A bit more code cleanup

This commit is contained in:
YourWishes committed 2021-11-22 20:25:45 -08:00
1 parent a4198e8396
commit 6c9eb8b685
217 files changed
+206 -184

No files matched your search

+9 -10
View File
@@ -18,19 +18,18 @@ target_include_directories(${PROJECT_NAME}
)
# Dawn Sources
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/dawn/*.c(pp|xx))
file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/dawn/*.h(pp|xx))
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.c(pp|xx))
file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h(pp|xx))
# Exclude Game Sources
list(FILTER SOURCES EXCLUDE REGEX ".*games\\/.*")
list(FILTER HEADERS EXCLUDE REGEX ".*games\\/.*")
target_sources(${PROJECT_NAME}
PRIVATE
${SOURCES}
${HEADERS}
)
# Sandbox Game Sources
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/sandbox/*.c(pp|xx))
file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/sandbox/*.h(pp|xx))
target_sources(${PROJECT_NAME}
PRIVATE
${SOURCES}
${HEADERS}
)
# Add Game Sources
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/games/${TARGET_GAME})
-32
View File
@@ -1,32 +0,0 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "loadingscene.h"
void loadingSceneInit(
loadingscene_t *scene,
assetmanager_t *assetManager
) {
scene->manager = assetManager;
}
void loadingSceneStart(loadingscene_t *scene) {
assetManagerStart(scene->manager);
}
bool loadingSceneUpdate(loadingscene_t *scene) {
assetManagerUpdate(scene->manager);
return scene->manager->finished;
}
void loadingSceneRender(loadingscene_t *scene) {
}
void loadingSceneDispose(loadingscene_t *scene) {
}
-26
View File
@@ -1,26 +0,0 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "../file/assetmanager.h"
typedef struct {
assetmanager_t *manager;
} loadingscene_t;
void loadingSceneInit(
loadingscene_t *scene,
assetmanager_t *assetManager
);
void loadingSceneStart(loadingscene_t *scene);
bool loadingSceneUpdate(loadingscene_t *scene);
void loadingSceneRender(loadingscene_t *scene);
void loadingSceneDispose(loadingscene_t *scene);
-9
View File
@@ -1,9 +0,0 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include <sandbox/game.h>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -6,7 +6,7 @@
*/
#pragma once
#include <dawn/libs.h>
#include "../libs.h"
#include "matrix.h"
#include "camera.h"
#include "texture.h"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+62
View File
@@ -0,0 +1,62 @@
# Copyright (c) 2021 Dominic Msters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
tool_game(
"Penny's Poker"
1.0
)
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.c(pp|xx))
file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h(pp|xx))
target_sources(${PROJECT_NAME}
PRIVATE
${SOURCES}
${HEADERS}
)
# Characters
set(DIR_CHARS "${ASSETS_SOURCE_DIR}/poker/characters")
tool_vn_character(vn_penny
${DIR_CHARS}/penny/character.xml poker/characters/penny/sprite
)
tool_vn_character(vn_lucy
${DIR_CHARS}/lucy/character.xml poker/characters/lucy/sprite
)
tool_vn_character(vn_julie
${DIR_CHARS}/julie/character.xml poker/characters/julie/sprite
)
tool_vn_character(vn_sammy
${DIR_CHARS}/sammy/character.xml poker/characters/sammy/sprite
)
tool_vn_character(vn_jenny
${DIR_CHARS}/jenny/character.xml poker/characters/jenny/sprite
)
# World
tool_texture(texture_pub
${ASSETS_SOURCE_DIR}/poker/world/pub/pub_skywall.png poker/world/pub
)
# Generate assets
tool_assets(
shader_textured
shader_singlerenderlist
font_opensans
texture_test
texture_pub
vn_penny
vn_lucy
vn_julie
vn_sammy
vn_jenny
locale_en
)
# Add Assets
add_dependencies(${PROJECT_NAME} assets)
File renamed without changes.
+37
View File
@@ -0,0 +1,37 @@
/**
* Copyright (c) 2021 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "../../libs.h"
#include "../../engine/engine.h"
typedef struct {
engine_t engine;
} game_t;
/**
* Initializes the Dawn Game instance.
*
* @param game Game to instanciate.
* @return True if successful otherwise false.
*/
bool gameInit(game_t *game);
/**
* Update the Dawn Game Instance.
*
* @param game Game to update.
* @param delta The delta of the game to tick by.
*/
bool gameUpdate(game_t *game, float delta);
/**
* Cleanup the dawn game instance.
*
* @param game Game to dispose.
*/
void gameDispose(game_t *game);
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 217 files, more files were not shown because too many files have changed in this diff. Show more