Fixed many casting issues.

This commit is contained in:
2021-08-21 12:18:01 -07:00
parent d660d732b9
commit fabb35b7cf
25 changed files with 133 additions and 212 deletions

View File

@ -35,9 +35,9 @@
#define FONT_SPACE ' ' #define FONT_SPACE ' '
// Heights // Heights
#define FONT_LINE_HEIGHT FONT_TEXTURE_SIZE*0.75 #define FONT_LINE_HEIGHT FONT_TEXTURE_SIZE*0.75f
#define FONT_INITIAL_LINE FONT_LINE_HEIGHT*0.75 #define FONT_INITIAL_LINE FONT_LINE_HEIGHT*0.75f
#define FONT_SPACE_SIZE FONT_TEXTURE_SIZE*0.45 #define FONT_SPACE_SIZE FONT_TEXTURE_SIZE*0.45f
/** Maximum number of characters a font text info can hold. */ /** Maximum number of characters a font text info can hold. */
#define FONT_TEXT_INFO_CHARS_MAX 1024 #define FONT_TEXT_INFO_CHARS_MAX 1024

View File

@ -7,8 +7,8 @@
#pragma once #pragma once
#define EPOCH_FIXED_STEP 0.016 #define EPOCH_FIXED_STEP 0.016f
#define EPOCH_SMALLEST_STEP 0.001 #define EPOCH_SMALLEST_STEP 0.001f
typedef struct { typedef struct {
/** /**

View File

@ -5,6 +5,8 @@
#pragma once #pragma once
#define MATH_PI ((float)M_PI)
/** /**
* Returns the modulous a result for b. Consdiders negative numbers correctly. * Returns the modulous a result for b. Consdiders negative numbers correctly.
* @param a Number to modulo against. (a % b) * @param a Number to modulo against. (a % b)
@ -48,18 +50,18 @@
* @param n Degrees to convert. * @param n Degrees to convert.
* @returns The number in radians. * @returns The number in radians.
*/ */
#define mathDeg2Rad(n) (n * M_PI / 180.0) #define mathDeg2Rad(n) (n * MATH_PI / 180.0f)
/** /**
* Convert radians to degrees. * Convert radians to degrees.
* @param n Radians to convert. * @param n Radians to convert.
* @returns The number in degrees. * @returns The number in degrees.
*/ */
#define mathRad2Deg(n) (n * 180 / M_PI) #define mathRad2Deg(n) (n * 180.0f / MATH_PI)
/** /**
* Sign the given number, essentially clamps > 0 to 1, and < 0 to -1. * Sign the given number, essentially clamps > 0 to 1, and < 0 to -1.
* @param n Number to sign. * @param n Number to sign.
* @returns The signed number. * @returns The signed number.
*/ */
#define mathSign(n) (n>=0 ? 1 : -1) #define mathSign(n) (n>=0 ? 1.0f : -1.0f)

View File

@ -19,7 +19,7 @@
* Generates a random floating point number. * Generates a random floating point number.
* @returns A random floating point number. * @returns A random floating point number.
*/ */
#define randFloat() (((float)randInt32()) * M_PI) #define randFloat() (((float)randInt32()) * MATH_PI)
/** /**
* Generates a random uint32_t * Generates a random uint32_t

View File

@ -14,26 +14,19 @@
#define VN_CHARACTER_BLINK_TIME_RANGE_MAX 6 #define VN_CHARACTER_BLINK_TIME_RANGE_MAX 6
#define VN_CHARACTER_SIZE 0.5 #define VN_CHARACTER_SIZE 0.5
/** How many quads the VN Character has. Base, Eyes, Mouth and Eyebrows */
#define VN_CHARACTER_QUAD_COUNT 4
typedef struct { typedef struct {
float x, y, z; float x, y, z;
float yaw, pitch, roll; float yaw, pitch, roll;
float scaleX, scaleY; float scaleX, scaleY;
float blinkStart;
char *name;
bool talking; bool talking;
tileset_t tilesetEyes; primitive_t primitive;
tileset_t tilesetMouth; texture_t *texture;
texture_t *textureEyes;
texture_t *textureBody;
texture_t *textureMouth;
texture_t *textureFace;
primitive_t primitiveEyes; int32_t baseWidth, baseHeight;
primitive_t primitiveBody; int32_t faceWidth, faceHeight;
primitive_t primitiveMouth; } vncharacter_t;
primitive_t primitiveFace;
} vncharacter_t;

View File

@ -112,7 +112,7 @@ int32_t main() {
} }
void glfwOnResize(GLFWwindow *window, int32_t width, int32_t height) { void glfwOnResize(GLFWwindow *window, int32_t width, int32_t height) {
renderSetResolution(&GAME_STATE->engine.render, width, height); renderSetResolution(&GAME_STATE->engine.render, (float)width, (float)height);
} }
void glfwOnKey(GLFWwindow *window, void glfwOnKey(GLFWwindow *window,

View File

@ -66,7 +66,6 @@ void queueDispose(queue_t *queue) {
} }
void queueRestack(queue_t *queue) { void queueRestack(queue_t *queue) {
queueaction_t *action;
uint8_t i; uint8_t i;
queueaction_t items[ANIMATION_QUEUE_ITEM_MAX]; queueaction_t items[ANIMATION_QUEUE_ITEM_MAX];

View File

@ -73,7 +73,7 @@ void fontTextInit(font_t *font, primitive_t *primitive, fonttextinfo_t *info) {
void fontTextClamp(font_t *font, fonttextinfo_t *info, char *text, void fontTextClamp(font_t *font, fonttextinfo_t *info, char *text,
float maxWidth, float fontSize float maxWidth, float fontSize
) { ) {
int32_t i, j, wordIndex; int32_t i, j;
char c; char c;
float x, y, wordX, scale; float x, y, wordX, scale;
stbtt_aligned_quad *quad; stbtt_aligned_quad *quad;

View File

@ -25,7 +25,7 @@ void skywallInit(primitive_t *primitive) {
if(SKYWALL_SLICE_COUNT == i) { if(SKYWALL_SLICE_COUNT == i) {
r = 0; r = 0;
} else { } else {
r = p * (float)M_PI * 2;// Convert % to radians r = p * MATH_PI * 2.0f;// Convert % to radians
} }
// Determine the X/Z for the given radian // Determine the X/Z for the given radian

View File

@ -29,7 +29,7 @@ void renderFrameStart(render_t *render) {
void renderDispose() { void renderDispose() {
} }
void renderSetResolution(render_t *render, int32_t width, int32_t height) { void renderSetResolution(render_t *render, float width, float height) {
render->width = width; render->width = width;
render->height = height; render->height = height;
} }

View File

@ -31,4 +31,4 @@ void renderDispose();
* @param width Width of the display (in pixels). * @param width Width of the display (in pixels).
* @param height Height of the display (in pixels). * @param height Height of the display (in pixels).
*/ */
void renderSetResolution(render_t *render, int32_t width, int32_t height); void renderSetResolution(render_t *render, float width, float height);

View File

@ -23,8 +23,12 @@ void tilesetInit(tileset_t *tileset,
tileset->rows = rows; tileset->rows = rows;
// Calculate division sizes (pixels) // Calculate division sizes (pixels)
tileset->divX = (width - (borderX * 2) - (gapX * (columns - 1))) / columns; tileset->divX = (
tileset->divY = (height - (borderY * 2) - (gapY * (rows - 1))) / rows; (float)width - ((float)borderX * 2.0f) - ((float)gapX * ((float)columns-1))
) / columns;
tileset->divY = (
(float)height - ((float)borderY * 2.0f) - ((float)gapY * ((float)rows - 1))
) / rows;
// Calculate the division sizes (units) // Calculate the division sizes (units)
tdivX = tileset->divX / width; tdivX = tileset->divX / width;

View File

@ -107,7 +107,7 @@ bool _csvBufferRowParserCallback(
} }
// Determine string info for the cell // Determine string info for the cell
int32_t length = strlen(data); int32_t length = (int32_t)strlen(data);
int32_t offset = (column * CSV_CELL_SIZE_MAX); int32_t offset = (column * CSV_CELL_SIZE_MAX);
// Now copy the string data to the buffer // Now copy the string data to the buffer
@ -144,7 +144,6 @@ bool _csvBufferRowWithHeadersCallback(
assetbuffer_t *asset, void *user, int32_t row, csvrow_t *csv assetbuffer_t *asset, void *user, int32_t row, csvrow_t *csv
) { ) {
csvbufferrowwithheadersdata_t *data = (csvbufferrowwithheadersdata_t *)user; csvbufferrowwithheadersdata_t *data = (csvbufferrowwithheadersdata_t *)user;
int32_t i;
// Take the headers for row 0 // Take the headers for row 0
if(row == 0) { if(row == 0) {

View File

@ -10,6 +10,7 @@
#include "../../../poker/actions/round.h" #include "../../../poker/actions/round.h"
#include "../../../poker/actions/blinds.h" #include "../../../poker/actions/blinds.h"
#include "../../../poker/actions/deal.h" #include "../../../poker/actions/deal.h"
#include "../discussion/pokerdiscussion.h"
#include "bet.h" #include "bet.h"
void _pokerGameActionRoundOnStart( void _pokerGameActionRoundOnStart(

View File

@ -7,6 +7,8 @@
#pragma once #pragma once
#include <dawn/dawn.h> #include <dawn/dawn.h>
#include "../../../vn/conversation/vnconversation.h"
#include "../../../vn/conversation/talk.h"
void pokerDiscussionGet( void pokerDiscussionGet(
pokerdiscussion_t *discussion, pokerdiscussiondata_t *data pokerdiscussion_t *discussion, pokerdiscussiondata_t *data

View File

@ -19,7 +19,7 @@ void pokerRenderRender(
shaderUsePosition(&assets->shader, 0, 0, 0, 0,engine->time.current/3,0); shaderUsePosition(&assets->shader, 0, 0, 0, 0,engine->time.current/3,0);
primitiveDraw(&render->skywall, 0, -1); primitiveDraw(&render->skywall, 0, -1);
} }
void pokerRenderDispose(pokerrender_t *render) { void pokerRenderDispose(pokerrender_t *render) {
primitiveDispose(&render->skywall); primitiveDispose(&render->skywall);
} }

View File

@ -42,7 +42,7 @@ void pokerUiRender(pokergame_t *pokerGame) {
// Player Chips // Player Chips
sprintf(buffer, "%u chips", playerPoker->chips); sprintf(buffer, "%u chips", playerPoker->chips);
playerUi->labelChips.y = (i+1) * 32; playerUi->labelChips.y = ((float)i+1.0f) * 32.0f;
labelSetText(&playerUi->labelChips, &pokerGame->assets.font, buffer); labelSetText(&playerUi->labelChips, &pokerGame->assets.font, buffer);
labelRender(&playerUi->labelChips, &pokerGame->assets.shader); labelRender(&playerUi->labelChips, &pokerGame->assets.shader);

View File

@ -10,7 +10,7 @@
float vectorDistance2D(float x0, float y0, float x1, float y1) { float vectorDistance2D(float x0, float y0, float x1, float y1) {
x0 = x1 - x0; x0 = x1 - x0;
y0 = y1 - y0; y0 = y1 - y0;
return sqrt(x0*x0 + y0*y0); return (float)sqrt(x0*x0 + y0*y0);
} }
@ -20,5 +20,5 @@ float vectorDistance3D(
x0 = x1 - x0; x0 = x1 - x0;
y0 = y1 - y0; y0 = y1 - y0;
z0 = z1 - z0; z0 = z1 - z0;
return sqrt(x0*x0 + y0*y0 + z0*z0); return (float)sqrt(x0*x0 + y0*y0 + z0*z0);
} }

View File

@ -12,42 +12,6 @@ void testSceneInit(testscene_t *scene, game_t *game) {
assetShaderLoad(&scene->shader, assetShaderLoad(&scene->shader,
"shaders/textured.vert", "shaders/textured.frag" "shaders/textured.vert", "shaders/textured.frag"
); );
// Init Conversation
// vnConversationInit(&scene->conversation, &scene->font);
scene->conversation.textbox.linesMax = 3;
scene->conversation.textbox.widthMax = game->engine.render.width;
// Load characters
assetTextureLoad(&scene->pennyEyes, "characters/penny/textures/eyes_sm.png");
assetTextureLoad(&scene->pennyBody, "characters/penny/textures/body_sm.png");
assetTextureLoad(&scene->pennyMouth,"characters/penny/textures/mouth_sm.png");
assetTextureLoad(&scene->pennyFace, "characters/penny/textures/face_sm.png");
vnCharacterInit(&scene->character1,
&scene->pennyEyes,
&scene->pennyBody,
&scene->pennyMouth,
&scene->pennyFace
);
vnCharacterInit(&scene->character2,
&scene->pennyEyes,
&scene->pennyBody,
&scene->pennyMouth,
&scene->pennyFace
);
scene->character1.x = 0;
scene->character2.x = 1;
scene->character1.y = 0;
scene->character2.y = 0;
// Add some conversation peices.
vnConversationTalk(&scene->conversation, "Hello World", &scene->character1);
queueDelay(&scene->conversation.actionQueue, 1);
vnConversationTalk(&scene->conversation, "What?", &scene->character2);
queueNext(&scene->conversation.actionQueue);
} }
void testSceneRender(testscene_t *scene, game_t *game) { void testSceneRender(testscene_t *scene, game_t *game) {
@ -61,25 +25,4 @@ void testSceneRender(testscene_t *scene, game_t *game) {
shaderUse(&scene->shader); shaderUse(&scene->shader);
shaderUseCamera(&scene->shader, &scene->camera); shaderUseCamera(&scene->shader, &scene->camera);
vnCharacterUpdate(&scene->character1, &game->engine);
vnCharacterUpdate(&scene->character2, &game->engine);
vnConversationUpdate(&scene->conversation, &game->engine);
vnCharacterRender(&scene->character1, &scene->shader);
vnCharacterRender(&scene->character2, &scene->shader);
cameraLookAt(&scene->camera,
0, 0, 10,
0, 0, 0
);
cameraOrtho(&scene->camera,
0, game->engine.render.width,
game->engine.render.height, 0,
0.01, 1000.0
);
shaderUseCamera(&scene->shader, &scene->camera);
vnConversationRender(&scene->conversation, &scene->shader);
} }

View File

@ -22,16 +22,6 @@ typedef struct {
shader_t shader; shader_t shader;
camera_t camera; camera_t camera;
font_t font; font_t font;
vnconversation_t conversation;
vncharacter_t character1;
vncharacter_t character2;
texture_t pennyEyes;
texture_t pennyBody;
texture_t pennyMouth;
texture_t pennyFace;
} testscene_t; } testscene_t;
void testSceneInit(testscene_t *scene, game_t *game); void testSceneInit(testscene_t *scene, game_t *game);

View File

@ -105,7 +105,11 @@ void stringStackInit(stringstack_t *stack) {
void stringStackPush(stringstack_t *stack, char *string) { void stringStackPush(stringstack_t *stack, char *string) {
size_t offset = stack->size * STRING_STACK_STRING_SIZE; size_t offset = stack->size * STRING_STACK_STRING_SIZE;
arrayCopy(sizeof(char), string, strlen(string) + 1, stack->strings + offset); arrayCopy(
sizeof(char), string,
(int32_t)strlen(string) + 1,
stack->strings + offset
);
stack->strings[stack->size] = stack->buffer + offset; stack->strings[stack->size] = stack->buffer + offset;
stack->size++; stack->size++;
} }

View File

@ -89,7 +89,7 @@ void vnTextBoxRender(vntextbox_t *box, shader_t *shader) {
frameRender(&box->frame, shader); frameRender(&box->frame, shader);
// Determine where we're rendering the indices up to. // Determine where we're rendering the indices up to.
charCount = box->textScroll; charCount = (int32_t)box->textScroll;
if(charCount == 0) return; if(charCount == 0) return;
// Clamp to lines if necessary. // Clamp to lines if necessary.
@ -134,7 +134,7 @@ void vnTextBoxDispose(vntextbox_t *box) {
bool vnTextBoxHasScrolled(vntextbox_t *box) { bool vnTextBoxHasScrolled(vntextbox_t *box) {
int32_t currentChar; int32_t currentChar;
currentChar = box->textScroll; currentChar = (int32_t)box->textScroll;
// Are we clamping lines? // Are we clamping lines?
if(box->linesMax > 0) { if(box->linesMax > 0) {

View File

@ -7,21 +7,11 @@
#include "vncharacter.h" #include "vncharacter.h"
void _vnCharacterQuad(primitive_t *primitive, tilesetdiv_t *div) { void vnCharacterInit(
quadInit(primitive, 0, vncharacter_t *character, texture_t *texture,
-VN_CHARACTER_SIZE, 0, div->x0, div->y1, int32_t baseWidth, int32_t baseHeight,
VN_CHARACTER_SIZE, VN_CHARACTER_SIZE*2, div->x1, div->y0 int32_t faceWidth, int32_t faceHeight
);
}
void vnCharacterInit(vncharacter_t *character,
texture_t *textureEyes,
texture_t *textureBody,
texture_t *textureMouth,
texture_t *textureFace
) { ) {
tilesetdiv_t div;
character->x = 0; character->x = 0;
character->y = 0; character->y = 0;
character->z = 0; character->z = 0;
@ -34,89 +24,96 @@ void vnCharacterInit(vncharacter_t *character,
character->scaleY = 1; character->scaleY = 1;
character->talking = false; character->talking = false;
character->blinkStart = randFloatRange(0, VN_CHARACTER_BLINK_TIME_RANGE_MAX);
character->name = ""; // Init the primitive.
character->texture = texture;
// Setup Textures primitiveInit(&character->primitive,
character->textureEyes = textureEyes; QUAD_VERTICE_COUNT * VN_CHARACTER_QUAD_COUNT,
character->textureBody = textureBody; QUAD_INDICE_COUNT * VN_CHARACTER_QUAD_COUNT
character->textureMouth = textureMouth;
character->textureFace = textureFace;
// Tileset
tilesetInit(&character->tilesetEyes, 1, 6,
textureEyes->width, textureEyes->height,
0, 0, 0, 0
);
tilesetInit(&character->tilesetMouth, 1, 11,
textureMouth->width, textureMouth->height,
0, 0, 0, 0
); );
vnCharacterSetEyes(character, 0); character->baseWidth = baseWidth;
vnCharacterSetMouth(character, 9); character->baseHeight = baseHeight;
character->faceWidth = faceWidth;
character->faceHeight = faceHeight;
div.x0 = 0, div.x1 = 1; // Buffer the base quad, this never changes (currently)
div.y0 = 0, div.y1 = 1; quadBuffer(&character->primitive, 0,
0,0,0,0,
((float)baseWidth / (float)baseHeight), baseHeight, 1, 1,
0, 0
);
_vnCharacterQuad(&character->primitiveBody, &div); // character->blinkStart = randFloatRange(0, VN_CHARACTER_BLINK_TIME_RANGE_MAX);
_vnCharacterQuad(&character->primitiveFace, &div);
}
// character->name = "";
void vnCharacterSetEyes(vncharacter_t *character, uint8_t eyes) { // // Setup Textures
tilesetdiv_t *div; // character->textureEyes = textureEyes;
div = character->tilesetEyes.divisions + eyes; // character->textureBody = textureBody;
_vnCharacterQuad(&character->primitiveEyes, div); // character->textureMouth = textureMouth;
} // character->textureFace = textureFace;
void vnCharacterSetMouth(vncharacter_t *character, uint8_t mouth) { // // Tileset
tilesetdiv_t *div; // tilesetInit(&character->tilesetEyes, 1, 6,
div = character->tilesetMouth.divisions + mouth; // textureEyes->width, textureEyes->height,
_vnCharacterQuad(&character->primitiveMouth, div); // 0, 0, 0, 0
// );
// tilesetInit(&character->tilesetMouth, 1, 11,
// textureMouth->width, textureMouth->height,
// 0, 0, 0, 0
// );
// vnCharacterSetEyes(character, 0);
// vnCharacterSetMouth(character, 9);
// div.x0 = 0, div.x1 = 1;
// div.y0 = 0, div.y1 = 1;
// _vnCharacterQuad(&character->primitiveBody, &div);
// _vnCharacterQuad(&character->primitiveFace, &div);
} }
void vnCharacterUpdate(vncharacter_t *character, engine_t *engine) { void vnCharacterUpdate(vncharacter_t *character, engine_t *engine) {
float n; // float n;
// Update the blinking frames // // Update the blinking frames
n = (engine->time.current - character->blinkStart) * 1.5; // n = (engine->time.current - character->blinkStart) * 1.5;
if(n >= 1) { // if(n >= 1) {
character->blinkStart = engine->time.current + randFloatRange( // character->blinkStart = engine->time.current + randFloatRange(
1, VN_CHARACTER_BLINK_TIME_RANGE_MAX // 1, VN_CHARACTER_BLINK_TIME_RANGE_MAX
); // );
} else if(n > 0) { // } else if(n > 0) {
n = easeInQuad(easeTimeToForwardAndBackward(n) * 2); // n = easeInQuad(easeTimeToForwardAndBackward(n) * 2);
vnCharacterSetEyes(character, n * character->tilesetEyes.count); // vnCharacterSetEyes(character, n * character->tilesetEyes.count);
} // }
// Updating the talking frames // // Updating the talking frames
if(character->talking) { // if(character->talking) {
vnCharacterSetMouth(character, // vnCharacterSetMouth(character,
(int32_t)(engine->time.current*12) % character->tilesetMouth.count // (int32_t)(engine->time.current*12) % character->tilesetMouth.count
); // );
} else { // } else {
vnCharacterSetMouth(character, 9); // vnCharacterSetMouth(character, 9);
} // }
// Update the scale frames // // Update the scale frames
float speed, amount; // float speed, amount;
if(character->talking) { // if(character->talking) {
speed = 2.5; // speed = 2.5;
amount = 100; // amount = 100;
n = easeTimeToForwardAndBackward(fmod(engine->time.current, 1 / speed) * speed) * 2; // n = easeTimeToForwardAndBackward(fmod(engine->time.current, 1 / speed) * speed) * 2;
n = easeInOutQuad(n) / amount - (1/(amount*2)); // n = easeInOutQuad(n) / amount - (1/(amount*2));
character->scaleX = 1 + n; // character->scaleX = 1 + n;
character->scaleY = 1 - n; // character->scaleY = 1 - n;
} else { // } else {
speed = 10; // speed = 10;
amount = 50; // amount = 50;
n = easeTimeToForwardAndBackward(fmod(engine->time.current, speed) / speed)*2; // n = easeTimeToForwardAndBackward(fmod(engine->time.current, speed) / speed)*2;
n = easeInOutCubic(n) / amount - (1/(amount*2)); // n = easeInOutCubic(n) / amount - (1/(amount*2));
character->scaleX = 1 + n; // character->scaleX = 1 + n;
character->scaleY = 1 + n*2; // character->scaleY = 1 + n*2;
} // }
} }
void vnCharacterRender(vncharacter_t *character, shader_t *shader) { void vnCharacterRender(vncharacter_t *character, shader_t *shader) {
@ -126,15 +123,6 @@ void vnCharacterRender(vncharacter_t *character, shader_t *shader) {
character->scaleX, character->scaleY, 1 character->scaleX, character->scaleY, 1
); );
shaderUseTexture(shader, character->textureBody); shaderUseTexture(shader, character->texture);
primitiveDraw(&character->primitiveBody, 0, -1); primitiveDraw(&character->primitive, 0, -1);
shaderUseTexture(shader, character->textureFace);
primitiveDraw(&character->primitiveFace, 0, -1);
shaderUseTexture(shader, character->textureEyes);
primitiveDraw(&character->primitiveEyes, 0, -1);
shaderUseTexture(shader, character->textureMouth);
primitiveDraw(&character->primitiveMouth, 0, -1);
} }

View File

@ -13,14 +13,10 @@
#include "../display/shader.h" #include "../display/shader.h"
#include "../display/primitives/quad.h" #include "../display/primitives/quad.h"
void vnCharacterInit(vncharacter_t *character, void vnCharacterInit(
texture_t *textureEyes, vncharacter_t *character, texture_t *texture,
texture_t *textureBody, int32_t baseWidth, int32_t baseHeight,
texture_t *textureMouth, int32_t faceWidth, int32_t faceHeight
texture_t *textureFace
); );
void vnCharacterSetEyes(vncharacter_t *character, uint8_t eyes);
void vnCharacterSetMouth(vncharacter_t *character, uint8_t mouth);
void vnCharacterUpdate(vncharacter_t *character, engine_t *engine); void vnCharacterUpdate(vncharacter_t *character, engine_t *engine);
void vnCharacterRender(vncharacter_t *character, shader_t *shader); void vnCharacterRender(vncharacter_t *character, shader_t *shader);

View File

@ -44,7 +44,7 @@ void vnSceneRenderWorld(vnscene_t *scene, engine_t *engine, shader_t *shader) {
// Set Camera Perspective // Set Camera Perspective
cameraPerspective(&scene->camera, 45, cameraPerspective(&scene->camera, 45,
engine->render.width/engine->render.height, engine->render.width/engine->render.height,
0.01, 1000.0 0.01f, 1000.0f
); );
// Update Shader // Update Shader
@ -73,7 +73,7 @@ void vnSceneRenderGui(vnscene_t *scene, engine_t *engine, shader_t *shader) {
cameraOrtho(&scene->camera, cameraOrtho(&scene->camera,
0, engine->render.width, 0, engine->render.width,
engine->render.height, 0, engine->render.height, 0,
0.01, 1000.0 0.01f, 1000.0f
); );
// Update Shader // Update Shader