summaryrefslogtreecommitdiff
path: root/src/state.c
diff options
context:
space:
mode:
authorjussi2023-10-28 14:15:20 +0300
committerjussi2023-10-28 14:15:20 +0300
commitaf03c7364ea0dfe2c8bb269eb8a8f9b580f39633 (patch)
tree8ef09eefe38c890112972768c6861432028d8945 /src/state.c
parent23935aefca3212c989199cd7e195c02b01ef14ae (diff)
downloadreilua-enhanced-af03c7364ea0dfe2c8bb269eb8a8f9b580f39633.tar.gz
reilua-enhanced-af03c7364ea0dfe2c8bb269eb8a8f9b580f39633.tar.bz2
reilua-enhanced-af03c7364ea0dfe2c8bb269eb8a8f9b580f39633.zip
New object type Font.
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/state.c b/src/state.c
index da065a5..010210e 100644
--- a/src/state.c
+++ b/src/state.c
@@ -16,12 +16,7 @@ bool stateInit( int argn, const char **argc, const char *exePath ) {
state->run = true;
state->resolution = (Vector2){ 800, 600 };
state->luaState = NULL;
- state->guiFont = 0;
state->logLevelInvalid = LOG_ERROR;
- /* Fonts. */
- state->fontAlloc = ALLOC_PAGE_SIZE;
- state->fontCount = 1;
- state->fonts = malloc( state->fontAlloc * sizeof( Font* ) );
/* Waves. */
state->waveAlloc = ALLOC_PAGE_SIZE;
state->waveCount = 0;
@@ -65,7 +60,6 @@ bool stateInit( int argn, const char **argc, const char *exePath ) {
/* The ones we want to save the first. */
if ( 0 < i ) {
- state->fonts[i] = NULL;
state->materials[i] = NULL;
}
}
@@ -73,8 +67,6 @@ bool stateInit( int argn, const char **argc, const char *exePath ) {
/* Has to be after InitWindod where opengl context is created. */
state->materials[0] = malloc( sizeof( Material ) );
*state->materials[0] = LoadMaterialDefault();
- state->fonts[0] = malloc( sizeof( Font ) );
- *state->fonts[0] = GetFontDefault();
if ( !IsWindowReady() ) {
state->hasWindow = false;
@@ -94,12 +86,6 @@ void stateInitInterpret( int argn, const char **argc ) {
}
void stateFree() {
- for ( int i = 0; i < state->fontCount; ++i ) {
- if ( state->fonts[i] != NULL ) {
- UnloadFont( *state->fonts[i] );
- free( state->fonts[i] );
- }
- }
for ( int i = 0; i < state->waveCount; ++i ) {
if ( state->waves[i] != NULL ) {
UnloadWave( *state->waves[i] );
@@ -165,7 +151,6 @@ void stateFree() {
if ( state->hasWindow ) {
CloseWindow();
}
- free( state->fonts );
free( state->waves );
free( state->sounds );
free( state->musics );