diff options
| author | octorock <79596758+octorock@users.noreply.github.com> | 2022-03-05 11:43:58 +0100 |
|---|---|---|
| committer | octorock <79596758+octorock@users.noreply.github.com> | 2022-03-05 19:09:49 +0100 |
| commit | d6bbbf2db6bd078a887138506bec5abcc36b3020 (patch) | |
| tree | ed21da6d5dcf2db20e4022830903b5ba19443c87 /src/manager | |
| parent | d18fed1fb9d52eb8c4be311d3c55bf4d29893d93 (diff) | |
Improve LayerStruct
Diffstat (limited to 'src/manager')
| -rw-r--r-- | src/manager/manager22.c | 3 | ||||
| -rw-r--r-- | src/manager/manager29.c | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/manager/manager22.c b/src/manager/manager22.c index a8bb0794..3bcefffb 100644 --- a/src/manager/manager22.c +++ b/src/manager/manager22.c @@ -8,6 +8,7 @@ #include "coord.h" #include "functions.h" #include "common.h" +#include "game.h" typedef struct { Manager manager; @@ -40,7 +41,7 @@ void Manager22_Main(Manager22* this) { sub_0801E120(); sub_0801E154(this->manager.unk_0e); } - if (gMain.substate == 2) { + if (gMain.substate == GAMEMAIN_UPDATE) { gScreen.lcd.displayControl |= DISPCNT_BG3_ON; sub_0805BA78(); sub_0805BAD4(); diff --git a/src/manager/manager29.c b/src/manager/manager29.c index fef0953c..010fb3ad 100644 --- a/src/manager/manager29.c +++ b/src/manager/manager29.c @@ -38,15 +38,15 @@ void Manager29_Main(Manager29* this) { } void sub_0805CBD0(Manager29* this) { - LayerStruct* puVar2; + LayerStruct* layer; this->manager.action = 1; this->unk_38 = (this->unk_38 >> 4 & 0x3fU) | (((this->unk_3a << 0x10) >> 0x14 & 0x3fU) << 6); this->unk_3a = (this->unk_3c >> 4 & 0x3f) | (((this->unk_36 + this->unk_37 * 0x100) >> 4 & 0x3fU) << 6); this->unk_3c = GetTileType(this->unk_38, this->unk_34); - puVar2 = GetLayerByIndex(this->unk_34); - this->unk_28 = puVar2->_5004; - this->unk_2c = &puVar2->_4[(s16)this->unk_3a]; + layer = GetLayerByIndex(this->unk_34); + this->unk_28 = (u16*)layer->metatileTypes; + this->unk_2c = &layer->mapData[(s16)this->unk_3a]; } void sub_0805CC3C(Manager29* this) { |
