From: sparky4 Date: Wed, 23 Sep 2015 14:27:43 +0000 (-0500) Subject: mad emore near stuff wwww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=b21fed9969cd357cd0aff8040453aa0677592de0;p=16.git mad emore near stuff wwww modified: 16.exe modified: inputest.exe modified: scroll.exe modified: src/lib/16_in.c modified: src/lib/16_in.h modified: vgmtest.exe --- diff --git a/16.exe b/16.exe index e5e5841b..4805389c 100755 Binary files a/16.exe and b/16.exe differ diff --git a/inputest.exe b/inputest.exe index 7f1a8b78..856ded19 100755 Binary files a/inputest.exe and b/inputest.exe differ diff --git a/scroll.exe b/scroll.exe index f1a52097..5c55fdb7 100755 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/lib/16_in.c b/src/lib/16_in.c index f07a694f..00fe3f1e 100755 --- a/src/lib/16_in.c +++ b/src/lib/16_in.c @@ -149,12 +149,12 @@ static byte far ASCIINames[] = // Unshifted ASCII for scan codes static Direction DirTable[] = // Quick lookup for total direction { - //dir_Nortinest, - dir_North, + //dir_Nortinest, + dir_North, dir_West, - dir_None, - dir_East, - dir_South + dir_None, + dir_East, + dir_South //dir_NorthEast, //dir_Soutinest, //,dir_SouthEast @@ -797,21 +797,21 @@ IN_ReadCursor(CursorInfo *info) // player and fills in the control info struct // /////////////////////////////////////////////////////////////////////////// -void +void near IN_ReadControl(int playnum,player_t *player) -{ +{ boolean realdelta; byte dbyte; word buttons; int dx,dy; Motion mx,my; - ControlType type; + ControlType type; sword conpee; register KeyboardDef *def; dx = dy = 0; mx = my = motion_None; - buttons = 0; + buttons = 0; #if DEMO0 if (DemoMode == demo_Playback) @@ -849,16 +849,16 @@ register KeyboardDef *def; mx = motion_Left,my = motion_Down; else if (Keyboard[def->downright]) mx = motion_Right,my = motion_Down;*/ - if(!inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]){ + if(!inpu.Keyboard[def->left] && !inpu.Keyboard[def->right]){ if((inpu.Keyboard[def->up] && !inpu.Keyboard[def->down] && player[playnum].d == 2))// || player[playnum].info.dir == 0) - my = motion_Up; + my = motion_Up; if((inpu.Keyboard[def->down] && !inpu.Keyboard[def->up] && player[playnum].d == 2))// || player[playnum].info.dir == 4) - my = motion_Down; + my = motion_Down; }else if(!inpu.Keyboard[def->up] && !inpu.Keyboard[def->down]){ if((inpu.Keyboard[def->left] && !inpu.Keyboard[def->right] && player[playnum].d == 2))// || player[playnum].info.dir == 1) - mx = motion_Left; + mx = motion_Left; if((inpu.Keyboard[def->right] && !inpu.Keyboard[def->left] && player[playnum].d == 2))// || player[playnum].info.dir == 3) - mx = motion_Right; + mx = motion_Right; } if (inpu.Keyboard[def->button0]) buttons += 1 << 0; @@ -896,7 +896,7 @@ register KeyboardDef *def; dx = mx;// * 127; dy = my;// * 127; } - + player[playnum].info.x = dx; player[playnum].info.xaxis = mx; player[playnum].info.y = dy; @@ -905,14 +905,14 @@ register KeyboardDef *def; player[playnum].info.button1 = buttons & (1 << 1); player[playnum].info.button2 = buttons & (1 << 2); player[playnum].info.button3 = buttons & (1 << 3); -// player[playnum].info.dir = DirTable[((my + 1) * 3) + (mx + 1)]; - conpee=(((my + 1) * 2) + (mx + 1)); - if(conpee) conpee--; - player[playnum].info.dir = DirTable[conpee]; - if(player[playnum].q==1 && (mx!=motion_None || my!=motion_None)) - { - player[playnum].d = player[playnum].info.dir; - } +// player[playnum].info.dir = DirTable[((my + 1) * 3) + (mx + 1)]; + conpee=(((my + 1) * 2) + (mx + 1)); + if(conpee) conpee--; + player[playnum].info.dir = DirTable[conpee]; + if(player[playnum].q==1 && (mx!=motion_None || my!=motion_None)) + { + player[playnum].d = player[playnum].info.dir; + } #if DEMO0 if (DemoMode == demo_Record) @@ -939,12 +939,12 @@ register KeyboardDef *def; } } #endif -#ifdef TESTCONTROLNOISY -if((inpu.Keyboard[def->up] || inpu.Keyboard[def->down] || inpu.Keyboard[def->left] || inpu.Keyboard[def->right])&& player[playnum].info.dir!=2) -{ - printf("(mx)=%d ", mx); - printf("(my)=%d ", my); - printf("dir=%d\n", player[playnum].info.dir); +#ifdef TESTCONTROLNOISY +if((inpu.Keyboard[def->up] || inpu.Keyboard[def->down] || inpu.Keyboard[def->left] || inpu.Keyboard[def->right])&& player[playnum].info.dir!=2) +{ + printf("(mx)=%d ", mx); + printf("(my)=%d ", my); + printf("dir=%d\n", player[playnum].info.dir); } #endif } @@ -1209,9 +1209,9 @@ void IN_ClearKey(byte code) } boolean IN_qb(byte kee) -{ +{ #ifdef TESTKEYIN - printf("%u\n", inpu.Keyboard[kee]); + printf("%u\n", inpu.Keyboard[kee]); #endif if(inpu.Keyboard[kee]==true) return 1; else return 0; diff --git a/src/lib/16_in.h b/src/lib/16_in.h index eecfae59..6cdf2514 100755 --- a/src/lib/16_in.h +++ b/src/lib/16_in.h @@ -28,7 +28,7 @@ #define __16_IN__ #include -#include "src/lib/16_head.h" +#include "src/lib/16_head.h" #include "src/lib/bitmap.h" #ifdef __DEBUG__ @@ -175,14 +175,14 @@ typedef enum { dir_South,//dir_Soutinest, } Direction; typedef struct { - boolean button0,button1,button2,button3; - int x,y; - Motion xaxis,yaxis; - Direction dir; + boolean near button0,button1,button2,button3; + int near x,y; + Motion near xaxis,yaxis; + Direction near dir; } CursorInfo; typedef struct { - ScanCode button0,button1, + ScanCode near button0,button1, //upleft, up, down, @@ -194,7 +194,7 @@ typedef struct { ; } KeyboardDef; typedef struct { - word joyMinX,joyMinY, + word near joyMinX,joyMinY, threshMinX,threshMinY, threshMaxX,threshMaxY, joyMaxX,joyMaxY, @@ -215,15 +215,15 @@ typedef struct int triggerx; //player's trigger box tile position on the viewable map 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 + int sheetsety; //NOT USED YET! player sprite sheet set on the image y word d; //direction!! wwww - word q; //loop variable + word q; //loop variable word speed; //player speed! bitmap_t data; //supposively the sprite sheet data - sword hp; //hitpoints of the player + 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; + ControlType Controls; } player_t; /* @@ -280,7 +280,7 @@ 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 IN_ReadControl(int playnum,player_t *player); +extern void near IN_ReadControl(int playnum,player_t *player); extern void IN_SetControlType(word playnum,player_t *player,ControlType type); #if DEMO0 extern boolean IN_StartDemoRecord(word bufsize); diff --git a/vgmtest.exe b/vgmtest.exe index e2a95e6c..86024fd9 100755 Binary files a/vgmtest.exe and b/vgmtest.exe differ