summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurice Henke <maurice@henke.gg>2021-08-12 19:52:22 +0200
committerMaurice Henke <maurice@henke.gg>2021-08-12 19:52:22 +0200
commit97b00de66c66b7a1432d8bf74d25773878d1273a (patch)
tree65ef72a75149dafeb5bf44a2aafa7ca083ee6557
parent36586d35e41f9f41daa5a948e5c9777c60600afc (diff)
custom magic byte for DZX replacement
-rw-r--r--GameCube/include/rando/data.h3
-rw-r--r--GameCube/source/rando/randomizer.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/GameCube/include/rando/data.h b/GameCube/include/rando/data.h
index cc050151..f8929001 100644
--- a/GameCube/include/rando/data.h
+++ b/GameCube/include/rando/data.h
@@ -60,7 +60,8 @@ namespace mod::rando
struct dzxCheck
{
uint16_t hash;
- uint16_t stageIDX;
+ uint8_t stageIDX;
+ uint8_t magicByte; // ignore this byte in data[]
uint8_t data[0x20];
} __attribute__( ( __packed__ ) );
diff --git a/GameCube/source/rando/randomizer.cpp b/GameCube/source/rando/randomizer.cpp
index bfdf33de..1e9f63f0 100644
--- a/GameCube/source/rando/randomizer.cpp
+++ b/GameCube/source/rando/randomizer.cpp
@@ -130,7 +130,7 @@ namespace mod::rando
// Fetch replacement byte
uint8_t newByte = dzxReplacements[j].data[b];
- if ( newByte != 0xFF )
+ if ( newByte != dzxReplacements[j].magicByte )
target[b] = newByte;
}
}