Merge branch 'main' of yibble.dev:bulmanator/ld58
This commit is contained in:
25
code/first.c
25
code/first.c
@@ -14,7 +14,6 @@
|
||||
|
||||
#include "core/core.h"
|
||||
#include "core/types.h"
|
||||
#include "game/npc.h"
|
||||
#include "os/core.h"
|
||||
|
||||
#include "vulkan/core.h"
|
||||
@@ -27,6 +26,9 @@
|
||||
#include "game/impl/bandit.c"
|
||||
#include "game/testnavmesh.h"
|
||||
|
||||
const int width = 1280;
|
||||
const int height = 720;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
(void)argc;
|
||||
@@ -99,29 +101,26 @@ int main(int argc, char **argv)
|
||||
World *world = M_ArenaPush(arena, World);
|
||||
game->world = world;
|
||||
world->random = Random_Seed(29237489723847);
|
||||
world->npcCount = 1;
|
||||
world->npcCount = 2;
|
||||
for(U32 i = 0; i < world->npcCount; i++) {
|
||||
NPC *npc1 = &world->npcs[i];
|
||||
npc1->collision.pos.x = 15;
|
||||
npc1->collision.pos.y = 15;
|
||||
npc1->collision.size.x = 1;
|
||||
npc1->collision.size.y = 1;
|
||||
npc1->collision.size.y = 2;
|
||||
npc1->name = S("Matt");
|
||||
npc1->mode = NPC_ACTION_WAITING;
|
||||
npc1->currentArea = i;
|
||||
npc1->waitTime = 0;
|
||||
npc1->maxWaitTime = 5;
|
||||
npc1->currentNavNode = 0;
|
||||
npc1->collision.pos.x = 15;
|
||||
npc1->collision.pos.y = 15;
|
||||
npc1->collision.size.x = 10;
|
||||
npc1->collision.size.y = 10;
|
||||
}
|
||||
|
||||
Bandit *badman = &world->bandit;
|
||||
badman->collision.pos.x = 15;
|
||||
badman->collision.pos.y = 15;
|
||||
badman->collision.size.x = 10;
|
||||
badman->collision.size.y = 10;
|
||||
badman->collision.size.x = 1;
|
||||
badman->collision.size.y = 2;
|
||||
badman->name = S("Leroy Brown");
|
||||
badman->mode = BANDIT_WAITING;
|
||||
badman->waitTime = 0;
|
||||
@@ -132,10 +131,12 @@ int main(int argc, char **argv)
|
||||
|
||||
world->navMesh = &TestNavMesh;
|
||||
world->npcPOI[0] = 100;
|
||||
world->player.world = world;
|
||||
world->player.pos.x = 0;
|
||||
world->player.pos.y = 0;
|
||||
world->player.bulletsLoaded = PLAYER_BULLET_COUNT;
|
||||
world->player.reloadTimer = 0;
|
||||
world->player.currentArea = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -158,7 +159,11 @@ int main(int argc, char **argv)
|
||||
{
|
||||
running = false;
|
||||
}
|
||||
|
||||
V3f projection = G_CameraUnproject(&game->camera, V2f_Clip(
|
||||
V2F(e.button.x, e.button.y),
|
||||
V2F(width, height)
|
||||
));
|
||||
game->world->mouseProjected = V2F(projection.x, projection.y);
|
||||
ProcessEvents(&e, game->world);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user