X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_in.h;h=9e4bfc2e88ae047cf49024a4e5919e5818cc117a;hb=c11666ac6f605f561e9c6c6f2bba3bccea4a7b18;hp=9b2705859385605f403125987974f19bf8c860ae;hpb=58b13c9c330902a6171c65ce2b2af6bd48ba475d;p=16.git diff --git a/src/lib/16_in.h b/src/lib/16_in.h index 9b270585..9e4bfc2e 100755 --- a/src/lib/16_in.h +++ b/src/lib/16_in.h @@ -30,20 +30,13 @@ #include #include "src/lib/16_head.h" #include "src/lib/16_timer.h" -#include "src/lib/bitmap.h" -#include "src/lib/planar.h" - -#ifdef __DEBUG__ -//#define __DEBUG_InputMgr__ -#endif - -#ifdef __DEBUG_InputMgr__ -//#define TESTKEYIN -//#define TESTCONTROLNOISY +#ifdef __WATCOMC__ //borland C BCEXMM.EXE +#include "src/lib/16_dbg.h" +#include "src/lib/16_sprit.h" +#include "src/lib/16_enti.h" +//#include "src/lib/bitmap.h" //old format #endif -extern byte testkeyin,testcontrolnoisy,testctrltype; - //if else for gfxtesting and direction //player[pn].d == 2 || //player[pn].d != 2 || @@ -57,7 +50,7 @@ extern byte testkeyin,testcontrolnoisy,testctrltype; #define JoyScaleShift 8 #define MaxJoyValue 5000 -#define MaxPlayers 4 +#define MaxPlayers 2//futre plans for multiple playable charaters and being able to alternate #define MaxKbds 2 #define MaxJoys 2 #define MaxPads 2 @@ -169,8 +162,6 @@ typedef enum { ctrl_Joystick, ctrl_Joystick1 = ctrl_Joystick,ctrl_Joystick2, ctrl_Mouse, -// ctrl_Joypad, -// ctrl_Joypad1 = ctrl_Joypad,ctrl_Joypad2 } ControlType; typedef enum { motion_Left = -1,motion_Up = -1, @@ -211,10 +202,6 @@ typedef struct { joyMultXL,joyMultYL, joyMultXH,joyMultYH; } JoystickDef; -// typedef struct -// { -// boolean w; -// } JoypadDef; typedef struct { @@ -231,14 +218,21 @@ typedef struct byte near pdir; //previous direction~ //byte near kd[2]; //array of arrow key pressed word speed; //player speed! + word spt; //speed per tile //0000 planar_buf_t huge *data; //supposively the sprite sheet data // planar_buf_t data; //supposively the sprite sheet data ////0000---- - bitmap_t huge *data; //supposively the sprite sheet data +#ifdef __WATCOMC__ + struct sprite *spri; //supposively the sprite sheet data + memptr gr; + entity_t *ent; +#endif + bitmap_t *data; //supposively the sprite sheet data//old format sword hp; //hitpoints of the player int persist_aniframe; /* gonna be increased to 1 before being used, so 0 is ok for default */ CursorInfo info; ControlType Controls; + int dx, dy, delta; //TODO: what is this? ^^ } player_t; /* @@ -252,7 +246,6 @@ typedef struct { boolean MousePresent; boolean JoysPresent[MaxJoys]; - boolean JoyPadPresent[MaxPads]; boolean Keyboard[NumCodes]; boolean Paused; char LastASCII; @@ -260,7 +253,6 @@ typedef struct KeyboardDef KbdDefs[MaxKbds]; JoystickDef JoyDefs[MaxJoys]; - JoypadDef JoypadDefs[MaxPads]; } inpu;*/ #ifdef DEMO0 @@ -311,5 +303,6 @@ extern boolean IN_UserInput(dword delay,boolean clear); extern boolean IN_KeyDown(byte code); extern void IN_ClearKey(byte code); extern boolean IN_qb(byte kee); +void IN_initplayer(player_t *player, word pn); #endif