Move object names, start RoomObject Subtypes
This commit is contained in:
465
src/app/zelda3/dungeon/object_names.h
Normal file
465
src/app/zelda3/dungeon/object_names.h
Normal file
@@ -0,0 +1,465 @@
|
||||
#ifndef YAZE_APP_ZELDA3_DUNGEON_OBJECT_NAMES_H
|
||||
#define YAZE_APP_ZELDA3_DUNGEON_OBJECT_NAMES_H
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace app {
|
||||
namespace zelda3 {
|
||||
namespace dungeon {
|
||||
|
||||
static const absl::string_view Type1RoomObjectNames[] = {
|
||||
"Ceiling ↔",
|
||||
"Wall (top, north) ↔",
|
||||
"Wall (top, south) ↔",
|
||||
"Wall (bottom, north) ↔",
|
||||
"Wall (bottom, south) ↔",
|
||||
"Wall columns (north) ↔",
|
||||
"Wall columns (south) ↔",
|
||||
"Deep wall (north) ↔",
|
||||
"Deep wall (south) ↔",
|
||||
"Diagonal wall A ◤ (top) ↔",
|
||||
"Diagonal wall A ◣ (top) ↔",
|
||||
"Diagonal wall A ◥ (top) ↔",
|
||||
"Diagonal wall A ◢ (top) ↔",
|
||||
"Diagonal wall B ◤ (top) ↔",
|
||||
"Diagonal wall B ◣ (top) ↔",
|
||||
"Diagonal wall B ◥ (top) ↔",
|
||||
"Diagonal wall B ◢ (top) ↔",
|
||||
"Diagonal wall C ◤ (top) ↔",
|
||||
"Diagonal wall C ◣ (top) ↔",
|
||||
"Diagonal wall C ◥ (top) ↔",
|
||||
"Diagonal wall C ◢ (top) ↔",
|
||||
"Diagonal wall A ◤ (bottom) ↔",
|
||||
"Diagonal wall A ◣ (bottom) ↔",
|
||||
"Diagonal wall A ◥ (bottom) ↔",
|
||||
"Diagonal wall A ◢ (bottom) ↔",
|
||||
"Diagonal wall B ◤ (bottom) ↔",
|
||||
"Diagonal wall B ◣ (bottom) ↔",
|
||||
"Diagonal wall B ◥ (bottom) ↔",
|
||||
"Diagonal wall B ◢ (bottom) ↔",
|
||||
"Diagonal wall C ◤ (bottom) ↔",
|
||||
"Diagonal wall C ◣ (bottom) ↔",
|
||||
"Diagonal wall C ◥ (bottom) ↔",
|
||||
"Diagonal wall C ◢ (bottom) ↔",
|
||||
"Platform stairs ↔",
|
||||
"Rail ↔",
|
||||
"Pit edge ┏━┓ A (north) ↔",
|
||||
"Pit edge ┏━┓ B (north) ↔",
|
||||
"Pit edge ┏━┓ C (north) ↔",
|
||||
"Pit edge ┏━┓ D (north) ↔",
|
||||
"Pit edge ┏━┓ E (north) ↔",
|
||||
"Pit edge ┗━┛ (south) ↔",
|
||||
"Pit edge ━━━ (south) ↔",
|
||||
"Pit edge ━━━ (north) ↔",
|
||||
"Pit edge ━━┛ (south) ↔",
|
||||
"Pit edge ┗━━ (south) ↔",
|
||||
"Pit edge ━━┓ (north) ↔",
|
||||
"Pit edge ┏━━ (north) ↔",
|
||||
"Rail wall (north) ↔",
|
||||
"Rail wall (south) ↔",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Carpet ↔",
|
||||
"Carpet trim ↔",
|
||||
"Weird door", // TODO: WEIRD DOOR OBJECT NEEDS INVESTIGATION
|
||||
"Drapes (north) ↔",
|
||||
"Drapes (west, odd) ↔",
|
||||
"Statues ↔",
|
||||
"Columns ↔",
|
||||
"Wall decors (north) ↔",
|
||||
"Wall decors (south) ↔",
|
||||
"Chairs in pairs ↔",
|
||||
"Tall torches ↔",
|
||||
"Supports (north) ↔",
|
||||
"Water edge ┏━┓ (concave) ↔",
|
||||
"Water edge ┗━┛ (concave) ↔",
|
||||
"Water edge ┏━┓ (convex) ↔",
|
||||
"Water edge ┗━┛ (convex) ↔",
|
||||
"Water edge ┏━┛ (concave) ↔",
|
||||
"Water edge ┗━┓ (concave) ↔",
|
||||
"Water edge ┗━┓ (convex) ↔",
|
||||
"Water edge ┏━┛ (convex) ↔",
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Supports (south) ↔",
|
||||
"Bar ↔",
|
||||
"Shelf A ↔",
|
||||
"Shelf B ↔",
|
||||
"Shelf C ↔",
|
||||
"Somaria path ↔",
|
||||
"Cannon hole A (north) ↔",
|
||||
"Cannon hole A (south) ↔",
|
||||
"Pipe path ↔",
|
||||
"Nothing",
|
||||
"Wall torches (north) ↔",
|
||||
"Wall torches (south) ↔",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Cannon hole B (north) ↔",
|
||||
"Cannon hole B (south) ↔",
|
||||
"Thick rail ↔",
|
||||
"Blocks ↔",
|
||||
"Long rail ↔",
|
||||
"Ceiling ↕",
|
||||
"Wall (top, west) ↕",
|
||||
"Wall (top, east) ↕",
|
||||
"Wall (bottom, west) ↕",
|
||||
"Wall (bottom, east) ↕",
|
||||
"Wall columns (west) ↕",
|
||||
"Wall columns (east) ↕",
|
||||
"Deep wall (west) ↕",
|
||||
"Deep wall (east) ↕",
|
||||
"Rail ↕",
|
||||
"Pit edge (west) ↕",
|
||||
"Pit edge (east) ↕",
|
||||
"Rail wall (west) ↕",
|
||||
"Rail wall (east) ↕",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Carpet ↕",
|
||||
"Carpet trim ↕",
|
||||
"Nothing",
|
||||
"Drapes (west) ↕",
|
||||
"Drapes (east) ↕",
|
||||
"Columns ↕",
|
||||
"Wall decors (west) ↕",
|
||||
"Wall decors (east) ↕",
|
||||
"Supports (west) ↕",
|
||||
"Water edge (west) ↕",
|
||||
"Water edge (east) ↕",
|
||||
"Supports (east) ↕",
|
||||
"Somaria path ↕",
|
||||
"Pipe path ↕",
|
||||
"Nothing",
|
||||
"Wall torches (west) ↕",
|
||||
"Wall torches (east) ↕",
|
||||
"Wall decors tight A (west) ↕",
|
||||
"Wall decors tight A (east) ↕",
|
||||
"Wall decors tight B (west) ↕",
|
||||
"Wall decors tight B (east) ↕",
|
||||
"Cannon hole (west) ↕",
|
||||
"Cannon hole (east) ↕",
|
||||
"Tall torches ↕",
|
||||
"Thick rail ↕",
|
||||
"Blocks ↕",
|
||||
"Long rail ↕",
|
||||
"Jump ledge (west) ↕",
|
||||
"Jump ledge (east) ↕",
|
||||
"Rug trim (west) ↕",
|
||||
"Rug trim (east) ↕",
|
||||
"Bar ↕",
|
||||
"Wall flair (west) ↕",
|
||||
"Wall flair (east) ↕",
|
||||
"Blue pegs ↕",
|
||||
"Orange pegs ↕",
|
||||
"Invisible floor ↕",
|
||||
"Fake pots ↕",
|
||||
"Hammer pegs ↕",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Diagonal ceiling A ◤",
|
||||
"Diagonal ceiling A ◣",
|
||||
"Diagonal ceiling A ◥",
|
||||
"Diagonal ceiling A ◢",
|
||||
"Pit ⇲",
|
||||
"Diagonal layer 2 mask A ◤",
|
||||
"Diagonal layer 2 mask A ◣",
|
||||
"Diagonal layer 2 mask A ◥",
|
||||
"Diagonal layer 2 mask A ◢",
|
||||
"Diagonal layer 2 mask B ◤", // TODO: VERIFY
|
||||
"Diagonal layer 2 mask B ◣", // TODO: VERIFY
|
||||
"Diagonal layer 2 mask B ◥", // TODO: VERIFY
|
||||
"Diagonal layer 2 mask B ◢", // TODO: VERIFY
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Jump ledge (north) ↔",
|
||||
"Jump ledge (south) ↔",
|
||||
"Rug ↔",
|
||||
"Rug trim (north) ↔",
|
||||
"Rug trim (south) ↔",
|
||||
"Archery game curtains ↔",
|
||||
"Wall flair (north) ↔",
|
||||
"Wall flair (south) ↔",
|
||||
"Blue pegs ↔",
|
||||
"Orange pegs ↔",
|
||||
"Invisible floor ↔",
|
||||
"Fake pressure plates ↔",
|
||||
"Fake pots ↔",
|
||||
"Hammer pegs ↔",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Ceiling (large) ⇲",
|
||||
"Chest platform (tall) ⇲",
|
||||
"Layer 2 pit mask (large) ⇲",
|
||||
"Layer 2 pit mask (medium) ⇲",
|
||||
"Floor 1 ⇲",
|
||||
"Floor 3 ⇲",
|
||||
"Layer 2 mask (large) ⇲",
|
||||
"Floor 4 ⇲",
|
||||
"Water floor ⇲ ",
|
||||
"Flood water (medium) ⇲ ",
|
||||
"Conveyor floor ⇲ ",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Moving wall (west) ⇲",
|
||||
"Moving wall (east) ⇲",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Icy floor A ⇲",
|
||||
"Icy floor B ⇲",
|
||||
"Moving wall flag", // TODO: WTF IS THIS?
|
||||
"Moving wall flag", // TODO: WTF IS THIS?
|
||||
"Moving wall flag", // TODO: WTF IS THIS?
|
||||
"Moving wall flag", // TODO: WTF IS THIS?
|
||||
"Layer 2 mask (medium) ⇲",
|
||||
"Flood water (large) ⇲",
|
||||
"Layer 2 swim mask ⇲",
|
||||
"Flood water B (large) ⇲",
|
||||
"Floor 2 ⇲",
|
||||
"Chest platform (short) ⇲",
|
||||
"Table / rock ⇲",
|
||||
"Spike blocks ⇲",
|
||||
"Spiked floor ⇲",
|
||||
"Floor 7 ⇲",
|
||||
"Tiled floor ⇲",
|
||||
"Rupee floor ⇲",
|
||||
"Conveyor upwards ⇲",
|
||||
"Conveyor downwards ⇲",
|
||||
"Conveyor leftwards ⇲",
|
||||
"Conveyor rightwards ⇲",
|
||||
"Heavy current water ⇲",
|
||||
"Floor 10 ⇲",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
"Nothing",
|
||||
};
|
||||
|
||||
static const absl::string_view Type2RoomObjectNames[] = {
|
||||
"Corner (top, concave) ▛",
|
||||
"Corner (top, concave) ▙",
|
||||
"Corner (top, concave) ▜",
|
||||
"Corner (top, concave) ▟",
|
||||
"Corner (top, convex) ▟",
|
||||
"Corner (top, convex) ▜",
|
||||
"Corner (top, convex) ▙",
|
||||
"Corner (top, convex) ▛",
|
||||
"Corner (bottom, concave) ▛",
|
||||
"Corner (bottom, concave) ▙",
|
||||
"Corner (bottom, concave) ▜",
|
||||
"Corner (bottom, concave) ▟",
|
||||
"Corner (bottom, convex) ▟",
|
||||
"Corner (bottom, convex) ▜",
|
||||
"Corner (bottom, convex) ▙",
|
||||
"Corner (bottom, convex) ▛",
|
||||
"Kinked corner north (bottom) ▜",
|
||||
"Kinked corner south (bottom) ▟",
|
||||
"Kinked corner north (bottom) ▛",
|
||||
"Kinked corner south (bottom) ▙",
|
||||
"Kinked corner west (bottom) ▙",
|
||||
"Kinked corner west (bottom) ▛",
|
||||
"Kinked corner east (bottom) ▟",
|
||||
"Kinked corner east (bottom) ▜",
|
||||
"Deep corner (concave) ▛",
|
||||
"Deep corner (concave) ▙",
|
||||
"Deep corner (concave) ▜",
|
||||
"Deep corner (concave) ▟",
|
||||
"Large brazier",
|
||||
"Statue",
|
||||
"Star tile (disabled)",
|
||||
"Star tile (enabled)",
|
||||
"Small torch (lit)",
|
||||
"Barrel",
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Table",
|
||||
"Fairy statue",
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Chair",
|
||||
"Bed",
|
||||
"Fireplace",
|
||||
"Mario portrait",
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Interroom stairs (up)",
|
||||
"Interroom stairs (down)",
|
||||
"Interroom stairs B (down)",
|
||||
"Intraroom stairs north B", // TODO: VERIFY LAYER HANDLING
|
||||
"Intraroom stairs north (separate layers)",
|
||||
"Intraroom stairs north (merged layers)",
|
||||
"Intraroom stairs north (swim layer)",
|
||||
"Block",
|
||||
"Water ladder (north)",
|
||||
"Water ladder (south)", // TODO: NEEDS IN GAME VERIFICATION
|
||||
"Dam floodgate",
|
||||
"Interroom spiral stairs up (top)",
|
||||
"Interroom spiral stairs down (top)",
|
||||
"Interroom spiral stairs up (bottom)",
|
||||
"Interroom spiral stairs down (bottom)",
|
||||
"Sanctuary wall (north)",
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Pew",
|
||||
"Magic bat altar",
|
||||
};
|
||||
|
||||
static const absl::string_view Type3RoomObjectNames[] = {
|
||||
"Waterfall face (empty)",
|
||||
"Waterfall face (short)",
|
||||
"Waterfall face (long)",
|
||||
"Somaria path endpoint",
|
||||
"Somaria path intersection ╋",
|
||||
"Somaria path corner ┏",
|
||||
"Somaria path corner ┗",
|
||||
"Somaria path corner ┓",
|
||||
"Somaria path corner ┛",
|
||||
"Somaria path intersection ┳",
|
||||
"Somaria path intersection ┻",
|
||||
"Somaria path intersection ┣",
|
||||
"Somaria path intersection ┫",
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Somaria path 2-way endpoint",
|
||||
"Somaria path crossover",
|
||||
"Babasu hole (north)",
|
||||
"Babasu hole (south)",
|
||||
"9 blue rupees",
|
||||
"Telepathy tile",
|
||||
"Warp door", // TODO: NEEDS IN GAME VERIFICATION THAT THIS IS USELESS
|
||||
"Kholdstare's shell",
|
||||
"Hammer peg",
|
||||
"Prison cell",
|
||||
"Big key lock",
|
||||
"Chest",
|
||||
"Chest (open)",
|
||||
"Intraroom stairs south", // TODO: VERIFY LAYER HANDLING
|
||||
"Intraroom stairs south (separate layers)",
|
||||
"Intraroom stairs south (merged layers)",
|
||||
"Interroom straight stairs up (north, top)",
|
||||
"Interroom straight stairs down (north, top)",
|
||||
"Interroom straight stairs up (south, top)",
|
||||
"Interroom straight stairs down (south, top)",
|
||||
"Deep corner (convex) ▟",
|
||||
"Deep corner (convex) ▜",
|
||||
"Deep corner (convex) ▙",
|
||||
"Deep corner (convex) ▛",
|
||||
"Interroom straight stairs up (north, bottom)",
|
||||
"Interroom straight stairs down (north, bottom)",
|
||||
"Interroom straight stairs up (south, bottom)",
|
||||
"Interroom straight stairs down (south, bottom)",
|
||||
"Lamp cones",
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Liftable large block",
|
||||
"Agahnim's altar",
|
||||
"Agahnim's boss room",
|
||||
"Pot",
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Big chest",
|
||||
"Big chest (open)",
|
||||
"Intraroom stairs south (swim layer)",
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Pipe end (south)",
|
||||
"Pipe end (north)",
|
||||
"Pipe end (east)",
|
||||
"Pipe end (west)",
|
||||
"Pipe corner ▛",
|
||||
"Pipe corner ▙",
|
||||
"Pipe corner ▜",
|
||||
"Pipe corner ▟",
|
||||
"Pipe-rock intersection ⯊",
|
||||
"Pipe-rock intersection ⯋",
|
||||
"Pipe-rock intersection ◖",
|
||||
"Pipe-rock intersection ◗",
|
||||
"Pipe crossover",
|
||||
"Bombable floor",
|
||||
"Fake bombable floor",
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Warp tile",
|
||||
"Tool rack",
|
||||
"Furnace",
|
||||
"Tub (wide)",
|
||||
"Anvil",
|
||||
"Warp tile (disabled)",
|
||||
"Pressure plate",
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Blue peg",
|
||||
"Orange peg",
|
||||
"Fortune teller room",
|
||||
"Unknown", // TODO: NEEDS IN GAME CHECKING
|
||||
"Bar corner ▛",
|
||||
"Bar corner ▙",
|
||||
"Bar corner ▜",
|
||||
"Bar corner ▟",
|
||||
"Decorative bowl",
|
||||
"Tub (tall)",
|
||||
"Bookcase",
|
||||
"Range",
|
||||
"Suitcase",
|
||||
"Bar bottles",
|
||||
"Arrow game hole (west)",
|
||||
"Arrow game hole (east)",
|
||||
"Vitreous goo gfx",
|
||||
"Fake pressure plate",
|
||||
"Medusa head",
|
||||
"4-way shooter block",
|
||||
"Pit",
|
||||
"Wall crack (north)",
|
||||
"Wall crack (south)",
|
||||
"Wall crack (west)",
|
||||
"Wall crack (east)",
|
||||
"Large decor",
|
||||
"Water grate (north)",
|
||||
"Water grate (south)",
|
||||
"Water grate (west)",
|
||||
"Water grate (east)",
|
||||
"Window sunlight",
|
||||
"Floor sunlight",
|
||||
"Trinexx's shell",
|
||||
"Layer 2 mask (full)",
|
||||
"Boss entrance",
|
||||
"Minigame chest",
|
||||
"Ganon door",
|
||||
"Triforce wall ornament",
|
||||
"Triforce floor tiles",
|
||||
"Freezor hole",
|
||||
"Pile of bones",
|
||||
"Vitreous goo damage",
|
||||
"Arrow tile ↑",
|
||||
"Arrow tile ↓",
|
||||
"Arrow tile →",
|
||||
"Nothing",
|
||||
};
|
||||
|
||||
} // namespace dungeon
|
||||
} // namespace zelda3
|
||||
} // namespace app
|
||||
} // namespace yaze
|
||||
|
||||
#endif // YAZE_APP_ZELDA3_DUNGEON_OBJECT_NAMES_H
|
||||
@@ -23,26 +23,6 @@ namespace dungeon {
|
||||
constexpr int entrance_gfx_group = 0x5D97;
|
||||
constexpr int gfx_animated_pointer = 0x10275; // JP 0x10624 //long pointer
|
||||
|
||||
class DungeonDestination {
|
||||
public:
|
||||
DungeonDestination(uint8_t i) : Index(i) {}
|
||||
|
||||
uint8_t Index;
|
||||
uint8_t Target = 0;
|
||||
uint8_t TargetLayer = 0;
|
||||
// RoomObject* AssociatedObject = nullptr;
|
||||
|
||||
// bool IsAssociated() { return AssociatedObject != nullptr; }
|
||||
|
||||
// int RealX() { return AssociatedObject ? AssociatedObject->RealX : 0; }
|
||||
|
||||
// int RealY() { return AssociatedObject ? AssociatedObject->RealY : 0; }
|
||||
|
||||
std::string ToString() {
|
||||
return std::to_string(Index) + ": To " + std::to_string(Target);
|
||||
}
|
||||
};
|
||||
|
||||
constexpr int dungeons_palettes_groups = 0x75460; // JP 0x67DD0
|
||||
constexpr int dungeons_main_bg_palette_pointers = 0xDEC4B; // JP Same
|
||||
constexpr int dungeons_palettes = 0xDD734;
|
||||
@@ -98,6 +78,16 @@ void DrawDungeonRoomBG2(std::vector<uint8_t>& tiles_bg2_buffer,
|
||||
std::vector<uint8_t>& current_gfx16,
|
||||
std::vector<uint8_t>& room_bg2_ptr);
|
||||
|
||||
class DungeonDestination {
|
||||
public:
|
||||
DungeonDestination(uint8_t i) : Index(i) {}
|
||||
|
||||
uint8_t Index;
|
||||
uint8_t Target = 0;
|
||||
uint8_t TargetLayer = 0;
|
||||
// RoomObject* AssociatedObject = nullptr;
|
||||
};
|
||||
|
||||
struct object_door {
|
||||
object_door(short id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer)
|
||||
: id_(id), x_(x), y_(y), size_(size), layer_(layer) {}
|
||||
|
||||
@@ -10,6 +10,7 @@ void RoomObject::DrawTile(Tile t, int xx, int yy,
|
||||
std::vector<uint8_t>& tiles_bg1_buffer,
|
||||
std::vector<uint8_t>& tiles_bg2_buffer,
|
||||
ushort tileUnder) {
|
||||
bool preview = false;
|
||||
if (width < xx + 8) {
|
||||
width = xx + 8;
|
||||
}
|
||||
@@ -53,7 +54,7 @@ void RoomObject::DrawTile(Tile t, int xx, int yy,
|
||||
} else {
|
||||
if (((xx / 8) + nx + offsetX) + ((ny + offsetY + (yy / 8)) * 64) < 4096 &&
|
||||
((xx / 8) + nx + offsetX) + ((ny + offsetY + (yy / 8)) * 64) >= 0) {
|
||||
ushort td = 0; // gfx::GetTilesInfo(); // TODO t.GetTileInfo()
|
||||
ushort td = 0; // gfx::GetTilesInfo(); // TODO t.GetTileInfo()
|
||||
|
||||
// collisionPoint.Add(
|
||||
// new Point(xx + ((nx + offsetX) * 8), yy + ((ny + +offsetY) * 8)));
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "app/gfx/snes_palette.h"
|
||||
#include "app/gfx/snes_tile.h"
|
||||
#include "app/rom.h"
|
||||
#include "app/zelda3/dungeon/object_names.h"
|
||||
|
||||
namespace yaze {
|
||||
namespace app {
|
||||
@@ -77,6 +78,10 @@ class RoomObject : public SharedROM {
|
||||
height(16),
|
||||
uniqueID(0) {}
|
||||
|
||||
virtual void Draw() {
|
||||
// ... Draw function implementation here
|
||||
}
|
||||
|
||||
void getObjectSize() {
|
||||
previousSize = size_;
|
||||
size_ = 1;
|
||||
@@ -117,10 +122,11 @@ class RoomObject : public SharedROM {
|
||||
}
|
||||
|
||||
void DrawTile(Tile t, int xx, int yy, std::vector<uint8_t>& current_gfx16,
|
||||
std::vector<uint8_t>& tiles_bg1_buffer, std::vector<uint8_t>& tiles_bg2_buffer,
|
||||
std::vector<uint8_t>& tiles_bg1_buffer,
|
||||
std::vector<uint8_t>& tiles_bg2_buffer,
|
||||
ushort tileUnder = 0xFFFF);
|
||||
|
||||
private:
|
||||
protected:
|
||||
int16_t id;
|
||||
|
||||
uint8_t x_;
|
||||
@@ -151,8 +157,6 @@ class RoomObject : public SharedROM {
|
||||
int offsetY = 0;
|
||||
bool diagonalFix = false;
|
||||
bool selected = false;
|
||||
bool redraw = false;
|
||||
bool preview = false;
|
||||
int previewId = 0;
|
||||
uint8_t previousSize = 0;
|
||||
bool showRectangle = false;
|
||||
@@ -161,6 +165,68 @@ class RoomObject : public SharedROM {
|
||||
uint8_t z = 0;
|
||||
bool deleted = false;
|
||||
};
|
||||
|
||||
class Subtype1 : public RoomObject {
|
||||
public:
|
||||
std::vector<Tile> tiles;
|
||||
std::string name;
|
||||
bool allBgs;
|
||||
Sorting sort;
|
||||
int tile_count_;
|
||||
|
||||
Subtype1(int16_t id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer,
|
||||
int tileCount)
|
||||
: RoomObject(id, x, y, size, layer), tile_count_(tileCount) {
|
||||
auto rom_data = rom()->data();
|
||||
name = Type1RoomObjectNames[id & 0xFF];
|
||||
int pos =
|
||||
core::tile_address +
|
||||
static_cast<int16_t>(
|
||||
(rom_data[core::subtype1_tiles + ((id & 0xFF) * 2) + 1] << 8) +
|
||||
rom_data[core::subtype1_tiles + ((id & 0xFF) * 2)]);
|
||||
addTiles(tile_count_, pos);
|
||||
sort = (Sorting)(Sorting::Horizontal | Sorting::Wall);
|
||||
}
|
||||
|
||||
void Draw() override {
|
||||
for (int s = 0; s < size_ + (tile_count_ == 8 ? 1 : 0); s++) {
|
||||
for (int i = 0; i < tile_count_; i++) {
|
||||
// DrawTile(tiles[i], ((s * 2)) * 8, (i / 2) * 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class Subtype2_Multiple : public RoomObject {
|
||||
public:
|
||||
int tx = 0;
|
||||
int ty = 0;
|
||||
std::vector<Tile> tiles;
|
||||
std::string name;
|
||||
bool allBgs;
|
||||
Sorting sort;
|
||||
|
||||
Subtype2_Multiple(int16_t id, uint8_t x, uint8_t y, uint8_t size,
|
||||
uint8_t layer)
|
||||
: RoomObject(id, x, y, size, layer) {
|
||||
// ... Constructor implementation here
|
||||
}
|
||||
|
||||
void Draw() override {
|
||||
// ... Draw function implementation here
|
||||
}
|
||||
|
||||
void setdata(const std::string& name, int tx, int ty, bool allbg = false) {
|
||||
// ... setdata function implementation here
|
||||
}
|
||||
|
||||
// Other member functions and variables
|
||||
};
|
||||
|
||||
class Subtype3 : public RoomObject {
|
||||
|
||||
};
|
||||
|
||||
} // namespace dungeon
|
||||
} // namespace zelda3
|
||||
} // namespace app
|
||||
|
||||
Reference in New Issue
Block a user