Extracted all parts of all characters

This commit is contained in:
2021-10-17 19:05:40 -07:00
parent c2bbaad5dd
commit 38c10c0db0
77 changed files with 62 additions and 12 deletions

View File

@ -28,8 +28,9 @@ project(${TARGET_NAME} VERSION 1.0)
add_executable(${PROJECT_NAME})
# Variables
SET(ROOT_DIR "${CMAKE_SOURCE_DIR}")
set(ROOT_DIR "${CMAKE_SOURCE_DIR}")
set(TOOLS_DIR "${ROOT_DIR}/tools")
set(ASSETS_DIR "assets")
# Include tools
add_subdirectory(tools)
@ -48,13 +49,31 @@ elseif(TARGET_TYPE STREQUAL game)
GAME_DISPOSE=pokerGameDispose
GAME_VERSION=1.0
)
set(DIR_CHARS poker/characters)
tool_vn_character(penny
${DIR_CHARS}/penny/character.xml ${DIR_CHARS}/penny.png
)
tool_vn_character(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(sammy
${DIR_CHARS}/sammy/character.xml ${DIR_CHARS}/sammy.png
)
set(DIR_CHARS assets/poker/characters/penny)
tool_vn_character(penny ${DIR_CHARS}/character.xml ${DIR_CHARS}/bruh.png)
add_dependencies(${PROJECT_NAME} penny)
tool_assets(
penny
lucy
jenny
sammy
)
endif()
# Common Game Dependencies.
add_dependencies(${PROJECT_NAME} assets)
add_subdirectory(client)
endif()

View File

@ -1 +0,0 @@
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*/character.xml)

View File

@ -0,0 +1,7 @@
<vncharacter context="poker/characters/jenny/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" />
<layer x="353" y="119" width="344" height="351" directory="eyebrows" />
<layer x="353" y="119" width="344" height="351" directory="sunglasses" />
</vncharacter>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -0,0 +1,6 @@
<vncharacter context="poker/characters/lucy/sprites">
<base file="base.png" />
<layer x="675" y="327" width="295" height="235" directory="eyes" />
<layer x="675" y="327" width="295" height="235" directory="mouth" />
<layer x="675" y="327" width="295" height="235" directory="eyebrows" />
</vncharacter>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1,6 @@
<vncharacter context="poker/characters/sammy/sprites">
<base file="base.png" />
<layer x="215" y="264" width="307" height="213" directory="eyes" />
<layer x="215" y="264" width="307" height="213" directory="mouth" />
<layer x="215" y="264" width="307" height="213" directory="eyebrows" />
</vncharacter>

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -3,4 +3,5 @@
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
add_subdirectory(file)
add_subdirectory(vn)

12
tools/file/CMakeLists.txt Normal file
View File

@ -0,0 +1,12 @@
# Copyright (c) 2021 Dominic Msters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
function(tool_assets args)
add_custom_target(assets
COMMAND tar -C ./assets -cvf test.zip *
DEPENDS ${ARGV}
COMMENT "Compressing Assets"
)
endfunction()

View File

@ -3,10 +3,9 @@
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
function(tool_vn_character DEP_NAME IN OUT)
add_custom_target(${DEP_NAME}
COMMAND node ${TOOLS_DIR}/vn/character-sheet-generator.js --root="${ROOT_DIR}" --in="${ROOT_DIR}/${IN}" --out="${OUT}"
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}"
)
endfunction()

View File

@ -7,6 +7,7 @@ const { mkdirp } = require('../utils/file');
// Parse Args
if(!args.root) throw new Error(`Missing root argument`);
if(!args.assets) throw new Error(`Missing assets argument`);
if(!args.in) throw new Error(`Missing in argument`);
if(!args.out) throw new Error(`Missing out argument`);
if(!args.in.endsWith('xml')) throw new Error(`Invalid in XML`);
@ -14,9 +15,9 @@ if(!args.out.endsWith('png')) throw new Error(`Invalid out PNG`);
// Determine in and out.
const root = path.resolve(args.root);
const file = path.resolve(args.in);
const file = path.resolve(args.root, args.assets, args.in);
if(!fs.existsSync(file)) throw new Error(`Could not find ${file}`);
const outFile = path.resolve(args.out);
const outFile = path.resolve(args.assets, args.out);
if(fs.existsSync(outFile)) return;
// Load XML
@ -25,7 +26,7 @@ const [ character ] = data.elements;
// Validate file.
if(!character.attributes.context) throw new Error(`Missing context`)
const dir = path.resolve(root, 'assets', character.attributes.context);
const dir = path.resolve(root, args.assets, character.attributes.context);
// Parse base and layers
const base = character.elements.find(e => e.name == 'base').attributes;