|
|
1.1 root 1: #ifndef _joystick_public
2: #define _joystick_public
3:
4: //***************************************************************************
5: //
6: // Public header for JOYSTICK.ASM.
7: //
8: //***************************************************************************
9:
10: extern byte Joy_xb;
11: extern byte Joy_yb;
12: extern byte Joy_xs;
13: extern byte Joy_ys;
14: extern word Joy_x;
15: extern word Joy_y;
16:
17: void JoyStick_Vals( void );
18: #ifdef __FLAT__
19: #pragma aux JoyStick_Vals modify exact [eax ebx ecx edx esi edi]
20: #else
21: #pragma aux JoyStick_Vals modify exact [ax bx cx dx si di]
22: #endif
23:
24: #define JOYSTICK_SetShift( x, y ) \
25: { \
26: Joy_x = 0; \
27: Joy_y = 0; \
28: Joy_xs = ( x ); \
29: Joy_ys = ( y ); \
30: Joy_xb = 1 << Joy_xs; \
31: Joy_yb = 1 << Joy_ys; \
32: }
33:
34: #define JOYSTICK_GetPos( x, y ) \
35: { \
36: JoyStick_Vals(); \
37: *( x ) = Joy_x; \
38: *( y ) = Joy_y; \
39: }
40:
41:
42: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.