• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

wwww


Commit MetaInfo

Revision5cae3e118cd55278d286cac524d30e36f9df88a4 (tree)
Time2016-03-13 14:17:26
Authorsparky4 <sparky4@cock...>
Commitersparky4

Log Message

pdir printf(%c%d %c%d %c%d %c%dn, dirchar(0), inpu.Keyboard[def->up], dirchar(4), inpu.Keyboard[def->down], dirchar(1), inpu.Keyboard[def->left], dirchar(3), inpu.Keyboard[def->right]);

Change Summary

Incremental Difference

--- a/src/lib/16_head.c
+++ b/src/lib/16_head.c
@@ -157,3 +157,27 @@ US_CheckParm(char *parm,char **strings)
157157
158158 exit(exit_code);
159159 }*/
160+
161+byte dirchar(byte in)
162+{
163+ byte out;
164+ switch(in)
165+ {
166+ case 0: //up
167+ out = 0x1E;
168+ break;
169+ case 4: //down
170+ out = 0x1F;
171+ break;
172+ case 1: //left
173+ out = 0x11;
174+ break;
175+ case 3: //right
176+ out = 0x10;
177+ break;
178+ default: //null
179+ out = 0xB3;
180+ break;
181+ }
182+ return out;
183+}
--- a/src/lib/16_head.h
+++ b/src/lib/16_head.h
@@ -178,5 +178,6 @@ void wait(clock_t wait);
178178 long int filesize(FILE *fp);
179179 void printmeminfoline(byte *strc, const byte *pee, size_t h_total, size_t h_used, size_t h_free);
180180 int US_CheckParm(char *parm,char **strings);
181+byte dirchar(byte in);
181182
182183 #endif/*_LIBHEAD_H_*/
--- a/src/lib/16_in.c
+++ b/src/lib/16_in.c
@@ -919,7 +919,7 @@ register KeyboardDef *def;
919919 player[pn].info.dir = DirTable[conpee];
920920
921921 //TODO: overwriting direction must be added
922- if(DIRECTIONIFELSEGFXTEST) player[pn].pdir=DirTable[conpee];
922+ if(player[pn].d==2) player[pn].pdir=DirTable[conpee];
923923 if(player[pn].q==1 && (mx!=motion_None || my!=motion_None))
924924 {
925925 player[pn].d = player[pn].info.dir;
@@ -952,13 +952,14 @@ register KeyboardDef *def;
952952 #endif
953953 //#ifdef TESTCONTROLNOISY
954954 if(testcontrolnoisy > 0)
955-//if((inpu.Keyboard[def->up] || inpu.Keyboard[def->down] || inpu.Keyboard[def->left] || inpu.Keyboard[def->right]) && NDIRECTIONIFELSEGFXTEST)
955+if((inpu.Keyboard[def->up] || inpu.Keyboard[def->down] || inpu.Keyboard[def->left] || inpu.Keyboard[def->right]) || player[pn].q>1)
956956 {
957957 printf("q=%d ", player[pn].q);
958- printf("cpee=%d ", conpee);
959- printf("(mx)=%d ", mx);
960- printf("(my)=%d ", my);
961- printf("pdir=%d d=%d dir=%d\n", player[pn].pdir, player[pn].d, player[pn].info.dir);
958+ printf("cpee=%c ", dirchar(conpee));
959+ //printf("(mx)=%d ", mx);
960+ //printf("(my)=%d ", my);
961+ printf("pdir=%c d=%c dir=%c", dirchar(player[pn].pdir), dirchar(player[pn].d), dirchar(player[pn].info.dir));
962+ printf("%c%d %c%d %c%d %c%d\n", dirchar(0), inpu.Keyboard[def->up], dirchar(4), inpu.Keyboard[def->down], dirchar(1), inpu.Keyboard[def->left], dirchar(3), inpu.Keyboard[def->right]);
962963 }
963964 //#endif
964965 }
--- a/src/lib/16_in.h
+++ b/src/lib/16_in.h
@@ -46,8 +46,9 @@ extern byte testkeyin,testcontrolnoisy;
4646
4747 //if else for gfxtesting and direction
4848 //player[pn].d == 2 ||
49+//player[pn].d != 2 ||
4950 #define DIRECTIONIFELSEGFXTEST (player[pn].info.dir == 2)
50-//#define NDIRECTIONIFELSEGFXTEST (player[pn].d != 2 || player[pn].info.dir != 2)
51+#define NDIRECTIONIFELSEGFXTEST (player[pn].info.dir != 2)
5152
5253 #define KeyInt 9 // The keyboard ISR number
5354