Changing file structure for assets.
This commit is contained in:
10
main.c
10
main.c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user