mirror of
https://git.planet-casio.com/Slyvtt/Collab_RPG.git
synced 2024-12-29 13:03:43 +01:00
added B&W vs Grayscale switch
This commit is contained in:
parent
87ad8b697d
commit
5195cdba49
7 changed files with 55 additions and 11 deletions
|
@ -9,6 +9,10 @@ include(Fxconv)
|
||||||
find_package(Gint 2.9 REQUIRED)
|
find_package(Gint 2.9 REQUIRED)
|
||||||
find_package(LibProf 2.4 REQUIRED)
|
find_package(LibProf 2.4 REQUIRED)
|
||||||
|
|
||||||
|
#set the color mode either to 1bit or 2bits
|
||||||
|
set(COLORMODE 1b)
|
||||||
|
|
||||||
|
|
||||||
fxconv_declare_converters(assets-fx/converters.py)
|
fxconv_declare_converters(assets-fx/converters.py)
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
|
@ -37,19 +41,46 @@ set(ASSETS
|
||||||
# ...
|
# ...
|
||||||
)
|
)
|
||||||
set(ASSETS_fx
|
set(ASSETS_fx
|
||||||
assets-fx/levels/tileset.png
|
|
||||||
assets-fx/levels/level0.json
|
assets-fx/levels/level0.json
|
||||||
# ...
|
# ...
|
||||||
)
|
)
|
||||||
|
|
||||||
fxconv_declare_assets(${ASSETS} ${ASSETS_fx} ${ASSETS_cg} WITH_METADATA)
|
set(ASSETS_fx_1b
|
||||||
|
assets-fx/levels/tileset1b.png
|
||||||
|
# ...
|
||||||
|
)
|
||||||
|
|
||||||
|
set(ASSETS_fx_2b
|
||||||
|
assets-fx/levels/tileset2b.png
|
||||||
|
# ...
|
||||||
|
)
|
||||||
|
|
||||||
|
fxconv_declare_assets(${ASSETS} ${ASSETS_fx} ${ASSETS_fx_1b} ${ASSETS_fx_2b} WITH_METADATA)
|
||||||
|
|
||||||
|
add_executable(myaddin ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}} ${ASSETS_${FXSDK_PLATFORM}_${COLORMODE}} )
|
||||||
|
|
||||||
|
if("${COLORMODE}" STREQUAL 1b)
|
||||||
|
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -DCOLOR1BIT)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
if("${COLORMODE}" STREQUAL 2b)
|
||||||
|
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -DCOLOR2BIT)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
add_executable(myaddin ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}})
|
|
||||||
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os)
|
|
||||||
target_link_options(myaddin PRIVATE -Wl,-Map=Build_Addin.map -Wl,--print-memory-usage)
|
target_link_options(myaddin PRIVATE -Wl,-Map=Build_Addin.map -Wl,--print-memory-usage)
|
||||||
target_link_libraries(myaddin LibProf::LibProf Gint::Gint)
|
target_link_libraries(myaddin LibProf::LibProf Gint::Gint)
|
||||||
|
|
||||||
|
|
||||||
if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G)
|
if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G)
|
||||||
generate_g1a(TARGET myaddin OUTPUT "Prj_PC.g1a"
|
if("${COLORMODE}" STREQUAL 1b)
|
||||||
NAME "Collab RPG" ICON assets-fx/icon.png)
|
generate_g1a(TARGET myaddin OUTPUT "PrjPC1b.g1a"
|
||||||
|
NAME "Col RPG NB" ICON assets-fx/icon1.png)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if("${COLORMODE}" STREQUAL 2b)
|
||||||
|
generate_g1a(TARGET myaddin OUTPUT "PrjPC2b.g1a"
|
||||||
|
NAME "Col RPG Grey" ICON assets-fx/icon2.png)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
BIN
assets-fx/icon1.png
Normal file
BIN
assets-fx/icon1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
assets-fx/icon2.png
Normal file
BIN
assets-fx/icon2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
|
@ -2,6 +2,11 @@
|
||||||
custom-type: map
|
custom-type: map
|
||||||
name_regex: (.*)\.json map_\1
|
name_regex: (.*)\.json map_\1
|
||||||
|
|
||||||
tileset.png:
|
tileset1b.png:
|
||||||
|
type: bopti-image
|
||||||
|
name: img_tilesetnpp
|
||||||
|
|
||||||
|
|
||||||
|
tileset2b.png:
|
||||||
type: bopti-image
|
type: bopti-image
|
||||||
name: img_tilesetnpp
|
name: img_tilesetnpp
|
BIN
assets-fx/levels/tileset1b.png
Normal file
BIN
assets-fx/levels/tileset1b.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 41 KiB |
BIN
assets-fx/levels/tileset2b.png
Normal file
BIN
assets-fx/levels/tileset2b.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
14
src/main.c
14
src/main.c
|
@ -1,10 +1,10 @@
|
||||||
#include <gint/display.h>
|
#include <gint/display.h>
|
||||||
#include <gint/keyboard.h>
|
#include <gint/keyboard.h>
|
||||||
#include <gint/gray.h>
|
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
|
|
||||||
|
#ifdef COLOR2BIT
|
||||||
|
#include <gint/gray.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,12 +14,20 @@ int main(void)
|
||||||
{
|
{
|
||||||
dclear(C_WHITE);
|
dclear(C_WHITE);
|
||||||
|
|
||||||
|
#ifdef COLOR2BIT
|
||||||
dgray( DGRAY_ON );
|
dgray( DGRAY_ON );
|
||||||
|
#endif
|
||||||
|
|
||||||
RenderMap();
|
RenderMap();
|
||||||
|
|
||||||
dupdate();
|
dupdate();
|
||||||
|
|
||||||
getkey();
|
getkey();
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef COLOR2BIT
|
||||||
|
dgray( DGRAY_OFF );
|
||||||
|
#endif
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue