botw-completer/source/map.h
badbl0cks 6bff4b6fcd
Refactor codebase and complete implementation
- Consolidate development files into final implementation
- Replace basic prototypes with full feature implementations
- Add complete hash-based save data access system
- Implement advanced map pin management algorithms
- Add comprehensive error handling and user feedback
- Complete Korok seed database with all 908 locations
2023-05-24 09:08:09 -07:00

48 lines
No EOL
1.7 KiB
C

#ifndef MAP_H
#define MAP_H
#include <stdlib.h>
#include <switch.h>
#define MAP_PIN_SWORD 0x1B
#define MAP_PIN_BOW 0x1C
#define MAP_PIN_SHIELD 0x1D
#define MAP_PIN_POT 0x1E
#define MAP_PIN_STAR 0x1F
#define MAP_PIN_CHEST 0x20
#define MAP_PIN_SKULL 0x21
#define MAP_PIN_LEAF 0x22
#define MAP_PIN_TOWER 0x23
#define MAP_PIN_EMPTY 0xFFFFFFFF
typedef struct {
u32 hash;
float x;
float y;
float z;
} Point;
void sortKoroksByDistance();
void loadPlayerLocation();
void eraseCompletedKorokPins();
int compDistance (const void* elem1, const void* elem2);
typedef bool (*func_t_0)(u32 offset, u32 value, u32 icon);
typedef bool (*func_t_1)(u32 offset, float value_x, float value_y, float value_z, Point location);
bool _loadMapPinIcons(u32 offset, u32 value, u32 icon);
bool _eraseMapPinIcons(u32 offset, u32 value, u32 icon);
bool _eraseMapPinLocs(u32 offset, float value_x, float value_y, float value_z, Point location);
bool _convertInvalidMapPinIcons(u32 offset, u32 value, u32 icon);
bool isKorokCompletedOrMarked(Point korok);
void addMapPin(u32 icon, Point location);
void eraseMapPins();
void convertInvalidMapPinIcons();
void countMapPins();
bool addPinToMap(u32 pin_icon, Point location);
bool _addMapPinLoc(u32 offset, float value_x, float value_y, float value_z, Point location);
bool _addMapPinIcon(u32 offset, u32 value, u32 icon);
bool isLocationInPinLoc(Point location);
bool _isLocationInPinLoc(u32 offset, float value_x, float value_y, float value_z, Point location);
bool _loadMapPinLocs(u32 offset, float value_x, float value_y, float value_z, Point location);
void iterateMapPinIcons(func_t_0 iterFunc, u32 icon);
void iterateMapPinLocs(func_t_1 iterFunc, Point location);
#endif