Added random number generator

Fixed typo in calculate camera
Removed some warning
This commit is contained in:
2025-10-05 15:17:37 +01:00
parent 1d70f3ae20
commit 5cabf845b6
8 changed files with 70 additions and 15 deletions

View File

@@ -290,7 +290,7 @@ void G_PipelinesLoad(G_State *game) {
Vk_PipelineCreate(basic);
}
void G_CalulateCamera(G_Camera *camera, F32 aspect) {
void G_CalculateCamera(G_Camera *camera, F32 aspect) {
Mat4x4FInv proj = M4x4F_Perspective(camera->fov, aspect, camera->nearp, camera->farp);
Mat4x4FInv view = M4x4F_CameraView(camera->x, camera->y, camera->z, camera->p);

View File

@@ -23,7 +23,7 @@ struct G_State {
function void G_ImagesLoad(G_State *game);
function void G_PipelinesLoad(G_State *game);
function void G_CalulateCamera(G_Camera *camera, F32 aspect);
function void G_CalculateCamera(G_Camera *camera, F32 aspect);
#include "aabb.h"
#include "player.h"

View File

@@ -8,10 +8,10 @@ void UpdateWorld(F32 delta, World *world) {
}
void UpdateNPCs(F32 delta, World *world) {
for(int i = 0; i < world->npcCount; i++) {
for(U32 i = 0; i < world->npcCount; i++) {
updateNPC(delta, &world->npcs[i], world);
}
}
}
void ProcessEvents(SDL_Event *event, World *world) {
PlayerUpdate(event, &world->player);

View File

@@ -25,7 +25,7 @@ struct World {
NPC npcs[128];
////Bandit
// The bandit the player is after.
// The bandit the player is after.
Bandit bandit;
// NPC points of interest, places to walk to.