mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
Initial commit: wowee native WoW 3.3.5a client
This commit is contained in:
commit
ce6cb8f38e
147 changed files with 32347 additions and 0 deletions
32
include/game/zone_manager.hpp
Normal file
32
include/game/zone_manager.hpp
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
namespace wowee {
|
||||
namespace game {
|
||||
|
||||
struct ZoneInfo {
|
||||
uint32_t id;
|
||||
std::string name;
|
||||
std::vector<std::string> musicPaths; // MPQ paths to music files
|
||||
};
|
||||
|
||||
class ZoneManager {
|
||||
public:
|
||||
void initialize();
|
||||
|
||||
uint32_t getZoneId(int tileX, int tileY) const;
|
||||
const ZoneInfo* getZoneInfo(uint32_t zoneId) const;
|
||||
std::string getRandomMusic(uint32_t zoneId) const;
|
||||
|
||||
private:
|
||||
// tile key = tileX * 100 + tileY
|
||||
std::unordered_map<int, uint32_t> tileToZone;
|
||||
std::unordered_map<uint32_t, ZoneInfo> zones;
|
||||
};
|
||||
|
||||
} // namespace game
|
||||
} // namespace wowee
|
||||
Loading…
Add table
Add a link
Reference in a new issue