X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_in.h;h=78ebd8053db4bec143f7dc2995773c0712fd92db;hb=734addea4c40d2e7fb6470bdf51ce96343a25e59;hp=d910f3ecfcbb8fea5ed5500d373f7a3d338f8805;hpb=1170e45860266537729a5a54eaafdf50511f5315;p=16.git diff --git a/src/lib/16_in.h b/src/lib/16_in.h index d910f3ec..78ebd805 100755 --- a/src/lib/16_in.h +++ b/src/lib/16_in.h @@ -29,7 +29,7 @@ #include #include "src/lib/16_head.h" -#include "src/lib/timer.h" +#include "src/lib/16_timer.h" #include "src/lib/bitmap.h" #include "src/lib/planar.h" @@ -42,7 +42,13 @@ //#define TESTCONTROLNOISY #endif -static word testkeyin,testcontrolnoisy; +extern boolean testkeyin,testcontrolnoisy,testctrltype; + +//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 @@ -163,8 +169,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, @@ -205,10 +209,6 @@ typedef struct { joyMultXL,joyMultYL, joyMultXH,joyMultYH; } JoystickDef; -typedef struct -{ - boolean w; -} JoypadDef; typedef struct { @@ -220,11 +220,15 @@ typedef struct int triggery; //player's trigger box tile position on the viewable map int sheetsetx; //NOT USED YET! player sprite sheet set on the image x int sheetsety; //NOT USED YET! player sprite sheet set on the image y - word d; //direction!! wwww - word q; //loop variable + byte d; //direction to render sprite!! wwww + byte q; //loop variable for anumation and locking the playing to compleate the animation cycle to prevent issues with misalignment www + byte near pdir; //previous direction~ + //byte near kd[2]; //array of arrow key pressed word speed; //player speed! +//0000 planar_buf_t huge *data; //supposively the sprite sheet data // planar_buf_t data; //supposively the sprite sheet data -// bitmap_t data; //supposively the sprite sheet data +////0000---- + bitmap_t huge *data; //supposively the sprite sheet data 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; @@ -242,7 +246,6 @@ typedef struct { boolean MousePresent; boolean JoysPresent[MaxJoys]; - boolean JoyPadPresent[MaxPads]; boolean Keyboard[NumCodes]; boolean Paused; char LastASCII; @@ -250,7 +253,6 @@ typedef struct KeyboardDef KbdDefs[MaxKbds]; JoystickDef JoyDefs[MaxJoys]; - JoypadDef JoypadDefs[MaxPads]; } inpu;*/ #ifdef DEMO0 @@ -283,8 +285,8 @@ extern void IN_SetKeyHook(void (*hook)()); extern void IN_ClearKeysDown(); //static void INL_AdjustCursor(CursorInfo *info,word buttons,int dx,int dy); extern void IN_ReadCursor(CursorInfo *info); -extern void near IN_ReadControl(int playnum,player_t *player); -extern void IN_SetControlType(word playnum,player_t *player,ControlType type); +extern void near IN_ReadControl(int pn,player_t *player); +extern void IN_SetControlType(word pn,player_t *player,ControlType type); #if DEMO0 extern boolean IN_StartDemoRecord(word bufsize); extern void IN_StartDemoPlayback(byte /*__segment*/ *buffer,word bufsize); @@ -301,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