X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_em%2Finput.c;h=f04718f7e4a5b19000c457551d1355ee342cd2ec;hb=73dd81c85be90e466493bcc6f45c402d29bc7f20;hp=a6ddcfab8bd49694846bc46ec6e9bf3703dce69f;hpb=c5321d9d36d0a74062651d0352fbbaccbe125eca;p=rocksndiamonds.git diff --git a/src/game_em/input.c b/src/game_em/input.c index a6ddcfab..f04718f7 100644 --- a/src/game_em/input.c +++ b/src/game_em/input.c @@ -24,6 +24,9 @@ unsigned short **Draw; static unsigned short *Index[4][HEIGHT]; static unsigned short Array[4][HEIGHT][WIDTH]; +extern unsigned int screen_x; +extern unsigned int screen_y; + void game_init_vars(void) { int x, y; @@ -86,6 +89,8 @@ void GameActions_EM(byte action) readjoy(action); + UpdateEngineValues(screen_x / TILEX, screen_y / TILEY); + if (frame == 7) { synchro_1(); @@ -124,6 +129,7 @@ void readjoy(byte action) if (action & JOY_BUTTON_1) fire = 1; +#if 1 ply1.joy_fire = fire; if (ply1.joy_stick || (north | east | south | west)) { @@ -132,4 +138,14 @@ void readjoy(byte action) ply1.joy_s = south; ply1.joy_w = west; } +#else + ply2.joy_fire = fire; + if (ply2.joy_stick || (north | east | south | west)) + { + ply2.joy_n = north; + ply2.joy_e = east; + ply2.joy_s = south; + ply2.joy_w = west; + } +#endif }