Begin LoadSprites, LoadChests, housekeeping

This commit is contained in:
scawful
2023-06-25 10:08:01 -04:00
parent 7d1dad3975
commit 3ada9988aa
18 changed files with 301 additions and 210 deletions

View File

@@ -4,8 +4,8 @@
#include "app/gfx/bitmap.h"
#include "app/gfx/snes_palette.h"
#include "app/gfx/snes_tile.h"
#include "app/rom.h"
#include "app/gui/canvas.h"
#include "app/rom.h"
namespace yaze {
namespace app {
@@ -74,7 +74,22 @@ bool Room::SaveGroupsToROM() {
return false;
}
void Room::LoadChests() {}
void Room::LoadChests() {
// ChestList.Clear();
// int cpos = rom_.Read24(core::constants::chests_data_pointer1).SNEStoPC();
// int clength = rom_.Read16(core::constants::chests_length_pointer);
// for (int i = 0; i < clength; i += 3) {
// ushort roomid = (ushort)(rom_.Read16(cpos) & 0x7FFF);
// cpos += 2;
// uchar item = rom_[cpos++]; // get now so cpos is incremented too
// if (roomid == RoomID) {
// ChestList.Add(new DungeonChestItem(ItemReceipt.GetTypeFromID(item)));
// }
// }
}
void Room::LoadBlocks() {}

View File

@@ -2,11 +2,12 @@
#define YAZE_APP_ZELDA3_DUNGEON_ROOM_H
#include "app/core/common.h"
#include "app/core/constants.h"
#include "app/gfx/bitmap.h"
#include "app/gfx/snes_palette.h"
#include "app/gfx/snes_tile.h"
#include "app/rom.h"
#include "app/gui/canvas.h"
#include "app/rom.h"
namespace yaze {
namespace app {
@@ -122,6 +123,7 @@ class Room {
uchar Floor2Graphics;
uchar Layer2Mode;
std::array<uchar, 16> blocks;
std::array<uchar, 16> ChestList;
uint8_t mainGfx[37][8];
uint8_t roomGfx[82][4];