Improve LayerStruct

This commit is contained in:
octorock
2022-03-05 11:43:58 +01:00
parent d18fed1fb9
commit d6bbbf2db6
67 changed files with 720 additions and 1213 deletions
+2 -1
View File
@@ -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();
+4 -4
View File
@@ -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) {