LIBGAME_DIR = libgame
LIBGAME = $(LIBGAME_DIR)/libgame.a
+GAME_BD_DIR = game_bd
+GAME_BD = $(GAME_BD_DIR)/game_bd.a
+
GAME_EM_DIR = game_em
GAME_EM = $(GAME_EM_DIR)/game_em.a
GAME_MM_DIR = game_mm
GAME_MM = $(GAME_MM_DIR)/game_mm.a
-RNDLIBS = $(LIBGAME) $(GAME_EM) $(GAME_SP) $(GAME_MM)
+RNDLIBS = $(LIBGAME) $(GAME_BD) $(GAME_EM) $(GAME_SP) $(GAME_MM)
AUTOCONF = conf_gfx.h conf_snd.h conf_mus.h
ICONBASE = windows_icon
# build targets
# -----------------------------------------------------------------------------
-all: $(AUTOCONF) libgame_dir game_em_dir game_sp_dir game_mm_dir $(PROGNAME) graphics_dir
+all: $(AUTOCONF) libgame_dir game_bd_dir game_em_dir game_sp_dir game_mm_dir $(PROGNAME) graphics_dir
$(PROGNAME): $(RNDLIBS) $(TIMESTAMP_FILE) $(COMMIT_HASH_FILE) $(OBJS) $(ICON)
$(CC) $(OBJS) $(ICON) $(RNDLIBS) $(LDFLAGS) -o $(PROGNAME)
$(LIBGAME):
@$(MAKE) -C $(LIBGAME_DIR)
+game_bd_dir:
+ @$(MAKE) -C $(GAME_BD_DIR)
+$(GAME_BD):
+ @$(MAKE) -C $(GAME_BD_DIR)
+
game_em_dir:
@$(MAKE) -C $(GAME_EM_DIR)
$(GAME_EM):
clean-obj:
$(MAKE) -C $(LIBGAME_DIR) clean
+ $(MAKE) -C $(GAME_BD_DIR) clean
$(MAKE) -C $(GAME_EM_DIR) clean
$(MAKE) -C $(GAME_SP_DIR) clean
$(MAKE) -C $(GAME_MM_DIR) clean
# -----------------------------------------------------------------------------
tags:
- $(ETAGS) *.[ch] $(LIBGAME_DIR)/*.[ch] $(GAME_EM_DIR)/*.[ch] $(GAME_SP_DIR)/*.[ch] $(GAME_MM_DIR)/*.[ch]
+ $(ETAGS) *.[ch] $(LIBGAME_DIR)/*.[ch] $(GAME_BD_DIR)/*.[ch] $(GAME_EM_DIR)/*.[ch] $(GAME_SP_DIR)/*.[ch] $(GAME_MM_DIR)/*.[ch]
depend:
$(MAKE) -C $(LIBGAME_DIR) depend
+ $(MAKE) -C $(GAME_BD_DIR) depend
$(MAKE) -C $(GAME_EM_DIR) depend
$(MAKE) -C $(GAME_SP_DIR) depend
$(MAKE) -C $(GAME_MM_DIR) depend
#include "libgame/libgame.h"
+#include "game_bd/export.h"
#include "game_em/export.h"
#include "game_sp/export.h"
#include "game_mm/export.h"
#include "game.h"
+// ============================================================================
+// functions and definitions exported from main program to game_bd
+// ============================================================================
+
+
// ============================================================================
// functions and definitions exported from main program to game_em
// ============================================================================
setConfigToDefaultsFromConfigList(chunk_config_INFO);
*level = li; // copy temporary buffer back to level data
+ setLevelInfoToDefaults_BD();
setLevelInfoToDefaults_EM();
setLevelInfoToDefaults_SP();
setLevelInfoToDefaults_MM();
+ level->native_bd_level = &native_bd_level;
level->native_em_level = &native_em_level;
level->native_sp_level = &native_sp_level;
level->native_mm_level = &native_mm_level;
--- /dev/null
+# =============================================================================
+# Rocks'n'Diamonds - McDuffin Strikes Back!
+# -----------------------------------------------------------------------------
+# (c) 1995-2023 by Artsoft Entertainment
+# Holger Schemel
+# info@artsoft.org
+# https://www.artsoft.org/
+# -----------------------------------------------------------------------------
+# The native Boulder Dash game engine is based on:
+# - GDash by Czirkos Zoltan (2010)
+# -----------------------------------------------------------------------------
+# src/game_bd/Makefile
+# =============================================================================
+
+# -----------------------------------------------------------------------------
+# configuration
+# -----------------------------------------------------------------------------
+
+SRCS = bd_main.c
+
+OBJS = bd_main.o
+
+GAME_BD = game_bd.a
+
+
+# -----------------------------------------------------------------------------
+# build targets
+# -----------------------------------------------------------------------------
+
+all: $(GAME_BD)
+
+$(GAME_BD): $(OBJS)
+ $(AR) cr $(GAME_BD) $(OBJS)
+ $(RANLIB) $(GAME_BD)
+
+.c.o:
+ $(CC) $(PROFILING) $(CFLAGS) -c $*.c
+
+clean:
+ $(RM) $(OBJS)
+ $(RM) $(GAME_BD)
+
+
+# -----------------------------------------------------------------------------
+# development only
+# -----------------------------------------------------------------------------
+
+depend:
+ for i in $(SRCS); do $(CPP) $(CFLAGS) -M $$i; done > .depend
+
+ifeq (.depend,$(wildcard .depend))
+include .depend
+endif
--- /dev/null
+// ============================================================================
+// Mirror Magic -- McDuffin's Revenge
+// ----------------------------------------------------------------------------
+// (c) 1995-2023 by Artsoft Entertainment
+// Holger Schemel
+// info@artsoft.org
+// https://www.artsoft.org/
+// ----------------------------------------------------------------------------
+// bd_main.c
+// ============================================================================
+
+#include "main_bd.h"
+
+
+struct GameInfo_BD game_bd;
+struct LevelInfo_BD native_bd_level;
+struct EngineSnapshotInfo_BD engine_snapshot_bd;
+
+
+// ============================================================================
+// level file functions
+// ============================================================================
+
+void setLevelInfoToDefaults_BD(void)
+{
+ // ...
+}
--- /dev/null
+#ifndef GAME_BD_EXPORT_H
+#define GAME_BD_EXPORT_H
+
+// ============================================================================
+// functions and definitions exported from game_bd to main program
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// constant definitions
+// ----------------------------------------------------------------------------
+
+// ...
+
+
+// ----------------------------------------------------------------------------
+// data structure definitions
+// ----------------------------------------------------------------------------
+
+struct GameInfo_BD
+{
+};
+
+struct LevelInfo_BD
+{
+};
+
+struct EngineSnapshotInfo_BD
+{
+};
+
+
+// ----------------------------------------------------------------------------
+// exported functions
+// ----------------------------------------------------------------------------
+
+extern struct GameInfo_BD game_bd;
+extern struct LevelInfo_BD native_bd_level;
+extern struct EngineSnapshotInfo_BD engine_snapshot_bd;
+
+void setLevelInfoToDefaults_BD(void);
+
+#endif // GAME_BD_EXPORT_H
--- /dev/null
+// ============================================================================
+// Mirror Magic -- McDuffin's Revenge
+// ----------------------------------------------------------------------------
+// (c) 1995-2023 by Artsoft Entertainment
+// Holger Schemel
+// info@artsoft.org
+// https://www.artsoft.org/
+// ----------------------------------------------------------------------------
+// game_bd.h
+// ============================================================================
+
+#ifndef GAME_BD_H
+#define GAME_BD_H
+
+#define GAME_BD_VERSION_1_0_0
+
+#include "export.h"
+
+#endif // GAME_BD_H
--- /dev/null
+#ifndef MAIN_BD_H
+#define MAIN_BD_H
+
+// ============================================================================
+// external functions and definitions imported from main program to game_bd
+// ============================================================================
+
+#include "../engines.h"
+
+
+// ============================================================================
+// functions and definitions that are exported from game_bd to main program
+// ============================================================================
+
+#include "export.h"
+
+
+// ============================================================================
+// internal functions and definitions that are not exported to main program
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// constant definitions
+// ----------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------
+// data structure definitions
+// ----------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------
+// exported variables
+// ----------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------
+// exported functions
+// ----------------------------------------------------------------------------
+
+#endif // MAIN_BD_H
// values for game engine type identifier
#define GAME_ENGINE_TYPE_UNKNOWN LEVEL_FILE_TYPE_UNKNOWN
#define GAME_ENGINE_TYPE_RND LEVEL_FILE_TYPE_RND
+#define GAME_ENGINE_TYPE_BD LEVEL_FILE_TYPE_BD
#define GAME_ENGINE_TYPE_EM LEVEL_FILE_TYPE_EM
#define GAME_ENGINE_TYPE_SP LEVEL_FILE_TYPE_SP
#define GAME_ENGINE_TYPE_MM LEVEL_FILE_TYPE_MM
-#define NUM_ENGINE_TYPES 4
+#define NUM_ENGINE_TYPES 5
// values for automatically playing tapes
#define AUTOPLAY_NONE 0
int game_engine_type;
// level stored in native format for the alternative native game engines
+ struct LevelInfo_BD *native_bd_level;
struct LevelInfo_EM *native_em_level;
struct LevelInfo_SP *native_sp_level;
struct LevelInfo_MM *native_mm_level;