Doing some code reshuffling
@ -39,6 +39,21 @@ add_subdirectory(tools)
|
||||
if(TARGET_TYPE STREQUAL test)
|
||||
add_subdirectory(test)
|
||||
elseif(TARGET_TYPE STREQUAL game)
|
||||
# Set up shared assets
|
||||
|
||||
# Shaders
|
||||
tool_copy(shader_textured
|
||||
shared/shaders/textured.vert shaders/textured.vert
|
||||
shared/shaders/textured.frag shaders/textured.frag
|
||||
)
|
||||
|
||||
# Fonts
|
||||
tool_copy(font_opensans
|
||||
shared/fonts/opensans/OpenSans-Regular.ttf fonts/opensans/OpenSans-Regular.ttf
|
||||
shared/fonts/opensans/OpenSans-Bold.ttf fonts/opensans/OpenSans-Bold.ttf
|
||||
)
|
||||
|
||||
# Poker Game
|
||||
if(TARGET_GAME STREQUAL poker)
|
||||
add_compile_definitions(
|
||||
GAME_NAME="Penny's Poker"
|
||||
@ -51,24 +66,26 @@ elseif(TARGET_TYPE STREQUAL game)
|
||||
)
|
||||
|
||||
set(DIR_CHARS poker/characters)
|
||||
tool_vn_character(penny
|
||||
tool_vn_character(vn_penny
|
||||
${DIR_CHARS}/penny/character.xml ${DIR_CHARS}/penny.png
|
||||
)
|
||||
tool_vn_character(lucy
|
||||
tool_vn_character(vn_lucy
|
||||
${DIR_CHARS}/lucy/character.xml ${DIR_CHARS}/lucy.png
|
||||
)
|
||||
tool_vn_character(jenny
|
||||
${DIR_CHARS}/jenny/character.xml ${DIR_CHARS}/jenny.png
|
||||
tool_vn_character(vn_julie
|
||||
${DIR_CHARS}/julie/character.xml ${DIR_CHARS}/julie.png
|
||||
)
|
||||
tool_vn_character(sammy
|
||||
tool_vn_character(vn_sammy
|
||||
${DIR_CHARS}/sammy/character.xml ${DIR_CHARS}/sammy.png
|
||||
)
|
||||
|
||||
tool_assets(
|
||||
penny
|
||||
lucy
|
||||
jenny
|
||||
sammy
|
||||
shader_textured
|
||||
font_opensans
|
||||
vn_penny
|
||||
vn_lucy
|
||||
vn_julie
|
||||
vn_sammy
|
||||
)
|
||||
endif()
|
||||
|
||||
|
BIN
assets/poker/characters/jenny/Design/bot.psd
Normal file
Before ![]() (image error) Size: 1.2 MiB After ![]() (image error) Size: 1.1 MiB ![]() ![]() |
Before ![]() (image error) Size: 1.3 MiB After ![]() (image error) Size: 1.1 MiB ![]() ![]() |
BIN
assets/poker/characters/jenny/Design/sprite_main.png
Normal file
After ![]() (image error) Size: 1.1 MiB |
BIN
assets/poker/characters/jenny/concept/gdf8rgvc.jpg
Normal file
After ![]() (image error) Size: 746 KiB |
BIN
assets/poker/characters/jenny/sprites/bot.png
Normal file
After ![]() (image error) Size: 1.0 MiB |
@ -1,4 +1,4 @@
|
||||
<vncharacter context="poker/characters/jenny/sprites">
|
||||
<vncharacter context="poker/characters/julie/sprites">
|
||||
<base file="base.png" />
|
||||
<layer x="353" y="119" width="344" height="351" directory="eyes" />
|
||||
<layer x="353" y="119" width="344" height="351" directory="mouth" />
|
0
assets/poker/characters/jenny/Concept/idol2s.png → assets/poker/characters/julie/concept/idol2s.png
Before ![]() (image error) Size: 1.6 MiB After ![]() (image error) Size: 1.6 MiB ![]() ![]() |
Before ![]() (image error) Size: 1.4 MiB After ![]() (image error) Size: 1.4 MiB ![]() ![]() |
Before ![]() (image error) Size: 6.9 MiB After ![]() (image error) Size: 6.9 MiB ![]() ![]() |
Before ![]() (image error) Size: 1.7 MiB After ![]() (image error) Size: 1.7 MiB ![]() ![]() |
BIN
assets/poker/characters/julie/design/screen_composition.png
Normal file
After ![]() (image error) Size: 1.2 MiB |
Before ![]() (image error) Size: 906 KiB After ![]() (image error) Size: 906 KiB ![]() ![]() |
BIN
assets/poker/characters/julie/design/sprite_base.png
Normal file
After ![]() (image error) Size: 1.3 MiB |
Before ![]() (image error) Size: 1.4 MiB After ![]() (image error) Size: 1.4 MiB ![]() ![]() |
Before ![]() (image error) Size: 1.3 MiB After ![]() (image error) Size: 1.3 MiB ![]() ![]() |
Before ![]() (image error) Size: 1.3 MiB After ![]() (image error) Size: 1.3 MiB ![]() ![]() |
Before ![]() (image error) Size: 16 KiB After ![]() (image error) Size: 16 KiB ![]() ![]() |
Before ![]() (image error) Size: 16 KiB After ![]() (image error) Size: 16 KiB ![]() ![]() |
Before ![]() (image error) Size: 16 KiB After ![]() (image error) Size: 16 KiB ![]() ![]() |
Before ![]() (image error) Size: 17 KiB After ![]() (image error) Size: 17 KiB ![]() ![]() |
Before ![]() (image error) Size: 37 KiB After ![]() (image error) Size: 37 KiB ![]() ![]() |
Before ![]() (image error) Size: 35 KiB After ![]() (image error) Size: 35 KiB ![]() ![]() |
Before ![]() (image error) Size: 20 KiB After ![]() (image error) Size: 20 KiB ![]() ![]() |
Before ![]() (image error) Size: 19 KiB After ![]() (image error) Size: 19 KiB ![]() ![]() |
Before ![]() (image error) Size: 14 KiB After ![]() (image error) Size: 14 KiB ![]() ![]() |
Before ![]() (image error) Size: 15 KiB After ![]() (image error) Size: 15 KiB ![]() ![]() |
Before ![]() (image error) Size: 15 KiB After ![]() (image error) Size: 15 KiB ![]() ![]() |
Before ![]() (image error) Size: 14 KiB After ![]() (image error) Size: 14 KiB ![]() ![]() |
Before ![]() (image error) Size: 16 KiB After ![]() (image error) Size: 16 KiB ![]() ![]() |
Before ![]() (image error) Size: 18 KiB After ![]() (image error) Size: 18 KiB ![]() ![]() |
Before ![]() (image error) Size: 13 KiB After ![]() (image error) Size: 13 KiB ![]() ![]() |
Before ![]() (image error) Size: 14 KiB After ![]() (image error) Size: 14 KiB ![]() ![]() |
Before ![]() (image error) Size: 15 KiB After ![]() (image error) Size: 15 KiB ![]() ![]() |
Before ![]() (image error) Size: 13 KiB After ![]() (image error) Size: 13 KiB ![]() ![]() |
Before ![]() (image error) Size: 14 KiB After ![]() (image error) Size: 14 KiB ![]() ![]() |
Before ![]() (image error) Size: 16 KiB After ![]() (image error) Size: 16 KiB ![]() ![]() |
Before ![]() (image error) Size: 47 KiB After ![]() (image error) Size: 47 KiB ![]() ![]() |
Before ![]() (image error) Size: 54 KiB After ![]() (image error) Size: 54 KiB ![]() ![]() |
Before ![]() (image error) Size: 21 MiB |
@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "../libs.h"
|
||||
#include "../util/math.h"
|
||||
#include "fuck.h"
|
||||
#include "common.h"
|
||||
#include "player.h"
|
||||
#include "pot.h"
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
#include "../libs.h"
|
||||
#include "fuck.h"
|
||||
#include "common.h"
|
||||
#include "card.h"
|
||||
|
||||
/**
|
||||
|
@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "../libs.h"
|
||||
#include "../util/flags.h"
|
||||
#include "fuck.h"
|
||||
#include "common.h"
|
||||
#include "bet.h"
|
||||
|
||||
/**
|
||||
|
@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "../libs.h"
|
||||
#include "../util/flags.h"
|
||||
#include "fuck.h"
|
||||
#include "common.h"
|
||||
#include "card.h"
|
||||
#include "pot.h"
|
||||
#include "bet.h"
|
||||
|
@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "../libs.h"
|
||||
#include "../util/array.h"
|
||||
#include "fuck.h"
|
||||
#include "common.h"
|
||||
|
||||
/**
|
||||
* Adds a new pot to the poker game instance.
|
||||
|
@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "../libs.h"
|
||||
#include "../util/math.h"
|
||||
#include "fuck.h"
|
||||
#include "common.h"
|
||||
#include "bet.h"
|
||||
#include "card.h"
|
||||
#include "winner.h"
|
||||
|
@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
#include "../libs.h"
|
||||
#include "card.h"
|
||||
#include "fuck.h"
|
||||
#include "common.h"
|
||||
#include "player.h"
|
||||
|
||||
|
||||
|
8
test/util/array.c
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Copyright (c) 2021 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#include "array.h"
|
12
test/util/array.h
Normal file
@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Copyright (c) 2021 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <unity.h>
|
||||
#include <util/array.h>
|
||||
|
||||
int test_array_h();
|
@ -9,4 +9,27 @@ function(tool_assets args)
|
||||
DEPENDS ${ARGV}
|
||||
COMMENT "Compressing Assets"
|
||||
)
|
||||
endfunction()
|
||||
|
||||
function(tool_copy target)
|
||||
math(EXPR CARGSN "${ARGC} - 1")
|
||||
set(LOOP_DEPENDENCIES)
|
||||
|
||||
foreach(index RANGE 1 ${CARGSN} 2)
|
||||
math(EXPR indexnext "${index} + 1")
|
||||
set(LOOP_TARGET "item_${target}_${index}")
|
||||
|
||||
LIST(GET ARGV ${index} from)
|
||||
LIST(GET ARGV ${indexnext} to)
|
||||
LIST(APPEND LOOP_DEPENDENCIES ${LOOP_TARGET})
|
||||
add_custom_command(OUTPUT ${LOOP_TARGET}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${ROOT_DIR}/${ASSETS_DIR}/${from}" "${ASSETS_DIR}/${to}"
|
||||
COMMENT "Copying ${from} => ${to}"
|
||||
)
|
||||
endforeach()
|
||||
|
||||
add_custom_target(${target}
|
||||
DEPENDS ${MY_LIST}
|
||||
COMMENT "Copying ${FILE_NAME}"
|
||||
)
|
||||
endfunction()
|
@ -6,6 +6,6 @@
|
||||
function(tool_vn_character DEP_NAME IN OUT)
|
||||
add_custom_target(${DEP_NAME}
|
||||
COMMAND node ${TOOLS_DIR}/vn/character-sheet-generator.js --assets="${ASSETS_DIR}" --root="${ROOT_DIR}" --in="${IN}" --out="${OUT}"
|
||||
COMMENT "Adding VN Character ${FILE_NAME}"
|
||||
COMMENT "Adding VN Character ${DEP_NAME}"
|
||||
)
|
||||
endfunction()
|