diff options
| author | nathan <nathansmith@disroot.org> | 2026-01-31 17:44:51 +0000 |
|---|---|---|
| committer | nathan <nathansmith@disroot.org> | 2026-01-31 17:44:51 +0000 |
| commit | 3a363047f42bc27c5caa20112fe578d608826423 (patch) | |
| tree | 0afc8b1a679ec6c21a5a56da2bd79d756770ecaf | |
| parent | 966afc26c23fdda3ce279559f154899cb0e08b31 (diff) | |
| download | FindThings-3a363047f42bc27c5caa20112fe578d608826423.tar.gz FindThings-3a363047f42bc27c5caa20112fe578d608826423.tar.bz2 FindThings-3a363047f42bc27c5caa20112fe578d608826423.zip | |
That didnt work out
| -rw-r--r-- | src/game.c | 63 | ||||
| -rw-r--r-- | src/game.h | 6 |
2 files changed, 1 insertions, 68 deletions
@@ -45,22 +45,6 @@ void resetScreenScale(Game* game) } } -void initMainMenu(Game* game) -{ - game->mainMenu.renderTexture = LoadRenderTexture(GetRenderWidth(), - GetRenderHeight()); - - game->mainMenu.camera = (Camera){ - .position = Vector3Zero(), - .target = (Vector3){0.0, 0.0, 1.0}, - .up = (Vector3){0.0, 1.0, 0.0}, - .fovy = 90.0, - .projection = CAMERA_PERSPECTIVE - }; - - game->mainMenu.sphere = LoadModelFromMesh(GenMeshSphere(1.0, 7, 14)); -} - void initGame(Game* game) { game->sceneId = MAIN_MENU_SCENE; @@ -116,9 +100,6 @@ void initGame(Game* game) // Inventory. initInventory(&game->inventory, &game->settings); - // Main menu. - initMainMenu(game); - // disableGameCursor(game); } @@ -156,33 +137,9 @@ void mainMenuHandleWidgets(Game* game, Vector2 position) } } -void updateMainMenuBouncy(Game* game) -{ - BeginMode3D(game->mainMenu.camera); - - game->mainMenu.sphere.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = - game->mainMenu.renderTexture.texture; - DrawModel(game->mainMenu.sphere, - (Vector3){Wrap(GetTime(), -10.0, 10.0), 0.0, 5.0}, - 1.0, - WHITE); - - EndMode3D(); -} - -// TODO: Use render texture instead of screenshot. void updateMainMenuScene(Game* game) { - Texture texture = game->mainMenu.renderTexture.texture; - - BeginTextureMode(game->mainMenu.renderTexture); - - DrawTexturePro(texture, - (Rectangle){0.0, 0.0, texture.width, -texture.height}, - (Rectangle){0.0, 0.0, texture.width, texture.height}, - (Vector2){0.0, 0.0}, - 0.0, - WHITE); + ClearBackground(BLACK); float renderWidth = GetRenderWidth(); float renderHeight = GetRenderHeight(); @@ -229,17 +186,6 @@ void updateMainMenuScene(Game* game) WHITE); mainMenuHandleWidgets(game, position); - - updateMainMenuBouncy(game); - - EndTextureMode(); - - DrawTexturePro(texture, - (Rectangle){0.0, 0.0, texture.width, -texture.height}, - (Rectangle){0.0, 0.0, texture.width, texture.height}, - (Vector2){0.0, 0.0}, - 0.0, - WHITE); } void drawGameTexturedBackground(Texture texture) @@ -506,12 +452,6 @@ void updateGame(Game* game) EndDrawing(); } -void closeMainMenu(Game* game) -{ - UnloadRenderTexture(game->mainMenu.renderTexture); - UnloadModel(game->mainMenu.sphere); -} - void closeGame(Game* game) { closeAssets(&game->assets); @@ -520,7 +460,6 @@ void closeGame(Game* game) UnloadModel(game->skybox); freeWorld(game->world); closeMap(&game->map); - closeMainMenu(game); CloseWindow(); } @@ -44,12 +44,6 @@ struct Game { AssetId postprocesserShader; bool ultraWideMode; } screen; - - struct { - RenderTexture renderTexture; - Camera camera; - Model sphere; - } mainMenu; }; void initGame(Game* game); |
