Fix naming conflicts and finalize v1.9.0 build

This commit is contained in:
Michael Howard 2026-04-23 16:42:56 -05:00
parent 05d8a5fb35
commit 704dbae342
1 changed files with 10 additions and 7 deletions

View File

@ -13,6 +13,9 @@
#include "rlgl.h" #include "rlgl.h"
#define CHUNK_SIZE 32 #define CHUNK_SIZE 32
#ifndef PI
#define PI 3.1415926535f
#endif
#define CHUNK_HEIGHT 128 #define CHUNK_HEIGHT 128
#define RENDER_DISTANCE 1 // 3x3 chunks visible for performance #define RENDER_DISTANCE 1 // 3x3 chunks visible for performance
@ -1260,11 +1263,11 @@ int main(void)
// --- PLAYER NAME POPUP (IF MISSING) --- // --- PLAYER NAME POPUP (IF MISSING) ---
if (playerName == "") { if (playerName == "") {
DrawRectangle(0, 0, currentWidth, currentHeight, (Color){ 0, 0, 0, 200 }); DrawRectangle(0, 0, currentWidth, currentHeight, (Color){ 0, 0, 0, 200 });
int pw = 400, ph = 200; int nw = 400, nh = 200;
Rectangle pBox = { (float)currentWidth/2 - pw/2, (float)currentHeight/2 - ph/2, (float)pw, (float)ph }; Rectangle nBox = { (float)currentWidth/2 - nw/2, (float)currentHeight/2 - nh/2, (float)nw, (float)nh };
DrawRectangleRec(pBox, (Color){ 40, 40, 40, 255 }); DrawRectangleRec(nBox, (Color){ 40, 40, 40, 255 });
DrawRectangleLinesEx(pBox, 2.0f, WHITE); DrawRectangleLinesEx(nBox, 2.0f, WHITE);
DrawTextEx(customFont, "Enter Your Name", (Vector2){ pBox.x + 20, pBox.y + 20 }, 24, 1.0f, WHITE); DrawTextEx(customFont, "Enter Your Name", (Vector2){ nBox.x + 20, nBox.y + 20 }, 24, 1.0f, WHITE);
static char inputName[32] = {0}; static char inputName[32] = {0};
int c = GetCharPressed(); int c = GetCharPressed();
@ -1281,8 +1284,8 @@ int main(void)
if (len > 0) inputName[len-1] = '\0'; if (len > 0) inputName[len-1] = '\0';
} }
DrawRectangle(pBox.x + 20, pBox.y + 60, pw - 40, 40, BLACK); DrawRectangle(nBox.x + 20, nBox.y + 60, nw - 40, 40, BLACK);
DrawTextEx(customFont, inputName, (Vector2){ pBox.x + 30, pBox.y + 70 }, 20, 1.0f, WHITE); DrawTextEx(customFont, inputName, (Vector2){ nBox.x + 30, nBox.y + 70 }, 20, 1.0f, WHITE);
if (IsKeyPressed(KEY_ENTER) && strlen(inputName) > 0) { if (IsKeyPressed(KEY_ENTER) && strlen(inputName) > 0) {
playerName = inputName; playerName = inputName;