Fixed some warnings
Moved global width/height
This commit is contained in:
12
code/first.c
12
code/first.c
@@ -26,13 +26,10 @@
|
||||
#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;
|
||||
(void)argv;
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
|
||||
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO))
|
||||
{
|
||||
@@ -150,6 +147,9 @@ int main(int argc, char **argv)
|
||||
|
||||
printf("%zu size in bytes\n", sizeof(TestNavMesh));
|
||||
|
||||
const int width = 1280;
|
||||
const int height = 720;
|
||||
|
||||
while (running)
|
||||
{
|
||||
SDL_Event e;
|
||||
@@ -161,7 +161,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
V3f projection = G_CameraUnproject(&game->camera, V2f_Clip(
|
||||
V2F(e.button.x, e.button.y),
|
||||
V2F(width, height)
|
||||
V2F((F32) width, (F32) height)
|
||||
));
|
||||
game->world->mouseProjected = V2F(projection.x, projection.y);
|
||||
ProcessEvents(&e, game->world);
|
||||
|
||||
Reference in New Issue
Block a user