19 lines
406 B
C
19 lines
406 B
C
|
|
#include "../world.h"
|
||
|
|
#include "../npc.h"
|
||
|
|
#include "../player.h"
|
||
|
|
#include <SDL3/SDL_events.h>
|
||
|
|
|
||
|
|
void UpdateWorld(F32 delta, World *world) {
|
||
|
|
UpdateNPCs(delta, world);
|
||
|
|
}
|
||
|
|
|
||
|
|
void UpdateNPCs(F32 delta, World *world) {
|
||
|
|
for(int i = 0; i < world->npcCount; i++) {
|
||
|
|
updateNPC(delta, &world->npcs[i], world);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
void ProcessEvents(SDL_Event *event, World *world) {
|
||
|
|
PlayerUpdate(event, &world->player);
|
||
|
|
}
|