mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 01:23:51 +00:00
Add mount rider bob and hoofbeat sounds, improve world map
- Rider character bobs with mount's run animation (sinusoidal, 0.12u amplitude) - Mount hoofbeat footstep sounds triggered at 4 points per animation cycle - M key opens map directly to player's current zone instead of continent - Mouse wheel scroll zooms map in/out between world, continent, and zone views - Fog of war darkens unexplored zones on continent view, clears on visit
This commit is contained in:
parent
0874f4f239
commit
35fff9307d
4 changed files with 174 additions and 11 deletions
|
|
@ -252,6 +252,11 @@ private:
|
|||
uint32_t footstepLastAnimationId = 0;
|
||||
float footstepLastNormTime = 0.0f;
|
||||
bool footstepNormInitialized = false;
|
||||
|
||||
// Mount footstep tracking (separate from player's)
|
||||
uint32_t mountFootstepLastAnimId = 0;
|
||||
float mountFootstepLastNormTime = 0.0f;
|
||||
bool mountFootstepNormInitialized = false;
|
||||
bool sfxStateInitialized = false;
|
||||
bool sfxPrevGrounded = true;
|
||||
bool sfxPrevJumping = false;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include <glm/glm.hpp>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
namespace wowee {
|
||||
|
|
@ -45,12 +46,16 @@ private:
|
|||
void enterWorldView();
|
||||
void loadZonesFromDBC();
|
||||
int findBestContinentForPlayer(const glm::vec3& playerRenderPos) const;
|
||||
int findZoneForPlayer(const glm::vec3& playerRenderPos) const;
|
||||
bool zoneBelongsToContinent(int zoneIdx, int contIdx) const;
|
||||
bool getContinentProjectionBounds(int contIdx, float& left, float& right,
|
||||
float& top, float& bottom) const;
|
||||
void loadZoneTextures(int zoneIdx);
|
||||
void compositeZone(int zoneIdx);
|
||||
void renderImGuiOverlay(const glm::vec3& playerRenderPos, int screenWidth, int screenHeight);
|
||||
void updateExploration(const glm::vec3& playerRenderPos);
|
||||
void zoomIn(const glm::vec3& playerRenderPos);
|
||||
void zoomOut();
|
||||
|
||||
// World pos → map UV using a specific zone's bounds
|
||||
glm::vec2 renderPosToMapUV(const glm::vec3& renderPos, int zoneIdx) const;
|
||||
|
|
@ -80,6 +85,9 @@ private:
|
|||
std::unique_ptr<Shader> tileShader;
|
||||
GLuint tileQuadVAO = 0;
|
||||
GLuint tileQuadVBO = 0;
|
||||
|
||||
// Exploration / fog of war
|
||||
std::unordered_set<int> exploredZones; // zone indices the player has visited
|
||||
};
|
||||
|
||||
} // namespace rendering
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue