Align game clock and fix crafting table textures - v1.5.2

This commit is contained in:
Michael Howard 2026-04-23 14:56:03 -05:00
parent 99e348abc5
commit 224b80311a
9 changed files with 5 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 477 KiB

After

Width:  |  Height:  |  Size: 738 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 KiB

After

Width:  |  Height:  |  Size: 597 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 477 KiB

After

Width:  |  Height:  |  Size: 738 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 KiB

After

Width:  |  Height:  |  Size: 597 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 477 KiB

After

Width:  |  Height:  |  Size: 738 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 KiB

After

Width:  |  Height:  |  Size: 597 KiB

View File

@ -986,8 +986,8 @@ int main(void)
DrawTexturePro(titleTexture, sourceRec, destRec, origin, 0.0f, WHITE);
EndMode2D();
// Show Version Number (v1.5.1) in Red
DrawTextEx(customFont, "v1.5.1", (Vector2){ (float)currentWidth - 140, (float)currentHeight - 40 }, 22, 1.0f, RED);
// Show Version Number (v1.5.2) in Red
DrawTextEx(customFont, "v1.5.2", (Vector2){ (float)currentWidth - 140, (float)currentHeight - 40 }, 22, 1.0f, RED);
}
Vector2 mousePos = GetMousePosition();
@ -1421,7 +1421,8 @@ int main(void)
// ---- Day / Night Cycle Calculations ----
float cycleLength = 300.0f; // 5 minutes
float timeOfDay = fmodf(gameTime, cycleLength) / cycleLength;
float sunAngle = timeOfDay * 2.0f * PI - PI/2.0f; // Offset so it starts at sunrise
// timeOfDay: 0.0 = Midnight, 0.25 = 6am (Sunrise), 0.5 = Noon, 0.75 = 6pm (Sunset)
float sunAngle = timeOfDay * 2.0f * PI - PI/2.0f;
float dayFactor = (sinf(sunAngle) + 1.0f) / 2.0f; // 0 (night) to 1 (day)
float lightLevel = 0.2f + 0.8f * dayFactor; // Ambient light multiplier
@ -1576,8 +1577,7 @@ int main(void)
(Vector2){ 10, 80 }, 16, 1.0f, DARKGRAY);
// --- In-Game Clock ---
float clockTime = fmodf(timeOfDay + 0.25f, 1.0f); // Offset so 0.5 is noon
int totalMinutes = (int)(clockTime * 24 * 60);
int totalMinutes = (int)(timeOfDay * 24 * 60);
int hours = (totalMinutes / 60) % 24;
int minutes = totalMinutes % 60;
const char* ampm = (hours >= 12) ? "PM" : "AM";