#include "src/lib/nyan/kitten.h"\r
#include "src/lib/types.h"\r
#include "src/lib/typdefst.h"\r
+#include "src/lib/16_in.h"\r
\r
#define VERSION __DATE__ " " __TIME__\r
\r
if(inpu.Keyboard[kee]==true) return 1;\r
else return 0;\r
}\r
+\r
+//init player!\r
+void IN_initplayer(player_t *player, word pn)\r
+{\r
+ player[pn].x = player[pn].tx*TILEWH;\r
+ player[pn].y = player[pn].ty*TILEWH;\r
+ player[pn].triggerx = player[pn].tx;\r
+ player[pn].triggery = player[pn].ty+1;\r
+/* player[0].info.x = player[0].tx;\r
+ player[0].info.xaxis = player[0].tx*TILEWH;\r
+ player[0].info.y = player[0].ty;\r
+ player[0].info.yaxis = player[0].ty*TILEWH;*/\r
+ player[pn].q=1;\r
+ player[pn].d=2;\r
+ player[pn].hp=4;\r
+}\r
extern boolean IN_KeyDown(byte code);\r
extern void IN_ClearKey(byte code);\r
extern boolean IN_qb(byte kee);\r
+void IN_initplayer(player_t *player, word pn);\r
\r
#endif\r
//default player position on the viewable map
player[0].tx = bg->tx + bg->page->tilemidposscreenx;
player[0].ty = bg->ty + bg->page->tilemidposscreeny;
- player[0].x = player[0].tx*TILEWH;
- player[0].y = player[0].ty*TILEWH;
- player[0].triggerx = player[0].tx;
- player[0].triggery = player[0].ty+1;
-/* player[0].info.x = player[0].tx;
- player[0].info.xaxis = player[0].tx*TILEWH;
- player[0].info.y = player[0].ty;
- player[0].info.yaxis = player[0].ty*TILEWH;*/
- player[0].q=1;
- player[0].d=2;
- player[0].hp=4;
-// player[0].persist_aniframe=0;
+ IN_initplayer(&player, 0);
//npc
/*npc0.tx = bg->tx + 1;
npc0.ty = bg->ty + 1;