]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
ALG Mad Dog McCree v1C holster event special case
authorToni Wilen <twilen@winuae.net>
Sat, 27 Jan 2024 13:27:27 +0000 (15:27 +0200)
committerToni Wilen <twilen@winuae.net>
Sat, 27 Jan 2024 13:27:27 +0000 (15:27 +0200)
arcadia.cpp

index 9513f0eb91830e7322388f4b285d8679cfa6175f..a0f8b9ad80a051f0f77dfd21911840693babda75 100644 (file)
@@ -598,6 +598,7 @@ int log_ld;
 static uae_u8 algmemory[ALG_NVRAM_SIZE];
 static int algmemory_modified;
 static int algmemory_initialized;
+static int alg_game_id;
 
 static void alg_nvram_write (void)
 {
@@ -1025,6 +1026,19 @@ uae_u16 alg_joydat(int joy, uae_u16 v)
 }
 uae_u8 alg_joystick_buttons(uae_u8 pra, uae_u8 dra, uae_u8 v)
 {
+       if (alg_flag) {
+               int ply = alg_get_player(alg_potgo);
+       
+               if (alg_game_id == 175) {
+                       // Mad Dog McCree v1C Holster is fire button
+                       if ((alg_flag & 256) && ply == 0) {
+                               v &= ~0x40;
+                       }
+                       if ((alg_flag & 512) && ply == 1) {
+                               v &= ~0x80;
+                       }
+               }
+       }
        return v;
 }
 
@@ -1059,6 +1073,7 @@ void alg_map_banks(void)
        } else {
                map_banks(&alg_ram_bank, 0xf7, 1, 0);
        }
+       alg_game_id = rd->id;
        pausevideograb(1);
        ld_audio = 0;
        ld_mode = 0;