Changing file structure for assets.

This commit is contained in:
2025-08-30 09:54:07 -05:00
parent 897b33a57a
commit 48788a7296
13 changed files with 6 additions and 4 deletions

10
main.c
View File

@@ -38,6 +38,8 @@ enum game_state {
//Defining program structure
//----------------------------------------------------------------------------------
//bob
typedef struct
{
Camera camera; // <- now part of the game state
@@ -126,12 +128,12 @@ int main(void)
UpdateCameraAngle(&g);
// Load GLTF model (no animations)
//Model model = LoadModel("bad_sphere.glb");
//Model model = LoadModel("resources/3d_models/bad_sphere.glb");
//Vector3 position = { 0.0f, 0.0f, 0.0f };
// Load a 2D image as texture for the billboard
//Billboards always point toward the active camera.
Texture2D sign = LoadTexture("diard-charles.jpg");
Texture2D sign = LoadTexture("resources/sprites/diard-charles.jpg");
GenTextureMipmaps(&sign);
SetTextureFilter(sign, TEXTURE_FILTER_BILINEAR); // optional but looks nicer
Vector3 bbPos = (Vector3){ 1.0f, 2.5f, 1.0f }; // where in 3D world to place it
@@ -139,14 +141,14 @@ int main(void)
// Load a 2D image as texture for the billboard
//Billboards always point toward the active camera.
Texture2D tree = LoadTexture("tree.png");
Texture2D tree = LoadTexture("resources/sprites/tree.png");
GenTextureMipmaps(&tree);
SetTextureFilter(tree, TEXTURE_FILTER_BILINEAR); // optional but looks nicer
Vector3 treepos = (Vector3){ 0.0f, 7.0f, 0.0f }; // where in 3D world to place it
float treeSize = 15.0f; // billboard height in world units
// --- Grass tile setup ---
Texture2D texGrass = LoadTexture("grass_textures/Grass_01.png"); // adjust path
Texture2D texGrass = LoadTexture("resources/textures/grass_textures/Grass_01.png"); // adjust path
GenTextureMipmaps(&texGrass);
SetTextureFilter(texGrass, TEXTURE_FILTER_TRILINEAR); // nicer at angles
SetTextureWrap(texGrass, TEXTURE_WRAP_REPEAT);