mirror of
https://git.planet-casio.com/Slyvtt/Collab_RPG.git
synced 2024-12-29 13:03:43 +01:00
Merge branch 'dev' of git.planet-casio.com:Slyvtt/Collab_RPG into events
This commit is contained in:
commit
12eba00f62
9 changed files with 52 additions and 41 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,6 +2,7 @@
|
||||||
/build-fx
|
/build-fx
|
||||||
/build-cg
|
/build-cg
|
||||||
/build-cg-push
|
/build-cg-push
|
||||||
|
/build-fxg3a
|
||||||
/*.g1a
|
/*.g1a
|
||||||
/*.g3a
|
/*.g3a
|
||||||
|
|
||||||
|
|
|
@ -8,11 +8,11 @@ include(GenerateG1A)
|
||||||
include(GenerateG3A)
|
include(GenerateG3A)
|
||||||
|
|
||||||
include(Fxconv)
|
include(Fxconv)
|
||||||
find_package(Gint 2.9 REQUIRED)
|
find_package(Gint 2.10 REQUIRED)
|
||||||
find_package(LibProf 2.4 REQUIRED)
|
find_package(LibProf 2.4 REQUIRED)
|
||||||
|
|
||||||
#set the color mode either to 1b or 2b
|
#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 the color mode either to 1b, 2b or EGA64
|
||||||
set(COLORMODE_cg 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}} )
|
add_executable(myaddin ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}} ${ASSETS_${FXSDK_PLATFORM}_${COLORMODE_fx}} )
|
||||||
elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
|
elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
|
||||||
add_executable(myaddin ${SOURCES} ${ASSETS} ${ASSETS_${FXSDK_PLATFORM}} ${ASSETS_${FXSDK_PLATFORM}_${COLORMODE_cg}} )
|
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()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# fx colormode
|
# fx colormode
|
||||||
if("${COLORMODE_fx}" STREQUAL 1b)
|
if("${COLORMODE_fx}" STREQUAL 1b)
|
||||||
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -DCOLOR1BIT)
|
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -DCOLOR1BIT)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if("${COLORMODE_fx}" STREQUAL 2b)
|
if("${COLORMODE_fx}" STREQUAL 2b)
|
||||||
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -DCOLOR2BIT)
|
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -DCOLOR2BIT)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# cg colormode
|
# cg colormode
|
||||||
if("${COLORMODE_cg}" STREQUAL 1b)
|
if("${COLORMODE_cg}" STREQUAL 1b)
|
||||||
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -DCOLOR1BIT)
|
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)
|
target_compile_options(myaddin PRIVATE -Wall -Wextra -Os -DCOLOREGA)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
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)
|
||||||
|
|
||||||
|
@ -128,6 +132,7 @@ if("${FXSDK_PLATFORM_LONG}" STREQUAL fx9860G)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
|
elseif("${FXSDK_PLATFORM_LONG}" STREQUAL fxCG50)
|
||||||
|
|
||||||
if("${COLORMODE_cg}" STREQUAL 1b)
|
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)
|
NAME "RPG PC EGA" ICONS assets-cg/ega64/icon-uns-ega64.png assets-cg/ega64/icon-sel-ega64.png)
|
||||||
endif()
|
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()
|
endif()
|
||||||
|
|
1
clean
1
clean
|
@ -6,6 +6,7 @@ cd ..
|
||||||
rm -r build-cg
|
rm -r build-cg
|
||||||
rm -r build-cg-push
|
rm -r build-cg-push
|
||||||
rm -r build-fx
|
rm -r build-fx
|
||||||
|
rm -r build-fxg3a
|
||||||
rm *.g1a
|
rm *.g1a
|
||||||
rm *.g3a
|
rm *.g3a
|
||||||
|
|
||||||
|
|
31
src/config.h
31
src/config.h
|
@ -2,27 +2,40 @@
|
||||||
#define CONFIG_H
|
#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
|
#define GRAYMODEOK 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define USB_FEATURE 0
|
|
||||||
|
|
||||||
#define DEBUGMODE 0
|
|
||||||
|
|
||||||
#ifdef FXCG50
|
#if GINT_RENDER_RGB
|
||||||
#define T_HEIGHT 16
|
#define T_HEIGHT 16
|
||||||
#define T_WIDTH 16
|
#define T_WIDTH 16
|
||||||
|
#define PXSIZE 2
|
||||||
|
#define PATH_COLOR C_RED
|
||||||
|
#define P_WIDTH 16
|
||||||
|
#define P_HEIGHT 16
|
||||||
#else
|
#else
|
||||||
#define T_HEIGHT 8
|
#define T_HEIGHT 8
|
||||||
#define T_WIDTH 8
|
#define T_WIDTH 8
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef FXCG50
|
|
||||||
#define PXSIZE 2
|
|
||||||
#else
|
|
||||||
#define PXSIZE 1
|
#define PXSIZE 1
|
||||||
|
#define PATH_COLOR C_BLACK
|
||||||
|
#define P_WIDTH 8
|
||||||
|
#define P_HEIGHT 8
|
||||||
#endif
|
#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
|
#endif
|
||||||
|
|
|
@ -28,7 +28,7 @@ extern font_t fontRPG;
|
||||||
|
|
||||||
/* the color of the text to go to the next dialog phase */
|
/* the color of the text to go to the next dialog phase */
|
||||||
/* it improves readability to have somathing lighter */
|
/* 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
|
#define NEXT_COLOR C_DARK
|
||||||
#else
|
#else
|
||||||
#define NEXT_COLOR C_BLACK
|
#define NEXT_COLOR C_BLACK
|
||||||
|
@ -39,7 +39,7 @@ void blit()
|
||||||
{
|
{
|
||||||
dupdate();
|
dupdate();
|
||||||
|
|
||||||
#if GRAYMODEOK
|
#if GRAYMODEOK && !defined(GINT_HW_CG)
|
||||||
dgray_getvram( &lightVRAMnext, &darkVRAMnext );
|
dgray_getvram( &lightVRAMnext, &darkVRAMnext );
|
||||||
dgray_getscreen( &lightVRAMcurrent, &darkVRAMcurrent );
|
dgray_getscreen( &lightVRAMcurrent, &darkVRAMcurrent );
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "game.h"
|
#include "game.h"
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
|
#include "config.h"
|
||||||
#define F_WIDTH (32*PXSIZE)
|
|
||||||
#define F_HEIGHT (32*PXSIZE)
|
|
||||||
|
|
||||||
/* showtext_opt()
|
/* showtext_opt()
|
||||||
*
|
*
|
||||||
|
|
|
@ -127,7 +127,7 @@ int main(void) {
|
||||||
/* render the map */
|
/* render the map */
|
||||||
draw(&game);
|
draw(&game);
|
||||||
|
|
||||||
#if DEBUGMODE && FXCG50
|
#if DEBUGMODE && GINT_RENDER_RGB
|
||||||
if (game.debug_map)
|
if (game.debug_map)
|
||||||
{
|
{
|
||||||
dfont( NULL );
|
dfont( NULL );
|
||||||
|
|
|
@ -14,15 +14,6 @@
|
||||||
extern bopti_image_t demo_PNJ_img;
|
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;
|
NPC *npcRPG;
|
||||||
uint32_t nbNPC = 0;
|
uint32_t nbNPC = 0;
|
||||||
|
|
||||||
|
|
15
src/player.h
15
src/player.h
|
@ -1,21 +1,8 @@
|
||||||
#ifndef PLAYER_H
|
#ifndef PLAYER_H
|
||||||
#define 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 <stdbool.h>
|
||||||
|
#include "config.h"
|
||||||
#include "game.h"
|
#include "game.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue