I LOVE STEALING PIRACY STEALING LURAICHU'S CODE FROM RECSBR - https://github.com/BTTRG/recsbr
This commit is contained in:
parent
88b7892c26
commit
3bedf7136a
27 changed files with 501 additions and 234 deletions
Binary file not shown.
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 10 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 5.1 KiB |
BIN
game_english/data/Wav/BladeShoot.wav
Normal file
BIN
game_english/data/Wav/BladeShoot.wav
Normal file
Binary file not shown.
BIN
game_english/data/Wav/Cursor.wav
Normal file
BIN
game_english/data/Wav/Cursor.wav
Normal file
Binary file not shown.
BIN
game_english/data/Wav/EnemyHurt.wav
Normal file
BIN
game_english/data/Wav/EnemyHurt.wav
Normal file
Binary file not shown.
BIN
game_english/data/Wav/Go.wav
Normal file
BIN
game_english/data/Wav/Go.wav
Normal file
Binary file not shown.
BIN
game_english/data/Wav/Hurt.wav
Normal file
BIN
game_english/data/Wav/Hurt.wav
Normal file
Binary file not shown.
BIN
game_english/data/Wav/Message.wav
Normal file
BIN
game_english/data/Wav/Message.wav
Normal file
Binary file not shown.
BIN
game_english/data/Wav/Select.wav
Normal file
BIN
game_english/data/Wav/Select.wav
Normal file
Binary file not shown.
BIN
game_english/data/Wav/Shatter.wav
Normal file
BIN
game_english/data/Wav/Shatter.wav
Normal file
Binary file not shown.
BIN
game_english/data/Wav/Shoot.wav
Normal file
BIN
game_english/data/Wav/Shoot.wav
Normal file
Binary file not shown.
BIN
game_english/data/Wav/YesNo.wav
Normal file
BIN
game_english/data/Wav/YesNo.wav
Normal file
Binary file not shown.
212
src/Caret.cpp
212
src/Caret.cpp
|
@ -7,10 +7,11 @@
|
||||||
#include "Draw.h"
|
#include "Draw.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "Triangle.h"
|
#include "Triangle.h"
|
||||||
|
#include "Map.h"
|
||||||
|
|
||||||
CARET gCrt[CARET_MAX];
|
CARET gCrt[CARET_MAX];
|
||||||
|
|
||||||
CARET_TABLE gCaretTable[18] = {
|
CARET_TABLE gCaretTable[24] = {
|
||||||
{0, 0},
|
{0, 0},
|
||||||
{0x800, 0x800},
|
{0x800, 0x800},
|
||||||
{0x1000, 0x1000},
|
{0x1000, 0x1000},
|
||||||
|
@ -28,7 +29,13 @@ CARET_TABLE gCaretTable[18] = {
|
||||||
{0x2800, 0x2800},
|
{0x2800, 0x2800},
|
||||||
{0x800, 0x800},
|
{0x800, 0x800},
|
||||||
{0x2800, 0x800},
|
{0x2800, 0x800},
|
||||||
{0x6800, 0x800}
|
{0x6800, 0x800},
|
||||||
|
{0x1000, 0x1000},
|
||||||
|
{0x1000, 0x1000},
|
||||||
|
{0x1000, 0x1000},
|
||||||
|
{0x800, 0x800},
|
||||||
|
{0x800, 0x800},
|
||||||
|
{0x800, 0x800},
|
||||||
};
|
};
|
||||||
|
|
||||||
void InitCaret(void)
|
void InitCaret(void)
|
||||||
|
@ -249,7 +256,7 @@ void ActCaret05(CARET *crt)
|
||||||
crt->rect = rect[crt->ani_no];
|
crt->rect = rect[crt->ani_no];
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActCaret07(CARET *crt)
|
void ActCaret07(CARET *crt) // Booster smoke
|
||||||
{
|
{
|
||||||
RECT rcLeft[7] = {
|
RECT rcLeft[7] = {
|
||||||
{56, 0, 64, 8},
|
{56, 0, 64, 8},
|
||||||
|
@ -401,16 +408,20 @@ void ActCaret11(CARET *crt)
|
||||||
|
|
||||||
void ActCaret12(CARET *crt)
|
void ActCaret12(CARET *crt)
|
||||||
{
|
{
|
||||||
RECT rcLeft[2] = {
|
RECT rcLeft[5] = {
|
||||||
|
{0, 193, 32, 225},
|
||||||
{112, 0, 144, 32},
|
{112, 0, 144, 32},
|
||||||
|
{64, 192, 96, 225},
|
||||||
{144, 0, 176, 32},
|
{144, 0, 176, 32},
|
||||||
|
//{144, 192, 176, 225},
|
||||||
|
{184, 192, 216, 225},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (++crt->ani_wait > 2)
|
if (++crt->ani_wait > 2)
|
||||||
{
|
{
|
||||||
crt->ani_wait = 0;
|
crt->ani_wait = 0;
|
||||||
|
|
||||||
if (++crt->ani_no > 1)
|
if (++crt->ani_no > 4)
|
||||||
{
|
{
|
||||||
crt->cond = 0;
|
crt->cond = 0;
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
|
@ -549,8 +560,191 @@ void ActCaret17(CARET *crt)
|
||||||
crt->rect = rcLeft[1];
|
crt->rect = rcLeft[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ActCaret18(CARET* crt)
|
||||||
|
{
|
||||||
|
RECT rcLeft[7] = {
|
||||||
|
{0, 153, 16, 169},
|
||||||
|
{16, 153, 32, 169},
|
||||||
|
{32, 153, 48, 169},
|
||||||
|
{48, 153, 64, 169},
|
||||||
|
{64, 153, 80, 169},
|
||||||
|
{80, 153, 96, 169},
|
||||||
|
{96, 153, 112, 169}
|
||||||
|
};
|
||||||
|
|
||||||
|
switch (crt->act_no)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
crt->ym = Random(-0x500, 0x500);
|
||||||
|
crt->xm = Random(-0x500, 0x500);
|
||||||
|
crt->act_no = 1;
|
||||||
|
case 1:
|
||||||
|
crt->ym += 0x20;
|
||||||
|
crt->rect = rcLeft[crt->ani_no];
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
crt->x += crt->xm;
|
||||||
|
crt->y += crt->ym;
|
||||||
|
|
||||||
|
//crt->rect = rcLeft[0];
|
||||||
|
crt->rect = rcLeft[crt->ani_no];
|
||||||
|
if (++crt->ani_wait > 6) // Animation counter, how many frames until we advance to next frame
|
||||||
|
{
|
||||||
|
crt->ani_wait = 0; // Reset counter
|
||||||
|
++crt->ani_no; // Increase animation frame by one
|
||||||
|
}
|
||||||
|
if (crt->ani_no > 6)
|
||||||
|
{
|
||||||
|
crt->cond = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ActCaret19(CARET* crt)
|
||||||
|
{
|
||||||
|
RECT rect[4] = {
|
||||||
|
{112, 32, 128, 48},
|
||||||
|
{128, 32, 144, 48},
|
||||||
|
{144, 32, 160, 48},
|
||||||
|
{160, 32, 176, 48},
|
||||||
|
};
|
||||||
|
|
||||||
|
if (++crt->ani_wait > 2)
|
||||||
|
{
|
||||||
|
crt->ani_wait = 0;
|
||||||
|
|
||||||
|
if (++crt->ani_no > 3)
|
||||||
|
{
|
||||||
|
crt->cond = 0;
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
return; // The code below will use 'ani_no' to access 'rect', even though it's now too high
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
crt->rect = rect[crt->ani_no];
|
||||||
|
}
|
||||||
|
|
||||||
|
void ActCaret20(CARET* crt) // Splash caret
|
||||||
|
{
|
||||||
|
RECT rect[4] = {
|
||||||
|
{0, 65, 8, 72},
|
||||||
|
{8, 65, 16, 72},
|
||||||
|
{16, 65, 24, 72},
|
||||||
|
{24, 65, 32, 72},
|
||||||
|
|
||||||
|
};
|
||||||
|
//crt->ym += 0x20;
|
||||||
|
//crt->ani_no = Random(0, 4);
|
||||||
|
crt->rect = rect[crt->ani_no];
|
||||||
|
if (++crt->ani_wait > 6) // Animation counter, how many frames until we advance to next frame
|
||||||
|
{
|
||||||
|
crt->ani_wait = 0; // Reset counter
|
||||||
|
++crt->ani_no; // Increase animation frame by one
|
||||||
|
}
|
||||||
|
if (crt->ani_no > 3)
|
||||||
|
{
|
||||||
|
crt->ani_no = 3;
|
||||||
|
crt->cond = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (crt->act_no)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
crt->ym = Random(-0x200, 0x80);
|
||||||
|
crt->xm = Random(-0x200, 0x200);
|
||||||
|
crt->act_no = 1;
|
||||||
|
case 1:
|
||||||
|
crt->ym += 0x20;
|
||||||
|
crt->rect = rect[crt->ani_no];
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (crt->ym > 0x5FF)
|
||||||
|
crt->ym = 0x5FF;
|
||||||
|
crt->x += crt->xm;
|
||||||
|
crt->y += crt->ym;
|
||||||
|
|
||||||
|
crt->rect = rect[crt->ani_no];
|
||||||
|
|
||||||
|
if (crt->direct == 2)
|
||||||
|
{
|
||||||
|
crt->rect.top += 2;
|
||||||
|
crt->rect.bottom += 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*if (++crt->act_wait > 10)
|
||||||
|
{
|
||||||
|
if (crt->flag & 1)
|
||||||
|
crt->cond = 0;
|
||||||
|
if (crt->flag & 4)
|
||||||
|
crt->cond = 0;
|
||||||
|
if (crt->flag & 8)
|
||||||
|
crt->cond = 0;
|
||||||
|
if (crt->flag & 0x100)
|
||||||
|
crt->cond = 0;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
if (crt->y > gMap.length * 0x200 * 0x10)
|
||||||
|
crt->cond = 0;
|
||||||
|
}
|
||||||
|
void ActCaret21(CARET* crt)
|
||||||
|
{
|
||||||
|
RECT rect[1] = {
|
||||||
|
{128, 120, 136, 128},
|
||||||
|
};
|
||||||
|
|
||||||
|
if (++crt->count1 > 30)
|
||||||
|
crt->cond = 0;
|
||||||
|
|
||||||
|
if (crt->count1 < 3)
|
||||||
|
crt->ym = -8 * 0x200;
|
||||||
|
else
|
||||||
|
crt->ym = 0;
|
||||||
|
|
||||||
|
crt->y += crt->ym;
|
||||||
|
crt->rect = rect[crt->ani_no];
|
||||||
|
}
|
||||||
|
// I FUCKING HATE THIS
|
||||||
|
void ActCaret22(CARET* crt)
|
||||||
|
{
|
||||||
|
RECT rect[1] = {
|
||||||
|
{136, 120, 144, 128},
|
||||||
|
};
|
||||||
|
|
||||||
|
if (++crt->count1 > 30)
|
||||||
|
crt->cond = 0;
|
||||||
|
|
||||||
|
if (crt->count1 < 3)
|
||||||
|
crt->ym = -8 * 0x200;
|
||||||
|
else
|
||||||
|
crt->ym = 0;
|
||||||
|
|
||||||
|
crt->y += crt->ym;
|
||||||
|
crt->rect = rect[crt->ani_no];
|
||||||
|
}
|
||||||
|
void ActCaret23(CARET* crt)
|
||||||
|
{
|
||||||
|
RECT rect[1] = {
|
||||||
|
{144, 120, 152, 128},
|
||||||
|
};
|
||||||
|
|
||||||
|
if (++crt->count1 > 30)
|
||||||
|
crt->cond = 0;
|
||||||
|
|
||||||
|
if (crt->count1 < 3)
|
||||||
|
crt->ym = -8 * 0x200;
|
||||||
|
else
|
||||||
|
crt->ym = 0;
|
||||||
|
|
||||||
|
crt->y += crt->ym;
|
||||||
|
crt->rect = rect[crt->ani_no];
|
||||||
|
}
|
||||||
typedef void (*CARETFUNCTION)(CARET*);
|
typedef void (*CARETFUNCTION)(CARET*);
|
||||||
CARETFUNCTION gpCaretFuncTbl[18] =
|
CARETFUNCTION gpCaretFuncTbl[24] =
|
||||||
{
|
{
|
||||||
ActCaret00,
|
ActCaret00,
|
||||||
ActCaret01,
|
ActCaret01,
|
||||||
|
@ -570,6 +764,12 @@ CARETFUNCTION gpCaretFuncTbl[18] =
|
||||||
ActCaret15,
|
ActCaret15,
|
||||||
ActCaret16,
|
ActCaret16,
|
||||||
ActCaret17,
|
ActCaret17,
|
||||||
|
ActCaret18,
|
||||||
|
ActCaret19,
|
||||||
|
ActCaret20,
|
||||||
|
ActCaret21,
|
||||||
|
ActCaret22,
|
||||||
|
ActCaret23,
|
||||||
};
|
};
|
||||||
|
|
||||||
void ActCaret(void)
|
void ActCaret(void)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "WindowsWrapper.h"
|
#include "WindowsWrapper.h"
|
||||||
|
|
||||||
#define CARET_MAX 0x40
|
#define CARET_MAX 0x43
|
||||||
|
|
||||||
struct CARET_TABLE
|
struct CARET_TABLE
|
||||||
{
|
{
|
||||||
|
@ -25,11 +25,13 @@ struct CARET
|
||||||
int ani_wait;
|
int ani_wait;
|
||||||
int view_left;
|
int view_left;
|
||||||
int view_top;
|
int view_top;
|
||||||
|
int count1;
|
||||||
|
int count2;
|
||||||
RECT rect;
|
RECT rect;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern CARET gCrt[CARET_MAX];
|
extern CARET gCrt[CARET_MAX];
|
||||||
extern CARET_TABLE gCaretTable[18];
|
extern CARET_TABLE gCaretTable[24];
|
||||||
|
|
||||||
void InitCaret(void);
|
void InitCaret(void);
|
||||||
void ActCaret(void);
|
void ActCaret(void);
|
||||||
|
|
|
@ -748,6 +748,7 @@ static int ModeAction(void)
|
||||||
if (g_GameFlags & 2)
|
if (g_GameFlags & 2)
|
||||||
{
|
{
|
||||||
PutMyLife(TRUE);
|
PutMyLife(TRUE);
|
||||||
|
PutCion();
|
||||||
PutArmsEnergy(TRUE);
|
PutArmsEnergy(TRUE);
|
||||||
PutMyAir((WINDOW_WIDTH / 2) - 40, (WINDOW_HEIGHT / 2) - 16);
|
PutMyAir((WINDOW_WIDTH / 2) - 40, (WINDOW_HEIGHT / 2) - 16);
|
||||||
PutActiveArmsList();
|
PutActiveArmsList();
|
||||||
|
|
|
@ -19,7 +19,8 @@
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
SOUND_TYPE_PIXTONE,
|
SOUND_TYPE_PIXTONE,
|
||||||
SOUND_TYPE_OTHER
|
SOUND_TYPE_OTHER,
|
||||||
|
SOUND_TYPE_DABABYAUDIO
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct
|
static const struct
|
||||||
|
@ -28,93 +29,94 @@ static const struct
|
||||||
const char *path;
|
const char *path;
|
||||||
int type;
|
int type;
|
||||||
} ptp_table[] = {
|
} ptp_table[] = {
|
||||||
// TODO - Name the files
|
// TODO - Remove names
|
||||||
{1, "PixTone/001.pxt", SOUND_TYPE_PIXTONE},
|
{1, "PixTone/007.pxt", SOUND_TYPE_PIXTONE}, //menu move blip
|
||||||
{2, "PixTone/002.pxt", SOUND_TYPE_PIXTONE},
|
{2, "Wav/Message.wav", SOUND_TYPE_OTHER}, //msg blip
|
||||||
{3, "PixTone/003.pxt", SOUND_TYPE_PIXTONE},
|
{3, "PixTone/003.pxt", SOUND_TYPE_PIXTONE}, //bonkhead
|
||||||
{4, "PixTone/004.pxt", SOUND_TYPE_PIXTONE},
|
{4, "PixTone/004.pxt", SOUND_TYPE_PIXTONE}, //switch weapon
|
||||||
{5, "PixTone/005.pxt", SOUND_TYPE_PIXTONE},
|
{5, "Wav/YesNo.wav", SOUND_TYPE_OTHER}, //menu prompt
|
||||||
{6, "PixTone/006.pxt", SOUND_TYPE_PIXTONE},
|
{6, "PixTone/006.pxt", SOUND_TYPE_PIXTONE}, //critter hop(?)
|
||||||
{7, "PixTone/007.pxt", SOUND_TYPE_PIXTONE},
|
{7, "PixTone/007.pxt", SOUND_TYPE_PIXTONE}, //nothing, DO NOT EDIT OR I'LL KILL YOU
|
||||||
{11, "PixTone/011.pxt", SOUND_TYPE_PIXTONE},
|
{11, "PixTone/011.pxt", SOUND_TYPE_PIXTONE},//swell sound, used in ballos fight
|
||||||
{12, "PixTone/012.pxt", SOUND_TYPE_PIXTONE},
|
{12, "PixTone/012.pxt", SOUND_TYPE_PIXTONE},//door
|
||||||
{14, "PixTone/014.pxt", SOUND_TYPE_PIXTONE},
|
{14, "PixTone/045.pxt", SOUND_TYPE_PIXTONE},//destroy snack block
|
||||||
{15, "PixTone/015.pxt", SOUND_TYPE_PIXTONE},
|
{15, "PixTone/015.pxt", SOUND_TYPE_PIXTONE},//touch exp dorito
|
||||||
{16, "PixTone/016.pxt", SOUND_TYPE_PIXTONE},
|
{16, "Wav/Hurt.wav", SOUND_TYPE_OTHER},//jump
|
||||||
{17, "PixTone/017.pxt", SOUND_TYPE_PIXTONE},
|
{17, "PixTone/007.pxt", SOUND_TYPE_PIXTONE},//hurt
|
||||||
{18, "PixTone/018.pxt", SOUND_TYPE_PIXTONE},
|
{18, "Wav/Select.wav", SOUND_TYPE_OTHER},//RIP
|
||||||
{20, "PixTone/020.pxt", SOUND_TYPE_PIXTONE},
|
{20, "PixTone/020.pxt", SOUND_TYPE_PIXTONE},//menu select
|
||||||
{21, "PixTone/021.pxt", SOUND_TYPE_PIXTONE},
|
{21, "PixTone/021.pxt", SOUND_TYPE_PIXTONE},//health refill
|
||||||
{22, "PixTone/022.pxt", SOUND_TYPE_PIXTONE},
|
{22, "PixTone/022.pxt", SOUND_TYPE_PIXTONE},//bubble
|
||||||
{23, "PixTone/023.pxt", SOUND_TYPE_PIXTONE},
|
{23, "PixTone/023.pxt", SOUND_TYPE_PIXTONE},//chest open
|
||||||
{24, "PixTone/024.pxt", SOUND_TYPE_PIXTONE},
|
{24, "PixTone/024.pxt", SOUND_TYPE_PIXTONE},//quote thud
|
||||||
{25, "PixTone/025.pxt", SOUND_TYPE_PIXTONE},
|
{25, "PixTone/025.pxt", SOUND_TYPE_PIXTONE},//walking
|
||||||
{26, "PixTone/026.pxt", SOUND_TYPE_PIXTONE},
|
{26, "PixTone/026.pxt", SOUND_TYPE_PIXTONE},//funne explosion!
|
||||||
{27, "PixTone/027.pxt", SOUND_TYPE_PIXTONE},
|
{27, "PixTone/027.pxt", SOUND_TYPE_PIXTONE},//quake (BOMMMMMMM)
|
||||||
{28, "PixTone/028.pxt", SOUND_TYPE_PIXTONE},
|
{28, "PixTone/028.pxt", SOUND_TYPE_PIXTONE},//level up
|
||||||
{29, "PixTone/029.pxt", SOUND_TYPE_PIXTONE},
|
{29, "PixTone/029.pxt", SOUND_TYPE_PIXTONE},//shot hit
|
||||||
{30, "PixTone/030.pxt", SOUND_TYPE_PIXTONE},
|
{30, "PixTone/030.pxt", SOUND_TYPE_PIXTONE},//teleporter sound effect
|
||||||
{31, "PixTone/031.pxt", SOUND_TYPE_PIXTONE},
|
{31, "PixTone/031.pxt", SOUND_TYPE_PIXTONE},//critter jump
|
||||||
{32, "PixTone/032.pxt", SOUND_TYPE_PIXTONE},
|
{32, "PixTone/032.pxt", SOUND_TYPE_PIXTONE},//shot bounce, played when shooting an an invincible enemy (clink!)
|
||||||
{33, "PixTone/033.pxt", SOUND_TYPE_PIXTONE},
|
{33, "PixTone/033.pxt", SOUND_TYPE_PIXTONE},//polar star shot level 1-2
|
||||||
{34, "PixTone/034.pxt", SOUND_TYPE_PIXTONE},
|
{34, "PixTone/034.pxt", SOUND_TYPE_PIXTONE},//woooosh sound, I think this has something to do with a weapon
|
||||||
{35, "PixTone/035.pxt", SOUND_TYPE_PIXTONE},
|
{35, "PixTone/035.pxt", SOUND_TYPE_PIXTONE},//fireball shot
|
||||||
{37, "PixTone/037.pxt", SOUND_TYPE_PIXTONE},
|
{37, "PixTone/037.pxt", SOUND_TYPE_PIXTONE},//fat ass explosion
|
||||||
{38, "PixTone/038.pxt", SOUND_TYPE_PIXTONE},
|
{38, "PixTone/038.pxt", SOUND_TYPE_PIXTONE},//no ammo
|
||||||
{39, "PixTone/039.pxt", SOUND_TYPE_PIXTONE},
|
{39, "Wav/Shoot.wav", SOUND_TYPE_OTHER},//get item
|
||||||
{40, "PixTone/040.pxt", SOUND_TYPE_PIXTONE},
|
{40, "PixTone/040.pxt", SOUND_TYPE_PIXTONE},//labyrinth critter fire bubble (I think)
|
||||||
{41, "PixTone/041.pxt", SOUND_TYPE_PIXTONE},
|
{41, "PixTone/041.pxt", SOUND_TYPE_PIXTONE},//Waterway stream
|
||||||
{42, "PixTone/042.pxt", SOUND_TYPE_PIXTONE},
|
{42, "PixTone/042.pxt", SOUND_TYPE_PIXTONE},//get missle
|
||||||
{43, "PixTone/043.pxt", SOUND_TYPE_PIXTONE},
|
{43, "PixTone/043.pxt", SOUND_TYPE_PIXTONE},//computer bep
|
||||||
{44, "PixTone/044.pxt", SOUND_TYPE_PIXTONE},
|
{44, "PixTone/044.pxt", SOUND_TYPE_PIXTONE},//missle hit
|
||||||
{45, "PixTone/045.pxt", SOUND_TYPE_PIXTONE},
|
{45, "PixTone/045.pxt", SOUND_TYPE_PIXTONE},//xp dorito bounce
|
||||||
{46, "PixTone/046.pxt", SOUND_TYPE_PIXTONE},
|
{46, "PixTone/046.pxt", SOUND_TYPE_PIXTONE},//ironH shot fly
|
||||||
{47, "PixTone/047.pxt", SOUND_TYPE_PIXTONE},
|
{47, "PixTone/047.pxt", SOUND_TYPE_PIXTONE},//fast, short explosion (explosion2)
|
||||||
{48, "PixTone/048.pxt", SOUND_TYPE_PIXTONE},
|
{48, "PixTone/048.pxt", SOUND_TYPE_PIXTONE},//bubbler lv. 1 shot
|
||||||
{49, "PixTone/049.pxt", SOUND_TYPE_PIXTONE},
|
{49, "PixTone/049.pxt", SOUND_TYPE_PIXTONE},//lv. 3 polar star shot
|
||||||
{50, "PixTone/050.pxt", SOUND_TYPE_PIXTONE},
|
{50, "PixTone/050.pxt", SOUND_TYPE_PIXTONE},//mimiga death squeak
|
||||||
{51, "PixTone/051.pxt", SOUND_TYPE_PIXTONE},
|
{51, "Wav/EnemyHurt.wav", SOUND_TYPE_OTHER},//enemy hurt
|
||||||
{52, "PixTone/052.pxt", SOUND_TYPE_PIXTONE},
|
{52, "Wav/EnemyHurt.wav", SOUND_TYPE_OTHER},//big enemy hurt
|
||||||
{53, "PixTone/053.pxt", SOUND_TYPE_PIXTONE},
|
{53, "Wav/EnemyHurt.wav", SOUND_TYPE_OTHER},//small enemy hurt
|
||||||
{54, "PixTone/054.pxt", SOUND_TYPE_PIXTONE},
|
{54, "Wav/EnemyHurt.wav", SOUND_TYPE_OTHER},//"cool" enemy hurt
|
||||||
{55, "PixTone/055.pxt", SOUND_TYPE_PIXTONE},
|
{55, "PixTone/055.pxt", SOUND_TYPE_PIXTONE},//another enemy squeak
|
||||||
{56, "PixTone/056.pxt", SOUND_TYPE_PIXTONE},
|
//{56, "PixTone/056.pxt", SOUND_TYPE_PIXTONE},//watersplash
|
||||||
{57, "PixTone/057.pxt", SOUND_TYPE_PIXTONE},
|
{57, "PixTone/057.pxt", SOUND_TYPE_PIXTONE},//weird and fast enemy hurt sfct
|
||||||
{58, "PixTone/058.pxt", SOUND_TYPE_PIXTONE},
|
{58, "PixTone/058.pxt", SOUND_TYPE_PIXTONE},//short noise???
|
||||||
{59, "PixTone/059.pxt", SOUND_TYPE_PIXTONE},
|
{59, "PixTone/059.pxt", SOUND_TYPE_PIXTONE},//spur charge 1
|
||||||
{60, "PixTone/060.pxt", SOUND_TYPE_PIXTONE},
|
{60, "PixTone/060.pxt", SOUND_TYPE_PIXTONE},//spur charge 2
|
||||||
{61, "PixTone/061.pxt", SOUND_TYPE_PIXTONE},
|
{61, "PixTone/061.pxt", SOUND_TYPE_PIXTONE},//spur charge 3
|
||||||
{62, "PixTone/062.pxt", SOUND_TYPE_PIXTONE},
|
{62, "PixTone/062.pxt", SOUND_TYPE_PIXTONE},//spur fire lv. 2
|
||||||
{63, "PixTone/063.pxt", SOUND_TYPE_PIXTONE},
|
{63, "PixTone/063.pxt", SOUND_TYPE_PIXTONE},//spur fire lv. 3
|
||||||
{64, "PixTone/064.pxt", SOUND_TYPE_PIXTONE},
|
{64, "PixTone/064.pxt", SOUND_TYPE_PIXTONE},//spur fire MAX
|
||||||
{65, "PixTone/065.pxt", SOUND_TYPE_PIXTONE},
|
{65, "PixTone/065.pxt", SOUND_TYPE_PIXTONE},//Honey, your spur is fully charged
|
||||||
{70, "PixTone/070.pxt", SOUND_TYPE_PIXTONE},
|
{70, "Wav/Shatter.wav", SOUND_TYPE_OTHER},//small explosion
|
||||||
{71, "PixTone/071.pxt", SOUND_TYPE_PIXTONE},
|
{71, "PixTone/071.pxt", SOUND_TYPE_PIXTONE},//lil crash
|
||||||
{72, "PixTone/072.pxt", SOUND_TYPE_PIXTONE},
|
{72, "PixTone/072.pxt", SOUND_TYPE_PIXTONE},//fat ass crash
|
||||||
{100, "PixTone/100.pxt", SOUND_TYPE_PIXTONE},
|
{100, "PixTone/100.pxt", SOUND_TYPE_PIXTONE},//I have no idea, sounds like a click
|
||||||
{101, "PixTone/101.pxt", SOUND_TYPE_PIXTONE},
|
{101, "PixTone/101.pxt", SOUND_TYPE_PIXTONE},//Lightning strike (RIP king fly high)
|
||||||
{102, "PixTone/102.pxt", SOUND_TYPE_PIXTONE},
|
{102, "PixTone/102.pxt", SOUND_TYPE_PIXTONE},//"jaws"
|
||||||
{103, "PixTone/103.pxt", SOUND_TYPE_PIXTONE},
|
{103, "PixTone/103.pxt", SOUND_TYPE_PIXTONE},//curly charges her gun
|
||||||
{104, "PixTone/104.pxt", SOUND_TYPE_PIXTONE},
|
{104, "PixTone/104.pxt", SOUND_TYPE_PIXTONE},//I have no idea, sounds like a squeal
|
||||||
{105, "PixTone/105.pxt", SOUND_TYPE_PIXTONE},
|
{105, "PixTone/105.pxt", SOUND_TYPE_PIXTONE},//puppy bark
|
||||||
{106, "PixTone/106.pxt", SOUND_TYPE_PIXTONE},
|
{106, "PixTone/106.pxt", SOUND_TYPE_PIXTONE},//blade shot
|
||||||
{107, "PixTone/107.pxt", SOUND_TYPE_PIXTONE},
|
{107, "PixTone/107.pxt", SOUND_TYPE_PIXTONE},//block move LMAO
|
||||||
{108, "PixTone/108.pxt", SOUND_TYPE_PIXTONE},
|
{108, "PixTone/108.pxt", SOUND_TYPE_PIXTONE},//idk, sounds like a large enemy hop or a fart
|
||||||
{109, "PixTone/109.pxt", SOUND_TYPE_PIXTONE},
|
{109, "PixTone/109.pxt", SOUND_TYPE_PIXTONE},//critter FLY
|
||||||
{110, "PixTone/110.pxt", SOUND_TYPE_PIXTONE},
|
{110, "PixTone/110.pxt", SOUND_TYPE_PIXTONE},//idk, click
|
||||||
{111, "PixTone/111.pxt", SOUND_TYPE_PIXTONE},
|
{111, "PixTone/111.pxt", SOUND_TYPE_PIXTONE},//idk, low pitched thud
|
||||||
{112, "PixTone/112.pxt", SOUND_TYPE_PIXTONE},
|
{112, "PixTone/112.pxt", SOUND_TYPE_PIXTONE},//idk, slightly higher pitched thud
|
||||||
{113, "PixTone/113.pxt", SOUND_TYPE_PIXTONE},
|
{113, "PixTone/113.pxt", SOUND_TYPE_PIXTONE},//booster
|
||||||
{114, "PixTone/114.pxt", SOUND_TYPE_PIXTONE},
|
{114, "PixTone/114.pxt", SOUND_TYPE_PIXTONE},//ALERT: CORE IS WOUNDED, CORE IS WOUNDED
|
||||||
{115, "PixTone/115.pxt", SOUND_TYPE_PIXTONE},
|
{115, "PixTone/115.pxt", SOUND_TYPE_PIXTONE},//Core thrusting towards your ass
|
||||||
{116, "PixTone/116.pxt", SOUND_TYPE_PIXTONE},
|
{116, "PixTone/116.pxt", SOUND_TYPE_PIXTONE},//epic idk sound
|
||||||
{117, "PixTone/117.pxt", SOUND_TYPE_PIXTONE},
|
{117, "PixTone/117.pxt", SOUND_TYPE_PIXTONE},//idk sound
|
||||||
{150, "PixTone/150.pxt", SOUND_TYPE_PIXTONE},
|
{150, "PixTone/150.pxt", SOUND_TYPE_PIXTONE},
|
||||||
{151, "PixTone/151.pxt", SOUND_TYPE_PIXTONE},
|
{151, "PixTone/151.pxt", SOUND_TYPE_PIXTONE},
|
||||||
{152, "PixTone/152.pxt", SOUND_TYPE_PIXTONE},
|
{152, "PixTone/152.pxt", SOUND_TYPE_PIXTONE},
|
||||||
{153, "PixTone/153.pxt", SOUND_TYPE_PIXTONE},
|
{153, "PixTone/153.pxt", SOUND_TYPE_PIXTONE},
|
||||||
{154, "PixTone/154.pxt", SOUND_TYPE_PIXTONE},
|
{154, "PixTone/154.pxt", SOUND_TYPE_PIXTONE},
|
||||||
{155, "PixTone/155.pxt", SOUND_TYPE_PIXTONE}
|
{155, "PixTone/155.pxt", SOUND_TYPE_PIXTONE}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Original decompiled from `PTone103.exe` - has since been modified
|
// Original decompiled from `PTone103.exe` - has since been modified
|
||||||
|
@ -186,6 +188,7 @@ static BOOL LoadPixToneFile(const char *filename, PIXTONEPARAMETER *pixtone_para
|
||||||
p += increment;
|
p += increment;
|
||||||
sscanf(p, "cy :%d\n\n%n", &pixtone_parameters[i].pointCy, &increment);
|
sscanf(p, "cy :%d\n\n%n", &pixtone_parameters[i].pointCy, &increment);
|
||||||
p += increment;
|
p += increment;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
free(file_buffer);
|
free(file_buffer);
|
||||||
|
@ -196,6 +199,7 @@ static BOOL LoadPixToneFile(const char *filename, PIXTONEPARAMETER *pixtone_para
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL LoadGenericData(void)
|
BOOL LoadGenericData(void)
|
||||||
{
|
{
|
||||||
int pt_size;
|
int pt_size;
|
||||||
|
@ -236,6 +240,13 @@ BOOL LoadGenericData(void)
|
||||||
if (bError)
|
if (bError)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
LoadSoundObject("data/PixTone/150.wav", 150);
|
||||||
|
LoadSoundObject("data/PixTone/151.wav", 151);
|
||||||
|
LoadSoundObject("data/PixTone/152.wav", 152);
|
||||||
|
LoadSoundObject("data/PixTone/153.wav", 153);
|
||||||
|
LoadSoundObject("data/PixTone/154.wav", 154);
|
||||||
|
LoadSoundObject("data/PixTone/155.wav", 155);
|
||||||
|
|
||||||
MakeSurface_Generic(WINDOW_WIDTH, WINDOW_HEIGHT, SURFACE_ID_SCREEN_GRAB, TRUE);
|
MakeSurface_Generic(WINDOW_WIDTH, WINDOW_HEIGHT, SURFACE_ID_SCREEN_GRAB, TRUE);
|
||||||
MakeSurface_Generic(320, 240, SURFACE_ID_LEVEL_BACKGROUND, FALSE);
|
MakeSurface_Generic(320, 240, SURFACE_ID_LEVEL_BACKGROUND, FALSE);
|
||||||
MakeSurface_Generic(WINDOW_WIDTH, WINDOW_HEIGHT, SURFACE_ID_MAP, TRUE);
|
MakeSurface_Generic(WINDOW_WIDTH, WINDOW_HEIGHT, SURFACE_ID_MAP, TRUE);
|
||||||
|
@ -246,7 +257,6 @@ BOOL LoadGenericData(void)
|
||||||
MakeSurface_Generic(320, 240, SURFACE_ID_LEVEL_SPRITESET_1, FALSE);
|
MakeSurface_Generic(320, 240, SURFACE_ID_LEVEL_SPRITESET_1, FALSE);
|
||||||
MakeSurface_Generic(320, 240, SURFACE_ID_LEVEL_SPRITESET_2, FALSE);
|
MakeSurface_Generic(320, 240, SURFACE_ID_LEVEL_SPRITESET_2, FALSE);
|
||||||
MakeSurface_Generic(320, 16 * (MAX_STRIP - 1), SURFACE_ID_CREDIT_CAST, FALSE);
|
MakeSurface_Generic(320, 16 * (MAX_STRIP - 1), SURFACE_ID_CREDIT_CAST, FALSE);
|
||||||
|
|
||||||
pt_size = 0;
|
pt_size = 0;
|
||||||
|
|
||||||
for (unsigned int i = 0; i < sizeof(ptp_table) / sizeof(ptp_table[0]); ++i)
|
for (unsigned int i = 0; i < sizeof(ptp_table) / sizeof(ptp_table[0]); ++i)
|
||||||
|
@ -265,6 +275,7 @@ BOOL LoadGenericData(void)
|
||||||
++ptp_num;
|
++ptp_num;
|
||||||
|
|
||||||
pt_size += MakePixToneObject(pixtone_parameters, ptp_num, ptp_table[i].slot);
|
pt_size += MakePixToneObject(pixtone_parameters, ptp_num, ptp_table[i].slot);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -274,6 +285,46 @@ BOOL LoadGenericData(void)
|
||||||
ExtraSound_LoadSFX(path.c_str(), ptp_table[i].slot);
|
ExtraSound_LoadSFX(path.c_str(), ptp_table[i].slot);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,,,,,,***/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@*.....,.@@%,,,,,,,,,,,/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@..........@.@*,,,,,,,,,,,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@.....,,...*@@@@@/,,,,,*****@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@.....@@@..(@@/@@@,,,*,**,*,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@.....**/,.,,.,,,,,,*,,,***,&@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@*...... . .,@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@. .% &...,,,,... . @@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@ ,,,,*,*.,,**//(//*****//#//@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@,,*,*,,.,,,**///*,.,*//((%&(/*%@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@#,##,,,,*..,,,,/((*,,*(#((/(***,/**@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@*/.,,.,*,,,**,,*,*((((#(//(##(*(,/*(,**,#@@@@@@@@@/%&*@@@@@
|
||||||
|
//@@@@@@@@@@@@@@@@@@@*/**//.,,*/((*,*,*/(#&%(#/,*(##(//@@,,****,,****@@@*#*(@@@@@@
|
||||||
|
//@@@@@@(%@@@@@@@@**/*,*//,@(,,**.,****,../#%####(.//.@@@@@@,,**,/(/((((//(#@@@@@@
|
||||||
|
//@@@@@@((#&@@@*//(***#(*&@@@#.,.,,*/****////*, .(//,@@@@@...,,,/(((((%((###*@@@@@
|
||||||
|
//@@@@@@*******//**/(#(/(*,@@@*.,,*,.(#&&@@&%%//#/*,@@@@@@,,..,/((/(//(((/#%#@@@@@
|
||||||
|
//@@@@@@*/***/*/*/((//((%#(*@@@@/,,**//#(#(((((#(//*@@@@@@,,,,*///(*((((######@@@@
|
||||||
|
//@@@@@@/***/*///*///#(*,//@&&&&@#.,**,,,..,*((#/,,/(@&@@@@@@**,**/*((#((#%#%(@@@@
|
||||||
|
//@@@@@#***////**((((//(/(/&&&&&/,.. ,***////(/..,,.&@@@@@&@@@@@&/,*//(((#%%%%#(@@
|
||||||
|
//@@@@@***///(/****/(////&&@&&&&%#,.. ,,,.....,,&%@@@@@@@&@@@@@@@@*****#&#%@#&@
|
||||||
|
//@@@@@*////((((((/**%&&&&&&&&&&@(&&&%%%&%%&&&&&&&&,@@@@&@@@@@@@@@@@@&@***,(@@@@@%
|
||||||
|
//@@@@***//(((((//%&&&&&&&&&&&&&&*%%&&&%%&&&&&&&%##&&&@@@@@@@@@@@@@@&@%&#%&,&(@@@@
|
||||||
|
//@@@@**,*(//((/&&&&&&&&&&@&&&&&&%*&&&&&&&&&&&&%/%&&@@@@@&@@@@@@@@@&@@@@,,,,,((((/
|
||||||
|
//@@((**,**//((@@@@@@&&@@@@&&@@@@@&(&@@&&&&&&&%/#&&@@@@@@@@@@@@@@@@@@@@@**,/*/##(/
|
||||||
|
//@@@#.,&#/((((%&@@@@@&&@@@@@@&@@@&&&&@@@&&&&&%%&&&&&@@@@@@@@@@@@@@@@@@@&***///###
|
||||||
|
//@@,,,**,%(%%%&&&&@@&&&&@@@@@@@@@@%/&@@@&&&%&(&&&&&&&&&&&@@@@@@@@@@@@@@@*,,////(#
|
||||||
|
//@*,,,,/**,/(@&&&&&&&&@@@@@@@@&&@@@&#@@@@&&&%&&&&%&&&&&&&&&@@@@@@@@&@*,****////(#
|
||||||
|
//&,**,,**,*((/%&&&&&&&&@@@@@@@@@@@@&%*&&(*&&&&&&&&&&&&&&&&&&&@@@@@/***,*****((///
|
||||||
|
|
||||||
|
case SOUND_TYPE_DABABYAUDIO:
|
||||||
|
{
|
||||||
|
std::string path = std::string("data/") + ptp_table[i].path;
|
||||||
|
LoadSoundObject(path.c_str(), ptp_table[i].slot);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ void InitMyChar(void)
|
||||||
gMC.life = 3;
|
gMC.life = 3;
|
||||||
gMC.max_life = 3;
|
gMC.max_life = 3;
|
||||||
gMC.unit = 0;
|
gMC.unit = 0;
|
||||||
|
cion = 0;
|
||||||
|
|
||||||
// This is initialized with the values the game uses in vanilla
|
// This is initialized with the values the game uses in vanilla
|
||||||
gMC.physics_normal.max_dash = 0x32C;
|
gMC.physics_normal.max_dash = 0x32C;
|
||||||
|
@ -445,7 +446,7 @@ void ActMyChar_Normal(BOOL bKey)
|
||||||
if (bKey)
|
if (bKey)
|
||||||
{
|
{
|
||||||
// Look up and down
|
// Look up and down
|
||||||
if (gKey & gKeyUp)
|
/*if (gKey & gKeyUp)
|
||||||
gMC.up = TRUE;
|
gMC.up = TRUE;
|
||||||
else
|
else
|
||||||
gMC.up = FALSE;
|
gMC.up = FALSE;
|
||||||
|
@ -453,7 +454,7 @@ void ActMyChar_Normal(BOOL bKey)
|
||||||
if (gKey & gKeyDown && !(gMC.flag & 8))
|
if (gKey & gKeyDown && !(gMC.flag & 8))
|
||||||
gMC.down = TRUE;
|
gMC.down = TRUE;
|
||||||
else
|
else
|
||||||
gMC.down = FALSE;
|
gMC.down = FALSE;*/
|
||||||
|
|
||||||
if (gKeyTrg & gKeyJump && (gMC.flag & 8 || gMC.flag & 0x10 || gMC.flag & 0x20))
|
if (gKeyTrg & gKeyJump && (gMC.flag & 8 || gMC.flag & 0x10 || gMC.flag & 0x20))
|
||||||
{
|
{
|
||||||
|
|
|
@ -800,7 +800,8 @@ void HitMyCharNpChar(void)
|
||||||
if (hit != 0 && gNPC[i].code_char == 1)
|
if (hit != 0 && gNPC[i].code_char == 1)
|
||||||
{
|
{
|
||||||
PlaySoundObject(14, SOUND_MODE_PLAY);
|
PlaySoundObject(14, SOUND_MODE_PLAY);
|
||||||
AddExpMyChar(gNPC[i].exp);
|
// AddExpMyChar(gNPC[i].exp);
|
||||||
|
cion+= 1;
|
||||||
gNPC[i].cond = 0;
|
gNPC[i].cond = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
184
src/MycParam.cpp
184
src/MycParam.cpp
|
@ -37,19 +37,35 @@ ARMS_LEVEL gArmsLevelTable[14] =
|
||||||
{{40, 60, 200}}
|
{{40, 60, 200}}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void SetDestroyMyChar(int x, int y, int w, int num)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int offset_x;
|
||||||
|
int offset_y;
|
||||||
|
|
||||||
|
// Create smoke
|
||||||
|
w /= 0x200;
|
||||||
|
for (i = 0; i < num; ++i)
|
||||||
|
{
|
||||||
|
offset_x = Random(-w, w) * 0x200;
|
||||||
|
offset_y = Random(-w, w) * 0x200;
|
||||||
|
SetNpChar(4, x + offset_x, y + offset_y, 0, 0, 1, NULL, 0x100);//SetNpChar(NPC_SMOKE, x + offset_x, y + offset_y, 0, 0, 0, NULL, 0x100);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Flash effect
|
||||||
|
SetCaret(x, y, 12, 0);
|
||||||
|
}
|
||||||
void AddExpMyChar(int x)
|
void AddExpMyChar(int x)
|
||||||
{
|
{
|
||||||
int lv = gArmsData[gSelectedArms].level - 1;
|
/*int lv = gArmsData[gSelectedArms].level - 1;
|
||||||
int arms_code = gArmsData[gSelectedArms].code;
|
int arms_code = gArmsData[gSelectedArms].code;
|
||||||
|
|
||||||
gArmsData[gSelectedArms].exp += x;
|
gArmsData[gSelectedArms].exp += x;
|
||||||
|
|
||||||
if (lv == 2)
|
if (lv == 2)
|
||||||
{
|
{
|
||||||
if (gArmsData[gSelectedArms].exp >= gArmsLevelTable[arms_code].exp[lv])
|
if (gArmsData[gSelectedArms].exp >= gArmsLevelTable[arms_code].exp[lv])
|
||||||
{
|
{
|
||||||
gArmsData[gSelectedArms].exp = gArmsLevelTable[arms_code].exp[lv];
|
gArmsData[gSelectedArms].exp = gArmsLevelTable[arms_code].exp[lv];
|
||||||
|
|
||||||
if (gMC.equip & EQUIP_WHIMSICAL_STAR)
|
if (gMC.equip & EQUIP_WHIMSICAL_STAR)
|
||||||
{
|
{
|
||||||
if (gMC.star < 3)
|
if (gMC.star < 3)
|
||||||
|
@ -65,7 +81,6 @@ void AddExpMyChar(int x)
|
||||||
{
|
{
|
||||||
++gArmsData[gSelectedArms].level;
|
++gArmsData[gSelectedArms].level;
|
||||||
gArmsData[gSelectedArms].exp = 0;
|
gArmsData[gSelectedArms].exp = 0;
|
||||||
|
|
||||||
if (gArmsData[gSelectedArms].code != 13)
|
if (gArmsData[gSelectedArms].code != 13)
|
||||||
{
|
{
|
||||||
PlaySoundObject(27, SOUND_MODE_PLAY);
|
PlaySoundObject(27, SOUND_MODE_PLAY);
|
||||||
|
@ -73,8 +88,6 @@ void AddExpMyChar(int x)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (gArmsData[gSelectedArms].code != 13)
|
if (gArmsData[gSelectedArms].code != 13)
|
||||||
{
|
{
|
||||||
gMC.exp_count += x;
|
gMC.exp_count += x;
|
||||||
|
@ -83,6 +96,19 @@ void AddExpMyChar(int x)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gMC.exp_wait = 10;
|
gMC.exp_wait = 10;
|
||||||
|
gArmsData[gSelectedArms].level = 1;
|
||||||
|
gArmsData[gSelectedArms].exp = 0;
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
cion += x;
|
||||||
|
if (x == 1) {
|
||||||
|
SetCaret(gMC.x, gMC.y, 21, 0);
|
||||||
|
}
|
||||||
|
else if (x == 3) {
|
||||||
|
SetCaret(gMC.x, gMC.y, 22, 0);
|
||||||
|
}
|
||||||
|
else if (x == 8) {
|
||||||
|
SetCaret(gMC.x, gMC.y, 23, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +201,7 @@ void DamageMyChar(int damage)
|
||||||
{
|
{
|
||||||
PlaySoundObject(17, SOUND_MODE_PLAY);
|
PlaySoundObject(17, SOUND_MODE_PLAY);
|
||||||
gMC.cond = 0;
|
gMC.cond = 0;
|
||||||
SetDestroyNpChar(gMC.x, gMC.y, 0x1400, 0x40);
|
SetDestroyMyChar(gMC.x, gMC.y, 0x1400, 0x40);
|
||||||
StartTextScript(40);
|
StartTextScript(40);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -233,25 +259,30 @@ void AddMaxLifeMyChar(int val)
|
||||||
gMC.lifeBr = gMC.life;
|
gMC.lifeBr = gMC.life;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PutActiveArmsList(void)
|
||||||
|
{
|
||||||
|
RECT rect = {0, 0, 0, 16};
|
||||||
|
|
||||||
|
// Draw icon
|
||||||
|
rect.left = gArmsData[gSelectedArms].code * 32;
|
||||||
|
rect.right = rect.left + 32;
|
||||||
|
// Put your X and Y values here
|
||||||
|
|
||||||
|
PutBitmap3(&grcGame, PixelToScreenCoord(16), PixelToScreenCoord(16), &rect, SURFACE_ID_ARMS_IMAGE);
|
||||||
|
|
||||||
|
}
|
||||||
void PutArmsEnergy(BOOL flash)
|
void PutArmsEnergy(BOOL flash)
|
||||||
{
|
{
|
||||||
static unsigned char add_flash;
|
static unsigned char add_flash;
|
||||||
|
|
||||||
RECT rcPer = {72, 48, 80, 56};
|
RECT rcPer = { 72, 48, 80, 56 };
|
||||||
RECT rcLv = {80, 80, 96, 88};
|
RECT rcView = { 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT };
|
||||||
RECT rcView = {0, 0, WINDOW_WIDTH, WINDOW_HEIGHT};
|
RECT rcNone = { 80, 48, 96, 56 };
|
||||||
RECT rcNone = {80, 48, 96, 56};
|
|
||||||
|
|
||||||
if (gArmsEnergyX > 16)
|
|
||||||
gArmsEnergyX -= 2;
|
|
||||||
if (gArmsEnergyX < 16)
|
|
||||||
gArmsEnergyX += 2;
|
|
||||||
|
|
||||||
// Draw max ammo
|
// Draw max ammo
|
||||||
if (gArmsData[gSelectedArms].max_num)
|
if (gArmsData[gSelectedArms].max_num)
|
||||||
{
|
{
|
||||||
PutNumber4(gArmsEnergyX + 32, 16, gArmsData[gSelectedArms].num, FALSE);
|
PutNumber4(32, 24, gArmsData[gSelectedArms].num, FALSE);
|
||||||
PutNumber4(gArmsEnergyX + 32, 24, gArmsData[gSelectedArms].max_num, FALSE);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -263,15 +294,6 @@ void PutArmsEnergy(BOOL flash)
|
||||||
if (flash == TRUE && (gMC.shock / 2) % 2)
|
if (flash == TRUE && (gMC.shock / 2) % 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PutBitmap3(&rcView, PixelToScreenCoord(gArmsEnergyX + 32), PixelToScreenCoord(24), &rcPer, SURFACE_ID_TEXT_BOX);
|
|
||||||
PutBitmap3(&rcView, PixelToScreenCoord(gArmsEnergyX), PixelToScreenCoord(32), &rcLv, SURFACE_ID_TEXT_BOX);
|
|
||||||
PutNumber4(gArmsEnergyX - 8, 32, gArmsData[gSelectedArms].level, FALSE);
|
|
||||||
|
|
||||||
RECT rcExpBox = {0, 72, 40, 80};
|
|
||||||
RECT rcExpVal = {0, 80, 0, 88};
|
|
||||||
RECT rcExpMax = {40, 72, 80, 80};
|
|
||||||
RECT rcExpFlash = {40, 80, 80, 88};
|
|
||||||
|
|
||||||
int lv = gArmsData[gSelectedArms].level - 1;
|
int lv = gArmsData[gSelectedArms].level - 1;
|
||||||
|
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
|
@ -281,97 +303,37 @@ void PutArmsEnergy(BOOL flash)
|
||||||
if (lv < 0)
|
if (lv < 0)
|
||||||
lv = 0;
|
lv = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int arms_code = gArmsData[gSelectedArms].code;
|
|
||||||
int exp_now = gArmsData[gSelectedArms].exp;
|
|
||||||
int exp_next = gArmsLevelTable[arms_code].exp[lv];
|
|
||||||
|
|
||||||
PutBitmap3(&rcView, PixelToScreenCoord(gArmsEnergyX + 24), PixelToScreenCoord(32), &rcExpBox, SURFACE_ID_TEXT_BOX);
|
|
||||||
|
|
||||||
if (lv == 2 && gArmsData[gSelectedArms].exp == gArmsLevelTable[arms_code].exp[lv])
|
|
||||||
{
|
|
||||||
PutBitmap3(&rcView, PixelToScreenCoord(gArmsEnergyX + 24), PixelToScreenCoord(32), &rcExpMax, SURFACE_ID_TEXT_BOX);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (exp_next != 0)
|
|
||||||
rcExpVal.right += (exp_now * 40) / exp_next;
|
|
||||||
else
|
|
||||||
rcExpVal.right = 0;
|
|
||||||
|
|
||||||
PutBitmap3(&rcView, PixelToScreenCoord(gArmsEnergyX + 24), PixelToScreenCoord(32), &rcExpVal, SURFACE_ID_TEXT_BOX);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gMC.exp_wait && ((add_flash++ / 2) % 2))
|
|
||||||
PutBitmap3(&rcView, PixelToScreenCoord(gArmsEnergyX + 24), PixelToScreenCoord(32), &rcExpFlash, SURFACE_ID_TEXT_BOX);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PutActiveArmsList(void)
|
|
||||||
{
|
|
||||||
int x;
|
|
||||||
int a;
|
|
||||||
RECT rect = {0, 0, 0, 16};
|
|
||||||
|
|
||||||
int arms_num = 0;
|
|
||||||
while (gArmsData[arms_num].code != 0)
|
|
||||||
++arms_num;
|
|
||||||
|
|
||||||
if (arms_num == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (a = 0; a < arms_num; ++a)
|
|
||||||
{
|
|
||||||
// Get X position to draw at
|
|
||||||
x = ((a - gSelectedArms) * 16) + gArmsEnergyX;
|
|
||||||
|
|
||||||
if (x < 8)
|
|
||||||
x += 48 + (arms_num * 16);
|
|
||||||
else if (x >= 24)
|
|
||||||
x += 48;
|
|
||||||
|
|
||||||
if (x >= 72 + ((arms_num - 1) * 16))
|
|
||||||
x -= 48 + (arms_num * 16);
|
|
||||||
if (x < 72 && x >= 24)
|
|
||||||
x -= 48;
|
|
||||||
|
|
||||||
// Draw icon
|
|
||||||
rect.left = gArmsData[a].code * 16;
|
|
||||||
rect.right = rect.left + 16;
|
|
||||||
PutBitmap3(&grcGame, PixelToScreenCoord(x), PixelToScreenCoord(16), &rect, SURFACE_ID_ARMS_IMAGE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void PutMyLife(BOOL flash)
|
void PutMyLife(BOOL flash)
|
||||||
{
|
{
|
||||||
RECT rcCase = {0, 40, 232, 48};
|
static unsigned int add_flash;
|
||||||
RECT rcLife = {0, 24, 232, 32};
|
|
||||||
RECT rcBr = {0, 32, 232, 40};
|
|
||||||
|
|
||||||
if (flash == TRUE && gMC.shock / 2 % 2)
|
RECT rcLife[2] = {
|
||||||
|
{0, 151, 7, 158},
|
||||||
|
{0, 144, 7, 151},
|
||||||
|
};
|
||||||
|
if (flash == TRUE && (gMC.shock / 2) % 2 && gMC.life != 1)
|
||||||
return;
|
return;
|
||||||
|
if (flash == TRUE && gMC.life == 1 && ((add_flash++ / 2) % 2))
|
||||||
if (gMC.lifeBr < gMC.life)
|
return;
|
||||||
gMC.lifeBr = gMC.life;
|
for (int i = 0; i < gMC.max_life - 1; i++) // For every 1 in max life, add 1 to i, and run the following code
|
||||||
|
|
||||||
if (gMC.lifeBr > gMC.life)
|
|
||||||
{
|
{
|
||||||
if (++gMC.lifeBr_count > 30)
|
// Put a heart
|
||||||
--gMC.lifeBr;
|
PutBitmap3(
|
||||||
}
|
&grcGame, // Target
|
||||||
else
|
// On the next two lines TT7 forgot PixelToScreenCoord, which is needed for the PutBitmap to work on resolutions other than 1x
|
||||||
{
|
PixelToScreenCoord(16 + (8 * i)), // X position, offset by 8 for every 1 in i
|
||||||
gMC.lifeBr_count = 0;
|
PixelToScreenCoord(225), // Y position,
|
||||||
|
& rcLife[gMC.life - 1 > i], // Which rect to use, 'gMC.life - 1 > i' checks if the current heart that is being drawn is full or not, returns 0 if it's not and 1 if it is
|
||||||
|
SURFACE_ID_TEXT_BOX); // Surface
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Draw bar
|
void PutCion()
|
||||||
rcCase.right = 64;
|
{
|
||||||
rcLife.right = ((gMC.life * 40) / gMC.max_life) - 1;
|
RECT rcCion = {208, 112, 226, 118};
|
||||||
rcBr.right = ((gMC.lifeBr * 40) / gMC.max_life) - 1;
|
PutBitmap3(&grcGame, PixelToScreenCoord(51), PixelToScreenCoord(218), &rcCion, SURFACE_ID_TEXT_BOX);
|
||||||
|
PutNumber4(17, 217, cion, FALSE);
|
||||||
PutBitmap3(&grcGame, PixelToScreenCoord(16), PixelToScreenCoord(40), &rcCase, SURFACE_ID_TEXT_BOX);
|
|
||||||
PutBitmap3(&grcGame, PixelToScreenCoord(40), PixelToScreenCoord(40), &rcBr, SURFACE_ID_TEXT_BOX);
|
|
||||||
PutBitmap3(&grcGame, PixelToScreenCoord(40), PixelToScreenCoord(40), &rcLife, SURFACE_ID_TEXT_BOX);
|
|
||||||
PutNumber4(8, 40, gMC.lifeBr, FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PutMyAir(int x, int y)
|
void PutMyAir(int x, int y)
|
||||||
|
|
|
@ -26,6 +26,7 @@ void AddMaxLifeMyChar(int val);
|
||||||
void PutArmsEnergy(BOOL flash);
|
void PutArmsEnergy(BOOL flash);
|
||||||
void PutActiveArmsList(void);
|
void PutActiveArmsList(void);
|
||||||
void PutMyLife(BOOL flash);
|
void PutMyLife(BOOL flash);
|
||||||
|
void PutCion();
|
||||||
void PutMyAir(int x, int y);
|
void PutMyAir(int x, int y);
|
||||||
void PutTimeCounter(int x, int y);
|
void PutTimeCounter(int x, int y);
|
||||||
BOOL SaveTimeCounter(void);
|
BOOL SaveTimeCounter(void);
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include "ArmsItem.h"
|
#include "ArmsItem.h"
|
||||||
#include "Caret.h"
|
#include "Caret.h"
|
||||||
|
#include "CommonDefines.h"
|
||||||
#include "Draw.h"
|
#include "Draw.h"
|
||||||
#include "File.h"
|
#include "File.h"
|
||||||
#include "Flags.h"
|
#include "Flags.h"
|
||||||
|
@ -166,13 +167,14 @@ void SetDestroyNpChar(int x, int y, int w, int num)
|
||||||
{
|
{
|
||||||
offset_x = Random(-w, w) * 0x200;
|
offset_x = Random(-w, w) * 0x200;
|
||||||
offset_y = Random(-w, w) * 0x200;
|
offset_y = Random(-w, w) * 0x200;
|
||||||
SetNpChar(NPC_SMOKE, x + offset_x, y + offset_y, 0, 0, 0, NULL, 0x100);
|
SetCaret(x + offset_x, y + offset_y, 18, 0);//SetNpChar(NPC_SMOKE, x + offset_x, y + offset_y, 0, 0, 0, NULL, 0x100);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flash effect
|
// Flash effect
|
||||||
SetCaret(x, y, 12, 0);
|
SetCaret(x, y, 12, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SetDestroyNpCharUp(int x, int y, int w, int num)
|
void SetDestroyNpCharUp(int x, int y, int w, int num)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -185,7 +187,7 @@ void SetDestroyNpCharUp(int x, int y, int w, int num)
|
||||||
{
|
{
|
||||||
offset_x = Random(-w, w) * 0x200;
|
offset_x = Random(-w, w) * 0x200;
|
||||||
offset_y = Random(-w, w) * 0x200;
|
offset_y = Random(-w, w) * 0x200;
|
||||||
SetNpChar(4, x + offset_x, y + offset_y, 0, 0, 1, NULL, 0x100);
|
SetCaret(x + offset_x, y + offset_y, 18, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flash effect
|
// Flash effect
|
||||||
|
@ -208,15 +210,15 @@ void SetExpObjects(int x, int y, int exp)
|
||||||
|
|
||||||
memset(&gNPC[n], 0, sizeof(NPCHAR));
|
memset(&gNPC[n], 0, sizeof(NPCHAR));
|
||||||
|
|
||||||
if (exp >= 20)
|
if (exp >= 8)
|
||||||
{
|
{
|
||||||
exp -= 20;
|
exp -= 8;
|
||||||
sub_exp = 20;
|
sub_exp = 8;
|
||||||
}
|
}
|
||||||
else if (exp >= 5)
|
else if (exp >= 3)
|
||||||
{
|
{
|
||||||
exp -= 5;
|
exp -= 3;
|
||||||
sub_exp = 5;
|
sub_exp = 3;
|
||||||
}
|
}
|
||||||
else if (exp >= 1)
|
else if (exp >= 1)
|
||||||
{
|
{
|
||||||
|
@ -618,7 +620,7 @@ void DeleteNpCharCode(int code, BOOL bSmoke)
|
||||||
|
|
||||||
if (bSmoke)
|
if (bSmoke)
|
||||||
{
|
{
|
||||||
PlaySoundObject(gNPC[n].destroy_voice, SOUND_MODE_PLAY);
|
PlaySoundObject(70, SOUND_MODE_PLAY);
|
||||||
|
|
||||||
switch (gNPC[n].size)
|
switch (gNPC[n].size)
|
||||||
{
|
{
|
||||||
|
@ -681,3 +683,4 @@ int CountAliveNpChar(void)
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ void ActNpc001(NPCHAR *npc)
|
||||||
// Bounce off floor
|
// Bounce off floor
|
||||||
if (npc->flag & 8)
|
if (npc->flag & 8)
|
||||||
{
|
{
|
||||||
PlaySoundObject(45, SOUND_MODE_PLAY);
|
PlaySoundObject(07, SOUND_MODE_PLAY);
|
||||||
npc->ym = -0x280;
|
npc->ym = -0x280;
|
||||||
npc->xm = 2 * npc->xm / 3;
|
npc->xm = 2 * npc->xm / 3;
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ void ActNpc001(NPCHAR *npc)
|
||||||
// Play bounce song (and try to clip out of floor if stuck)
|
// Play bounce song (and try to clip out of floor if stuck)
|
||||||
if (npc->flag & 0xD)
|
if (npc->flag & 0xD)
|
||||||
{
|
{
|
||||||
PlaySoundObject(45, SOUND_MODE_PLAY);
|
PlaySoundObject(07, SOUND_MODE_PLAY);
|
||||||
if (++npc->count2 > 2)
|
if (++npc->count2 > 2)
|
||||||
npc->y -= 1 * 0x200;
|
npc->y -= 1 * 0x200;
|
||||||
}
|
}
|
||||||
|
@ -183,17 +183,22 @@ void ActNpc001(NPCHAR *npc)
|
||||||
// Size
|
// Size
|
||||||
if (npc->act_no != 0)
|
if (npc->act_no != 0)
|
||||||
{
|
{
|
||||||
switch (npc->exp)
|
//cout << npc->exp;
|
||||||
|
switch (npc->exp) //SetCaret(gMC.x, gMC.y, 21, 0);
|
||||||
{
|
{
|
||||||
case 5:
|
case 3:
|
||||||
npc->rect.top += 16;
|
npc->rect.top += 16;
|
||||||
npc->rect.bottom += 16;
|
npc->rect.bottom += 16;
|
||||||
|
//printf("me when 3 cion drop");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 20:
|
case 8:
|
||||||
npc->rect.top += 32;
|
npc->rect.top += 32;
|
||||||
npc->rect.bottom += 32;
|
npc->rect.bottom += 32;
|
||||||
|
//printf("me when 8 cion drops");
|
||||||
break;
|
break;
|
||||||
|
//case 1:
|
||||||
|
//printf("bruh whate da heall bruh");
|
||||||
}
|
}
|
||||||
|
|
||||||
npc->act_no = 1;
|
npc->act_no = 1;
|
||||||
|
|
|
@ -82,6 +82,7 @@ BOOL SaveProfile(const char *name)
|
||||||
memcpy(profile.permitstage, gPermitStage, sizeof(profile.permitstage));
|
memcpy(profile.permitstage, gPermitStage, sizeof(profile.permitstage));
|
||||||
memcpy(profile.permit_mapping, gMapping, sizeof(profile.permit_mapping));
|
memcpy(profile.permit_mapping, gMapping, sizeof(profile.permit_mapping));
|
||||||
memcpy(profile.flags, gFlagNPC, sizeof(profile.flags));
|
memcpy(profile.flags, gFlagNPC, sizeof(profile.flags));
|
||||||
|
profile.cion = cion;
|
||||||
// Custom
|
// Custom
|
||||||
memcpy(profile.extra_code, gProfileCodeExtra, sizeof(profile.extra_code));
|
memcpy(profile.extra_code, gProfileCodeExtra, sizeof(profile.extra_code));
|
||||||
profile.MIMCurrentNum = gMIMCurrentNum;
|
profile.MIMCurrentNum = gMIMCurrentNum;
|
||||||
|
@ -123,6 +124,7 @@ BOOL SaveProfile(const char *name)
|
||||||
fwrite(profile.permit_mapping, 0x80, 1, fp);
|
fwrite(profile.permit_mapping, 0x80, 1, fp);
|
||||||
fwrite(FLAG, 4, 1, fp);
|
fwrite(FLAG, 4, 1, fp);
|
||||||
fwrite(profile.flags, 1000, 1, fp);
|
fwrite(profile.flags, 1000, 1, fp);
|
||||||
|
File_WriteLE32(profile.cion, fp);
|
||||||
// Custom
|
// Custom
|
||||||
fwrite(gProfileCodeExtra, 0x10, 1, fp);
|
fwrite(gProfileCodeExtra, 0x10, 1, fp);
|
||||||
File_WriteLE32(profile.MIMCurrentNum, fp);
|
File_WriteLE32(profile.MIMCurrentNum, fp);
|
||||||
|
@ -211,6 +213,7 @@ BOOL LoadProfile(const char *name)
|
||||||
fread(profile.permit_mapping, 0x80, 1, fp);
|
fread(profile.permit_mapping, 0x80, 1, fp);
|
||||||
fread(profile.FLAG, 4, 1, fp);
|
fread(profile.FLAG, 4, 1, fp);
|
||||||
fread(profile.flags, 1000, 1, fp);
|
fread(profile.flags, 1000, 1, fp);
|
||||||
|
profile.cion = File_ReadLE32(fp);
|
||||||
|
|
||||||
// Custom
|
// Custom
|
||||||
fread(profile.extra_code, 0x10, 1, fp);
|
fread(profile.extra_code, 0x10, 1, fp);
|
||||||
|
@ -268,6 +271,7 @@ BOOL LoadProfile(const char *name)
|
||||||
gMC.star = profile.star;
|
gMC.star = profile.star;
|
||||||
gMC.cond = 0x80;
|
gMC.cond = 0x80;
|
||||||
gMC.air = 1000;
|
gMC.air = 1000;
|
||||||
|
cion = profile.cion;
|
||||||
gMC.lifeBr = profile.life;
|
gMC.lifeBr = profile.life;
|
||||||
gMC.x = profile.x;
|
gMC.x = profile.x;
|
||||||
gMC.y = profile.y;
|
gMC.y = profile.y;
|
||||||
|
|
|
@ -30,7 +30,8 @@ typedef struct PROFILE
|
||||||
signed char permit_mapping[0x80];
|
signed char permit_mapping[0x80];
|
||||||
char FLAG[4];
|
char FLAG[4];
|
||||||
unsigned char flags[1000];
|
unsigned char flags[1000];
|
||||||
|
// CION
|
||||||
|
unsigned int cion;
|
||||||
// Custom
|
// Custom
|
||||||
char extra_code[0x10];
|
char extra_code[0x10];
|
||||||
// <MIM
|
// <MIM
|
||||||
|
|
|
@ -53,6 +53,7 @@ const RECT gRect_line = {0, 0, 216, 16};
|
||||||
static unsigned long nod_color;
|
static unsigned long nod_color;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
unsigned int cion = 0;
|
||||||
unsigned int gMIMCurrentNum = 0;
|
unsigned int gMIMCurrentNum = 0;
|
||||||
|
|
||||||
// Initialize and end tsc
|
// Initialize and end tsc
|
||||||
|
@ -705,6 +706,38 @@ int TextScriptProc(void)
|
||||||
y = GetTextScriptNo(gTS.p_read + 9);
|
y = GetTextScriptNo(gTS.p_read + 9);
|
||||||
AddPermitStage(x, y);
|
AddPermitStage(x, y);
|
||||||
gTS.p_read += 13;
|
gTS.p_read += 13;
|
||||||
|
}
|
||||||
|
//CION commands
|
||||||
|
//Add X amount of cion
|
||||||
|
else if (IS_COMMAND('C','I','+'))
|
||||||
|
{
|
||||||
|
x = GetTextScriptNo(gTS.p_read + 4);
|
||||||
|
cion+= x;
|
||||||
|
gTS.p_read += 8;
|
||||||
|
}
|
||||||
|
//Remove X amount of cion
|
||||||
|
else if (IS_COMMAND('C','I','-'))
|
||||||
|
{
|
||||||
|
x = GetTextScriptNo(gTS.p_read + 4);
|
||||||
|
cion-= x;
|
||||||
|
gTS.p_read += 8;
|
||||||
|
}
|
||||||
|
//Set cion to X (useful for removing all cions!)
|
||||||
|
else if (IS_COMMAND('C','I','S'))
|
||||||
|
{
|
||||||
|
x = GetTextScriptNo(gTS.p_read + 4);
|
||||||
|
cion= x;
|
||||||
|
gTS.p_read += 8;
|
||||||
|
}
|
||||||
|
//If cion is Greater than or Equal to X, go to event Y.
|
||||||
|
else if (IS_COMMAND('C','I','J'))
|
||||||
|
{
|
||||||
|
x = GetTextScriptNo(gTS.p_read + 4);
|
||||||
|
y = GetTextScriptNo(gTS.p_read + 9);
|
||||||
|
if (cion >= x)
|
||||||
|
JumpTextScript(y);
|
||||||
|
else
|
||||||
|
gTS.p_read += 13;
|
||||||
}
|
}
|
||||||
else if (IS_COMMAND('M','P','+'))
|
else if (IS_COMMAND('M','P','+'))
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,6 +55,8 @@ typedef struct TEXT_SCRIPT
|
||||||
unsigned char wait_beam;
|
unsigned char wait_beam;
|
||||||
} TEXT_SCRIPT;
|
} TEXT_SCRIPT;
|
||||||
|
|
||||||
|
unsigned extern int cion;
|
||||||
|
|
||||||
extern TEXT_SCRIPT gTS;
|
extern TEXT_SCRIPT gTS;
|
||||||
|
|
||||||
extern const RECT gRect_line;
|
extern const RECT gRect_line;
|
||||||
|
|
Loading…
Reference in a new issue