1#ifndef YAZE_APP_ZELDA3_SPRITE_H
2#define YAZE_APP_ZELDA3_SPRITE_H
16static const std::string kSpriteDefaultNames[]{
19 "02 Flying Stalfos Head",
20 "03 No Pointer (Empty",
21 "04 Pull Switch (good",
22 "05 Pull Switch (unused",
23 "06 Pull Switch (bad",
24 "07 Pull Switch (unused",
25 "08 Octorock (one way",
27 "0A Octorock (four way",
33 "10 Octoballon Hatchlings",
37 "14 Gargoyle's Domain Gate",
39 "16 Sahasrahla / Aginah",
48 "1F Bug-Catching Kid",
58 "29 Blind Hideout attendant",
62 "2D Telepathic Stones",
63 "2E Multipurpose Sprite",
78 "3D Signs? Chicken lady also showed up / Scared ladies outside houses.",
80 "3F Tutorial Soldier",
82 "41 Blue Sword Soldier / Used by guards to detect player",
83 "42 Green Sword Soldier",
84 "43 Red Spear Soldier",
85 "44 Assault Sword Soldier",
86 "45 Green Spear Soldier",
89 "48 Red Javelin Soldier",
90 "49 Red Javelin Soldier 2",
91 "4A Red Bomb Soldiers",
92 "4B Green Soldier Recruits",
100 "53 Armos Knights (Boss",
104 "57 Desert Palace Barriers",
108 "5B Spark (Left to Right",
109 "5C Spark (Right to Left",
110 "5D Roller (vertical moving",
111 "5E Roller (vertical moving",
113 "60 Roller (horizontal moving",
117 "64 Devalant (Shooter",
118 "65 Shooting Gallery Proprietor",
119 "66 Moving Cannon Ball Shooters (Right",
120 "67 Moving Cannon Ball Shooters (Left",
121 "68 Moving Cannon Ball Shooters (Down",
122 "69 Moving Cannon Ball Shooters (Up",
123 "6A Ball N' Chain Trooper",
129 "70 Helmasaur King Fireball",
131 "72 Activator for the ponds (where you throw in items",
134 "75 Bottle Salesman",
136 "77 Antifairy (Alternate",
140 "7B Agahnim Energy Ball",
143 "7E Guruguru Bar (Clockwise",
144 "7F Guruguru Bar (Counter Clockwise",
147 "82 Antifairy Circle",
166 "95 Eye Laser (Right",
167 "96 Eye Laser (Left",
168 "97 Eye Laser (Down",
175 "9E Ostrich (Haunted Grove",
177 "A0 Birds (Haunted Grove",
179 "A2 Kholdstare (Boss",
180 "A3 Kholdstare's Shell",
185 "A8 Bomber Flying Creatures from Darkworld",
186 "A9 Bomber Flying Creatures from Darkworld",
195 "B2 Good bee again?",
196 "B3 Hylian Inscription",
197 "B4 Thief?s chest (not the one that follows you",
200 "B7 Maiden following you in Blind Dungeon",
201 "B8 Monologue Testing Sprite",
202 "B9 Feuding Friends on Death Mountain",
204 "BB Salesman / chestgame guy / 300 rupee giver guy / Chest game thief",
205 "BC Drunk in the inn",
206 "BD Vitreous (Large Eyeball",
207 "BE Vitreous (Small Eyeball",
208 "BF Vitreous' Lightning",
209 "C0 Monster in Lake of Ill Omen / Quake Medallion",
210 "C1 Agahnim teleporting Zelda to dark world",
215 "C6 Four Way Fireball Spitters (spit when you use your sword",
217 "C8 Big Fairy who heals you",
221 "CC Another part of trinexx",
222 "CD Yet another part of trinexx",
223 "CE Blind The Thief (Boss)",
230 "D5 Digging Game Proprietor",
237 "DC Bomb Refill (1)",
238 "DD Bomb Refill (4)",
239 "DE Bomb Refill (8)",
240 "DF Small Magic Refill",
241 "E0 Full Magic Refill",
242 "E1 Arrow Refill (5)",
243 "E2 Arrow Refill (10)",
249 "E8 Fake Master Sword",
250 "E9 Magic Shop dude / His items",
251 "EA Heart Container",
254 "ED Cane Of Somaria Platform",
256 "EF Cane of Somaria Platform (Unused)",
257 "F0 Cane of Somaria Platform (Unused)",
258 "F1 Cane of Somaria Platform (Unused)",
259 "F2 Medallion Tablet",
282 Sprite(
const std::vector<uint8_t>& src, uint8_t overworld_map_id, uint8_t
id,
284 :
map_id_(static_cast<int>(overworld_map_id)),
296 name_ = kSpriteDefaultNames[
id];
304 name_ = kSpriteDefaultNames[
id];
305 if (((
subtype & 0x07) == 0x07) &&
id > 0 &&
id <= 0x1A) {
306 name_ = kOverlordNames[
id - 1];
311 void InitSprite(
const std::vector<uint8_t>& src, uint8_t overworld_map_id,
312 uint8_t
id, uint8_t
x, uint8_t
y,
int map_x,
int map_y) {
315 map_id_ =
static_cast<int>(overworld_map_id);
323 name_ = kSpriteDefaultNames[
id];
331 bool mirror_x =
false,
bool mirror_y =
false,
332 int sizex = 2,
int sizey = 2);
340 auto x()
const {
return x_; }
341 auto y()
const {
return y_; }
enum yaze::zelda3::GameEntity::EntityType entity_type_
std::vector< uint8_t > preview_gfx_
Sprite(const std::vector< uint8_t > &src, uint8_t overworld_map_id, uint8_t id, uint8_t x, uint8_t y, int map_x, int map_y)
void DrawSpriteTile(int x, int y, int srcx, int srcy, int pal, bool mirror_x=false, bool mirror_y=false, int sizex=2, int sizey=2)
void InitSprite(const std::vector< uint8_t > &src, uint8_t overworld_map_id, uint8_t id, uint8_t x, uint8_t y, int map_x, int map_y)
std::vector< uint8_t > current_gfx_
void UpdateCoordinates(int map_x, int map_y)
auto set_key_drop(int key)
void UpdateMapProperties(uint16_t map_id) override
Sprite(uint8_t id, uint8_t x, uint8_t y, uint8_t subtype, uint8_t layer)
auto preview_graphics() const
auto set_deleted(bool deleted)
Zelda 3 specific classes and functions.
Main namespace for the application.