Wip: Add basic vector math
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include <SDL3/SDL_rect.h>
|
||||
#define SDL_MAIN_USE_CALLBACKS 1 /* use the callbacks instead of main() */
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
@@ -10,11 +11,13 @@
|
||||
#include <SDL3/SDL_render.h>
|
||||
#include <SDL3/SDL_video.h>
|
||||
#include <SDL3_ttf/SDL_ttf.h>
|
||||
#include "MathCommon.h"
|
||||
#include "Text.h"
|
||||
#include "fileCommon.h"
|
||||
#include "game.h"
|
||||
#include "window.h"
|
||||
|
||||
|
||||
Game game;
|
||||
Window window;
|
||||
|
||||
@@ -65,6 +68,8 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[]) {
|
||||
SDL_Log("SDL could not initialize! SDL error: %s\n", SDL_GetError());
|
||||
}
|
||||
|
||||
Vector3 vector = Vector3(0, 255, 0);
|
||||
|
||||
SDL_AppResult result = window.CreateWindow(600, 800);
|
||||
|
||||
if (result != SDL_APP_CONTINUE) {
|
||||
@@ -87,7 +92,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[]) {
|
||||
return SDL_APP_FAILURE;
|
||||
}
|
||||
|
||||
text.SetText("Hello There", &window);
|
||||
text.SetText("Hello There", &window, {100, 100, 100, 500});
|
||||
|
||||
return SDL_APP_CONTINUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user