diff options
author | nathan <nathansmith@disroot.org> | 2025-07-06 07:54:28 +0000 |
---|---|---|
committer | nathan <nathansmith@disroot.org> | 2025-07-06 07:54:28 +0000 |
commit | 404d0f1bdf95d5951bf2a5e77dca2f9dc18f373e (patch) | |
tree | db78303dc890b589696770ad713e801e6e713abf /src/game.c | |
parent | 025655dcf21ec40f1730097d3614114c704f5a17 (diff) | |
download | FindThings-404d0f1bdf95d5951bf2a5e77dca2f9dc18f373e.tar.gz FindThings-404d0f1bdf95d5951bf2a5e77dca2f9dc18f373e.tar.bz2 FindThings-404d0f1bdf95d5951bf2a5e77dca2f9dc18f373e.zip |
Cleaned up shit
Diffstat (limited to 'src/game.c')
-rw-r--r-- | src/game.c | 16 |
1 files changed, 4 insertions, 12 deletions
@@ -20,15 +20,8 @@ void initGame(Game* game) game->player = createPlayer(); game->player.position = (Vector3){50.0, 30.0, 50.0}; - // Heightmap. - Mesh heightmapMesh = GenMeshHeightmap(game->assets.images[HEIGHT_MAP_IMAGE], - (Vector3){1000.0, 30.0, 1000.0}); - game->heightmap = LoadModelFromMesh(heightmapMesh); - game->heightmap.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = - game->assets.textures[HEIGHT_MAP_TEXTURE]; - - game->heightmapColors = LoadImageColors( - game->assets.images[HEIGHT_MAP_IMAGE]); + // World. + game->world = createWorld(&game->assets); DisableCursor(); } @@ -46,7 +39,7 @@ void updateGameScene(Game* game) updatePlayer(&game->player, game); - DrawModel(game->heightmap, Vector3Zero(), 1.0, WHITE); + updateWorld(&game->world, game); EndMode3D(); } @@ -75,7 +68,6 @@ void updateGame(Game* game) void closeGame(Game* game) { closeAssets(&game->assets); - UnloadModel(game->heightmap); - UnloadImageColors(game->heightmapColors); + freeWorld(game->world); CloseWindow(); } |