mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-23 06:34:18 -04:00
Merge pull request #121 from Cuyler36/m_scene_ftr
Implement & link m_scene_ftr.c
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#include "m_scene_ftr.h"
|
||||
|
||||
#include "m_scene.h"
|
||||
#include "m_play.h"
|
||||
|
||||
static void mScn_KeepMyRoomBankNew(Object_Exchange_c* exchange, s16 bank_id, size_t size) {
|
||||
Object_Bank_c* bank = exchange->banks + exchange->bank_idx;
|
||||
|
||||
bank->bank_id = bank_id;
|
||||
bank->dma_start = exchange->next_bank_ram_address;
|
||||
bank->ram_start = exchange->next_bank_ram_address;
|
||||
bank->size = size;
|
||||
|
||||
if (exchange->bank_idx < (mSc_OBJECT_BANK_NUM - 1)) {
|
||||
exchange->next_bank_ram_address = (char*)ALIGN_NEXT((u32)exchange->next_bank_ram_address + size, 16);
|
||||
exchange->bank_idx++;
|
||||
}
|
||||
}
|
||||
|
||||
static void mScn_ObtainCarpetBank(GAME_PLAY* play) {
|
||||
Object_Exchange_c* exchange = &play->object_exchange;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
mScn_KeepMyRoomBankNew(exchange, 18, 0x2020); // carpet tex + pal
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
mScn_KeepMyRoomBankNew(exchange, 19, 0x1020); // wall tex + pal
|
||||
}
|
||||
}
|
||||
|
||||
extern void mScn_ObtainMyRoomBank(GAME_PLAY* play) {
|
||||
mScn_ObtainCarpetBank(play);
|
||||
}
|
||||
Reference in New Issue
Block a user