1 // ============================================================================
2 // Rocks'n'Diamonds - McDuffin Strikes Back!
3 // ----------------------------------------------------------------------------
4 // (c) 1995-2024 by Artsoft Entertainment
7 // https://www.artsoft.org/
8 // ----------------------------------------------------------------------------
10 // ============================================================================
15 // ============================================================================
16 // functions and definitions exported from game_bd to main program
17 // ============================================================================
20 #include "bd_elements.h"
21 #include "bd_gameplay.h"
24 // ----------------------------------------------------------------------------
25 // constant definitions
26 // ----------------------------------------------------------------------------
28 #define BD_MAX_CAVE_WIDTH MAX_PLAYFIELD_WIDTH
29 #define BD_MAX_CAVE_HEIGHT MAX_PLAYFIELD_HEIGHT
32 // ----------------------------------------------------------------------------
33 // data structure definitions
34 // ----------------------------------------------------------------------------
40 unsigned int random_seed;
46 // needed for updating panel
48 int gems_still_needed;
60 boolean loaded_from_caveset;
70 struct EngineSnapshotInfo_BD
75 // ----------------------------------------------------------------------------
77 // ----------------------------------------------------------------------------
79 extern struct GameInfo_BD game_bd;
80 extern struct LevelInfo_BD native_bd_level;
81 extern struct GraphicInfo_BD graphic_info_bd_object[O_MAX_ALL][8];
82 extern struct GraphicInfo_BD graphic_info_bd_color_template;
83 extern struct EngineSnapshotInfo_BD engine_snapshot_bd;
85 void bd_open_all(void);
86 void bd_close_all(void);
88 int map_action_RND_to_BD(int);
89 int map_action_BD_to_RND(int);
91 boolean checkGameRunning_BD(void);
92 boolean checkGamePlaying_BD(void);
93 boolean checkBonusTime_BD(void);
94 int getFramesPerSecond_BD(void);
95 int getTimeLeft_BD(void);
97 void InitGfxBuffers_BD(void);
99 void setLevelInfoToDefaults_BD_Ext(int, int);
100 void setLevelInfoToDefaults_BD(void);
101 boolean LoadNativeLevel_BD(char *, int, boolean);
102 boolean SaveNativeLevel_BD(char *);
104 void PreparePreviewTileBitmap_BD(Bitmap *, int);
105 void SetPreviewTileBitmapReference_BD(Bitmap *);
106 Bitmap *GetPreviewTileBitmap_BD(Bitmap *);
108 unsigned int InitEngineRandom_BD(int);
109 void InitGameEngine_BD(void);
110 void GameActions_BD(byte[MAX_PLAYERS]);
111 void CoverScreen_BD(void);
113 void BlitScreenToBitmap_BD(Bitmap *);
114 void RedrawPlayfield_BD(boolean);
116 #endif // EXPORT_BD_H