Changing file structure for assets.
10
main.c
@@ -38,6 +38,8 @@ enum game_state {
|
|||||||
//Defining program structure
|
//Defining program structure
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
//bob
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
Camera camera; // <- now part of the game state
|
Camera camera; // <- now part of the game state
|
||||||
@@ -126,12 +128,12 @@ int main(void)
|
|||||||
UpdateCameraAngle(&g);
|
UpdateCameraAngle(&g);
|
||||||
|
|
||||||
// Load GLTF model (no animations)
|
// 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 };
|
//Vector3 position = { 0.0f, 0.0f, 0.0f };
|
||||||
|
|
||||||
// Load a 2D image as texture for the billboard
|
// Load a 2D image as texture for the billboard
|
||||||
//Billboards always point toward the active camera.
|
//Billboards always point toward the active camera.
|
||||||
Texture2D sign = LoadTexture("diard-charles.jpg");
|
Texture2D sign = LoadTexture("resources/sprites/diard-charles.jpg");
|
||||||
GenTextureMipmaps(&sign);
|
GenTextureMipmaps(&sign);
|
||||||
SetTextureFilter(sign, TEXTURE_FILTER_BILINEAR); // optional but looks nicer
|
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
|
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
|
// Load a 2D image as texture for the billboard
|
||||||
//Billboards always point toward the active camera.
|
//Billboards always point toward the active camera.
|
||||||
Texture2D tree = LoadTexture("tree.png");
|
Texture2D tree = LoadTexture("resources/sprites/tree.png");
|
||||||
GenTextureMipmaps(&tree);
|
GenTextureMipmaps(&tree);
|
||||||
SetTextureFilter(tree, TEXTURE_FILTER_BILINEAR); // optional but looks nicer
|
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
|
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
|
float treeSize = 15.0f; // billboard height in world units
|
||||||
|
|
||||||
// --- Grass tile setup ---
|
// --- 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);
|
GenTextureMipmaps(&texGrass);
|
||||||
SetTextureFilter(texGrass, TEXTURE_FILTER_TRILINEAR); // nicer at angles
|
SetTextureFilter(texGrass, TEXTURE_FILTER_TRILINEAR); // nicer at angles
|
||||||
SetTextureWrap(texGrass, TEXTURE_WRAP_REPEAT);
|
SetTextureWrap(texGrass, TEXTURE_WRAP_REPEAT);
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 197 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |