X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_in.h;h=828cb5f8aaa8891694d24b92b4a7f218d1a4c622;hb=a565be31ce92d6168ae6983042da75b0b683e52b;hp=8978a759fe2ae585eda424ce377985147c47a335;hpb=f6d0f26f669392f2970eb91d744fb88651583cf3;p=16.git diff --git a/src/lib/16_in.h b/src/lib/16_in.h index 8978a759..828cb5f8 100755 --- a/src/lib/16_in.h +++ b/src/lib/16_in.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2019 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -33,8 +33,8 @@ #include #include "src/lib/16_head.h" #include "src/lib/16_timer.h" -#ifdef __WATCOMC__ //borland C BCEXMM.EXE #include "src/lib/16_dbg.h" +#ifdef __WATCOMC__ //borland C BCEXMM.EXE #include "src/lib/16_spri.h" #include "src/lib/16_enti.h" #endif @@ -138,13 +138,20 @@ #define key_LSuper 0x5b #define key_RSuper 0x5c #define key_Menu 0x5d +#define sc_LBrkt 0x1a // [ +#define sc_RBrkt 0x1b // ] +#define sc_BackSlash 0x2b // | +#define sc_ForeSlash 0x35 // / ? // Stuff for the mouse -#define MReset 0 +//moved to 16_tdef.h +/*#define MReset 0 #define MButtons 3 #define MDelta 11 -#define MouseInt 0x33 +#define MouseInt 0x33*/ +#define Mouse(x) _AX = x,geninterrupt(MouseInt) + #ifdef DEMO0 typedef enum { demo_Off,demo_Record,demo_Playback,demo_PlayDone @@ -213,36 +220,34 @@ typedef struct { #endif // Internal routines -extern void IN_Startup(void),IN_Shutdown(void), - IN_Default(boolean gotit,player_t *player,ControlType nt), +extern void IN_Startup(global_game_variables_t *gvar),IN_Shutdown(global_game_variables_t *gvar), + IN_Default(boolean gotit,player_t *player,ControlType nt, global_game_variables_t *gvar), IN_SetKeyHook(void (*)()), IN_ClearKeysDown(void), - IN_ReadCursor(CursorInfo *), - IN_ReadControl(player_t *player), + IN_ReadCursor(CursorInfo *, global_game_variables_t *gvar), + IN_ReadControl(player_t *player, global_game_variables_t *gvar), IN_SetControlType(player_t *player,ControlType type), IN_GetJoyAbs(word joy,word *xp,word *yp), IN_SetupJoy(word joy,word minx,word maxx, - word miny,word maxy), + word miny,word maxy, global_game_variables_t *gvar), #if DEMO0 IN_StopDemo(void),IN_FreeDemoBuffer(void), #endif - IN_Ack(void),IN_AckBack(void); -extern boolean IN_UserInput(word delay); + IN_Ack(global_game_variables_t *gvar),IN_AckBack(void); +extern boolean IN_UserInput(word delay, global_game_variables_t *gvar); extern char IN_WaitForASCII(void); extern ScanCode IN_WaitForKey(void); extern word IN_GetJoyButtonsDB(word joy); extern byte *IN_GetScanName(ScanCode); -byte IN_MouseButtons (void); +byte IN_MouseButtons (global_game_variables_t *gvar); byte IN_JoyButtons (void); -void INL_GetJoyDelta(word joy,int *dx,int *dy/*,boolean adaptive*/); -void IN_StartAck(void); -boolean IN_CheckAck (void); -boolean IN_IsUserInput(); -#define Mouse(x) INL_Mouse(x) -//void IN_SetKeyHook(void (*hook)()); +void INL_GetJoyDelta(word joy,int *dx,int *dy/*,boolean adaptive*/, global_game_variables_t *gvar); +void IN_StartAck(global_game_variables_t *gvar); +boolean IN_CheckAck (global_game_variables_t *gvar); +boolean IN_IsUserInput(global_game_variables_t *gvar); #if DEMO0 boolean IN_StartDemoRecord(word bufsize); void IN_StartDemoPlayback(byte *buffer,word bufsize); @@ -250,8 +255,8 @@ void IN_StopDemo(void); void IN_FreeDemoBuffer(void); #endif -boolean IN_KeyDown(byte code), - IN_qb(byte kee); +//boolean IN_KeyDown(byte code), +// IN_qb(byte kee); void IN_ClearKey(byte code), IN_KbdLED(); ScanCode IN_GetLastScan(),