Rename world_index_ to main_gfx_id_

This commit is contained in:
scawful
2024-05-24 20:29:18 -04:00
parent 63b7e48950
commit cb309743ea
2 changed files with 8 additions and 8 deletions

View File

@@ -146,13 +146,13 @@ void OverworldMap::LoadAreaInfo() {
// ============================================================================
void OverworldMap::LoadWorldIndex() {
void OverworldMap::LoadMainBlocksetId() {
if (parent_ < 0x40) {
world_index_ = 0x20;
main_gfx_id_ = 0x20;
} else if (parent_ >= 0x40 && parent_ < 0x80) {
world_index_ = 0x21;
main_gfx_id_ = 0x21;
} else if (parent_ == 0x88) {
world_index_ = 0x24;
main_gfx_id_ = 0x24;
}
}
@@ -174,7 +174,7 @@ void OverworldMap::LoadSpritesBlocksets() {
void OverworldMap::LoadMainBlocksets() {
for (int i = 0; i < 8; i++) {
static_graphics_[i] = rom_[rom_.version_constants().kOverworldGfxGroups2 +
(world_index_ * 8) + i];
(main_gfx_id_ * 8) + i];
}
}
@@ -221,7 +221,7 @@ void OverworldMap::LoadDeathMountainGFX() {
}
void OverworldMap::LoadAreaGraphics() {
LoadWorldIndex();
LoadMainBlocksetId();
LoadSpritesBlocksets();
LoadMainBlocksets();
LoadAreaGraphicsBlocksets();

View File

@@ -103,7 +103,7 @@ class OverworldMap : public editor::context::GfxContext {
private:
void LoadAreaInfo();
void LoadWorldIndex();
void LoadMainBlocksetId();
void LoadSpritesBlocksets();
void LoadMainBlocksets();
void LoadAreaGraphicsBlocksets();
@@ -123,7 +123,7 @@ class OverworldMap : public editor::context::GfxContext {
int large_index_ = 0; // Quadrant ID [0-3]
int world_ = 0; // World ID [0-2]
int game_state_ = 0; // Game state [0-2]
int world_index_ = 0; // Spr Pal Modifier
int main_gfx_id_ = 0; // Spr Pal Modifier
uint16_t message_id_ = 0;
uint8_t area_graphics_ = 0;