X-Git-Url: http://4ch.mooo.com/gitweb/?p=16.git;a=blobdiff_plain;f=src%2Flib%2F16_in.h;h=97a560d0e998168a09c4a2d9b88aedb62ff83618;hp=86980fe8b4aa51d6c32225d0a7b382d12bcb4ff5;hb=af2715fef8681d909afe82f7baaf5e13baabb76f;hpb=cbd1a853acf0cd2feb3cf359b98d80694dec7ca9 diff --git a/src/lib/16_in.h b/src/lib/16_in.h index 86980fe8..97a560d0 100755 --- a/src/lib/16_in.h +++ b/src/lib/16_in.h @@ -1,21 +1,24 @@ -/* Catacomb Apocalypse Source Code - * Copyright (C) 1993-2014 Flat Rock Software +/* Project 16 Source Code~ + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * - * This program is free software; you can redistribute it and/or modify + * This file is part of Project 16. + * + * Project 16 is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * Project 16 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * */ - // // ID Engine // ID_IN.h - Header file for Input Manager @@ -30,19 +33,12 @@ #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" -//#include "src/lib/bitmap.h" //old format #endif -//if else for gfxtesting and direction -//player[pn].d == 2 || -//player[pn].d != 2 || -#define DIRECTIONIFELSE (player[pn].info.dir == 2) -//#define NDIRECTIONIFELSE (player[pn].info.dir != 2) - #define KeyInt 9 // The keyboard ISR number // Stuff for the joystick @@ -53,7 +49,6 @@ //#define MaxPlayers 2//future plans for multiple playable charaters and being able to alternate #define MaxKbds 2 #define MaxJoys 2 -#define MaxPads 2 #define NumCodes 128 //typedef byte ScanCode; @@ -218,48 +213,48 @@ typedef struct { #endif // Internal routines -void interrupt INL_KeyService(); -void Mouse(int x); -//static void INL_GetMouseDelta(int *x,int *y); -//static word INL_GetMouseButtons(void); -void IN_GetJoyAbs(word joy,word *xp,word *yp); -//static void INL_GetJoyDelta(word joy,int *dx,int *dy,boolean adaptive); -//static word INL_GetJoyButtons(word joy); -word IN_GetJoyButtonsDB(word joy); -//static void INL_StartKbd(void); -//static void INL_ShutKbd(void); -//static boolean INL_StartMouse(void); -//static void INL_ShutMouse(void); -//static void INL_SetJoyScale(word joy); -void IN_SetupJoy(word joy,word minx,word maxx,word miny,word maxy); -//static boolean INL_StartJoy(word joy); -//static void INL_ShutJoy(word joy); -void IN_Startup(); -void IN_Default(boolean gotit,player_t *player,ControlType nt); -void IN_Shutdown(); -void IN_SetKeyHook(void (*hook)()); -void IN_ClearKeysDown(); -//static void INL_AdjustCursor(CursorInfo *info,word buttons,int dx,int dy); -void IN_ReadCursor(CursorInfo *info); -void near IN_ReadControl(word pn, player_t *player); -void IN_SetControlType(word pn,player_t *player,ControlType type); +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 *, 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, global_game_variables_t *gvar), +#if DEMO0 + IN_StopDemo(void),IN_FreeDemoBuffer(void), +#endif + 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 (global_game_variables_t *gvar); +byte IN_JoyButtons (void); + +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); +#define Mouse(x) INL_Mouse(x) +//void IN_SetKeyHook(void (*hook)()); #if DEMO0 boolean IN_StartDemoRecord(word bufsize); -void IN_StartDemoPlayback(byte /*__segment*/ *buffer,word bufsize); +void IN_StartDemoPlayback(byte *buffer,word bufsize); void IN_StopDemo(void); void IN_FreeDemoBuffer(void); #endif -byte *IN_GetScanName(ScanCode scan); -ScanCode IN_WaitForKey(); -char IN_WaitForASCII(); -void IN_AckBack(); -void IN_Ack(); -boolean IN_IsUserInput(); -boolean IN_UserInput(dword delay,boolean clear); -boolean IN_KeyDown(byte code); -void IN_ClearKey(byte code); -boolean IN_qb(byte kee); -ScanCode IN_GetLastScan(); -ScanCode IN_GetCurCode(); + +boolean IN_KeyDown(byte code), + IN_qb(byte kee); +void IN_ClearKey(byte code), + IN_KbdLED(); +ScanCode IN_GetLastScan(), + IN_GetCurCode(); #endif