Merge branch 'dev' of git.planet-casio.com:Slyvtt/Collab_RPG into events

This commit is contained in:
mibi88 2024-07-24 15:38:06 +02:00
commit 12eba00f62
9 changed files with 52 additions and 41 deletions

1
.gitignore vendored
View file

@ -2,6 +2,7 @@
/build-fx
/build-cg
/build-cg-push
/build-fxg3a
/*.g1a
/*.g3a

View file

@ -8,11 +8,11 @@ include(GenerateG1A)
include(GenerateG3A)
include(Fxconv)
find_package(Gint 2.9 REQUIRED)
find_package(Gint 2.10 REQUIRED)
find_package(LibProf 2.4 REQUIRED)
#set the color mode either to 1b or 2b
set(COLORMODE_fx 2b)
set(COLORMODE_fx 1b)
#set the color mode either to 1b, 2b or EGA64
set(COLORMODE_cg EGA64)
@ -86,18 +86,21 @@ if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G)
add_executable(myaddin ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}} ${ASSETS_${FXSDK_PLATFORM}_${COLORMODE_fx}} )
elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
add_executable(myaddin ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}} ${ASSETS_${FXSDK_PLATFORM}_${COLORMODE_cg}} )
elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G_G3A)
add_executable(myaddin ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}} ${ASSETS_${FXSDK_PLATFORM}_${COLORMODE_fx}} )
endif()
# fx colormode
if("${COLORMODE_fx}" STREQUAL 1b)
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -DCOLOR1BIT)
endif()
if("${COLORMODE_fx}" STREQUAL 2b)
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -DCOLOR2BIT)
endif()
# cg colormode
if("${COLORMODE_cg}" STREQUAL 1b)
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -DCOLOR1BIT)
@ -111,6 +114,7 @@ if("${COLORMODE_cg}" STREQUAL EGA64)
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -DCOLOREGA)
endif()
target_link_options(myaddin PRIVATE -Wl,-Map=Build_Addin.map -Wl,--print-memory-usage)
target_link_libraries(myaddin LibProf::LibProf Gint::Gint)
@ -128,6 +132,7 @@ if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G)
endif()
elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
if("${COLORMODE_cg}" STREQUAL 1b)
@ -145,4 +150,19 @@ elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
NAME "RPG PC EGA" ICONS assets-cg/ega64/icon-uns-ega64.png assets-cg/ega64/icon-sel-ega64.png)
endif()
elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G_G3A)
if("${COLORMODE_fx}" STREQUAL 1b)
generate_g3a(TARGET myaddin OUTPUT "RPG_1bfx.g3a"
NAME "RPG PC 1b fx" ICONS assets-cg/1b/icon-uns-1b.png assets-cg/1b/icon-sel-1b.png)
endif()
if("${COLORMODE_fx}" STREQUAL 2b)
generate_g3a(TARGET myaddin OUTPUT "RPG_2bfx.g3a"
NAME "RPG PC 2b fx" ICONS assets-cg/2b/icon-uns-2b.png assets-cg/2b/icon-sel-2b.png)
endif()
endif()

1
clean
View file

@ -6,6 +6,7 @@ cd ..
rm -r build-cg
rm -r build-cg-push
rm -r build-fx
rm -r build-fxg3a
rm *.g1a
rm *.g3a

View file

@ -2,27 +2,40 @@
#define CONFIG_H
#if !defined(FXCG50) && defined(COLOR2BIT)
#define USB_FEATURE 0
#define DEBUGMODE 0
/* Enable GrayMode on either FX and FX_G3A targets */
#if GINT_RENDER_MONO && defined(COLOR2BIT)
#define GRAYMODEOK 1
#endif
#define USB_FEATURE 0
#define DEBUGMODE 0
#ifdef FXCG50
#if GINT_RENDER_RGB
#define T_HEIGHT 16
#define T_WIDTH 16
#define PXSIZE 2
#define PATH_COLOR C_RED
#define P_WIDTH 16
#define P_HEIGHT 16
#else
#define T_HEIGHT 8
#define T_WIDTH 8
#endif
#ifdef FXCG50
#define PXSIZE 2
#else
#define PXSIZE 1
#define PATH_COLOR C_BLACK
#define P_WIDTH 8
#define P_HEIGHT 8
#endif
/* SPEED should NOT be 8 or bigger: it may cause bugs when handling
* collisions! */
#define SPEED PXSIZE*2
#define F_WIDTH (32*PXSIZE)
#define F_HEIGHT (32*PXSIZE)
#endif

View file

@ -28,7 +28,7 @@ extern font_t fontRPG;
/* the color of the text to go to the next dialog phase */
/* it improves readability to have somathing lighter */
#if GRAYMODEOK || (defined(FXCG50) && !defined(COLOR1BIT))
#if GRAYMODEOK || (defined(GINT_RENDER_RGB) && !defined(COLOR1BIT))
#define NEXT_COLOR C_DARK
#else
#define NEXT_COLOR C_BLACK
@ -39,7 +39,7 @@ void blit()
{
dupdate();
#if GRAYMODEOK
#if GRAYMODEOK && !defined(GINT_HW_CG)
dgray_getvram( &lightVRAMnext, &darkVRAMnext );
dgray_getscreen( &lightVRAMcurrent, &darkVRAMcurrent );

View file

@ -5,9 +5,7 @@
#include <string.h>
#include "game.h"
#include "map.h"
#define F_WIDTH (32*PXSIZE)
#define F_HEIGHT (32*PXSIZE)
#include "config.h"
/* showtext_opt()
*

View file

@ -127,7 +127,7 @@ int main(void) {
/* render the map */
draw(&game);
#if DEBUGMODE && FXCG50
#if DEBUGMODE && GINT_RENDER_RGB
if (game.debug_map)
{
dfont( NULL );

View file

@ -14,15 +14,6 @@
extern bopti_image_t demo_PNJ_img;
/* the color of the text to go to the next dialog phase */
/* it improves readability to have somathing lighter */
#if defined(FXCG50)
#define PATH_COLOR C_RED
#else
#define PATH_COLOR C_BLACK
#endif
NPC *npcRPG;
uint32_t nbNPC = 0;

View file

@ -1,21 +1,8 @@
#ifndef PLAYER_H
#define PLAYER_H
/* The size of the player. */
#ifdef FXCG50
#define P_WIDTH 16
#define P_HEIGHT 16
#else
#define P_WIDTH 8
#define P_HEIGHT 8
#endif
/* SPEED should NOT be 8 or bigger: it may cause bugs when handling
* collisions! */
#define SPEED PXSIZE*2
#include <stdbool.h>
#include "config.h"
#include "game.h"
#include "memory.h"