Added covers, cross-fade
This commit is contained in:
1 parent
0f2b2e55af
commit
e618c91415
29 files changed
+40462
-29
No files matched your search
+5
-2
@@ -24,7 +24,7 @@ namespace ZL
|
||||
static constexpr float CAMERA_FOV_Y = 1.0f / 1.5f;
|
||||
// How close the player needs to be to a peaceful NPC before the
|
||||
// on_npc_interact callback fires and the conversation begins.
|
||||
static constexpr float NPC_TALK_DISTANCE = 1.25f;
|
||||
static constexpr float NPC_TALK_DISTANCE = 1.35f;
|
||||
|
||||
static float distancePointToSegmentXZ(const Eigen::Vector3f& p,
|
||||
const Eigen::Vector3f& a,
|
||||
@@ -654,6 +654,7 @@ namespace ZL
|
||||
//glBindTexture(GL_TEXTURE_2D, roomTexture->getTexID());
|
||||
//renderer.DrawVertexRenderStruct(roomMesh);
|
||||
|
||||
renderer.RenderUniform1f("uAlpha", 1.0f);
|
||||
for (auto& [name, gameObj] : gameObjects) {
|
||||
glBindTexture(GL_TEXTURE_2D, gameObj.texture->getTexID());
|
||||
renderer.DrawVertexRenderStruct(gameObj.mesh);
|
||||
@@ -664,7 +665,7 @@ namespace ZL
|
||||
intObj.draw(renderer);
|
||||
}
|
||||
}
|
||||
|
||||
renderer.RenderUniform1f("uAlpha", 1.0f);
|
||||
const Eigen::Matrix4f currentView = renderer.GetCurrentModelViewMatrix();
|
||||
if (player) player->prepareHitSparksForDraw(currentView);
|
||||
for (auto& npc : npcs) npc->prepareHitSparksForDraw(currentView);
|
||||
@@ -832,6 +833,7 @@ namespace ZL
|
||||
//renderer.DrawVertexRenderStruct(roomMesh);
|
||||
|
||||
CheckGlError(__FILE__, __LINE__);
|
||||
renderer.RenderUniform1f("uAlpha", 1.0f);
|
||||
for (auto& [name, gameObj] : gameObjects) {
|
||||
glBindTexture(GL_TEXTURE_2D, gameObj.texture->getTexID());
|
||||
renderer.DrawVertexRenderStruct(gameObj.mesh);
|
||||
@@ -845,6 +847,7 @@ namespace ZL
|
||||
}
|
||||
CheckGlError(__FILE__, __LINE__);
|
||||
|
||||
|
||||
#ifdef DEBUG_LIGHT
|
||||
// In debug-light mode characters use the plain shaders (draw normally
|
||||
// but from the light's viewpoint — projection/view already on stack).
|
||||
|
||||
Reference in new issue
Block a user