~ubuntu-branches/ubuntu/lucid/biniax2/lucid

« back to all changes in this revision

Viewing changes to desktop/inp.h

  • Committer: Bazaar Package Importer
  • Author(s): Miriam Ruiz
  • Date: 2008-04-10 11:12:15 UTC
  • Revision ID: james.westby@ubuntu.com-20080410111215-g7iyqnk6kgbxhuw9
Tags: upstream-0.0.20080409
ImportĀ upstreamĀ versionĀ 0.0.20080409

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************************************
 
2
BINIAX INPUT-RELATED DEFINITIONS
 
3
COPYRIGHT JORDAN TUZSUZOV, (C) 2005-2007
 
4
 
 
5
  This software is provided 'as-is', without any express or implied
 
6
  warranty.  In no event will the authors be held liable for any damages
 
7
  arising from the use of this software.
 
8
 
 
9
  Permission is granted to anyone to use this software for any purpose,
 
10
  including commercial applications, and to alter it and redistribute it
 
11
  freely, subject to the following restrictions:
 
12
 
 
13
  1. The origin of this software must not be misrepresented; you must not
 
14
     claim that you wrote the original software. If you use this software
 
15
     in a product, an acknowledgment in the product documentation would be
 
16
     appreciated but is not required.
 
17
  2. Altered source versions must be plainly marked as such, and must not be
 
18
     misrepresented as being the original software.
 
19
  3. This notice may not be removed or altered from any source distribution.
 
20
 
 
21
LICENSE ORIGIN : http://www.gzip.org/zlib/zlib_license.html
 
22
 
 
23
For complete product license refer to LICENSE.TXT file
 
24
 
 
25
******************************************************************************/
 
26
 
 
27
#ifndef _BNX_INP_H
 
28
#define _BNX_INP_H
 
29
 
 
30
/******************************************************************************
 
31
INCLUDES
 
32
******************************************************************************/
 
33
 
 
34
#include "inc.h"
 
35
 
 
36
#define cInpKeyEnter            SDLK_RETURN
 
37
#define cInpKeyBackspace        SDLK_BACKSPACE
 
38
 
 
39
/******************************************************************************
 
40
LOCAL INPUT DATA (KEY FLAGS, POINTERS, ETC.)
 
41
******************************************************************************/
 
42
 
 
43
typedef struct BNX_INP
 
44
{
 
45
 
 
46
        BNX_BOOL        keyUp;
 
47
        BNX_BOOL        keyDown;
 
48
        BNX_BOOL        keyLeft;
 
49
        BNX_BOOL        keyRight;
 
50
        BNX_BOOL        keyAltUp;
 
51
        BNX_BOOL        keyAltDown;
 
52
        BNX_BOOL        keyAltLeft;
 
53
        BNX_BOOL        keyAltRight;
 
54
        BNX_BOOL        keyPageUp;
 
55
        BNX_BOOL        keyPageDown;
 
56
        BNX_BOOL        keyA;
 
57
        BNX_BOOL        keyB;
 
58
        BNX_BOOL        keyC;
 
59
        BNX_BOOL        keyQuit;
 
60
        BNX_BOOL        keyDel;
 
61
        char            letter;
 
62
 
 
63
        BNX_UINT32      moment;
 
64
 
 
65
} BNX_INP;
 
66
 
 
67
BNX_INP _Inp;
 
68
 
 
69
/******************************************************************************
 
70
FUNCTIONS
 
71
******************************************************************************/
 
72
 
 
73
BNX_BOOL inpInit();
 
74
 
 
75
void inpUpdate();
 
76
 
 
77
BNX_BOOL inpKeyLeft();
 
78
BNX_BOOL inpKeyRight();
 
79
BNX_BOOL inpKeyUp();
 
80
BNX_BOOL inpKeyDown();
 
81
BNX_BOOL inpKeyAltLeft();
 
82
BNX_BOOL inpKeyAltRight();
 
83
BNX_BOOL inpKeyAltUp();
 
84
BNX_BOOL inpKeyAltDown();
 
85
BNX_BOOL inpKeyPageUp();
 
86
BNX_BOOL inpKeyPageDown();
 
87
BNX_BOOL inpKeyA();
 
88
BNX_BOOL inpKeyB();
 
89
BNX_BOOL inpKeyC();
 
90
BNX_BOOL inpKeyDel();
 
91
BNX_BOOL inpExit();
 
92
 
 
93
char inpGetChar();
 
94
 
 
95
BNX_INP *inpDirect();
 
96
 
 
97
 
 
98
#endif