added support for object rendering wrap-around for BD level handling
authorHolger Schemel <info@artsoft.org>
Mon, 11 Mar 2024 08:10:39 +0000 (09:10 +0100)
committerHolger Schemel <info@artsoft.org>
Mon, 11 Mar 2024 08:12:47 +0000 (09:12 +0100)
src/files.c
src/main.h

index e6e2281694d66a945891aa0c3abcb3a55d2cf850..b5ac78f262ebe17e97bfd604d879abc8431c3df3 100644 (file)
@@ -321,6 +321,12 @@ static struct LevelFileConfigInfo chunk_config_INFO[] =
     &li.bd_line_shifting_borders,      FALSE
   },
 
+  {
+    -1,                                        -1,
+    TYPE_BOOLEAN,                      CONF_VALUE_8_BIT(21),
+    &li.bd_wraparound_objects,         FALSE
+  },
+
   {
     -1,                                        -1,
     -1,                                        -1,
@@ -3775,6 +3781,7 @@ static void CopyNativeLevel_RND_to_BD(struct LevelInfo *level)
   cave->diagonal_movements             = level->bd_diagonal_movements;
 
   cave->lineshift                      = level->bd_line_shifting_borders;
+  cave->wraparound_objects             = level->bd_wraparound_objects;
 
   strncpy(cave->name, level->name, sizeof(GdString));
   cave->name[sizeof(GdString) - 1] = '\0';
@@ -3813,6 +3820,7 @@ static void CopyNativeLevel_BD_to_RND(struct LevelInfo *level)
   level->bd_diagonal_movements         = cave->diagonal_movements;
 
   level->bd_line_shifting_borders      = cave->lineshift;
+  level->bd_wraparound_objects         = cave->wraparound_objects;
 
   char *cave_name = getStringPrint("%s / %d", cave->name, bd_level_nr + 1);
 
index fcdcaf2613ec4e2632a06a3d76684347b5420a18..65ee52c691956a94999fd671a8af6986af8769f6 100644 (file)
@@ -3487,6 +3487,7 @@ struct LevelInfo
   int bd_scheduling_type;              // BD engine scheduling type
   boolean bd_pal_timing;               // BD engine uses special PAL timing
   boolean bd_line_shifting_borders;    // BD engine uses line-shifting wrap-around
+  boolean bd_wraparound_objects;       // BD cave object rendering uses wrap-around
   boolean bd_intermission;             // BD level is intermission
   boolean bd_diagonal_movements;       // BD style diagonal movements
   boolean em_slippery_gems;            // EM style "gems slip from wall" behaviour