Added "const" qualifier to some functions.

"cdrom:\ and ;1" are automatically inserted into file name, in order to save memory space.
Some minor optimizations.
This commit is contained in:
Xavier ASUS 2018-11-18 20:03:35 +01:00
parent 4c0028bfcc
commit 2ccc0f5edd
25 changed files with 79307 additions and 3457 deletions

File diff suppressed because it is too large Load Diff

84
Source/Airport.geany Normal file
View File

@ -0,0 +1,84 @@
[editor]
line_wrapping=false
line_break_column=120
auto_continue_multiline=true
[file_prefs]
final_new_line=true
ensure_convert_new_lines=true
strip_trailing_spaces=true
replace_tabs=false
[indentation]
indent_width=4
indent_type=0
indent_hard_tab_width=8
detect_indent=false
detect_indent_width=false
indent_mode=3
[project]
name=Airport
base_path=/home/xavier/Airport/Source/
description=
file_patterns=
[long line marker]
long_line_behaviour=1
long_line_column=120
[files]
current_page=7
FILE_NAME_0=27415;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FAircraft.c;0;4
FILE_NAME_1=5668;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FCamera.c;0;4
FILE_NAME_2=4610;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FEndAnimation.c;0;4
FILE_NAME_3=6782;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FFont.c;0;4
FILE_NAME_4=130127;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FGame.c;0;4
FILE_NAME_5=44772;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FGameGui.c;0;4
FILE_NAME_6=19837;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FGfx.c;0;4
FILE_NAME_7=11503;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FLoadMenu.c;0;4
FILE_NAME_8=746;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2Fmain.c;0;4
FILE_NAME_9=745;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FMainMenuBtnAni.c;0;4
FILE_NAME_10=30731;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FMemCard.c;0;4
FILE_NAME_11=23479;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FMenu.c;0;4
FILE_NAME_12=3922;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FMessage.c;0;4
FILE_NAME_13=11301;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FPad.c;0;4
FILE_NAME_14=11644;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FPltParser.c;0;4
FILE_NAME_15=10080;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FPSXSDKIntro.c;0;4
FILE_NAME_16=2238;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FSerial.c;0;4
FILE_NAME_17=2666;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FSfx.c;0;4
FILE_NAME_18=32729;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FSystem.c;0;4
FILE_NAME_19=3755;C;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FTimer.c;0;4
FILE_NAME_20=1198;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FAircraft.h;0;4
FILE_NAME_21=871;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FCamera.h;0;4
FILE_NAME_22=529;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FEndAnimation.h;0;4
FILE_NAME_23=1133;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FFont.h;0;4
FILE_NAME_24=1598;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FGameGui.h;0;4
FILE_NAME_25=1830;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FGame.h;0;4
FILE_NAME_26=7294;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FGameStructures.h;0;4
FILE_NAME_27=3564;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FGfx.h;0;4
FILE_NAME_28=787;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FGlobal_Inc.h;0;4
FILE_NAME_29=514;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FLoadMenu.h;0;4
FILE_NAME_30=559;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FMainMenuBtnAni.h;0;4
FILE_NAME_31=4622;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FMemCard.h;0;4
FILE_NAME_32=387;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FMenu.h;0;4
FILE_NAME_33=439;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FMessage.h;0;4
FILE_NAME_34=1720;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FPad.h;0;4
FILE_NAME_35=750;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FPltParser.h;0;4
FILE_NAME_36=684;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FPSXSDKIntro.h;0;4
FILE_NAME_37=752;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FSerial.h;0;4
FILE_NAME_38=831;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FSfx.h;0;4
FILE_NAME_39=3993;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FSystem.h;0;4
FILE_NAME_40=1066;C++;0;EUTF-8;0;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FTimer.h;0;4
FILE_NAME_41=3584;Make;0;EUTF-8;1;1;0;%2Fhome%2Fxavier%2FAirport%2FSource%2FMakefile;0;4
[VTE]
last_dir=/home/xavier/Airport/Bin
[build-menu]
NF_01_LB=Make Custom _Target...
NF_01_CM=make rebuild
NF_01_WD=
EX_00_LB=_Execute
EX_00_CM=pcsxr -nogui -cdfile AIRPORT.cue
EX_00_WD=/home/xavier/Airport/Bin

Binary file not shown.

Binary file not shown.

76081
Source/Exe/AIRPORT.s Normal file

File diff suppressed because it is too large Load Diff

View File

@ -20,14 +20,14 @@
* *************************************/
enum
{
{
// We will use the most significant bit
// for internal purposes.
SQUARE_BTN_8BIT = 128,
CROSS_BTN_8BIT,
CIRCLE_BTN_8BIT,
TRIANGLE_BTN_8BIT
TRIANGLE_BTN_8BIT
};
/* *************************************
@ -41,7 +41,7 @@ enum
static char _internal_text[FONT_INTERNAL_TEXT_BUFFER_MAX_SIZE];
static volatile unsigned char _blend_effect_lum;
bool FontLoadImage(char* strPath, TYPE_FONT * ptrFont)
bool FontLoadImage(const char* strPath, TYPE_FONT * ptrFont)
{
if (GfxSpriteFromFile(strPath, &ptrFont->spr) == false)
{
@ -104,8 +104,8 @@ void FontSetSize(TYPE_FONT * ptrFont, short size)
}
void FontSetMaxCharPerLine(TYPE_FONT* ptrFont, uint8_t max)
{
ptrFont->max_ch_wrap = max;
{
ptrFont->max_ch_wrap = max;
}
void FontSetSpacing(TYPE_FONT* ptrFont, short spacing)
@ -118,7 +118,7 @@ void FontCyclic(void)
_blend_effect_lum -= 8;
}
void FontPrintText(TYPE_FONT * ptrFont, short x, short y, char* str, ...)
void FontPrintText(TYPE_FONT * ptrFont, short x, short y, const char* str, ...)
{
uint16_t i;
uint8_t line_count = 0;
@ -176,7 +176,7 @@ void FontPrintText(TYPE_FONT * ptrFont, short x, short y, char* str, ...)
for (j = i + 1; j < result; j++)
{
if (_internal_text[j] != ' ')
{
{
if (++aux_line_count >= ptrFont->max_ch_wrap)
{
line_count = 0;
@ -184,18 +184,18 @@ void FontPrintText(TYPE_FONT * ptrFont, short x, short y, char* str, ...)
y += ptrFont->char_h;
linefeed_needed = true;
break;
}
}
}
else
{
break;
}
{
break;
}
}
}
if (linefeed_needed == false)
{
x += ptrFont->char_w;
{
x += ptrFont->char_w;
}
continue;

View File

@ -20,9 +20,9 @@
* Global prototypes
* *************************************/
bool FontLoadImage(char* strPath, TYPE_FONT * ptrFont);
bool FontLoadImage(const char* strPath, TYPE_FONT * ptrFont);
void FontSetSize(TYPE_FONT * ptrFont, short size);
void FontPrintText(TYPE_FONT *ptrFont, short x, short y, char* str, ...);
void FontPrintText(TYPE_FONT *ptrFont, short x, short y, const char* str, ...);
void FontSetInitChar(TYPE_FONT * ptrFont, char c);
void FontSetFlags(TYPE_FONT * ptrFont, FONT_FLAGS flags);
void FontCyclic(void);

File diff suppressed because it is too large Load Diff

View File

@ -206,10 +206,10 @@ static bool GameGuiClearPassengersLeft_Flag;
static bool GameGuiBubbleShowFlag;
static bool GameGuiBubbleVibrationFlag;
static const char* GameFileList[] = { "cdrom:\\DATA\\SPRITES\\BUBBLE.TIM;1" ,
"cdrom:\\DATA\\FONTS\\FONT_1.FNT;1" ,
"cdrom:\\DATA\\SPRITES\\DEPARR.TIM;1" ,
"cdrom:\\DATA\\SPRITES\\PAGEUPDN.TIM;1" };
static const char* GameFileList[] = { "DATA\\SPRITES\\BUBBLE.TIM" ,
"DATA\\FONTS\\FONT_1.FNT" ,
"DATA\\SPRITES\\DEPARR.TIM" ,
"DATA\\SPRITES\\PAGEUPDN.TIM" };
static void* GameFileDest[] = { (GsSprite*)&BubbleSpr ,
(TYPE_FONT*)&RadioFont ,

View File

@ -81,12 +81,12 @@ typedef struct t_cartpos
}TYPE_CARTESIAN_POS;
typedef struct t_tileData
{
{
bool ShowTile;
TYPE_CARTESIAN_POS CartPos;
unsigned char r;
unsigned char g;
unsigned char b;
unsigned char b;
}TYPE_TILE_DATA;
typedef struct t_flightData

View File

@ -536,7 +536,7 @@ bool GfxIsGPUBusy(void)
* false if an error happened, true otherwise.
*
* **********************************************************************/
bool GfxSpriteFromFile(char* fname, GsSprite* spr)
bool GfxSpriteFromFile(const char* fname, GsSprite* spr)
{
GsImage gsi;
@ -572,7 +572,7 @@ bool GfxSpriteFromFile(char* fname, GsSprite* spr)
* false if an error happened, true otherwise.
*
* **********************************************************************/
bool GfxCLUTFromFile(char* fname)
bool GfxCLUTFromFile(const char* fname)
{
GsImage gsi;

View File

@ -52,10 +52,10 @@ void GfxDrawScene_Fast(void);
bool GfxReadyForDMATransfer(void);
// Fills a GsSprite structure with information from a TIM file.
bool GfxSpriteFromFile(char* fname, GsSprite* spr);
bool GfxSpriteFromFile(const char* fname, GsSprite* spr);
// Reportedly, loads CLUT data from a TIM image (image data is discarded)
bool GfxCLUTFromFile(char* fname);
bool GfxCLUTFromFile(const char* fname);
// Returns true if current object is within screen limits, false otherwise.
bool GfxIsInsideScreenArea(short x, short y, short w, short h);

View File

@ -19,32 +19,15 @@
#ifndef SERIAL_INTERFACE
#define Serial_printf dprintf
#define Serial_printf printf
#endif // SERIAL_INTERFACE
#define REFRESH_FREQUENCY 50 //50 Hz PAL / 60 Hz NTSC
#define DEBUG_PRINT_VAR(var) Serial_printf(#var " = %d\n", var);
#ifndef bool
typedef enum t_bool
{
false = 0,
true = 1
}bool;
#endif
#if (PSXSDK_VERSION != 0x0599)
#error "Wrong PSXSDK version! Please use version 0.5.99."
#endif
/* Test for GCC == 5.2.0 */
#if ( (__GNUC__ != 5) || (__GNUC_MINOR__ != 2) || (__GNUC_PATCHLEVEL__ != 0) )
#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)
#pragma message ( "******** You are using GCC version number: " STR(__GNUC__) \
"." STR(__GNUC_MINOR__) "." STR(__GNUC_PATCHLEVEL__) " ********")
#error "Wrong GCC version! Please use version 5.2.0."
#endif
#endif // GLOBAL_INC__H__

View File

@ -1,5 +1,5 @@
/* **************************************
* Includes *
* Includes *
* *************************************/
#include "LoadMenu.h"
@ -10,79 +10,79 @@
#include "Sfx.h"
/* **************************************
* Defines *
* Defines *
* *************************************/
/* **************************************
* Structs and enums *
* Structs and enums *
* *************************************/
enum
{
SMALL_FONT_SIZE = 8,
SMALL_FONT_SIZE = 8,
SMALL_FONT_SPACING = 6
};
enum
{
BG_BLUE_TARGET_VALUE = 0xC0,
BG_WHITE_TARGET_VALUE = /*0x40*/ 0,
BG_INCREASE_STEP = 0x10
BG_BLUE_TARGET_VALUE = 0xC0,
BG_WHITE_TARGET_VALUE = /*0x40*/ 0,
BG_INCREASE_STEP = 0x10
};
enum
{
LOADING_BAR_X = 64,
LOADING_BAR_Y = 200,
LOADING_BAR_N_LINES = 4,
LOADING_BAR_X = 64,
LOADING_BAR_Y = 200,
LOADING_BAR_N_LINES = 4,
LOADING_BAR_WIDTH = 256,
LOADING_BAR_HEIGHT = 16,
LOADING_BAR_WIDTH = 256,
LOADING_BAR_HEIGHT = 16,
LOADING_BAR_LUMINANCE_TARGET = NORMAL_LUMINANCE,
LOADING_BAR_LUMINANCE_STEP = 10
LOADING_BAR_LUMINANCE_TARGET = NORMAL_LUMINANCE,
LOADING_BAR_LUMINANCE_STEP = 10
};
enum
{
LOADING_TITLE_CLUT_X = 384,
LOADING_TITLE_CLUT_Y = 496,
LOADING_TITLE_X = 128,
LOADING_TITLE_Y = 32,
LOADING_TITLE_CLUT_X = 384,
LOADING_TITLE_CLUT_Y = 496,
LOADING_TITLE_X = 128,
LOADING_TITLE_Y = 32,
LOADING_TITLE_U = 0,
LOADING_TITLE_V = 0,
LOADING_TITLE_U = 0,
LOADING_TITLE_V = 0,
LOADING_TITLE_LUMINANCE_STEP = 10,
LOADING_TITLE_LUMINANCE_TARGET = NORMAL_LUMINANCE
LOADING_TITLE_LUMINANCE_STEP = 10,
LOADING_TITLE_LUMINANCE_TARGET = NORMAL_LUMINANCE
};
enum
{
PLANE_START_X = 56,
PLANE_START_Y = 200,
PLANE_START_X = 56,
PLANE_START_Y = 200,
PLANE_U = 0,
PLANE_V = 32,
PLANE_SIZE = 16,
PLANE_U = 0,
PLANE_V = 32,
PLANE_SIZE = 16,
PLANE_LUMINANCE_STEP = 0x10,
PLANE_LUMINANCE_TARGET_VALUE = NORMAL_LUMINANCE
PLANE_LUMINANCE_STEP = 0x10,
PLANE_LUMINANCE_TARGET_VALUE = NORMAL_LUMINANCE
};
/* *************************************
* Local Prototypes
* Local Prototypes
* *************************************/
static void LoadMenuInit(void);
static void ISR_LoadMenuVBlank(void);
static bool LoadMenuISRHasEnded(void);
static bool LoadMenuISRHasStarted(void);
static void LoadMenuLoadFileList( const char* fileList[], void* dest[],
uint8_t szFileList, uint8_t szDestList);
static void LoadMenuLoadFileList(const char* const fileList[], void* const dest[],
uint8_t szFileList, uint8_t szDestList);
/* *************************************
* Local Variables
* Local Variables
* *************************************/
static GsGPoly4 loadMenuBg;
@ -91,21 +91,21 @@ static GsSprite LoadMenuTitleSpr;
static GsLine LoadMenuBarLines[LOADING_BAR_N_LINES];
static GsRectangle LoadMenuBarRect;
static const char* LoadMenuFiles[] = { "cdrom:\\DATA\\SPRITES\\PLANE.TIM;1",
"cdrom:\\DATA\\SPRITES\\LOADING.TIM;1",
"cdrom:\\DATA\\FONTS\\FONT_2.FNT;1" };
static const char* LoadMenuFiles[] = { "DATA\\SPRITES\\PLANE.TIM",
"DATA\\SPRITES\\LOADING.TIM",
"DATA\\FONTS\\FONT_2.FNT" };
static void* LoadMenuDest[] = { (GsSprite*)&LoadMenuPlaneSpr,
(GsSprite*)&LoadMenuTitleSpr,
(TYPE_FONT*)&SmallFont };
(GsSprite*)&LoadMenuTitleSpr,
(TYPE_FONT*)&SmallFont };
static char* strCurrentFile;
static const char* strCurrentFile;
// Flags to communicate with ISR state
// * startup_flag: background fades in from black to blue.
// * end_flag: tells the background to fade out to black.
// * isr_ended: background has totally faded out to black.
// * isr_started: tells the ISR has finished starting up.
// * startup_flag: background fades in from black to blue.
// * end_flag: tells the background to fade out to black.
// * isr_ended: background has totally faded out to black.
// * isr_started: tells the ISR has finished starting up.
static volatile bool startup_flag;
static volatile bool isr_started;
static volatile bool end_flag;
@ -118,147 +118,147 @@ static bool load_menu_running;
void LoadMenuInit(void)
{
int i;
static bool first_load = false;
int i;
static bool first_load = false;
if (first_load == false)
{
first_load = true;
LoadMenuLoadFileList( LoadMenuFiles,
LoadMenuDest,
sizeof (LoadMenuFiles) / sizeof (char*),
sizeof (LoadMenuDest) / sizeof (void*));
}
if (first_load == false)
{
first_load = true;
LoadMenuLoadFileList( LoadMenuFiles,
LoadMenuDest,
sizeof (LoadMenuFiles) / sizeof (char*),
sizeof (LoadMenuDest) / sizeof (void*));
}
FontSetSize(&SmallFont, SMALL_FONT_SIZE);
FontSetSize(&SmallFont, SMALL_FONT_SIZE);
FontSetSpacing(&SmallFont, SMALL_FONT_SPACING);
LoadMenuPlaneSpr.r = 0;
LoadMenuPlaneSpr.g = 0;
LoadMenuPlaneSpr.b = 0;
LoadMenuPlaneSpr.r = 0;
LoadMenuPlaneSpr.g = 0;
LoadMenuPlaneSpr.b = 0;
LoadMenuPlaneSpr.x = PLANE_START_X;
LoadMenuPlaneSpr.y = PLANE_START_Y;
LoadMenuPlaneSpr.x = PLANE_START_X;
LoadMenuPlaneSpr.y = PLANE_START_Y;
// "Loading..." title init
// "Loading..." title init
LoadMenuTitleSpr.r = 0;
LoadMenuTitleSpr.g = 0;
LoadMenuTitleSpr.b = 0;
LoadMenuTitleSpr.r = 0;
LoadMenuTitleSpr.g = 0;
LoadMenuTitleSpr.b = 0;
LoadMenuTitleSpr.x = LOADING_TITLE_X;
LoadMenuTitleSpr.y = LOADING_TITLE_Y;
LoadMenuTitleSpr.x = LOADING_TITLE_X;
LoadMenuTitleSpr.y = LOADING_TITLE_Y;
LoadMenuTitleSpr.cx = LOADING_TITLE_CLUT_X;
LoadMenuTitleSpr.cy = LOADING_TITLE_CLUT_Y;
LoadMenuTitleSpr.u = LOADING_TITLE_U;
LoadMenuTitleSpr.v = LOADING_TITLE_V;
LoadMenuTitleSpr.cx = LOADING_TITLE_CLUT_X;
LoadMenuTitleSpr.cy = LOADING_TITLE_CLUT_Y;
LoadMenuTitleSpr.u = LOADING_TITLE_U;
LoadMenuTitleSpr.v = LOADING_TITLE_V;
startup_flag = true;
isr_started = false;
end_flag = false;
isr_ended = false;
startup_flag = true;
isr_started = false;
end_flag = false;
isr_ended = false;
// Background init
// Background init
loadMenuBg.x[0] = 0;
loadMenuBg.x[1] = X_SCREEN_RESOLUTION;
loadMenuBg.x[2] = 0;
loadMenuBg.x[3] = X_SCREEN_RESOLUTION;
loadMenuBg.x[0] = 0;
loadMenuBg.x[1] = X_SCREEN_RESOLUTION;
loadMenuBg.x[2] = 0;
loadMenuBg.x[3] = X_SCREEN_RESOLUTION;
loadMenuBg.y[0] = 0;
loadMenuBg.y[1] = 0;
loadMenuBg.y[2] = Y_SCREEN_RESOLUTION;
loadMenuBg.y[3] = Y_SCREEN_RESOLUTION;
loadMenuBg.y[0] = 0;
loadMenuBg.y[1] = 0;
loadMenuBg.y[2] = Y_SCREEN_RESOLUTION;
loadMenuBg.y[3] = Y_SCREEN_RESOLUTION;
// Colour components adjustment (default to zero)
for (i = 0; i < 4 ; i++)
{
loadMenuBg.r[i] = 0;
loadMenuBg.g[i] = 0;
loadMenuBg.b[i] = 0;
}
// Colour components adjustment (default to zero)
for (i = 0; i < 4 ; i++)
{
loadMenuBg.r[i] = 0;
loadMenuBg.g[i] = 0;
loadMenuBg.b[i] = 0;
}
// "Loading" bar line 0 (up left - up right)
// "Loading" bar line 0 (up left - up right)
LoadMenuBarLines[0].x[0] = LOADING_BAR_X;
LoadMenuBarLines[0].x[1] = LOADING_BAR_X + LOADING_BAR_WIDTH;
LoadMenuBarLines[0].x[0] = LOADING_BAR_X;
LoadMenuBarLines[0].x[1] = LOADING_BAR_X + LOADING_BAR_WIDTH;
LoadMenuBarLines[0].y[0] = LOADING_BAR_Y;
LoadMenuBarLines[0].y[1] = LOADING_BAR_Y;
LoadMenuBarLines[0].y[0] = LOADING_BAR_Y;
LoadMenuBarLines[0].y[1] = LOADING_BAR_Y;
// "Loading" bar line 1 (up left - down left)
// "Loading" bar line 1 (up left - down left)
LoadMenuBarLines[1].x[0] = LOADING_BAR_X;
LoadMenuBarLines[1].x[1] = LOADING_BAR_X;
LoadMenuBarLines[1].x[0] = LOADING_BAR_X;
LoadMenuBarLines[1].x[1] = LOADING_BAR_X;
LoadMenuBarLines[1].y[0] = LOADING_BAR_Y;
LoadMenuBarLines[1].y[1] = LOADING_BAR_Y + LOADING_BAR_HEIGHT;
LoadMenuBarLines[1].y[0] = LOADING_BAR_Y;
LoadMenuBarLines[1].y[1] = LOADING_BAR_Y + LOADING_BAR_HEIGHT;
// "Loading" bar line 2 (down left - down right)
// "Loading" bar line 2 (down left - down right)
LoadMenuBarLines[2].x[0] = LOADING_BAR_X;
LoadMenuBarLines[2].x[1] = LOADING_BAR_X + LOADING_BAR_WIDTH;
LoadMenuBarLines[2].x[0] = LOADING_BAR_X;
LoadMenuBarLines[2].x[1] = LOADING_BAR_X + LOADING_BAR_WIDTH;
LoadMenuBarLines[2].y[0] = LOADING_BAR_Y + LOADING_BAR_HEIGHT;
LoadMenuBarLines[2].y[1] = LOADING_BAR_Y + LOADING_BAR_HEIGHT;
LoadMenuBarLines[2].y[0] = LOADING_BAR_Y + LOADING_BAR_HEIGHT;
LoadMenuBarLines[2].y[1] = LOADING_BAR_Y + LOADING_BAR_HEIGHT;
// "Loading" bar line 3 (up right - down right)
// "Loading" bar line 3 (up right - down right)
LoadMenuBarLines[3].x[0] = LOADING_BAR_X + LOADING_BAR_WIDTH;
LoadMenuBarLines[3].x[1] = LOADING_BAR_X + LOADING_BAR_WIDTH;
LoadMenuBarLines[3].x[0] = LOADING_BAR_X + LOADING_BAR_WIDTH;
LoadMenuBarLines[3].x[1] = LOADING_BAR_X + LOADING_BAR_WIDTH;
LoadMenuBarLines[3].y[0] = LOADING_BAR_Y;
LoadMenuBarLines[3].y[1] = LOADING_BAR_Y + LOADING_BAR_HEIGHT;
LoadMenuBarLines[3].y[0] = LOADING_BAR_Y;
LoadMenuBarLines[3].y[1] = LOADING_BAR_Y + LOADING_BAR_HEIGHT;
for (i = 0; i < LOADING_BAR_N_LINES ; i++)
{
LoadMenuBarLines[i].r = 0;
LoadMenuBarLines[i].g = 0;
LoadMenuBarLines[i].b = 0;
}
for (i = 0; i < LOADING_BAR_N_LINES ; i++)
{
LoadMenuBarLines[i].r = 0;
LoadMenuBarLines[i].g = 0;
LoadMenuBarLines[i].b = 0;
}
LoadMenuBarRect.r = 0;
LoadMenuBarRect.g = 0;
LoadMenuBarRect.b = 0;
LoadMenuBarRect.r = 0;
LoadMenuBarRect.g = 0;
LoadMenuBarRect.b = 0;
// LoadMenuBarRect.attribute |= ENABLE_TRANS | TRANS_MODE(0);
// LoadMenuBarRect.attribute |= ENABLE_TRANS | TRANS_MODE(0);
LoadMenuBarRect.x = LOADING_BAR_X;
LoadMenuBarRect.y = LOADING_BAR_Y;
LoadMenuBarRect.w = 0;
LoadMenuBarRect.h = LOADING_BAR_HEIGHT;
LoadMenuBarRect.x = LOADING_BAR_X;
LoadMenuBarRect.y = LOADING_BAR_Y;
LoadMenuBarRect.w = 0;
LoadMenuBarRect.h = LOADING_BAR_HEIGHT;
LoadMenuBarRect.attribute |= ENABLE_TRANS | TRANS_MODE(0);
LoadMenuBarRect.attribute |= ENABLE_TRANS | TRANS_MODE(0);
load_menu_running = true;
load_menu_running = true;
SmallFont.spr.r = 0;
SmallFont.spr.g = 0;
SmallFont.spr.b = 0;
SmallFont.spr.r = 0;
SmallFont.spr.g = 0;
SmallFont.spr.b = 0;
GfxSetGlobalLuminance(0);
GfxSetGlobalLuminance(0);
Serial_printf("I_MASK = 0x%08X\n", (*(unsigned int*)0x1F801074));
SetVBlankHandler(&ISR_LoadMenuVBlank);
SetVBlankHandler(&ISR_LoadMenuVBlank);
}
void LoadMenuEnd(void)
{
end_flag = true;
load_menu_running = false;
end_flag = true;
load_menu_running = false;
while (LoadMenuISRHasEnded() == false);
Serial_printf("Set default VBlank handler.\n");
SetVBlankHandler(&ISR_SystemDefaultVBlank);
while (LoadMenuISRHasEnded() == false);
Serial_printf("Set default VBlank handler.\n");
SetVBlankHandler(&ISR_SystemDefaultVBlank);
GfxSetGlobalLuminance(NORMAL_LUMINANCE);
GfxSetGlobalLuminance(NORMAL_LUMINANCE);
}
void ISR_LoadMenuVBlank(void)
{
uint8_t i;
uint8_t i;
SystemIncreaseGlobalTimer();
@ -271,268 +271,264 @@ void ISR_LoadMenuVBlank(void)
return;
}
/*if ( (SystemIsBusy() != false) || (GfxIsGPUBusy() != false) || (SerialIsBusy() != false) )
{
return;
}*/
/*if ( (SystemIsBusy() != false) || (GfxIsGPUBusy() != false) || (SerialIsBusy() != false) )
{
return;
}*/
if (startup_flag != false)
{
// "Loading..." text
if (LoadMenuTitleSpr.r < LOADING_TITLE_LUMINANCE_TARGET)
{
LoadMenuTitleSpr.r += LOADING_TITLE_LUMINANCE_STEP;
LoadMenuTitleSpr.g += LOADING_TITLE_LUMINANCE_STEP;
LoadMenuTitleSpr.b += LOADING_TITLE_LUMINANCE_STEP;
}
if (startup_flag != false)
{
// "Loading..." text
if (LoadMenuTitleSpr.r < LOADING_TITLE_LUMINANCE_TARGET)
{
LoadMenuTitleSpr.r += LOADING_TITLE_LUMINANCE_STEP;
LoadMenuTitleSpr.g += LOADING_TITLE_LUMINANCE_STEP;
LoadMenuTitleSpr.b += LOADING_TITLE_LUMINANCE_STEP;
}
if (loadMenuBg.g[0] < BG_WHITE_TARGET_VALUE)
{
loadMenuBg.r[0] += BG_INCREASE_STEP;
loadMenuBg.r[1] += BG_INCREASE_STEP;
if (loadMenuBg.g[0] < BG_WHITE_TARGET_VALUE)
{
loadMenuBg.r[0] += BG_INCREASE_STEP;
loadMenuBg.r[1] += BG_INCREASE_STEP;
loadMenuBg.g[0] += BG_INCREASE_STEP;
loadMenuBg.g[1] += BG_INCREASE_STEP;
loadMenuBg.g[0] += BG_INCREASE_STEP;
loadMenuBg.g[1] += BG_INCREASE_STEP;
loadMenuBg.b[0] += BG_INCREASE_STEP;
loadMenuBg.b[1] += BG_INCREASE_STEP;
}
// Blue background
if (loadMenuBg.b[2] < BG_BLUE_TARGET_VALUE)
{
loadMenuBg.b[2] += BG_INCREASE_STEP;
loadMenuBg.b[3] += BG_INCREASE_STEP;
}
loadMenuBg.b[0] += BG_INCREASE_STEP;
loadMenuBg.b[1] += BG_INCREASE_STEP;
}
// Blue background
if (loadMenuBg.b[2] < BG_BLUE_TARGET_VALUE)
{
loadMenuBg.b[2] += BG_INCREASE_STEP;
loadMenuBg.b[3] += BG_INCREASE_STEP;
}
if (LoadMenuBarRect.r < LOADING_BAR_LUMINANCE_TARGET)
{
LoadMenuBarRect.r += LOADING_BAR_LUMINANCE_STEP;
LoadMenuBarRect.g += LOADING_BAR_LUMINANCE_STEP;
LoadMenuBarRect.b += LOADING_BAR_LUMINANCE_STEP;
}
else
{
startup_flag = false;
isr_started = true;
}
if (LoadMenuBarRect.r < LOADING_BAR_LUMINANCE_TARGET)
{
LoadMenuBarRect.r += LOADING_BAR_LUMINANCE_STEP;
LoadMenuBarRect.g += LOADING_BAR_LUMINANCE_STEP;
LoadMenuBarRect.b += LOADING_BAR_LUMINANCE_STEP;
}
else
{
startup_flag = false;
isr_started = true;
}
for (i = 0;i < LOADING_BAR_N_LINES ; i++)
{
if (LoadMenuBarLines[i].r < LOADING_BAR_LUMINANCE_TARGET)
{
LoadMenuBarLines[i].r += LOADING_BAR_LUMINANCE_STEP;
LoadMenuBarLines[i].g += LOADING_BAR_LUMINANCE_STEP;
LoadMenuBarLines[i].b += LOADING_BAR_LUMINANCE_STEP;
}
}
for (i = 0;i < LOADING_BAR_N_LINES ; i++)
{
if (LoadMenuBarLines[i].r < LOADING_BAR_LUMINANCE_TARGET)
{
LoadMenuBarLines[i].r += LOADING_BAR_LUMINANCE_STEP;
LoadMenuBarLines[i].g += LOADING_BAR_LUMINANCE_STEP;
LoadMenuBarLines[i].b += LOADING_BAR_LUMINANCE_STEP;
}
}
if (LoadMenuPlaneSpr.r < PLANE_LUMINANCE_TARGET_VALUE)
{
LoadMenuPlaneSpr.r += PLANE_LUMINANCE_STEP;
LoadMenuPlaneSpr.g += PLANE_LUMINANCE_STEP;
LoadMenuPlaneSpr.b += PLANE_LUMINANCE_STEP;
}
if (LoadMenuPlaneSpr.r < PLANE_LUMINANCE_TARGET_VALUE)
{
LoadMenuPlaneSpr.r += PLANE_LUMINANCE_STEP;
LoadMenuPlaneSpr.g += PLANE_LUMINANCE_STEP;
LoadMenuPlaneSpr.b += PLANE_LUMINANCE_STEP;
}
}
else if (end_flag != false)
{
LoadMenuTitleSpr.r -= LOADING_TITLE_LUMINANCE_STEP;
LoadMenuTitleSpr.g -= LOADING_TITLE_LUMINANCE_STEP;
LoadMenuTitleSpr.b -= LOADING_TITLE_LUMINANCE_STEP;
}
else if (end_flag != false)
{
LoadMenuTitleSpr.r -= LOADING_TITLE_LUMINANCE_STEP;
LoadMenuTitleSpr.g -= LOADING_TITLE_LUMINANCE_STEP;
LoadMenuTitleSpr.b -= LOADING_TITLE_LUMINANCE_STEP;
if (loadMenuBg.g[0] > 0)
{
loadMenuBg.r[0] -= BG_INCREASE_STEP;
loadMenuBg.r[1] -= BG_INCREASE_STEP;
if (loadMenuBg.g[0] > 0)
{
loadMenuBg.r[0] -= BG_INCREASE_STEP;
loadMenuBg.r[1] -= BG_INCREASE_STEP;
loadMenuBg.g[0] -= BG_INCREASE_STEP;
loadMenuBg.g[1] -= BG_INCREASE_STEP;
loadMenuBg.g[0] -= BG_INCREASE_STEP;
loadMenuBg.g[1] -= BG_INCREASE_STEP;
loadMenuBg.b[0] -= BG_INCREASE_STEP;
loadMenuBg.b[1] -= BG_INCREASE_STEP;
}
loadMenuBg.b[0] -= BG_INCREASE_STEP;
loadMenuBg.b[1] -= BG_INCREASE_STEP;
}
if (loadMenuBg.b[2] > 0)
{
loadMenuBg.b[2] -= BG_INCREASE_STEP;
loadMenuBg.b[3] -= BG_INCREASE_STEP;
}
if (loadMenuBg.b[2] > 0)
{
loadMenuBg.b[2] -= BG_INCREASE_STEP;
loadMenuBg.b[3] -= BG_INCREASE_STEP;
}
if (loadMenuBg.b[2] == 0)
{
end_flag = false;
isr_ended = true;
}
if (loadMenuBg.b[2] == 0)
{
end_flag = false;
isr_ended = true;
}
if (LoadMenuPlaneSpr.r > 0)
{
LoadMenuPlaneSpr.r -= PLANE_LUMINANCE_STEP;
LoadMenuPlaneSpr.g -= PLANE_LUMINANCE_STEP;
LoadMenuPlaneSpr.b -= PLANE_LUMINANCE_STEP;
}
if (LoadMenuPlaneSpr.r > 0)
{
LoadMenuPlaneSpr.r -= PLANE_LUMINANCE_STEP;
LoadMenuPlaneSpr.g -= PLANE_LUMINANCE_STEP;
LoadMenuPlaneSpr.b -= PLANE_LUMINANCE_STEP;
}
LoadMenuPlaneSpr.x = (PLANE_START_X + LOADING_BAR_WIDTH);
LoadMenuPlaneSpr.y = PLANE_START_Y;
LoadMenuPlaneSpr.x = (PLANE_START_X + LOADING_BAR_WIDTH);
LoadMenuPlaneSpr.y = PLANE_START_Y;
LoadMenuBarRect.w = LOADING_BAR_WIDTH;
LoadMenuBarRect.w = LOADING_BAR_WIDTH;
if (LoadMenuBarRect.r > 0)
{
LoadMenuBarRect.r -= LOADING_BAR_LUMINANCE_STEP;
LoadMenuBarRect.g -= LOADING_BAR_LUMINANCE_STEP;
LoadMenuBarRect.b -= LOADING_BAR_LUMINANCE_STEP;
}
if (LoadMenuBarRect.r > 0)
{
LoadMenuBarRect.r -= LOADING_BAR_LUMINANCE_STEP;
LoadMenuBarRect.g -= LOADING_BAR_LUMINANCE_STEP;
LoadMenuBarRect.b -= LOADING_BAR_LUMINANCE_STEP;
}
for (i = 0;i < LOADING_BAR_N_LINES ; i++)
{
if (LoadMenuBarLines[i].r > 0)
{
LoadMenuBarLines[i].r -= LOADING_BAR_LUMINANCE_STEP;
LoadMenuBarLines[i].g -= LOADING_BAR_LUMINANCE_STEP;
LoadMenuBarLines[i].b -= LOADING_BAR_LUMINANCE_STEP;
}
}
}
for (i = 0;i < LOADING_BAR_N_LINES ; i++)
{
if (LoadMenuBarLines[i].r > 0)
{
LoadMenuBarLines[i].r -= LOADING_BAR_LUMINANCE_STEP;
LoadMenuBarLines[i].g -= LOADING_BAR_LUMINANCE_STEP;
LoadMenuBarLines[i].b -= LOADING_BAR_LUMINANCE_STEP;
}
}
}
GsSortGPoly4(&loadMenuBg);
GsSortGPoly4(&loadMenuBg);
GsSortRectangle(&LoadMenuBarRect);
GsSortRectangle(&LoadMenuBarRect);
for (i = 0 ; i < LOADING_BAR_N_LINES ; i++)
{
GsSortLine(&LoadMenuBarLines[i]);
}
for (i = 0 ; i < LOADING_BAR_N_LINES ; i++)
{
GsSortLine(&LoadMenuBarLines[i]);
}
GsSortSprite(&LoadMenuTitleSpr);
GsSortSprite(&LoadMenuTitleSpr);
LoadMenuPlaneSpr.w = PLANE_SIZE;
LoadMenuPlaneSpr.h = PLANE_SIZE;
LoadMenuPlaneSpr.w = PLANE_SIZE;
LoadMenuPlaneSpr.h = PLANE_SIZE;
GsSortSprite(&LoadMenuPlaneSpr);
GsSortSprite(&LoadMenuPlaneSpr);
FontSetFlags(&SmallFont, FONT_BLEND_EFFECT);
FontSetFlags(&SmallFont, FONT_BLEND_EFFECT);
FontPrintText( &SmallFont,
LOADING_BAR_X,
LOADING_BAR_Y + LOADING_BAR_HEIGHT + 8,
strCurrentFile );
FontPrintText( &SmallFont,
LOADING_BAR_X,
LOADING_BAR_Y + LOADING_BAR_HEIGHT + 8,
strCurrentFile );
GfxDrawScene_Fast();
GfxDrawScene_Fast();
}
bool LoadMenuISRHasEnded(void)
{
return isr_ended;
return isr_ended;
}
bool LoadMenuISRHasStarted(void)
{
return isr_started;
return isr_started;
}
void LoadMenu( const char* fileList[],
void* dest[],
uint8_t szFileList , uint8_t szDestList)
void LoadMenu( const char* const fileList[],
void* const dest[],
uint8_t szFileList , uint8_t szDestList)
{
if (load_menu_running == false)
{
LoadMenuInit();
if (load_menu_running == false)
{
LoadMenuInit();
while (LoadMenuISRHasStarted() == false);
}
while (LoadMenuISRHasStarted() == false);
}
LoadMenuLoadFileList(fileList, dest, szFileList, szDestList);
LoadMenuLoadFileList(fileList, dest, szFileList, szDestList);
}
void LoadMenuLoadFileList( const char* fileList[], void* dest[],
uint8_t szFileList, uint8_t szDestList)
void LoadMenuLoadFileList( const char* const fileList[], void* const dest[],
uint8_t szFileList, uint8_t szDestList)
{
char aux_file_name[100];
char* extension;
short x_increment;
uint8_t fileLoadedCount;
char* extension;
short x_increment;
uint8_t fileLoadedCount;
if (szFileList != szDestList)
{
Serial_printf("File list size different from dest list size! %d vs %d\n",
szFileList, szDestList);
return;
}
if (szFileList != szDestList)
{
Serial_printf("File list size different from dest list size! %d vs %d\n",
szFileList, szDestList);
return;
}
for (fileLoadedCount = 0; fileLoadedCount < szFileList ; fileLoadedCount++)
{
strCurrentFile = (char*)fileList[fileLoadedCount];
for (fileLoadedCount = 0; fileLoadedCount < szFileList ; fileLoadedCount++)
{
strCurrentFile = fileList[fileLoadedCount];
if (strCurrentFile == NULL)
{
continue;
}
if (strCurrentFile == NULL)
{
continue;
}
x_increment = (short)(LOADING_BAR_WIDTH / szFileList);
x_increment = LOADING_BAR_WIDTH / szFileList;
// Calculate new X position for loading menu plane sprite.
// This is not calculated on ISR as to avoid longer ISR time.
LoadMenuPlaneSpr.x = (PLANE_START_X + (fileLoadedCount* x_increment) );
// Calculate new X position for loading menu plane sprite.
// This is not calculated on ISR as to avoid longer ISR time.
LoadMenuPlaneSpr.x = (PLANE_START_X + (fileLoadedCount* x_increment) );
LoadMenuBarRect.w = fileLoadedCount* x_increment;
LoadMenuBarRect.w = fileLoadedCount * x_increment;
//Serial_printf("Files %d / %d loaded. New plane X = %d.\n",fileLoadedCount,szFileList,LoadMenuPlaneSpr.x);
static char auxstr[256];
// Backup original file path
strncpy(aux_file_name, strCurrentFile, 100);
strncpy(auxstr, strCurrentFile, sizeof (auxstr));
//We want to get file extension, so split into tokens
strtok(strCurrentFile, ".;");
extension = strtok(NULL, ".;");
//We want to get file extension, so split into tokens
strtok(auxstr, ".");
extension = strtok(NULL, ".");
Serial_printf("File extension: .%s\n", extension);
//Restore original file path in order to load file
strncpy(strCurrentFile, aux_file_name, 100);
Serial_printf("File extension: .%s\n", extension);
if (strncmp(extension, "TIM", 3) == 0)
{
if (GfxSpriteFromFile(strCurrentFile, dest[fileLoadedCount]) == false)
{
Serial_printf("Could not load image file \"%s\"!\n", strCurrentFile);
}
}
else if (strncmp(extension, "CLT", 3) == 0)
{
if (dest[fileLoadedCount] != NULL)
{
Serial_printf("WARNING: File %s linked to non-NULL destination pointer!\n", dest[fileLoadedCount]);
}
if (strncmp(extension, "TIM", 3) == 0)
{
if (GfxSpriteFromFile(strCurrentFile, dest[fileLoadedCount]) == false)
{
Serial_printf("Could not load image file \"%s\"!\n", strCurrentFile);
}
}
else if (strncmp(extension, "CLT", 3) == 0)
{
if (dest[fileLoadedCount] != NULL)
{
Serial_printf("WARNING: File %s linked to non-NULL destination pointer!\n", dest[fileLoadedCount]);
}
if (GfxCLUTFromFile(strCurrentFile) == false)
{
Serial_printf("Could not load CLUT file \"%s\"!\n", strCurrentFile);
}
}
else if (strncmp(extension, "VAG", 3) == 0)
{
if (SfxUploadSound(strCurrentFile, dest[fileLoadedCount]) == false)
{
Serial_printf("Could not load sound file \"%s\"!\n", strCurrentFile);
}
}
else if (strncmp(extension, "FNT", 3) == 0)
{
if (FontLoadImage(strCurrentFile, dest[fileLoadedCount]) == false)
{
Serial_printf("Could not load font file \"%s\"!\n", strCurrentFile);
}
}
else if (strncmp(extension, "PLT", 3) == 0)
{
if (PltParserLoadFile(strCurrentFile, dest[fileLoadedCount]) == false)
{
Serial_printf("Could not load pilots file \"%s\"!\n", strCurrentFile);
}
}
else
{
Serial_printf("LoadMenu does not recognize following extension: %s\n",extension);
}
}
if (GfxCLUTFromFile(strCurrentFile) == false)
{
Serial_printf("Could not load CLUT file \"%s\"!\n", strCurrentFile);
}
}
else if (strncmp(extension, "VAG", 3) == 0)
{
if (SfxUploadSound(strCurrentFile, dest[fileLoadedCount]) == false)
{
Serial_printf("Could not load sound file \"%s\"!\n", strCurrentFile);
}
}
else if (strncmp(extension, "FNT", 3) == 0)
{
if (FontLoadImage(strCurrentFile, dest[fileLoadedCount]) == false)
{
Serial_printf("Could not load font file \"%s\"!\n", strCurrentFile);
}
}
else if (strncmp(extension, "PLT", 3) == 0)
{
if (PltParserLoadFile(strCurrentFile, dest[fileLoadedCount]) == false)
{
Serial_printf("Could not load pilots file \"%s\"!\n", strCurrentFile);
}
}
else
{
Serial_printf("LoadMenu does not recognize following extension: %s\n",extension);
}
}
}

View File

@ -15,8 +15,8 @@
* Global prototypes
* *************************************/
void LoadMenu( const char* fileList[],
void* dest[],
void LoadMenu( const char* const fileList[],
void* const dest[],
uint8_t szFileList , uint8_t szDestList);
void LoadMenuEnd(void);

View File

@ -60,7 +60,8 @@ MUSIC_OBJ_DIR = ../Bin
MUSIC_SRC_DIR = ../Music
MUSIC_TRACKS = $(addprefix $(MUSIC_OBJ_DIR)/, TRACK01.bin TRACK02.bin TRACK03.bin)
FFMPEG = ffmpeg
FFMPEG_DIR = $(MUSIC_SRC_DIR)/$(FFMPEG)/bin
FFMPEG_DIR =
#FFMPEG_DIR = $(MUSIC_SRC_DIR)/$(FFMPEG)/bin/
FFMPEG_FLAGS = -f s16le -acodec pcm_s16le
# VAG objects:
@ -117,7 +118,7 @@ SPRITE_OBJECTS += $(addprefix $(OBJ_FONTS_PATH)/, INTROFNT.TIM \
# ------------------------------------
$(BIN_TARGET_PATH)/$(PROJECT).bin: $(EXE_PATH)/$(PROJECT).iso $(MUSIC_TRACKS)
mkpsxiso $< $@ $(LICENSE_FILE) $(addprefix --track=, $(MUSIC_TRACKS))
mkpsxiso $< $@ $(LICENSE_FILE) -s $(addprefix --track=, $(MUSIC_TRACKS))
#~ mkpsxiso $< $@ $(LICENSE_FILE)
# $(PROJECT).cue is automatically generated by mkpsxiso
@ -128,6 +129,7 @@ rebuild:
-include $(DEPS)
clean:
rm -f $(OBJ_DIR)/*.d
rm -f $(OBJ_DIR)/*.o
rm -f $(OBJ_SOUNDS_DIR)/*.VAG
rm -f $(OBJ_LEVELS_DIR)/*.LVL
@ -175,7 +177,7 @@ $(OBJ_LEVELS_DIR)/%.PLT: $(SRC_LEVELS_DIR)/%.PLT
cp $^ $@
$(MUSIC_OBJ_DIR)/%.bin: $(MUSIC_SRC_DIR)/%.mp3
$(FFMPEG_DIR)/$(FFMPEG) -i $< $(FFMPEG_FLAGS) $@
$(FFMPEG_DIR)$(FFMPEG) -i $< $(FFMPEG_FLAGS) $@
# ----------------------------------------
# Phony targets

View File

@ -1,318 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.0.3, 2018-03-10T18:45:16. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{b7e5565e-6cea-457a-8037-111a3ab036df}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.7.0 MinGW 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.7.0 MinGW 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.57.win32_mingw53_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/cygwin/home/Xavier/Airport/Source/build-MapEditor-Desktop_Qt_5_7_0_MinGW_32bit-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/cygwin/home/Xavier/Airport/Source/MapEditor</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/cygwin/home/Xavier/Airport/Source/MapEditor</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">MapEditor</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:C:/cygwin/home/Xavier/Airport/Source/MapEditor/MapEditor.pro</value>
<value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">MapEditor.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">C:/cygwin/home/Xavier/Airport/Source/MapEditor</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">18</value>
</data>
<data>
<variable>Version</variable>
<value type="int">18</value>
</data>
</qtcreator>

File diff suppressed because it is too large Load Diff

View File

@ -122,8 +122,8 @@ static bool PSXSDKIntroStringEvent;
static bool PSXSDKIntroClose;
// Text
static char* strPSXSDKIntro = {"MADE WITH PSXSDK"};
static char* strPSXSDKIntroAuthor = {"BY NEXTVOLUME"};
static const char* strPSXSDKIntro = {"MADE WITH PSXSDK"};
static const char* strPSXSDKIntroAuthor = {"BY NEXTVOLUME"};
/* *************************************
* Global variables

View File

@ -28,7 +28,7 @@
static void PltParserResetBuffers(TYPE_FLIGHT_DATA* ptrFlightData);
bool PltParserLoadFile(char* strPath, TYPE_FLIGHT_DATA* ptrFlightData)
bool PltParserLoadFile(const char* strPath, TYPE_FLIGHT_DATA* ptrFlightData)
{
enum
{

View File

@ -16,7 +16,7 @@
/* *************************************
* Global prototypes
* *************************************/
bool PltParserLoadFile(char* strPath, TYPE_FLIGHT_DATA* ptrFlightData);
bool PltParserLoadFile(const char* strPath, TYPE_FLIGHT_DATA* ptrFlightData);
uint8_t* PltParserGenerateFile(TYPE_PLT_CONFIG* ptrPltConfig);
/* *************************************

View File

@ -31,7 +31,7 @@ void SfxPlaySound(SsVag* sound)
}
}
bool SfxUploadSound_Ex(char* file_path, SsVag* vag, uint8_t voiceIndex)
bool SfxUploadSound_Ex(const char* file_path, SsVag* vag, uint8_t voiceIndex)
{
#ifdef PSXSDK_DEBUG
static size_t SPUBytesUsed;
@ -86,7 +86,7 @@ bool SfxUploadSound_Ex(char* file_path, SsVag* vag, uint8_t voiceIndex)
return true;
}
bool SfxUploadSound(char* file_path, SsVag* vag)
bool SfxUploadSound(const char* file_path, SsVag* vag)
{
bool success = false;
uint8_t i;

View File

@ -26,7 +26,7 @@ typedef enum t_musicTracks
* Global prototypes
* *************************************/
void SfxPlaySound(SsVag* sound);
bool SfxUploadSound(char* file_path, SsVag* vag);
bool SfxUploadSound(const char* file_path, SsVag* vag);
void SfxPlayTrack(MUSIC_TRACKS track);
void SfxStopMusic(void);

View File

@ -478,7 +478,7 @@ void SystemCheckTimer(bool* timer, uint64_t* last_timer, uint8_t step)
* @return: true if file has been loaded successfully, false otherwise.
*
* ****************************************************************************************/
bool SystemLoadFileToBuffer(char* fname, uint8_t* buffer, uint32_t szBuffer)
bool SystemLoadFileToBuffer(const char* fname, uint8_t* buffer, uint32_t szBuffer)
{
#ifdef SERIAL_INTERFACE
uint8_t fileSizeBuffer[sizeof (uint32_t)] = {0};
@ -501,8 +501,12 @@ bool SystemLoadFileToBuffer(char* fname, uint8_t* buffer, uint32_t szBuffer)
memset(buffer,0,szBuffer);
static char completeFileName[256];
snprintf(completeFileName, sizeof (completeFileName), "cdrom:\\%s;1", fname);
#ifdef SERIAL_INTERFACE
Serial_printf("#%s@", fname);
Serial_printf("#%s@", completeFileName);
SerialRead(fileSizeBuffer, sizeof (uint32_t) );
@ -538,7 +542,9 @@ bool SystemLoadFileToBuffer(char* fname, uint8_t* buffer, uint32_t szBuffer)
SystemDisableVBlankInterrupt();
f = fopen(fname, "r");
Serial_printf("Opening %s...\n", completeFileName);
f = fopen((char*)completeFileName, "r");
if (f == NULL)
{
@ -571,7 +577,7 @@ bool SystemLoadFileToBuffer(char* fname, uint8_t* buffer, uint32_t szBuffer)
#endif // SERIAL_INTERFACE
Serial_printf("File \"%s\" loaded successfully!\n",fname);
Serial_printf("File \"%s\" loaded successfully!\n",completeFileName);
return true;
}
@ -587,7 +593,7 @@ bool SystemLoadFileToBuffer(char* fname, uint8_t* buffer, uint32_t szBuffer)
* @return: true if file has been loaded successfully, false otherwise.
*
* ****************************************************************************************/
bool SystemLoadFile(char*fname)
bool SystemLoadFile(const char* fname)
{
return SystemLoadFileToBuffer(fname,file_buffer,sizeof (file_buffer));
}
@ -1208,7 +1214,7 @@ void SystemGetFileBasename(const char* fileName, char* str, const size_t sz)
i++; // Skip '\\' character.
for (; fileName[i] != ';'; i++)
for (; fileName[i]; i++)
{
str[j++] = fileName[i];
}

View File

@ -29,10 +29,10 @@ void SystemSetRandSeed(void);
bool SystemRefreshNeeded(void);
// Loads a file into system's internal buffer
bool SystemLoadFile(char*fname);
bool SystemLoadFile(const char*fname);
// Loads a file into desired buffer
bool SystemLoadFileToBuffer(char* fname, uint8_t* buffer, uint32_t szBuffer);
bool SystemLoadFileToBuffer(const char* fname, uint8_t* buffer, uint32_t szBuffer);
// Clears VSync flag after each frame
void SystemDisableScreenRefresh(void);