From a3692d1c40568de767d06a47b85490b8e3e89af2 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Wed, 5 Aug 2020 21:45:59 +0100 Subject: [PATCH] Add Caret enums --- src/Boss.cpp | 9 +-- src/BulHit.cpp | 7 ++- src/Bullet.cpp | 71 ++++++++++++------------ src/Caret.cpp | 47 ++++++++-------- src/Caret.h | 22 ++++++++ src/CommonDefines.h | 3 +- src/MyChar.cpp | 19 ++++--- src/MycHit.cpp | 9 +-- src/MycParam.cpp | 4 +- src/NpChar.cpp | 5 +- src/NpcAct000.cpp | 5 +- src/NpcAct020.cpp | 7 ++- src/NpcAct040.cpp | 6 +- src/NpcAct080.cpp | 6 +- src/NpcAct100.cpp | 5 +- src/NpcAct120.cpp | 9 +-- src/NpcAct140.cpp | 12 ++-- src/NpcAct160.cpp | 20 +++---- src/NpcAct180.cpp | 21 +++---- src/NpcAct200.cpp | 9 +-- src/NpcAct220.cpp | 11 ++-- src/NpcAct240.cpp | 7 ++- src/NpcAct260.cpp | 9 +-- src/NpcAct300.cpp | 5 +- src/NpcAct320.cpp | 5 +- src/NpcAct340.cpp | 2 +- src/NpcHit.cpp | 9 +-- src/Shoot.cpp | 131 ++++++++++++++++++++++---------------------- 28 files changed, 259 insertions(+), 216 deletions(-) diff --git a/src/Boss.cpp b/src/Boss.cpp index b88acc2d..d59b7f68 100644 --- a/src/Boss.cpp +++ b/src/Boss.cpp @@ -15,6 +15,7 @@ #include "BossX.h" #include "Bullet.h" #include "Caret.h" +#include "CommonDefines.h" #include "Draw.h" #include "Map.h" #include "MyChar.h" @@ -158,9 +159,9 @@ void HitBossBullet(void) { if (gBoss[bos].shock < 14) { - SetCaret(gBul[bul].x, gBul[bul].y, 11, 0); - SetCaret(gBul[bul].x, gBul[bul].y, 11, 0); - SetCaret(gBul[bul].x, gBul[bul].y, 11, 0); + SetCaret(gBul[bul].x, gBul[bul].y, CARET_HURT_PARTICLES, DIR_LEFT); + SetCaret(gBul[bul].x, gBul[bul].y, CARET_HURT_PARTICLES, DIR_LEFT); + SetCaret(gBul[bul].x, gBul[bul].y, CARET_HURT_PARTICLES, DIR_LEFT); PlaySoundObject(gBoss[bos_].hit_voice, SOUND_MODE_PLAY); } @@ -187,7 +188,7 @@ void HitBossBullet(void) { if (!(gBul[bul].bbits & 0x10)) { - SetCaret(gBul[bul].x, gBul[bul].y, 2, 2); + SetCaret(gBul[bul].x, gBul[bul].y, CARET_PROJECTILE_DISSIPATION, DIR_RIGHT); PlaySoundObject(31, SOUND_MODE_PLAY); gBul[bul].cond = 0; continue; diff --git a/src/BulHit.cpp b/src/BulHit.cpp index 814cf079..41982c42 100644 --- a/src/BulHit.cpp +++ b/src/BulHit.cpp @@ -6,6 +6,7 @@ #include "Bullet.h" #include "Caret.h" +#include "CommonDefines.h" #include "Game.h" #include "Map.h" #include "NpChar.h" @@ -16,10 +17,10 @@ static void Vanish(BULLET *bul) if (bul->code_bullet != 37 && bul->code_bullet != 38 && bul->code_bullet != 39) PlaySoundObject(28, SOUND_MODE_PLAY); else - SetCaret(bul->x, bul->y, 2, 1); + SetCaret(bul->x, bul->y, CARET_PROJECTILE_DISSIPATION, DIR_UP); bul->cond = 0; - SetCaret(bul->x, bul->y, 2, 2); + SetCaret(bul->x, bul->y, CARET_PROJECTILE_DISSIPATION, DIR_RIGHT); } int JudgeHitBulletBlock(int x, int y, BULLET *bul) @@ -37,7 +38,7 @@ int JudgeHitBulletBlock(int x, int y, BULLET *bul) if (!(bul->bbits & 0x40)) bul->cond = 0; - SetCaret(bul->x, bul->y, 2, 0); + SetCaret(bul->x, bul->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); PlaySoundObject(12, SOUND_MODE_PLAY); for (i = 0; i < 4; ++i) diff --git a/src/Bullet.cpp b/src/Bullet.cpp index 0850735f..55ba282b 100644 --- a/src/Bullet.cpp +++ b/src/Bullet.cpp @@ -7,6 +7,7 @@ #include "Draw.h" #include "Caret.h" +#include "CommonDefines.h" #include "Game.h" #include "KeyControl.h" #include "MyChar.h" @@ -204,7 +205,7 @@ void ActBullet_Frontia1(BULLET *bul) if (++bul->count1 > bul->life_count) { bul->cond = 0; - SetCaret(bul->x, bul->y, 3, 0); + SetCaret(bul->x, bul->y, CARET_SHOOT, DIR_LEFT); return; } @@ -271,7 +272,7 @@ void ActBullet_Frontia2(BULLET *bul, int level) if (++bul->count1 > bul->life_count) { bul->cond = 0; - SetCaret(bul->x, bul->y, 3, 0); + SetCaret(bul->x, bul->y, CARET_SHOOT, DIR_LEFT); return; } @@ -396,7 +397,7 @@ void ActBullet_PoleStar(BULLET *bul, int level) if (++bul->count1 > bul->life_count) { bul->cond = 0; - SetCaret(bul->x, bul->y, 3, 0); + SetCaret(bul->x, bul->y, CARET_SHOOT, DIR_LEFT); return; } @@ -518,7 +519,7 @@ void ActBullet_FireBall(BULLET *bul, int level) if (++bul->count1 > bul->life_count) { bul->cond = 0; - SetCaret(bul->x, bul->y, 3, 0); + SetCaret(bul->x, bul->y, CARET_SHOOT, DIR_LEFT); return; } @@ -536,7 +537,7 @@ void ActBullet_FireBall(BULLET *bul, int level) if (bBreak) { bul->cond = 0; - SetCaret(bul->x, bul->y, 2, 0); + SetCaret(bul->x, bul->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); PlaySoundObject(28, SOUND_MODE_PLAY); return; } @@ -687,7 +688,7 @@ void ActBullet_MachineGun(BULLET *bul, int level) if (++bul->count1 > bul->life_count) { bul->cond = 0; - SetCaret(bul->x, bul->y, 3, 0); + SetCaret(bul->x, bul->y, CARET_SHOOT, DIR_LEFT); return; } @@ -766,7 +767,7 @@ void ActBullet_Missile(BULLET *bul, int level) if (++bul->count1 > bul->life_count) { bul->cond = 0; - SetCaret(bul->x, bul->y, 3, 0); + SetCaret(bul->x, bul->y, CARET_SHOOT, DIR_LEFT); return; } @@ -919,17 +920,17 @@ void ActBullet_Missile(BULLET *bul, int level) switch (bul->direct) { - case 0: - SetCaret(bul->x + (8 * 0x200), bul->y, 7, 2); + case DIR_LEFT: + SetCaret(bul->x + (8 * 0x200), bul->y, CARET_EXHAUST, DIR_RIGHT); break; - case 1: - SetCaret(bul->x, bul->y + (8 * 0x200), 7, 3); + case DIR_UP: + SetCaret(bul->x, bul->y + (8 * 0x200), CARET_EXHAUST, DIR_DOWN); break; - case 2: - SetCaret(bul->x - (8 * 0x200), bul->y, 7, 0); + case DIR_RIGHT: + SetCaret(bul->x - (8 * 0x200), bul->y, CARET_EXHAUST, DIR_LEFT); break; - case 3: - SetCaret(bul->x, bul->y - (8 * 0x200), 7, 1); + case DIR_DOWN: + SetCaret(bul->x, bul->y - (8 * 0x200), CARET_EXHAUST, DIR_UP); break; } } @@ -1022,7 +1023,7 @@ void ActBullet_Bubblin1(BULLET *bul) if (bul->flag & 0x2FF) { bul->cond = 0; - SetCaret(bul->x, bul->y, 2, 0); + SetCaret(bul->x, bul->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); return; } @@ -1072,7 +1073,7 @@ void ActBullet_Bubblin1(BULLET *bul) if (++bul->act_wait > 40) { bul->cond = 0; - SetCaret(bul->x, bul->y, 15, 0); + SetCaret(bul->x, bul->y, CARET_PROJECTILE_DISSIPATION_TINY, DIR_LEFT); } RECT rect[4] = { @@ -1110,7 +1111,7 @@ void ActBullet_Bubblin2(BULLET *bul) if (bDelete) { bul->cond = 0; - SetCaret(bul->x, bul->y, 2, 0); + SetCaret(bul->x, bul->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); return; } @@ -1164,7 +1165,7 @@ void ActBullet_Bubblin2(BULLET *bul) if (++bul->act_wait > 60) { bul->cond = 0; - SetCaret(bul->x, bul->y, 15, 0); + SetCaret(bul->x, bul->y, CARET_PROJECTILE_DISSIPATION_TINY, DIR_LEFT); } RECT rect[4] = { @@ -1191,7 +1192,7 @@ void ActBullet_Bubblin3(BULLET *bul) if (++bul->act_wait > 100 || !(gKey & gKeyShot)) { bul->cond = 0; - SetCaret(bul->x, bul->y, 2, 0); + SetCaret(bul->x, bul->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); PlaySoundObject(100, SOUND_MODE_PLAY); if (gMC.up) @@ -1279,7 +1280,7 @@ void ActBullet_Spine(BULLET *bul) if (++bul->count1 > bul->life_count || bul->flag & 8) { bul->cond = 0; - SetCaret(bul->x, bul->y, 3, 0); + SetCaret(bul->x, bul->y, CARET_SHOOT, DIR_LEFT); return; } @@ -1355,7 +1356,7 @@ void ActBullet_Sword1(BULLET *bul) if (++bul->count1 > bul->life_count) { bul->cond = 0; - SetCaret(bul->x, bul->y, 3, 0); + SetCaret(bul->x, bul->y, CARET_SHOOT, DIR_LEFT); return; } @@ -1425,7 +1426,7 @@ void ActBullet_Sword2(BULLET *bul) if (++bul->count1 > bul->life_count) { bul->cond = 0; - SetCaret(bul->x, bul->y, 3, 0); + SetCaret(bul->x, bul->y, CARET_SHOOT, DIR_LEFT); return; } @@ -1560,7 +1561,7 @@ void ActBullet_Sword3(BULLET *bul) if (bul->count1 > bul->life_count) { bul->cond = 0; - SetCaret(bul->x, bul->y, 3, 0); + SetCaret(bul->x, bul->y, CARET_SHOOT, DIR_LEFT); return; } @@ -1692,7 +1693,7 @@ void ActBullet_SuperMissile(BULLET *bul, int level) if (++bul->count1 > bul->life_count) { bul->cond = 0; - SetCaret(bul->x, bul->y, 3, 0); + SetCaret(bul->x, bul->y, CARET_SHOOT, DIR_LEFT); return; } @@ -1850,17 +1851,17 @@ void ActBullet_SuperMissile(BULLET *bul, int level) switch (bul->direct) { - case 0: - SetCaret(bul->x + (8 * 0x200), bul->y, 7, 2); + case DIR_LEFT: + SetCaret(bul->x + (8 * 0x200), bul->y, CARET_EXHAUST, DIR_RIGHT); break; - case 1: - SetCaret(bul->x, bul->y + (8 * 0x200), 7, 3); + case DIR_UP: + SetCaret(bul->x, bul->y + (8 * 0x200), CARET_EXHAUST, DIR_DOWN); break; - case 2: - SetCaret(bul->x - (8 * 0x200), bul->y, 7, 0); + case DIR_RIGHT: + SetCaret(bul->x - (8 * 0x200), bul->y, CARET_EXHAUST, DIR_LEFT); break; - case 3: - SetCaret(bul->x, bul->y - (8 * 0x200), 7, 1); + case DIR_DOWN: + SetCaret(bul->x, bul->y - (8 * 0x200), CARET_EXHAUST, DIR_UP); break; } } @@ -1944,7 +1945,7 @@ void ActBullet_Nemesis(BULLET *bul, int level) if (++bul->count1 > bul->life_count) { bul->cond = 0; - SetCaret(bul->x, bul->y, 3, 0); + SetCaret(bul->x, bul->y, CARET_SHOOT, DIR_LEFT); return; } @@ -2052,7 +2053,7 @@ void ActBullet_Spur(BULLET *bul, int level) if (++bul->count1 > bul->life_count) { bul->cond = 0; - SetCaret(bul->x, bul->y, 3, 0); + SetCaret(bul->x, bul->y, CARET_SHOOT, DIR_LEFT); return; } diff --git a/src/Caret.cpp b/src/Caret.cpp index e054f109..5b940caf 100644 --- a/src/Caret.cpp +++ b/src/Caret.cpp @@ -4,6 +4,7 @@ #include "WindowsWrapper.h" +#include "CommonDefines.h" #include "Draw.h" #include "Game.h" #include "Triangle.h" @@ -38,24 +39,24 @@ CARET gCrt[CARET_MAX]; // Sprite offsets CARET_TABLE gCaretTable[18] = { - {0, 0}, // Null - { 4 * 0x200, 4 * 0x200}, // Bubble - { 8 * 0x200, 8 * 0x200}, // Projectile dissipation - { 8 * 0x200, 8 * 0x200}, // Shoot - { 8 * 0x200, 8 * 0x200}, // Snake after-image? This doesn't seem to be used. - { 4 * 0x200, 4 * 0x200}, // 'Zzz' - snoring - { 8 * 0x200, 8 * 0x200}, // Duplicate of the Snake after-image - { 4 * 0x200, 4 * 0x200}, // Exhaust (used by the Booster and hoverbike) - { 8 * 0x200, 8 * 0x200}, // Drowned Quote - { 8 * 0x200, 8 * 0x200}, // The '?' that appears when you press the down key - {28 * 0x200, 8 * 0x200}, // 'Level Up!' - { 4 * 0x200, 4 * 0x200}, // Red hurt particles (used by bosses and invisible hidden pickups) - {16 * 0x200, 16 * 0x200}, // Missile Launcher explosion flash - { 4 * 0x200, 4 * 0x200}, // Dust particles (used when Quote jumps into the ceiling) - {20 * 0x200, 20 * 0x200}, // Broken (unknown and unused) - { 4 * 0x200, 4 * 0x200}, // Tiny version of the projectile dissipation effect - {20 * 0x200, 4 * 0x200}, // 'Empty!' - {52 * 0x200, 4 * 0x200} // 'PUSH JUMP KEY!' (unused) + {0, 0}, // CARET_NULL + { 4 * 0x200, 4 * 0x200}, // CARET_BUBBLE + { 8 * 0x200, 8 * 0x200}, // CARET_PROJECTILE_DISSIPATION + { 8 * 0x200, 8 * 0x200}, // CARET_SHOOT + { 8 * 0x200, 8 * 0x200}, // CARET_SNAKE_AFTERIMAGE + { 4 * 0x200, 4 * 0x200}, // CARET_ZZZ + { 8 * 0x200, 8 * 0x200}, // CARET_SNAKE_AFTERIMAGE_DUPLICATE + { 4 * 0x200, 4 * 0x200}, // CARET_EXHAUST + { 8 * 0x200, 8 * 0x200}, // CARET_DROWNED_QUOTE + { 8 * 0x200, 8 * 0x200}, // CARET_QUESTION_MARK + {28 * 0x200, 8 * 0x200}, // CARET_LEVEL_UP + { 4 * 0x200, 4 * 0x200}, // CARET_HURT_PARTICLES + {16 * 0x200, 16 * 0x200}, // CARET_EXPLOSION + { 4 * 0x200, 4 * 0x200}, // CARET_TINY_PARTICLES + {20 * 0x200, 20 * 0x200}, // CARET_UNKNOWN + { 4 * 0x200, 4 * 0x200}, // CARET_PROJECTILE_DISSIPATION_TINY + {20 * 0x200, 4 * 0x200}, // CARET_EMPTY + {52 * 0x200, 4 * 0x200} // CARET_PUSH_JUMP_KEY }; void InitCaret(void) @@ -464,7 +465,7 @@ void ActCaret12(CARET *crt) crt->rect = rcLeft[crt->ani_no]; } -// Particles used when Quote jumps into the ceiling +// Particles used when Quote jumps into the ceiling, and also used by the Demon Crown and Ballos's puppy void ActCaret13(CARET *crt) { RECT rcLeft[2] = { @@ -478,12 +479,12 @@ void ActCaret13(CARET *crt) switch (crt->direct) { - case 0: + case DIR_LEFT: crt->xm = Random(-0x600, 0x600); crt->ym = Random(-0x200, 0x200); break; - case 1: + case DIR_UP: crt->ym = -0x200 * Random(1, 3); break; } @@ -491,7 +492,7 @@ void ActCaret13(CARET *crt) switch (crt->direct) { - case 0: + case DIR_LEFT: crt->xm = (crt->xm * 4) / 5; crt->ym = (crt->ym * 4) / 5; break; @@ -505,7 +506,7 @@ void ActCaret13(CARET *crt) crt->rect = rcLeft[crt->ani_wait / 2 % 2]; - if (crt->direct == 5) + if (crt->direct == DIR_OTHER) crt->x -= 4 * 0x200; } diff --git a/src/Caret.h b/src/Caret.h index 26e6a510..7ae09837 100644 --- a/src/Caret.h +++ b/src/Caret.h @@ -2,6 +2,28 @@ #include "WindowsWrapper.h" +enum +{ + CARET_NULL = 0, + CARET_BUBBLE = 1, + CARET_PROJECTILE_DISSIPATION = 2, + CARET_SHOOT = 3, + CARET_SNAKE_AFTERIMAGE = 4, + CARET_ZZZ = 5, + CARET_SNAKE_AFTERIMAGE_DUPLICATE = 6, + CARET_EXHAUST = 7, + CARET_DROWNED_QUOTE = 8, + CARET_QUESTION_MARK = 9, + CARET_LEVEL_UP = 10, + CARET_HURT_PARTICLES = 11, + CARET_EXPLOSION = 12, + CARET_TINY_PARTICLES = 13, + CARET_UNKNOWN = 14, + CARET_PROJECTILE_DISSIPATION_TINY = 15, + CARET_EMPTY = 16, + CARET_PUSH_JUMP_KEY = 17 +}; + void InitCaret(void); void ActCaret(void); void PutCaret(int fx, int fy); diff --git a/src/CommonDefines.h b/src/CommonDefines.h index f7eb3da3..26b75099 100644 --- a/src/CommonDefines.h +++ b/src/CommonDefines.h @@ -18,7 +18,8 @@ enum Direction DIR_UP = 1, DIR_RIGHT = 2, DIR_DOWN = 3, - DIR_AUTO = 4 + DIR_AUTO = 4, + DIR_OTHER = 5 }; struct OTHER_RECT // The original name for this struct is unknown diff --git a/src/MyChar.cpp b/src/MyChar.cpp index 6722321e..0d90b194 100644 --- a/src/MyChar.cpp +++ b/src/MyChar.cpp @@ -7,6 +7,7 @@ #include "ArmsItem.h" #include "Caret.h" +#include "CommonDefines.h" #include "Draw.h" #include "Flags.h" #include "Game.h" @@ -494,9 +495,9 @@ void ActMyChar_Normal(BOOL bKey) if (gKeyTrg & gKeyJump || gMC.boost_cnt % 3 == 1) { if (gMC.direct == 0) - SetCaret(gMC.x + (2 * 0x200), gMC.y + (2 * 0x200), 7, 2); + SetCaret(gMC.x + (2 * 0x200), gMC.y + (2 * 0x200), CARET_EXHAUST, DIR_RIGHT); if (gMC.direct == 2) - SetCaret(gMC.x - (2 * 0x200), gMC.y + (2 * 0x200), 7, 0); + SetCaret(gMC.x - (2 * 0x200), gMC.y + (2 * 0x200), CARET_EXHAUST, DIR_LEFT); PlaySoundObject(113, SOUND_MODE_PLAY); } @@ -509,14 +510,14 @@ void ActMyChar_Normal(BOOL bKey) // Boost particles (and sound) if (gKeyTrg & gKeyJump || gMC.boost_cnt % 3 == 1) { - SetCaret(gMC.x, gMC.y + (6 * 0x200), 7, 3); + SetCaret(gMC.x, gMC.y + (6 * 0x200), CARET_EXHAUST, DIR_DOWN); PlaySoundObject(113, SOUND_MODE_PLAY); } } else if (gMC.boost_sw == 3 && (gKeyTrg & gKeyJump || gMC.boost_cnt % 3 == 1)) { // Boost particles (and sound) - SetCaret(gMC.x, gMC.y - (6 * 0x200), 7, 1); + SetCaret(gMC.x, gMC.y - (6 * 0x200), CARET_EXHAUST, DIR_UP); PlaySoundObject(113, SOUND_MODE_PLAY); } } @@ -533,7 +534,7 @@ void ActMyChar_Normal(BOOL bKey) if (gMC.boost_cnt % 3 == 0) { - SetCaret(gMC.x, gMC.y + (gMC.hit.bottom / 2), 7, 3); + SetCaret(gMC.x, gMC.y + (gMC.hit.bottom / 2), CARET_EXHAUST, DIR_DOWN); PlaySoundObject(113, SOUND_MODE_PLAY); } @@ -758,9 +759,9 @@ void ActMyChar_Stream(BOOL bKey) } if (gMC.ym < -0x200 && gMC.flag & 2) - SetCaret(gMC.x, gMC.y - gMC.hit.top, 13, 5); + SetCaret(gMC.x, gMC.y - gMC.hit.top, CARET_TINY_PARTICLES, DIR_OTHER); if (gMC.ym > 0x200 && gMC.flag & 8) - SetCaret(gMC.x, gMC.y + gMC.hit.bottom, 13, 5); + SetCaret(gMC.x, gMC.y + gMC.hit.bottom, CARET_TINY_PARTICLES, DIR_OTHER); if (gMC.xm > 0x400) gMC.xm = 0x400; @@ -836,9 +837,9 @@ void AirProcess(void) StartTextScript(41); if (gMC.direct == 0) - SetCaret(gMC.x, gMC.y, 8, 0); + SetCaret(gMC.x, gMC.y, CARET_DROWNED_QUOTE, DIR_LEFT); else - SetCaret(gMC.x, gMC.y, 8, 2); + SetCaret(gMC.x, gMC.y, CARET_DROWNED_QUOTE, DIR_RIGHT); gMC.cond &= ~0x80; } diff --git a/src/MycHit.cpp b/src/MycHit.cpp index 2477b440..9eceb00c 100644 --- a/src/MycHit.cpp +++ b/src/MycHit.cpp @@ -5,6 +5,7 @@ #include "Back.h" #include "Boss.h" #include "Caret.h" +#include "CommonDefines.h" #include "Game.h" #include "KeyControl.h" #include "Map.h" @@ -24,8 +25,8 @@ static void PutlittleStar(void) if (!(gMC.cond & 2) && gMC.ym < -0x200) { PlaySoundObject(3, SOUND_MODE_PLAY); - SetCaret(gMC.x, gMC.y - gMC.hit.top, 13, 0); - SetCaret(gMC.x, gMC.y - gMC.hit.top, 13, 0); + SetCaret(gMC.x, gMC.y - gMC.hit.top, CARET_TINY_PARTICLES, DIR_LEFT); + SetCaret(gMC.x, gMC.y - gMC.hit.top, CARET_TINY_PARTICLES, DIR_LEFT); } } @@ -853,7 +854,7 @@ void HitMyCharNpChar(void) // Create question mark when NPC hasn't been interacted with if (gMC.ques) - SetCaret(gMC.x, gMC.y, 9, 0); + SetCaret(gMC.x, gMC.y, CARET_QUESTION_MARK, DIR_LEFT); } void HitMyCharBoss(void) @@ -913,5 +914,5 @@ void HitMyCharBoss(void) } if (gMC.ques) - SetCaret(gMC.x, gMC.y, 9, 0); + SetCaret(gMC.x, gMC.y, CARET_QUESTION_MARK, DIR_LEFT); } diff --git a/src/MycParam.cpp b/src/MycParam.cpp index 7273da9c..20385f29 100644 --- a/src/MycParam.cpp +++ b/src/MycParam.cpp @@ -67,7 +67,7 @@ void AddExpMyChar(int x) if (gArmsData[gSelectedArms].code != 13) { PlaySoundObject(27, SOUND_MODE_PLAY); - SetCaret(gMC.x, gMC.y, 10, 0); + SetCaret(gMC.x, gMC.y, CARET_LEVEL_UP, DIR_LEFT); } } } @@ -157,7 +157,7 @@ void DamageMyChar(int damage) gArmsData[gSelectedArms].exp = gArmsLevelTable[arms_code].exp[lv] + gArmsData[gSelectedArms].exp; if (gMC.life > 0 && gArmsData[gSelectedArms].code != 13) - SetCaret(gMC.x, gMC.y, 10, 2); + SetCaret(gMC.x, gMC.y, CARET_LEVEL_UP, DIR_RIGHT); } else { diff --git a/src/NpChar.cpp b/src/NpChar.cpp index cdd802b1..934400c6 100644 --- a/src/NpChar.cpp +++ b/src/NpChar.cpp @@ -8,6 +8,7 @@ #include "ArmsItem.h" #include "Caret.h" +#include "CommonDefines.h" #include "Draw.h" #include "Flags.h" #include "Game.h" @@ -164,7 +165,7 @@ void SetDestroyNpChar(int x, int y, int w, int num) } // Flash effect - SetCaret(x, y, 12, 0); + SetCaret(x, y, CARET_EXPLOSION, DIR_LEFT); } void SetDestroyNpCharUp(int x, int y, int w, int num) @@ -183,7 +184,7 @@ void SetDestroyNpCharUp(int x, int y, int w, int num) } // Flash effect - SetCaret(x, y, 12, 0); + SetCaret(x, y, CARET_EXPLOSION, DIR_LEFT); } void SetExpObjects(int x, int y, int exp) diff --git a/src/NpcAct000.cpp b/src/NpcAct000.cpp index 5811ce1d..b4e8f107 100644 --- a/src/NpcAct000.cpp +++ b/src/NpcAct000.cpp @@ -6,6 +6,7 @@ #include "Back.h" #include "Caret.h" +#include "CommonDefines.h" #include "Frame.h" #include "Game.h" #include "Map.h" @@ -1051,7 +1052,7 @@ void ActNpc011(NPCHAR *npc) if (npc->flag & 0xFF) { npc->cond = 0; - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); } npc->y += npc->ym; @@ -1075,7 +1076,7 @@ void ActNpc011(NPCHAR *npc) if (++npc->count1 > 150) { - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); npc->cond = 0; } } diff --git a/src/NpcAct020.cpp b/src/NpcAct020.cpp index 30911cbd..ef5e26d8 100644 --- a/src/NpcAct020.cpp +++ b/src/NpcAct020.cpp @@ -5,6 +5,7 @@ #include "WindowsWrapper.h" #include "Caret.h" +#include "CommonDefines.h" #include "Game.h" #include "Frame.h" #include "MyChar.h" @@ -803,7 +804,7 @@ void ActNpc030(NPCHAR *npc) if (++npc->act_wait > 100) { npc->act_wait = 0; - SetCaret(npc->x, npc->y - (2 * 0x200), 5, 0); + SetCaret(npc->x, npc->y - (2 * 0x200), CARET_ZZZ, DIR_LEFT); } } @@ -970,7 +971,7 @@ void ActNpc033(NPCHAR *npc) { if (npc->flag & 5) { - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); npc->cond = 0; } else if (npc->flag & 8) @@ -1000,7 +1001,7 @@ void ActNpc033(NPCHAR *npc) if (++npc->act_wait > 250) { - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); npc->cond = 0; } } diff --git a/src/NpcAct040.cpp b/src/NpcAct040.cpp index 8971b050..0f9314b6 100644 --- a/src/NpcAct040.cpp +++ b/src/NpcAct040.cpp @@ -819,7 +819,7 @@ void ActNpc048(NPCHAR *npc) if (++npc->count1 > 2 || npc->direct == 2) { VanishNpChar(npc); - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); } else { @@ -856,7 +856,7 @@ void ActNpc048(NPCHAR *npc) if (++npc->act_wait > 750) { - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); npc->cond = 0; } @@ -1064,7 +1064,7 @@ void ActNpc050(NPCHAR *npc) { if (++npc->count1 > 1) { - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); npc->cond = 0; } } diff --git a/src/NpcAct080.cpp b/src/NpcAct080.cpp index 7732d7c4..8932ad4d 100644 --- a/src/NpcAct080.cpp +++ b/src/NpcAct080.cpp @@ -637,7 +637,7 @@ void ActNpc084(NPCHAR *npc) { if (npc->flag & 0xFF) { - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); npc->cond = 0; } @@ -664,7 +664,7 @@ void ActNpc084(NPCHAR *npc) if (++npc->count1 > 300) { - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); npc->cond = 0; } } @@ -1410,7 +1410,7 @@ void ActNpc093(NPCHAR *npc) if (++npc->act_wait > 200) { npc->act_wait = 0; - SetCaret(npc->x, npc->y, 5, 0); + SetCaret(npc->x, npc->y, CARET_ZZZ, DIR_LEFT); } break; diff --git a/src/NpcAct100.cpp b/src/NpcAct100.cpp index 50eb8483..31af6bc8 100644 --- a/src/NpcAct100.cpp +++ b/src/NpcAct100.cpp @@ -6,6 +6,7 @@ #include "Bullet.h" #include "Caret.h" +#include "CommonDefines.h" #include "Frame.h" #include "Game.h" #include "MyChar.h" @@ -500,7 +501,7 @@ void ActNpc108(NPCHAR *npc) { if (npc->flag & 0xFF) { - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); npc->cond = 0; } @@ -526,7 +527,7 @@ void ActNpc108(NPCHAR *npc) if (++npc->count1 > 300) { - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); npc->cond = 0; } } diff --git a/src/NpcAct120.cpp b/src/NpcAct120.cpp index 269dee15..cd21959e 100644 --- a/src/NpcAct120.cpp +++ b/src/NpcAct120.cpp @@ -7,6 +7,7 @@ #include "Bullet.h" #include "Caret.h" +#include "CommonDefines.h" #include "Frame.h" #include "Game.h" #include "KeyControl.h" @@ -75,7 +76,7 @@ void ActNpc121(NPCHAR *npc) if (++npc->act_wait > 100) { npc->act_wait = 0; - SetCaret(npc->x, npc->y, 5, 0); + SetCaret(npc->x, npc->y, CARET_ZZZ, DIR_LEFT); } } } @@ -285,7 +286,7 @@ void ActNpc123(NPCHAR *npc) { case 0: npc->act_no = 1; - SetCaret(npc->x, npc->y, 3, 0); + SetCaret(npc->x, npc->y, CARET_SHOOT, DIR_LEFT); PlaySoundObject(32, SOUND_MODE_PLAY); switch (npc->direct) @@ -345,7 +346,7 @@ void ActNpc123(NPCHAR *npc) if (bBreak) { - SetCaret(npc->x, npc->y, 2, 2); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_RIGHT); PlaySoundObject(28, SOUND_MODE_PLAY); npc->cond = 0; } @@ -819,7 +820,7 @@ void ActNpc131(NPCHAR *npc) if (++npc->act_wait > 100) { npc->act_wait = 0; - SetCaret(npc->x, npc->y, 5, 0); + SetCaret(npc->x, npc->y, CARET_ZZZ, DIR_LEFT); } if (npc->direct == 0) diff --git a/src/NpcAct140.cpp b/src/NpcAct140.cpp index eb589523..c3873690 100644 --- a/src/NpcAct140.cpp +++ b/src/NpcAct140.cpp @@ -413,7 +413,7 @@ void ActNpc141(NPCHAR *npc) { npc->act_no = 20; npc->act_wait = 0; - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); PlaySoundObject(12, SOUND_MODE_PLAY); for (i = 0; i < 4; ++i) @@ -952,7 +952,7 @@ void ActNpc148(NPCHAR *npc) { if (npc->flag & 0xFF) { - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); npc->cond = 0; } @@ -971,7 +971,7 @@ void ActNpc148(NPCHAR *npc) if (++npc->count1 > 300) { - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); npc->cond = 0; } } @@ -1734,7 +1734,7 @@ void ActNpc156(NPCHAR *npc) { if (npc->flag & 0xFF) { - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); npc->cond = 0; } @@ -1754,7 +1754,7 @@ void ActNpc156(NPCHAR *npc) if (++npc->count1 > 300) { - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); npc->cond = 0; } } @@ -1956,7 +1956,7 @@ void ActNpc158(NPCHAR *npc) if (++npc->ani_wait > 2) { npc->ani_wait = 0; - SetCaret(npc->x, npc->y, 7, 4); + SetCaret(npc->x, npc->y, CARET_EXHAUST, DIR_AUTO); } npc->ani_no = (npc->count1 + 0x10) / 0x20; diff --git a/src/NpcAct160.cpp b/src/NpcAct160.cpp index 017f69de..5080c0bc 100644 --- a/src/NpcAct160.cpp +++ b/src/NpcAct160.cpp @@ -896,14 +896,14 @@ void ActNpc170(NPCHAR *npc) npc->xm -= 0x20; if (npc->count1 % 3 == 1) - SetCaret(npc->x + (8 * 0x200), npc->y, 7, 2); + SetCaret(npc->x + (8 * 0x200), npc->y, CARET_EXHAUST, DIR_RIGHT); } else { npc->xm += 0x20; if (npc->count1 % 3 == 1) - SetCaret(npc->x - (8 * 0x200), npc->y, 7, 0); + SetCaret(npc->x - (8 * 0x200), npc->y, CARET_EXHAUST, DIR_LEFT); } if (npc->count1 < 50) @@ -1056,7 +1056,7 @@ void ActNpc172(NPCHAR *npc) if (npc->flag & 1 || npc->flag & 4) { - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); VanishNpChar(npc); return; } @@ -1294,7 +1294,7 @@ void ActNpc174(NPCHAR *npc) { if (++npc->count1 > 1) { - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); npc->cond = 0; } } @@ -1474,7 +1474,7 @@ void ActNpc177(NPCHAR *npc) if (npc->flag & 0xFF) { - SetCaret(npc->x, npc->y, 3, 0); + SetCaret(npc->x, npc->y, CARET_SHOOT, DIR_LEFT); npc->cond = 0; return; } @@ -1521,7 +1521,7 @@ void ActNpc177(NPCHAR *npc) if (++npc->act_wait > 300) { - SetCaret(npc->x, npc->y, 3, 0); + SetCaret(npc->x, npc->y, CARET_SHOOT, DIR_LEFT); npc->cond = 0; return; } @@ -1564,7 +1564,7 @@ void ActNpc178(NPCHAR *npc) { if (npc->flag & 0xFF) { - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); npc->cond = 0; } @@ -1599,7 +1599,7 @@ void ActNpc178(NPCHAR *npc) if (++npc->count1 > 150) { VanishNpChar(npc); - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); } } @@ -1609,7 +1609,7 @@ void ActNpc179(NPCHAR *npc) if (npc->flag & 0xFF) { npc->cond = 0; - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); } npc->xm -= 0x20; @@ -1641,6 +1641,6 @@ void ActNpc179(NPCHAR *npc) if (++npc->count1 > 300) { VanishNpChar(npc); - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); } } diff --git a/src/NpcAct180.cpp b/src/NpcAct180.cpp index 4ddf760a..0b630116 100644 --- a/src/NpcAct180.cpp +++ b/src/NpcAct180.cpp @@ -7,6 +7,7 @@ #include "Back.h" #include "Bullet.h" #include "Caret.h" +#include "CommonDefines.h" #include "Flags.h" #include "Frame.h" #include "Game.h" @@ -386,12 +387,12 @@ void ActNpc181(NPCHAR *npc) if (npc->direct == 0) { SetBullet(12, npc->x - (4 * 0x200), npc->y + (3 * 0x200), 0); - SetCaret(npc->x - (4 * 0x200), npc->y + (3 * 0x200), 3, 0); + SetCaret(npc->x - (4 * 0x200), npc->y + (3 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(12, npc->x + (4 * 0x200), npc->y + (3 * 0x200), 2); - SetCaret(npc->x + (4 * 0x200), npc->y + (3 * 0x200), 3, 0); + SetCaret(npc->x + (4 * 0x200), npc->y + (3 * 0x200), CARET_SHOOT, DIR_LEFT); } } else @@ -399,12 +400,12 @@ void ActNpc181(NPCHAR *npc) if (npc->direct == 0) { SetBullet(12, npc->x - (2 * 0x200), npc->y - (4 * 0x200), 1); - SetCaret(npc->x - (2 * 0x200), npc->y - (4 * 0x200), 3, 0); + SetCaret(npc->x - (2 * 0x200), npc->y - (4 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(12, npc->x + (2 * 0x200), npc->y - (4 * 0x200), 1); - SetCaret(npc->x + (2 * 0x200), npc->y - (4 * 0x200), 3, 0); + SetCaret(npc->x + (2 * 0x200), npc->y - (4 * 0x200), CARET_SHOOT, DIR_LEFT); } } } @@ -493,12 +494,12 @@ void ActNpc182(NPCHAR *npc) if (npc->direct == 0) { SetBullet(6, npc->x - (4 * 0x200), npc->y + (3 * 0x200), 0); - SetCaret(npc->x - (4 * 0x200), npc->y + (3 * 0x200), 3, 0); + SetCaret(npc->x - (4 * 0x200), npc->y + (3 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(6, npc->x + (4 * 0x200), npc->y + (3 * 0x200), 2); - SetCaret(npc->x + (4 * 0x200), npc->y + (3 * 0x200), 3, 0); + SetCaret(npc->x + (4 * 0x200), npc->y + (3 * 0x200), CARET_SHOOT, DIR_LEFT); } } else @@ -506,12 +507,12 @@ void ActNpc182(NPCHAR *npc) if (npc->direct == 0) { SetBullet(6, npc->x - (2 * 0x200), npc->y - (4 * 0x200), 1); - SetCaret(npc->x - (2 * 0x200), npc->y - (4 * 0x200), 3, 0); + SetCaret(npc->x - (2 * 0x200), npc->y - (4 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(6, npc->x + (2 * 0x200), npc->y - (4 * 0x200), 1); - SetCaret(npc->x + (2 * 0x200), npc->y - (4 * 0x200), 3, 0); + SetCaret(npc->x + (2 * 0x200), npc->y - (4 * 0x200), CARET_SHOOT, DIR_LEFT); } } } @@ -1184,9 +1185,9 @@ void ActNpc192(NPCHAR *npc) PlaySoundObject(34, SOUND_MODE_PLAY); if (npc->direct == 0) - SetCaret(npc->x + (10 * 0x200), npc->y + (10 * 0x200), 7, 2); + SetCaret(npc->x + (10 * 0x200), npc->y + (10 * 0x200), CARET_EXHAUST, DIR_RIGHT); else - SetCaret(npc->x - (10 * 0x200), npc->y + (10 * 0x200), 7, 0); + SetCaret(npc->x - (10 * 0x200), npc->y + (10 * 0x200), CARET_EXHAUST, DIR_LEFT); } RECT rcLeft[2] = { diff --git a/src/NpcAct200.cpp b/src/NpcAct200.cpp index 66b2862a..e4ab9281 100644 --- a/src/NpcAct200.cpp +++ b/src/NpcAct200.cpp @@ -6,6 +6,7 @@ #include "Bullet.h" #include "Caret.h" +#include "CommonDefines.h" #include "Frame.h" #include "Game.h" #include "MyChar.h" @@ -163,7 +164,7 @@ void ActNpc202(NPCHAR *npc) if (npc->flag & 0xFF) { npc->cond = 0; - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); } npc->y += npc->ym; @@ -189,7 +190,7 @@ void ActNpc202(NPCHAR *npc) if (++npc->count1 > 300) { npc->cond = 0; - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); } } @@ -750,7 +751,7 @@ void ActNpc209(NPCHAR *npc) if (npc->flag & 0xFF) { npc->cond = 0; - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); } npc->y += npc->ym; @@ -777,7 +778,7 @@ void ActNpc209(NPCHAR *npc) if (++npc->count1 > 300) { npc->cond = 0; - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); } } diff --git a/src/NpcAct220.cpp b/src/NpcAct220.cpp index ece414e1..9b88d564 100644 --- a/src/NpcAct220.cpp +++ b/src/NpcAct220.cpp @@ -5,6 +5,7 @@ #include "WindowsWrapper.h" #include "Caret.h" +#include "CommonDefines.h" #include "Game.h" #include "MyChar.h" #include "NpChar.h" @@ -617,9 +618,9 @@ void ActNpc231(NPCHAR *npc) ++npc->act_wait; if (npc->act_wait % 2 == 0) - SetCaret(npc->x - (10 * 0x200), npc->y + (8 * 0x200), 7, 3); + SetCaret(npc->x - (10 * 0x200), npc->y + (8 * 0x200), CARET_EXHAUST, DIR_DOWN); if (npc->act_wait % 2 == 1) - SetCaret(npc->x + (10 * 0x200), npc->y + (8 * 0x200), 7, 3); + SetCaret(npc->x + (10 * 0x200), npc->y + (8 * 0x200), CARET_EXHAUST, DIR_DOWN); if (npc->act_wait % 4 == 1) PlaySoundObject(34, SOUND_MODE_PLAY); @@ -647,10 +648,10 @@ void ActNpc231(NPCHAR *npc) if (npc->ym < 0) { if (npc->act_wait % 8 == 0) - SetCaret(npc->x - (10 * 0x200), npc->y + (8 * 0x200), 7, 3); + SetCaret(npc->x - (10 * 0x200), npc->y + (8 * 0x200), CARET_EXHAUST, DIR_DOWN); if (npc->act_wait % 8 == 4) - SetCaret(npc->x + (10 * 0x200), npc->y + (8 * 0x200), 7, 3); + SetCaret(npc->x + (10 * 0x200), npc->y + (8 * 0x200), CARET_EXHAUST, DIR_DOWN); if (npc->act_wait % 16 == 1) PlaySoundObject(34, SOUND_MODE_PLAY); @@ -1153,7 +1154,7 @@ void ActNpc237(NPCHAR *npc) if (bHit) { for (i = 0; i < 5; ++i) - SetCaret(npc->x, npc->y, 1, 0); + SetCaret(npc->x, npc->y, CARET_BUBBLE, DIR_LEFT); PlaySoundObject(21, SOUND_MODE_PLAY); npc->cond = 0; diff --git a/src/NpcAct240.cpp b/src/NpcAct240.cpp index 747eeb2b..c4eb698b 100644 --- a/src/NpcAct240.cpp +++ b/src/NpcAct240.cpp @@ -5,6 +5,7 @@ #include "WindowsWrapper.h" #include "Caret.h" +#include "CommonDefines.h" #include "Frame.h" #include "Game.h" #include "Map.h" @@ -338,7 +339,7 @@ void ActNpc244(NPCHAR *npc) if (bHit) { for (i = 0; i < 3; ++i) - SetCaret(npc->x, npc->y + (4 * 0x200), 1, 2); + SetCaret(npc->x, npc->y + (4 * 0x200), CARET_BUBBLE, DIR_RIGHT); if (npc->x > gMC.x - (256 * 0x200) && npc->x < gMC.x + (256 * 0x200) && npc->y > gMC.y - (160 * 0x200) && npc->y < gMC.y + (160 * 0x200)) PlaySoundObject(21, SOUND_MODE_PLAY); @@ -831,7 +832,7 @@ void ActNpc248(NPCHAR *npc) if (npc->flag & 0xFF) { npc->cond = 0; - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); } npc->y += npc->ym; @@ -856,7 +857,7 @@ void ActNpc248(NPCHAR *npc) if (++npc->count1 > 300) { npc->cond = 0; - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); } } diff --git a/src/NpcAct260.cpp b/src/NpcAct260.cpp index f88d6af2..f58b5c3b 100644 --- a/src/NpcAct260.cpp +++ b/src/NpcAct260.cpp @@ -5,6 +5,7 @@ #include "WindowsWrapper.h" #include "Caret.h" +#include "CommonDefines.h" #include "Frame.h" #include "Game.h" #include "Map.h" @@ -1527,15 +1528,15 @@ void ActNpc271(NPCHAR *npc) if (npc->ym < 0 && npc->y - npc->hit.top < 8 * 0x200) { npc->ym *= -1; - SetCaret(npc->x, npc->y - (8 * 0x200), 13, 0); - SetCaret(npc->x, npc->y - (8 * 0x200), 13, 0); + SetCaret(npc->x, npc->y - (8 * 0x200), CARET_TINY_PARTICLES, DIR_LEFT); + SetCaret(npc->x, npc->y - (8 * 0x200), CARET_TINY_PARTICLES, DIR_LEFT); } if (npc->ym > 0 && npc->y + npc->hit.bottom > 232 * 0x200) { npc->ym *= -1; - SetCaret(npc->x, npc->y + (8 * 0x200), 13, 0); - SetCaret(npc->x, npc->y + (8 * 0x200), 13, 0); + SetCaret(npc->x, npc->y + (8 * 0x200), CARET_TINY_PARTICLES, DIR_LEFT); + SetCaret(npc->x, npc->y + (8 * 0x200), CARET_TINY_PARTICLES, DIR_LEFT); } npc->x += npc->xm; diff --git a/src/NpcAct300.cpp b/src/NpcAct300.cpp index 86898d4d..8bbe1e8d 100644 --- a/src/NpcAct300.cpp +++ b/src/NpcAct300.cpp @@ -7,6 +7,7 @@ #include "Boss.h" #include "Bullet.h" #include "Caret.h" +#include "CommonDefines.h" #include "Frame.h" #include "Game.h" #include "Map.h" @@ -27,7 +28,7 @@ void ActNpc300(NPCHAR *npc) } if (++npc->ani_wait % 8 == 1) - SetCaret(npc->x + (Random(-8, 8) * 0x200), npc->y + (8 * 0x200), 13, 1); + SetCaret(npc->x + (Random(-8, 8) * 0x200), npc->y + (8 * 0x200), CARET_TINY_PARTICLES, DIR_UP); npc->rect = rc; } @@ -89,7 +90,7 @@ void ActNpc301(NPCHAR *npc) if (++npc->ani_wait > 2) { npc->ani_wait = 0; - SetCaret(npc->x, npc->y, 7, 4); + SetCaret(npc->x, npc->y, CARET_EXHAUST, DIR_AUTO); } npc->ani_no = (npc->count1 + 0x10) / 0x20; diff --git a/src/NpcAct320.cpp b/src/NpcAct320.cpp index 68fd5bbc..029cfb94 100644 --- a/src/NpcAct320.cpp +++ b/src/NpcAct320.cpp @@ -6,6 +6,7 @@ #include "Bullet.h" #include "Caret.h" +#include "CommonDefines.h" #include "Frame.h" #include "Game.h" #include "KeyControl.h" @@ -167,7 +168,7 @@ void ActNpc321(NPCHAR *npc) if (g_GameFlags & 2 && CountBulletNum(43) < 2 && gKeyTrg & gKeyShot) { SetBullet(43, npc->pNpc->x, npc->pNpc->y, direct); - SetCaret(npc->pNpc->x, npc->pNpc->y, 3, 0); + SetCaret(npc->pNpc->x, npc->pNpc->y, CARET_SHOOT, DIR_LEFT); PlaySoundObject(117, SOUND_MODE_PLAY); } @@ -767,7 +768,7 @@ void ActNpc331(NPCHAR *npc) if (npc->flag & 8) { npc->cond = 0; - SetCaret(npc->x, npc->y, 2, 0); + SetCaret(npc->x, npc->y, CARET_PROJECTILE_DISSIPATION, DIR_LEFT); } break; diff --git a/src/NpcAct340.cpp b/src/NpcAct340.cpp index 6666effc..6fbd8800 100644 --- a/src/NpcAct340.cpp +++ b/src/NpcAct340.cpp @@ -1917,7 +1917,7 @@ void ActNpc357(NPCHAR *npc) } if (npc->act_wait % 8 == 1) - SetCaret(npc->x + (Random(-8, 8) * 0x200), npc->y + 0x1000, 13, 1); + SetCaret(npc->x + (Random(-8, 8) * 0x200), npc->y + 0x1000, CARET_TINY_PARTICLES, DIR_UP); } // Misery (stood in the wind during the credits) diff --git a/src/NpcHit.cpp b/src/NpcHit.cpp index 1ec75c15..a08f82d6 100644 --- a/src/NpcHit.cpp +++ b/src/NpcHit.cpp @@ -5,6 +5,7 @@ #include "Back.h" #include "Bullet.h" #include "Caret.h" +#include "CommonDefines.h" #include "Flags.h" #include "Game.h" #include "Map.h" @@ -591,9 +592,9 @@ void HitNpCharBullet(void) { if (gNPC[n].shock < 14) { - SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, 11, 0); - SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, 11, 0); - SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, 11, 0); + SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, CARET_HURT_PARTICLES, DIR_LEFT); + SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, CARET_HURT_PARTICLES, DIR_LEFT); + SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, CARET_HURT_PARTICLES, DIR_LEFT); PlaySoundObject(gNPC[n].hit_voice, SOUND_MODE_PLAY); gNPC[n].shock = 16; } @@ -614,7 +615,7 @@ void HitNpCharBullet(void) else if (!(gBul[b].bbits & 0x10)) { // Hit invulnerable NPC - SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, 2, 2); + SetCaret((gBul[b].x + gNPC[n].x) / 2, (gBul[b].y + gNPC[n].y) / 2, CARET_PROJECTILE_DISSIPATION, DIR_RIGHT); PlaySoundObject(31, SOUND_MODE_PLAY); gBul[b].life = 0; continue; diff --git a/src/Shoot.cpp b/src/Shoot.cpp index 6ebcfac5..a9701e42 100644 --- a/src/Shoot.cpp +++ b/src/Shoot.cpp @@ -5,6 +5,7 @@ #include "ArmsItem.h" #include "Bullet.h" #include "Caret.h" +#include "CommonDefines.h" #include "KeyControl.h" #include "MyChar.h" #include "MycParam.h" @@ -47,12 +48,12 @@ void ShootBullet_Frontia1(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y - (10 * 0x200), 1); - SetCaret(gMC.x - (3 * 0x200), gMC.y - (10 * 0x200), 3, 0); + SetCaret(gMC.x - (3 * 0x200), gMC.y - (10 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y - (10 * 0x200), 1); - SetCaret(gMC.x + (3 * 0x200), gMC.y - (10 * 0x200), 3, 0); + SetCaret(gMC.x + (3 * 0x200), gMC.y - (10 * 0x200), CARET_SHOOT, DIR_LEFT); } } else if (gMC.down) @@ -60,12 +61,12 @@ void ShootBullet_Frontia1(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y + (10 * 0x200), 3); - SetCaret(gMC.x - (3 * 0x200), gMC.y + (10 * 0x200), 3, 0); + SetCaret(gMC.x - (3 * 0x200), gMC.y + (10 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y + (10 * 0x200), 3); - SetCaret(gMC.x + (3 * 0x200), gMC.y + (10 * 0x200), 3, 0); + SetCaret(gMC.x + (3 * 0x200), gMC.y + (10 * 0x200), CARET_SHOOT, DIR_LEFT); } } else @@ -73,12 +74,12 @@ void ShootBullet_Frontia1(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (2 * 0x200), 0); - SetCaret(gMC.x - (12 * 0x200), gMC.y + (2 * 0x200), 3, 0); + SetCaret(gMC.x - (12 * 0x200), gMC.y + (2 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (2 * 0x200), 2); - SetCaret(gMC.x + (12 * 0x200), gMC.y + (2 * 0x200), 3, 0); + SetCaret(gMC.x + (12 * 0x200), gMC.y + (2 * 0x200), CARET_SHOOT, DIR_LEFT); } } @@ -122,12 +123,12 @@ void ShootBullet_PoleStar(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 1); - SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 3, 0); + SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 1); - SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 3, 0); + SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT); } } else if (gMC.down) @@ -135,12 +136,12 @@ void ShootBullet_PoleStar(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3); - SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3, 0); + SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3); - SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3, 0); + SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT); } } else @@ -148,12 +149,12 @@ void ShootBullet_PoleStar(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (3 * 0x200), 0); - SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 3, 0); + SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (3 * 0x200), 2); - SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 3, 0); + SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT); } } @@ -206,12 +207,12 @@ void ShootBullet_FireBall(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (4 * 0x200), gMC.y - (8 * 0x200), 1); - SetCaret(gMC.x - (4 * 0x200), gMC.y - (8 * 0x200), 3, 0); + SetCaret(gMC.x - (4 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (4 * 0x200), gMC.y - (8 * 0x200), 1); - SetCaret(gMC.x + (4 * 0x200), gMC.y - (8 * 0x200), 3, 0); + SetCaret(gMC.x + (4 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT); } } else if (gMC.down) @@ -219,12 +220,12 @@ void ShootBullet_FireBall(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (4 * 0x200), gMC.y + (8 * 0x200), 3); - SetCaret(gMC.x - (4 * 0x200), gMC.y + (8 * 0x200), 3, 0); + SetCaret(gMC.x - (4 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (4 * 0x200), gMC.y + (8 * 0x200), 3); - SetCaret(gMC.x + (4 * 0x200), gMC.y + (8 * 0x200), 3, 0); + SetCaret(gMC.x + (4 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT); } } else @@ -232,12 +233,12 @@ void ShootBullet_FireBall(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (2 * 0x200), 0); - SetCaret(gMC.x - (12 * 0x200), gMC.y + (2 * 0x200), 3, 0); + SetCaret(gMC.x - (12 * 0x200), gMC.y + (2 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (2 * 0x200), 2); - SetCaret(gMC.x + (12 * 0x200), gMC.y + (2 * 0x200), 3, 0); + SetCaret(gMC.x + (12 * 0x200), gMC.y + (2 * 0x200), CARET_SHOOT, DIR_LEFT); } } @@ -285,7 +286,7 @@ void ShootBullet_Machinegun1(int level) if (empty == 0) { - SetCaret(gMC.x, gMC.y, 16, 0); + SetCaret(gMC.x, gMC.y, CARET_EMPTY, DIR_LEFT); empty = 50; } @@ -300,12 +301,12 @@ void ShootBullet_Machinegun1(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y - (8 * 0x200), 1); - SetCaret(gMC.x - (3 * 0x200), gMC.y - (8 * 0x200), 3, 0); + SetCaret(gMC.x - (3 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y - (8 * 0x200), 1); - SetCaret(gMC.x + (3 * 0x200), gMC.y - (8 * 0x200), 3, 0); + SetCaret(gMC.x + (3 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT); } } else if (gMC.down) @@ -326,12 +327,12 @@ void ShootBullet_Machinegun1(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y + (8 * 0x200), 3); - SetCaret(gMC.x - (3 * 0x200), gMC.y + (8 * 0x200), 3, 0); + SetCaret(gMC.x - (3 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y + (8 * 0x200), 3); - SetCaret(gMC.x + (3 * 0x200), gMC.y + (8 * 0x200), 3, 0); + SetCaret(gMC.x + (3 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT); } } else @@ -339,12 +340,12 @@ void ShootBullet_Machinegun1(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 0); - SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 3, 0); + SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 2); - SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 3, 0); + SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT); } } @@ -486,7 +487,7 @@ void ShootBullet_Missile(int level, BOOL bSuper) if (empty == 0) { - SetCaret(gMC.x, gMC.y, 16, 0); + SetCaret(gMC.x, gMC.y, CARET_EMPTY, DIR_LEFT); empty = 50; } @@ -498,12 +499,12 @@ void ShootBullet_Missile(int level, BOOL bSuper) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 1); - SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 3, 0); + SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 1); - SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 3, 0); + SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT); } } else if (gMC.down) @@ -511,12 +512,12 @@ void ShootBullet_Missile(int level, BOOL bSuper) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3); - SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3, 0); + SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3); - SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3, 0); + SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT); } } else @@ -524,12 +525,12 @@ void ShootBullet_Missile(int level, BOOL bSuper) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y, 0); - SetCaret(gMC.x - (12 * 0x200), gMC.y, 3, 0); + SetCaret(gMC.x - (12 * 0x200), gMC.y, CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y, 2); - SetCaret(gMC.x + (12 * 0x200), gMC.y, 3, 0); + SetCaret(gMC.x + (12 * 0x200), gMC.y, CARET_SHOOT, DIR_LEFT); } } } @@ -541,7 +542,7 @@ void ShootBullet_Missile(int level, BOOL bSuper) if (empty == 0) { - SetCaret(gMC.x, gMC.y, 16, 0); + SetCaret(gMC.x, gMC.y, CARET_EMPTY, DIR_LEFT); empty = 50; } @@ -553,14 +554,14 @@ void ShootBullet_Missile(int level, BOOL bSuper) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 1); - SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 3, 0); + SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT); SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y, 1); SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y, 1); } else { SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 1); - SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 3, 0); + SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT); SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y, 1); SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y, 1); } @@ -570,14 +571,14 @@ void ShootBullet_Missile(int level, BOOL bSuper) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3); - SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3, 0); + SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT); SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y, 3); SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y, 3); } else { SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3); - SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3, 0); + SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT); SetBullet(bul_no, gMC.x - (3 * 0x200), gMC.y, 3); SetBullet(bul_no, gMC.x + (3 * 0x200), gMC.y, 3); } @@ -587,14 +588,14 @@ void ShootBullet_Missile(int level, BOOL bSuper) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (1 * 0x200), 0); - SetCaret(gMC.x - (12 * 0x200), gMC.y + (1 * 0x200), 3, 0); + SetCaret(gMC.x - (12 * 0x200), gMC.y + (1 * 0x200), CARET_SHOOT, DIR_LEFT); SetBullet(bul_no, gMC.x, gMC.y - (8 * 0x200), 0); SetBullet(bul_no, gMC.x + (4 * 0x200), gMC.y - (1 * 0x200), 0); } else { SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (1 * 0x200), 2); - SetCaret(gMC.x + (12 * 0x200), gMC.y + (1 * 0x200), 3, 0); + SetCaret(gMC.x + (12 * 0x200), gMC.y + (1 * 0x200), CARET_SHOOT, DIR_LEFT); SetBullet(bul_no, gMC.x, gMC.y - (8 * 0x200), 2); SetBullet(bul_no, gMC.x - (4 * 0x200), gMC.y - (1 * 0x200), 2); } @@ -620,7 +621,7 @@ void ShootBullet_Bubblin1(void) if (empty == 0) { - SetCaret(gMC.x, gMC.y, 16, 0); + SetCaret(gMC.x, gMC.y, CARET_EMPTY, DIR_LEFT); empty = 50; } @@ -632,12 +633,12 @@ void ShootBullet_Bubblin1(void) if (gMC.direct == 0) { SetBullet(19, gMC.x - (1 * 0x200), gMC.y - (2 * 0x200), 1); - SetCaret(gMC.x - (1 * 0x200), gMC.y - (2 * 0x200), 3, 0); + SetCaret(gMC.x - (1 * 0x200), gMC.y - (2 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(19, gMC.x + (1 * 0x200), gMC.y - (2 * 0x200), 1); - SetCaret(gMC.x + (1 * 0x200), gMC.y - (2 * 0x200), 3, 0); + SetCaret(gMC.x + (1 * 0x200), gMC.y - (2 * 0x200), CARET_SHOOT, DIR_LEFT); } } else if (gMC.down) @@ -645,12 +646,12 @@ void ShootBullet_Bubblin1(void) if (gMC.direct == 0) { SetBullet(19, gMC.x - (1 * 0x200), gMC.y + (2 * 0x200), 3); - SetCaret(gMC.x - (1 * 0x200), gMC.y + (2 * 0x200), 3, 0); + SetCaret(gMC.x - (1 * 0x200), gMC.y + (2 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(19, gMC.x + (1 * 0x200), gMC.y + (2 * 0x200), 3); - SetCaret(gMC.x + (1 * 0x200), gMC.y + (2 * 0x200), 3, 0); + SetCaret(gMC.x + (1 * 0x200), gMC.y + (2 * 0x200), CARET_SHOOT, DIR_LEFT); } } else @@ -658,12 +659,12 @@ void ShootBullet_Bubblin1(void) if (gMC.direct == 0) { SetBullet(19, gMC.x - (6 * 0x200), gMC.y + (3 * 0x200), 0); - SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 3, 0); + SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(19, gMC.x + (6 * 0x200), gMC.y + (3 * 0x200), 2); - SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 3, 0); + SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT); } } @@ -701,7 +702,7 @@ void ShootBullet_Bubblin2(int level) if (empty == 0) { - SetCaret(gMC.x, gMC.y, 16, 0); + SetCaret(gMC.x, gMC.y, CARET_EMPTY, DIR_LEFT); empty = 50; } @@ -713,12 +714,12 @@ void ShootBullet_Bubblin2(int level) if (gMC.direct == 0) { SetBullet(level, gMC.x - (3 * 0x200), gMC.y - (8 * 0x200), 1); - SetCaret(gMC.x - (3 * 0x200), gMC.y - (16 * 0x200), 3, 0); + SetCaret(gMC.x - (3 * 0x200), gMC.y - (16 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(level, gMC.x + (3 * 0x200), gMC.y - (8 * 0x200), 1); - SetCaret(gMC.x + (3 * 0x200), gMC.y - (16 * 0x200), 3, 0); + SetCaret(gMC.x + (3 * 0x200), gMC.y - (16 * 0x200), CARET_SHOOT, DIR_LEFT); } } else if (gMC.down) @@ -726,12 +727,12 @@ void ShootBullet_Bubblin2(int level) if (gMC.direct == 0) { SetBullet(level, gMC.x - (3 * 0x200), gMC.y + (8 * 0x200), 3); - SetCaret(gMC.x - (3 * 0x200), gMC.y + (16 * 0x200), 3, 0); + SetCaret(gMC.x - (3 * 0x200), gMC.y + (16 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(level, gMC.x + (3 * 0x200), gMC.y + (8 * 0x200), 3); - SetCaret(gMC.x + (3 * 0x200), gMC.y + (16 * 0x200), 3, 0); + SetCaret(gMC.x + (3 * 0x200), gMC.y + (16 * 0x200), CARET_SHOOT, DIR_LEFT); } } else @@ -739,12 +740,12 @@ void ShootBullet_Bubblin2(int level) if (gMC.direct == 0) { SetBullet(level, gMC.x - (6 * 0x200), gMC.y + (3 * 0x200), 0); - SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 3, 0); + SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(level, gMC.x + (6 * 0x200), gMC.y + (3 * 0x200), 2); - SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 3, 0); + SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT); } } @@ -842,12 +843,12 @@ void ShootBullet_Nemesis(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (12 * 0x200), 1); - SetCaret(gMC.x - (1 * 0x200), gMC.y - (12 * 0x200), 3, 0); + SetCaret(gMC.x - (1 * 0x200), gMC.y - (12 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (12 * 0x200), 1); - SetCaret(gMC.x + (1 * 0x200), gMC.y - (12 * 0x200), 3, 0); + SetCaret(gMC.x + (1 * 0x200), gMC.y - (12 * 0x200), CARET_SHOOT, DIR_LEFT); } } else if (gMC.down) @@ -855,12 +856,12 @@ void ShootBullet_Nemesis(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (12 * 0x200), 3); - SetCaret(gMC.x - (1 * 0x200), gMC.y + (12 * 0x200), 3, 0); + SetCaret(gMC.x - (1 * 0x200), gMC.y + (12 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (12 * 0x200), 3); - SetCaret(gMC.x + (1 * 0x200), gMC.y + (12 * 0x200), 3, 0); + SetCaret(gMC.x + (1 * 0x200), gMC.y + (12 * 0x200), CARET_SHOOT, DIR_LEFT); } } else @@ -868,12 +869,12 @@ void ShootBullet_Nemesis(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (22 * 0x200), gMC.y + (3 * 0x200), 0); - SetCaret(gMC.x - (16 * 0x200), gMC.y + (3 * 0x200), 3, 0); + SetCaret(gMC.x - (16 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (22 * 0x200), gMC.y + (3 * 0x200), 2); - SetCaret(gMC.x + (16 * 0x200), gMC.y + (3 * 0x200), 3, 0); + SetCaret(gMC.x + (16 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT); } } @@ -1000,12 +1001,12 @@ void ShootBullet_Spur(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 1); - SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), 3, 0); + SetCaret(gMC.x - (1 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 1); - SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), 3, 0); + SetCaret(gMC.x + (1 * 0x200), gMC.y - (8 * 0x200), CARET_SHOOT, DIR_LEFT); } } else if (gMC.down) @@ -1013,12 +1014,12 @@ void ShootBullet_Spur(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3); - SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), 3, 0); + SetCaret(gMC.x - (1 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3); - SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), 3, 0); + SetCaret(gMC.x + (1 * 0x200), gMC.y + (8 * 0x200), CARET_SHOOT, DIR_LEFT); } } else @@ -1026,12 +1027,12 @@ void ShootBullet_Spur(int level) if (gMC.direct == 0) { SetBullet(bul_no, gMC.x - (6 * 0x200), gMC.y + (3 * 0x200), 0); - SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), 3, 0); + SetCaret(gMC.x - (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT); } else { SetBullet(bul_no, gMC.x + (6 * 0x200), gMC.y + (3 * 0x200), 2); - SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), 3, 0); + SetCaret(gMC.x + (12 * 0x200), gMC.y + (3 * 0x200), CARET_SHOOT, DIR_LEFT); } }