X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_bd%2Fmain_bd.c;h=1bf30fcafaedd8fc5c4d1f64fe9d47f4d98c0302;hb=08097448ca93da43b5f12df9fd180c2375eb6018;hp=f76098910fffb1a92ca161d57744121202e2f047;hpb=cf2fb7f9f4ca20097ab96b40ddf0bee0a0f462e5;p=rocksndiamonds.git diff --git a/src/game_bd/main_bd.c b/src/game_bd/main_bd.c index f7609891..1bf30fca 100644 --- a/src/game_bd/main_bd.c +++ b/src/game_bd/main_bd.c @@ -1,10 +1,10 @@ // ============================================================================ -// Mirror Magic -- McDuffin's Revenge +// Rocks'n'Diamonds - McDuffin Strikes Back! // ---------------------------------------------------------------------------- -// (c) 1995-2023 by Artsoft Entertainment -// Holger Schemel -// info@artsoft.org -// https://www.artsoft.org/ +// (c) 1995-2024 by Artsoft Entertainment +// Holger Schemel +// info@artsoft.org +// https://www.artsoft.org/ // ---------------------------------------------------------------------------- // main_bd.c // ============================================================================ @@ -21,7 +21,30 @@ struct EngineSnapshotInfo_BD engine_snapshot_bd; // level file functions // ============================================================================ -void setLevelInfoToDefaults_BD(void) +int map_action_BD_to_RND(int action) +{ + GdDirection player_move = action & GD_REPLAY_MOVE_MASK; + boolean player_fire = action & GD_REPLAY_FIRE_MASK; + + int action_move = (player_move == GD_MV_UP ? JOY_UP : + player_move == GD_MV_UP_RIGHT ? JOY_UP | JOY_RIGHT : + player_move == GD_MV_RIGHT ? JOY_RIGHT : + player_move == GD_MV_DOWN_RIGHT ? JOY_DOWN | JOY_RIGHT : + player_move == GD_MV_DOWN ? JOY_DOWN : + player_move == GD_MV_DOWN_LEFT ? JOY_DOWN | JOY_LEFT : + player_move == GD_MV_LEFT ? JOY_LEFT : + player_move == GD_MV_UP_LEFT ? JOY_UP | JOY_LEFT : JOY_NO_ACTION); + int action_fire = (player_fire ? JOY_BUTTON_1 : JOY_NO_ACTION); + + return (action_move | action_fire); +} + +void setLevelInfoToDefaults_BD_Ext(int width, int height) { // ... } + +void setLevelInfoToDefaults_BD(void) +{ + setLevelInfoToDefaults_BD_Ext(0, 0); +}