yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
overworld.h
Go to the documentation of this file.
1#ifndef YAZE_APP_DATA_OVERWORLD_H
2#define YAZE_APP_DATA_OVERWORLD_H
3
4#include <vector>
5
6#include "absl/container/flat_hash_map.h"
7#include "absl/status/status.h"
8#include "app/core/common.h"
10#include "app/gfx/snes_tile.h"
11#include "app/rom.h"
12#include "app/zelda3/common.h"
15
16namespace yaze {
17namespace app {
18namespace zelda3 {
19
24namespace overworld {
25
26constexpr int GravesYTilePos = 0x49968; // short (0x0F entries)
27constexpr int GravesXTilePos = 0x49986; // short (0x0F entries)
28constexpr int GravesTilemapPos = 0x499A4; // short (0x0F entries)
29constexpr int GravesGFX = 0x499C2; // short (0x0F entries)
30
31constexpr int GravesXPos = 0x4994A; // short (0x0F entries)
32constexpr int GravesYLine = 0x4993A; // short (0x08 entries)
33constexpr int GravesCountOnY = 0x499E0; // Byte 0x09 entries
34
35constexpr int GraveLinkSpecialHole = 0x46DD9; // short
36constexpr int GraveLinkSpecialStairs = 0x46DE0; // short
37
38// List of secret item names
39const std::vector<std::string> kSecretItemNames = {
40 "Nothing", // 0
41 "Green Rupee", // 1
42 "Rock hoarder", // 2
43 "Bee", // 3
44 "Health pack", // 4
45 "Bomb", // 5
46 "Heart ", // 6
47 "Blue Rupee", // 7
48 "Key", // 8
49 "Arrow", // 9
50 "Bomb", // 10
51 "Heart", // 11
52 "Magic", // 12
53 "Full Magic", // 13
54 "Cucco", // 14
55 "Green Soldier", // 15
56 "Bush Stal", // 16
57 "Blue Soldier", // 17
58 "Landmine", // 18
59 "Heart", // 19
60 "Fairy", // 20
61 "Heart", // 21
62 "Nothing ", // 22
63 "Hole", // 23
64 "Warp", // 24
65 "Staircase", // 25
66 "Bombable", // 26
67 "Switch" // 27
68};
69
70constexpr int overworldItemsPointers = 0xDC2F9;
71constexpr int kOverworldItemsAddress = 0xDC8B9; // 1BC2F9
72constexpr int overworldItemsBank = 0xDC8BF;
73constexpr int overworldItemsEndData = 0xDC89C; // 0DC89E
74
75class OverworldItem : public GameEntity {
76 public:
77 bool bg2_ = false;
78 uint8_t id_;
79 uint8_t game_x_;
80 uint8_t game_y_;
81 uint16_t room_map_id_;
82 int unique_id = 0;
83 bool deleted = false;
84 OverworldItem() = default;
85
86 OverworldItem(uint8_t id, uint16_t room_map_id, int x, int y, bool bg2) {
87 this->id_ = id;
88 this->x_ = x;
89 this->y_ = y;
90 this->bg2_ = bg2;
91 this->room_map_id_ = room_map_id;
92 this->map_id_ = room_map_id;
93 this->entity_id_ = id;
94 this->entity_type_ = kItem;
95
96 int map_x = room_map_id - ((room_map_id / 8) * 8);
97 int map_y = room_map_id / 8;
98
99 game_x_ = static_cast<uint8_t>(std::abs(x - (map_x * 512)) / 16);
100 game_y_ = static_cast<uint8_t>(std::abs(y - (map_y * 512)) / 16);
101 }
102
103 void UpdateMapProperties(uint16_t room_map_id) override {
104 room_map_id_ = room_map_id;
105
106 if (room_map_id_ >= 64) {
107 room_map_id_ -= 64;
108 }
109
110 int map_x = room_map_id_ - ((room_map_id_ / 8) * 8);
111 int map_y = room_map_id_ / 8;
112
113 game_x_ = static_cast<uint8_t>(std::abs(x_ - (map_x * 512)) / 16);
114 game_y_ = static_cast<uint8_t>(std::abs(y_ - (map_y * 512)) / 16);
115
116 std::cout << "Item: " << std::hex << std::setw(2) << std::setfill('0')
117 << static_cast<int>(id_) << " MapId: " << std::hex << std::setw(2)
118 << std::setfill('0') << static_cast<int>(room_map_id_)
119 << " X: " << static_cast<int>(game_x_)
120 << " Y: " << static_cast<int>(game_y_) << std::endl;
121 }
122};
123
124constexpr int OWExitRoomId = 0x15D8A; // 0x15E07 Credits sequences
125// 105C2 Ending maps
126// 105E2 Sprite Group Table for Ending
127constexpr int OWExitMapId = 0x15E28;
128constexpr int OWExitVram = 0x15E77;
129constexpr int OWExitYScroll = 0x15F15;
130constexpr int OWExitXScroll = 0x15FB3;
131constexpr int OWExitYPlayer = 0x16051;
132constexpr int OWExitXPlayer = 0x160EF;
133constexpr int OWExitYCamera = 0x1618D;
134constexpr int OWExitXCamera = 0x1622B;
135constexpr int OWExitDoorPosition = 0x15724;
136constexpr int OWExitUnk1 = 0x162C9;
137constexpr int OWExitUnk2 = 0x16318;
138constexpr int OWExitDoorType1 = 0x16367;
139constexpr int OWExitDoorType2 = 0x16405;
140
141constexpr int OWExitMapIdWhirlpool = 0x16AE5; // JP = ;016849
142constexpr int OWExitVramWhirlpool = 0x16B07; // JP = ;01686B
143constexpr int OWExitYScrollWhirlpool = 0x16B29; // JP = ;01688D
144constexpr int OWExitXScrollWhirlpool = 0x16B4B; // JP = ;016DE7
145constexpr int OWExitYPlayerWhirlpool = 0x16B6D; // JP = ;016E09
146constexpr int OWExitXPlayerWhirlpool = 0x16B8F; // JP = ;016E2B
147constexpr int OWExitYCameraWhirlpool = 0x16BB1; // JP = ;016E4D
148constexpr int OWExitXCameraWhirlpool = 0x16BD3; // JP = ;016E6F
149constexpr int OWExitUnk1Whirlpool = 0x16BF5; // JP = ;016E91
150constexpr int OWExitUnk2Whirlpool = 0x16C17; // JP = ;016EB3
151constexpr int OWWhirlpoolPosition = 0x16CF8; // JP = ;016F94
152
153class OverworldExit : public GameEntity {
154 public:
155 uint16_t y_scroll_;
156 uint16_t x_scroll_;
163 uint16_t door_type_1_;
164 uint16_t door_type_2_;
165 uint16_t room_id_;
166 uint16_t map_pos_; // Position in the vram
170 bool is_hole_ = false;
171 bool deleted_ = false;
172 bool is_automatic_ = false;
173 bool large_map_ = false;
174
175 OverworldExit() = default;
176 OverworldExit(uint16_t room_id, uchar map_id, uint16_t vram_location,
177 uint16_t y_scroll, uint16_t x_scroll, uint16_t player_y,
178 uint16_t player_x, uint16_t camera_y, uint16_t camera_x,
179 uchar scroll_mod_y, uchar scroll_mod_x, uint16_t door_type_1,
180 uint16_t door_type_2, bool deleted = false)
181 : map_pos_(vram_location),
182 entrance_id_(0),
183 area_x_(0),
184 area_y_(0),
185 room_id_(room_id),
186 y_scroll_(y_scroll),
187 x_scroll_(x_scroll),
188 y_player_(player_y),
189 x_player_(player_x),
190 y_camera_(camera_y),
191 x_camera_(camera_x),
192 scroll_mod_y_(scroll_mod_y),
193 scroll_mod_x_(scroll_mod_x),
194 door_type_1_(door_type_1),
195 door_type_2_(door_type_2),
196 is_hole_(false),
197 deleted_(deleted) {
198 // Initialize entity variables
199 x_ = player_x;
200 y_ = player_y;
201 map_id_ = map_id;
203
204 int mapX = (map_id_ - ((map_id_ / 8) * 8));
205 int mapY = (map_id_ / 8);
206
207 area_x_ = (uchar)((std::abs(x_ - (mapX * 512)) / 16));
208 area_y_ = (uchar)((std::abs(y_ - (mapY * 512)) / 16));
209
210 if (door_type_1 != 0) {
211 int p = (door_type_1 & 0x7FFF) >> 1;
212 entrance_id_ = (uchar)(p % 64);
213 area_y_ = (uchar)(p >> 6);
214 }
215
216 if (door_type_2 != 0) {
217 int p = (door_type_2 & 0x7FFF) >> 1;
218 entrance_id_ = (uchar)(p % 64);
219 area_y_ = (uchar)(p >> 6);
220 }
221
222 if (map_id_ >= 64) {
223 map_id_ -= 64;
224 }
225
226 mapX = (map_id_ - ((map_id_ / 8) * 8));
227 mapY = (map_id_ / 8);
228
229 area_x_ = (uchar)((std::abs(x_ - (mapX * 512)) / 16));
230 area_y_ = (uchar)((std::abs(y_ - (mapY * 512)) / 16));
231
232 map_pos_ = (uint16_t)((((area_y_) << 6) | (area_x_ & 0x3F)) << 1);
233 }
234
235 // Overworld overworld
236 void UpdateMapProperties(uint16_t map_id) override {
237 map_id_ = map_id;
238
239 int large = 256;
240 int mapid = map_id;
241
242 if (map_id < 128) {
243 large = large_map_ ? 768 : 256;
244 // if (overworld.overworld_map(map_id)->Parent() != map_id) {
245 // mapid = overworld.overworld_map(map_id)->Parent();
246 // }
247 }
248
249 int mapX = map_id - ((map_id / 8) * 8);
250 int mapY = map_id / 8;
251
252 area_x_ = (uchar)((std::abs(x_ - (mapX * 512)) / 16));
253 area_y_ = (uchar)((std::abs(y_ - (mapY * 512)) / 16));
254
255 if (map_id >= 64) {
256 map_id -= 64;
257 }
258
259 int mapx = (map_id & 7) << 9;
260 int mapy = (map_id & 56) << 6;
261
262 if (is_automatic_) {
263 x_ = x_ - 120;
264 y_ = y_ - 80;
265
266 if (x_ < mapx) {
267 x_ = mapx;
268 }
269
270 if (y_ < mapy) {
271 y_ = mapy;
272 }
273
274 if (x_ > mapx + large) {
275 x_ = mapx + large;
276 }
277
278 if (y_ > mapy + large + 32) {
279 y_ = mapy + large + 32;
280 }
281
282 x_camera_ = x_player_ + 0x07;
283 y_camera_ = y_player_ + 0x1F;
284
285 if (x_camera_ < mapx + 127) {
286 x_camera_ = mapx + 127;
287 }
288
289 if (y_camera_ < mapy + 111) {
290 y_camera_ = mapy + 111;
291 }
292
293 if (x_camera_ > mapx + 127 + large) {
294 x_camera_ = mapx + 127 + large;
295 }
296
297 if (y_camera_ > mapy + 143 + large) {
298 y_camera_ = mapy + 143 + large;
299 }
300 }
301
302 short vram_x_scroll = (short)(x_ - mapx);
303 short vram_y_scroll = (short)(y_ - mapy);
304
305 map_pos_ = (uint16_t)(((vram_y_scroll & 0xFFF0) << 3) |
306 ((vram_x_scroll & 0xFFF0) >> 3));
307
308 std::cout << "Exit: " << room_id_ << " MapId: " << std::hex << mapid
309 << " X: " << static_cast<int>(area_x_)
310 << " Y: " << static_cast<int>(area_y_) << std::endl;
311 }
312};
313
314constexpr int OWEntranceMap = 0xDB96F;
315constexpr int OWEntrancePos = 0xDBA71;
316constexpr int OWEntranceEntranceId = 0xDBB73;
317
318// (0x13 entries, 2 bytes each) modified(less 0x400)
319// map16 coordinates for each hole
320constexpr int OWHolePos = 0xDB800;
321
322// (0x13 entries, 2 bytes each) corresponding
323// area numbers for each hole
324constexpr int OWHoleArea = 0xDB826;
325
326//(0x13 entries, 1 byte each) corresponding entrance numbers
327constexpr int OWHoleEntrance = 0xDB84C;
328
329// OWEntrances Expansion
330
331// Instructions for editors
332// if byte at (PC) address 0xDB895 == B8 then it is vanilla
333// Load normal overworld entrances data
334// Otherwise load from the expanded space
335// When saving just save in expanded space 256 values for each
336// (PC Addresses) - you can find snes address at the orgs below
337// 0x0DB35F = (short) Map16 tile address (mapPos in ZS)
338// 0x0DB55F = (short) Screen ID (MapID in ZS)
339// 0x0DB75F = (byte) Entrance leading to (EntranceID in ZS)
340
341// *Important* the Screen ID now also require bit 0x8000 (15) being set to tell
342// entrance is a hole
344 public:
345 uint16_t map_pos_;
349 bool is_hole_ = false;
350 bool deleted = false;
351
352 OverworldEntrance() = default;
353 OverworldEntrance(int x, int y, uchar entrance_id, short map_id,
354 uint16_t map_pos, bool hole)
355 : map_pos_(map_pos), entrance_id_(entrance_id), is_hole_(hole) {
356 x_ = x;
357 y_ = y;
358 map_id_ = map_id;
359 entity_id_ = entrance_id;
361
362 int mapX = (map_id_ - ((map_id_ / 8) * 8));
363 int mapY = (map_id_ / 8);
364 area_x_ = (uchar)((std::abs(x - (mapX * 512)) / 16));
365 area_y_ = (uchar)((std::abs(y - (mapY * 512)) / 16));
366 }
367
368 void UpdateMapProperties(uint16_t map_id) override {
369 map_id_ = map_id;
370
371 if (map_id_ >= 64) {
372 map_id_ -= 64;
373 }
374
375 int mapX = (map_id_ - ((map_id_ / 8) * 8));
376 int mapY = (map_id_ / 8);
377
378 area_x_ = (uchar)((std::abs(x_ - (mapX * 512)) / 16));
379 area_y_ = (uchar)((std::abs(y_ - (mapY * 512)) / 16));
380
381 map_pos_ = (uint16_t)((((area_y_) << 6) | (area_x_ & 0x3F)) << 1);
382 }
383};
384
385constexpr int kOverworldMapPaletteIds = 0x7D1C;
386constexpr int kOverworldSpritePaletteIds = 0x7B41;
387constexpr int overworldMapPaletteGroup = 0x75504;
388constexpr int overworldSpritePaletteGroup = 0x75580;
389constexpr int overworldSpriteset = 0x7A41;
390constexpr int overworldSpecialGFXGroup = 0x16821;
391constexpr int overworldSpecialPALGroup = 0x16831;
392constexpr int overworldSpritesBegining = 0x4C881;
393constexpr int overworldSpritesAgahnim = 0x4CA21;
394constexpr int overworldSpritesZelda = 0x4C901;
395
396constexpr int kAreaGfxIdPtr = 0x7C9C;
397constexpr int kOverworldMessageIds = 0x3F51D;
398
399constexpr int overworldMusicBegining = 0x14303;
400constexpr int overworldMusicZelda = 0x14303 + 0x40;
401constexpr int overworldMusicMasterSword = 0x14303 + 0x80;
402constexpr int overworldMusicAgahim = 0x14303 + 0xC0;
403constexpr int overworldMusicDW = 0x14403;
404constexpr int overworldEntranceAllowedTilesLeft = 0xDB8C1;
406
407// 0x00 = small maps, 0x20 = large maps
408constexpr int overworldMapSize = 0x12844;
409
410// 0x01 = small maps, 0x03 = large maps
411constexpr int overworldMapSizeHighByte = 0x12884;
412
413// relative to the WORLD + 0x200 per map
414// large map that are not == parent id = same position as their parent!
415// eg for X position small maps :
416// 0000, 0200, 0400, 0600, 0800, 0A00, 0C00, 0E00
417// all Large map would be :
418// 0000, 0000, 0400, 0400, 0800, 0800, 0C00, 0C00
419constexpr int overworldMapParentId = 0x125EC;
420constexpr int overworldTransitionPositionY = 0x128C4;
421constexpr int overworldTransitionPositionX = 0x12944;
422constexpr int overworldScreenSize = 0x1788D;
423constexpr int OverworldScreenSizeForLoading = 0x4C635;
424
425// constexpr int OverworldScreenTileMapChangeByScreen = 0x12634;
430
431constexpr int OverworldMapDataOverflow = 0x130000;
432
433constexpr int transition_target_north = 0x13EE2;
434constexpr int transition_target_west = 0x13F62;
435constexpr int overworldCustomMosaicASM = 0x1301D0;
436constexpr int overworldCustomMosaicArray = 0x1301F0;
437
438// Expanded tile16 and tile32
439constexpr int kMap16TilesExpanded = 0x1E8000;
440constexpr int kMap32TileTRExpanded = 0x020000;
441constexpr int kMap32TileBLExpanded = 0x1F0000;
442constexpr int kMap32TileBRExpanded = 0x1F8000;
443constexpr int kMap32TileCountExpanded = 0x0067E0;
444
445constexpr int kMap16Tiles = 0x78000;
446constexpr int kNumOverworldMaps = 160;
447constexpr int kNumTile16Individual = 4096;
448constexpr int Map32PerScreen = 256;
449constexpr int NumberOfMap16 = 3752; // 4096
450constexpr int NumberOfMap16Ex = 4096; // 4096
451constexpr int LimitOfMap32 = 8864;
452constexpr int NumberOfOWSprites = 352;
454
462 public:
463 absl::Status Load(Rom &rom);
464 absl::Status LoadOverworldMaps();
465 void LoadTileTypes();
466 void LoadEntrances();
467
468 absl::Status LoadExits();
469 absl::Status LoadItems();
470 absl::Status LoadSprites();
471 absl::Status LoadSpritesFromMap(int spriteStart, int spriteCount,
472 int spriteIndex);
473
474 absl::Status Save(Rom &rom);
475 absl::Status SaveOverworldMaps();
476 absl::Status SaveLargeMaps();
477 absl::Status SaveEntrances();
478 absl::Status SaveExits();
479 absl::Status SaveItems();
480
481 absl::Status CreateTile32Tilemap();
482 absl::Status SaveMap16Expanded();
483 absl::Status SaveMap16Tiles();
484 absl::Status SaveMap32Expanded();
485 absl::Status SaveMap32Tiles();
486
487 absl::Status SaveMapProperties();
488
489 void Destroy() {
490 for (auto &map : overworld_maps_) {
491 map.Destroy();
492 }
493 overworld_maps_.clear();
494 all_entrances_.clear();
495 all_exits_.clear();
496 all_items_.clear();
497 all_sprites_.clear();
498 is_loaded_ = false;
499 }
500
501 int GetTileFromPosition(ImVec2 position) const {
502 if (current_world_ == 0) {
503 return map_tiles_.light_world[position.x][position.y];
504 } else if (current_world_ == 1) {
505 return map_tiles_.dark_world[position.x][position.y];
506 } else {
507 return map_tiles_.special_world[position.x][position.y];
508 }
509 }
510
511 OWBlockset &GetMapTiles(int world_type) {
512 switch (world_type) {
513 case 0:
514 return map_tiles_.light_world;
515 case 1:
516 return map_tiles_.dark_world;
517 case 2:
519 default:
520 return map_tiles_.light_world;
521 }
522 }
523
524 auto overworld_maps() const { return overworld_maps_; }
525 auto overworld_map(int i) const { return &overworld_maps_[i]; }
526 auto mutable_overworld_map(int i) { return &overworld_maps_[i]; }
527 auto exits() const { return &all_exits_; }
528 auto mutable_exits() { return &all_exits_; }
529 std::vector<gfx::Tile16> tiles16() const { return tiles16_; }
530 auto mutable_tiles16() { return &tiles16_; }
531 auto sprites(int state) const { return all_sprites_[state]; }
532 auto mutable_sprites(int state) { return &all_sprites_[state]; }
533 auto current_graphics() const {
534 return overworld_maps_[current_map_].current_graphics();
535 }
536 auto &entrances() { return all_entrances_; }
538 auto &holes() { return all_holes_; }
539 auto mutable_holes() { return &all_holes_; }
540 auto deleted_entrances() const { return deleted_entrances_; }
542 auto current_area_palette() const {
543 return overworld_maps_[current_map_].current_palette();
544 }
546 return overworld_maps_[current_map_].bitmap_data();
547 }
548 auto tile16_blockset_data() const {
549 return overworld_maps_[current_map_].current_tile16_blockset();
550 }
551 auto is_loaded() const { return is_loaded_; }
552 void set_current_map(int i) { current_map_ = i; }
553 auto map_tiles() const { return map_tiles_; }
554 auto mutable_map_tiles() { return &map_tiles_; }
555 auto all_items() const { return all_items_; }
556 auto mutable_all_items() { return &all_items_; }
557 auto all_tiles_types() const { return all_tiles_types_; }
559
560 private:
567
568 void FetchLargeMaps();
569 absl::StatusOr<uint16_t> GetTile16ForTile32(int index, int quadrant,
570 int dimension,
571 const uint32_t *map32address);
572 absl::Status AssembleMap32Tiles();
573 void AssembleMap16Tiles();
574 void AssignWorldTiles(int x, int y, int sx, int sy, int tpos,
575 OWBlockset &world);
576 void OrganizeMapTiles(std::vector<uint8_t> &bytes,
577 std::vector<uint8_t> &bytes2, int i, int sx, int sy,
578 int &ttpos);
579 absl::Status DecompressAllMapTiles();
580
581 bool is_loaded_ = false;
582 bool expanded_tile16_ = false;
583 bool expanded_tile32_ = false;
585
586 int game_state_ = 0;
590
593
594 uint8_t all_tiles_types_[0x200];
595
596 std::vector<gfx::Tile16> tiles16_;
597 std::vector<gfx::Tile32> tiles32_;
598 std::vector<uint16_t> tiles32_list_;
599 std::vector<gfx::Tile32> tiles32_unique_;
600 std::vector<OverworldMap> overworld_maps_;
601 std::vector<OverworldEntrance> all_entrances_;
602 std::vector<OverworldEntrance> all_holes_;
603 std::vector<OverworldExit> all_exits_;
604 std::vector<OverworldItem> all_items_;
605 std::vector<std::vector<Sprite>> all_sprites_;
606
607 std::vector<uint64_t> deleted_entrances_;
608
609 std::vector<std::vector<uint8_t>> map_data_p1 =
610 std::vector<std::vector<uint8_t>>(kNumOverworldMaps);
611 std::vector<std::vector<uint8_t>> map_data_p2 =
612 std::vector<std::vector<uint8_t>>(kNumOverworldMaps);
613
614 std::vector<int> map_pointers1_id = std::vector<int>(kNumOverworldMaps);
615 std::vector<int> map_pointers2_id = std::vector<int>(kNumOverworldMaps);
616
617 std::vector<int> map_pointers1 = std::vector<int>(kNumOverworldMaps);
618 std::vector<int> map_pointers2 = std::vector<int>(kNumOverworldMaps);
619
620 std::vector<absl::flat_hash_map<uint16_t, int>> usage_stats_;
621};
622
623} // namespace overworld
624} // namespace zelda3
625} // namespace app
626} // namespace yaze
627
628#endif
The Rom class is used to load, save, and modify Rom data.
Definition rom.h:136
A class to hold a shared pointer to a Rom object.
Definition rom.h:576
A class to manage experimental feature flags.
Definition common.h:36
Base class for all overworld and dungeon entities.
Definition common.h:35
enum yaze::app::zelda3::GameEntity::EntityType entity_type_
void UpdateMapProperties(uint16_t map_id) override
Definition overworld.h:368
OverworldEntrance(int x, int y, uchar entrance_id, short map_id, uint16_t map_pos, bool hole)
Definition overworld.h:353
OverworldExit(uint16_t room_id, uchar map_id, uint16_t vram_location, uint16_t y_scroll, uint16_t x_scroll, uint16_t player_y, uint16_t player_x, uint16_t camera_y, uint16_t camera_x, uchar scroll_mod_y, uchar scroll_mod_x, uint16_t door_type_1, uint16_t door_type_2, bool deleted=false)
Definition overworld.h:176
void UpdateMapProperties(uint16_t map_id) override
Definition overworld.h:236
OverworldItem(uint8_t id, uint16_t room_map_id, int x, int y, bool bg2)
Definition overworld.h:86
void UpdateMapProperties(uint16_t room_map_id) override
Definition overworld.h:103
Represents the full Overworld data, light and dark world.
Definition overworld.h:461
std::vector< std::vector< Sprite > > all_sprites_
Definition overworld.h:605
OWBlockset & GetMapTiles(int world_type)
Definition overworld.h:511
std::vector< OverworldItem > all_items_
Definition overworld.h:604
std::vector< gfx::Tile32 > tiles32_
Definition overworld.h:597
std::vector< absl::flat_hash_map< uint16_t, int > > usage_stats_
Definition overworld.h:620
std::vector< OverworldEntrance > all_entrances_
Definition overworld.h:601
std::vector< gfx::Tile32 > tiles32_unique_
Definition overworld.h:599
std::vector< OverworldExit > all_exits_
Definition overworld.h:603
void OrganizeMapTiles(std::vector< uint8_t > &bytes, std::vector< uint8_t > &bytes2, int i, int sx, int sy, int &ttpos)
Definition overworld.cc:198
std::vector< uint64_t > deleted_entrances_
Definition overworld.h:607
std::vector< gfx::Tile16 > tiles16_
Definition overworld.h:596
void AssignWorldTiles(int x, int y, int sx, int sy, int tpos, OWBlockset &world)
Definition overworld.cc:186
absl::StatusOr< uint16_t > GetTile16ForTile32(int index, int quadrant, int dimension, const uint32_t *map32address)
Definition overworld.cc:101
std::vector< gfx::Tile16 > tiles16() const
Definition overworld.h:529
std::vector< OverworldEntrance > all_holes_
Definition overworld.h:602
int GetTileFromPosition(ImVec2 position) const
Definition overworld.h:501
std::vector< OverworldMap > overworld_maps_
Definition overworld.h:600
std::vector< std::vector< uint8_t > > map_data_p2
Definition overworld.h:611
std::vector< std::vector< uint8_t > > map_data_p1
Definition overworld.h:609
absl::Status LoadSpritesFromMap(int spriteStart, int spriteCount, int spriteIndex)
Definition overworld.cc:475
std::vector< uint16_t > tiles32_list_
Definition overworld.h:598
unsigned char uchar
Definition constants.h:114
constexpr int overworldTransitionPositionY
Definition overworld.h:420
constexpr int kMap32TileCountExpanded
Definition overworld.h:443
constexpr int NumberOfOWSprites
Definition overworld.h:452
constexpr int kOverworldItemsAddress
Definition overworld.h:71
constexpr int OWWhirlpoolPosition
Definition overworld.h:151
constexpr int overworldSpritePaletteGroup
Definition overworld.h:388
constexpr int overworldMapParentId
Definition overworld.h:419
constexpr int GraveLinkSpecialStairs
Definition overworld.h:36
constexpr int kMap32TileBLExpanded
Definition overworld.h:441
constexpr int OWExitYCameraWhirlpool
Definition overworld.h:147
constexpr int OWExitDoorPosition
Definition overworld.h:135
constexpr int overworldSpriteset
Definition overworld.h:389
constexpr int kMap32TileTRExpanded
Definition overworld.h:440
constexpr int overworldMapPaletteGroup
Definition overworld.h:387
constexpr int overworldItemsEndData
Definition overworld.h:73
constexpr int OverworldScreenSizeForLoading
Definition overworld.h:423
constexpr int OverworldScreenTileMapChangeByScreen2
Definition overworld.h:427
constexpr int OWExitXCameraWhirlpool
Definition overworld.h:148
constexpr int kOverworldMapPaletteIds
Definition overworld.h:385
constexpr int overworldSpritesZelda
Definition overworld.h:394
constexpr int overworldCustomMosaicArray
Definition overworld.h:436
constexpr int OverworldMapDataOverflow
Definition overworld.h:431
constexpr int OWEntranceEntranceId
Definition overworld.h:316
constexpr int kNumTile16Individual
Definition overworld.h:447
constexpr int overworldEntranceAllowedTilesRight
Definition overworld.h:405
constexpr int NumberOfMap16Ex
Definition overworld.h:450
constexpr int kNumOverworldMaps
Definition overworld.h:446
constexpr int OWExitXScrollWhirlpool
Definition overworld.h:144
constexpr int overworldMapSize
Definition overworld.h:408
constexpr int overworldMusicDW
Definition overworld.h:403
constexpr int OWExitUnk1Whirlpool
Definition overworld.h:149
constexpr int OWExitUnk2Whirlpool
Definition overworld.h:150
constexpr int overworldMusicMasterSword
Definition overworld.h:401
constexpr int OWExitXPlayerWhirlpool
Definition overworld.h:146
constexpr int overworldCustomMosaicASM
Definition overworld.h:435
constexpr int overworldScreenSize
Definition overworld.h:422
constexpr int kMap16TilesExpanded
Definition overworld.h:439
constexpr int OWExitDoorType2
Definition overworld.h:139
constexpr int OWExitMapIdWhirlpool
Definition overworld.h:141
constexpr int overworldMusicBegining
Definition overworld.h:399
constexpr int kOverworldSpritePaletteIds
Definition overworld.h:386
constexpr int OverworldScreenTileMapChangeByScreen3
Definition overworld.h:428
constexpr int transition_target_north
Definition overworld.h:433
constexpr int overworldMusicZelda
Definition overworld.h:400
constexpr int overworldSpecialGFXGroup
Definition overworld.h:390
constexpr int overworldMapSizeHighByte
Definition overworld.h:411
constexpr int GravesCountOnY
Definition overworld.h:33
constexpr int OWExitYScrollWhirlpool
Definition overworld.h:143
constexpr int overworldSpritesBegining
Definition overworld.h:392
constexpr int overworldMusicAgahim
Definition overworld.h:402
constexpr int transition_target_west
Definition overworld.h:434
constexpr int kMap32TileBRExpanded
Definition overworld.h:442
constexpr int overworldItemsBank
Definition overworld.h:72
const std::vector< std::string > kSecretItemNames
Definition overworld.h:39
constexpr int OverworldScreenTileMapChangeByScreen4
Definition overworld.h:429
constexpr int overworldSpecialPALGroup
Definition overworld.h:391
constexpr int overworldTransitionPositionX
Definition overworld.h:421
constexpr int GravesYTilePos
Definition overworld.h:26
constexpr int overworldSpritesAgahnim
Definition overworld.h:393
constexpr int OverworldScreenTileMapChangeByScreen1
Definition overworld.h:426
constexpr int OWExitDoorType1
Definition overworld.h:138
constexpr int overworldItemsPointers
Definition overworld.h:70
constexpr int GraveLinkSpecialHole
Definition overworld.h:35
constexpr int OWExitVramWhirlpool
Definition overworld.h:142
constexpr int GravesXTilePos
Definition overworld.h:27
constexpr int GravesTilemapPos
Definition overworld.h:28
constexpr int OWExitYPlayerWhirlpool
Definition overworld.h:145
constexpr int overworldEntranceAllowedTilesLeft
Definition overworld.h:404
constexpr int kOverworldMessageIds
Definition overworld.h:397
std::vector< std::vector< uint16_t > > OWBlockset
Represents tile32 data for the overworld.
Definition common.h:19
Definition common.cc:22
Overworld map tile32 data.
Definition common.h:24