Alphabetized macros in BossFrog and re-ordered some stuff to go along with Clownacy's coding standards

Also changed NPC_NULL_DELETES_ITSELF to NPC_DAMAGE_TEXT_HOLDER as Fayti pointed out the misnomer

Note to self : Make a PR with coding standards

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
Gabriel Ravier 2019-09-13 20:35:37 +02:00
parent aeb1e292b7
commit e2c57e6dbc
No known key found for this signature in database
GPG key ID: 1E75F156884F3DCE
4 changed files with 41 additions and 41 deletions

View file

@ -11,6 +11,19 @@
#include "Sound.h" #include "Sound.h"
#include "Triangle.h" #include "Triangle.h"
enum BalfrogAnims
{
BALFANI_NOTHING = 0,
BALFANI_STANDING_STILL = 1,
BALFANI_MOUTH_BARELY_OPEN_CROUCHING = 2,
BALFANI_MOUTH_OPEN_CROUCHING = 3,
BALFANI_MOUTH_OPEN_CROUCHING_FLASHING = 4,
BALFANI_JUMPING = 5,
BALFANI_BALROG_WHITE = 6,
BALFANI_BALROG_CROUCHING = 7,
BALFANI_BALROG_JUMPING = 8
};
enum BalfrogStates enum BalfrogStates
{ {
BALFROG_INITIALIZE = 0, BALFROG_INITIALIZE = 0,
@ -41,19 +54,6 @@ enum BalfrogStates
BALFROG_GONE_INTO_CEILING = 143 BALFROG_GONE_INTO_CEILING = 143
}; };
enum BalfrogAnims
{
BALFANI_NOTHING = 0,
BALFANI_STANDING_STILL = 1,
BALFANI_MOUTH_BARELY_OPEN_CROUCHING = 2,
BALFANI_MOUTH_OPEN_CROUCHING = 3,
BALFANI_MOUTH_OPEN_CROUCHING_FLASHING = 4,
BALFANI_JUMPING = 5,
BALFANI_BALROG_WHITE = 6,
BALFANI_BALROG_CROUCHING = 7,
BALFANI_BALROG_JUMPING = 8
};
// Balfrog's mouth // Balfrog's mouth
static void ActBossChar02_01(void) static void ActBossChar02_01(void)
{ {

View file

@ -3,14 +3,14 @@
#define WINDOW_WIDTH 320 #define WINDOW_WIDTH 320
#define WINDOW_HEIGHT 240 #define WINDOW_HEIGHT 240
enum Direction #define TILES_TO_UNITS(x) ((x) * 0x2000)
{ #define UNITS_TO_TILES(x) ((x) / 0x2000)
DIR_LEFT = 0, #define TILES_TO_PIXELS(x) ((x) * 0x10)
DIR_UP = 1, #define PIXELS_TO_TILES(x) ((x) / 0x10)
DIR_RIGHT = 2, #define PIXELS_TO_UNITS(x) ((x) * 0x200)
DIR_DOWN = 3, #define UNITS_TO_PIXELS(x) ((x) / 0x200)
DIR_AUTO = 4 #define SECONDS_TO_FRAMES(x) ((x) * 50)
}; #define FRAMES_TO_SECONDS(x) ((x) / 50)
enum Collisions enum Collisions
{ {
@ -21,11 +21,11 @@ enum Collisions
// To be continued // To be continued
}; };
#define TILES_TO_UNITS(x) ((x) * 0x2000) enum Direction
#define UNITS_TO_TILES(x) ((x) / 0x2000) {
#define TILES_TO_PIXELS(x) ((x) * 0x10) DIR_LEFT = 0,
#define PIXELS_TO_TILES(x) ((x) / 0x10) DIR_UP = 1,
#define PIXELS_TO_UNITS(x) ((x) * 0x200) DIR_RIGHT = 2,
#define UNITS_TO_PIXELS(x) ((x) / 0x200) DIR_DOWN = 3,
#define SECONDS_TO_FRAMES(x) ((x) * 50) DIR_AUTO = 4
#define FRAMES_TO_SECONDS(x) ((x) / 50) };

View file

@ -37,7 +37,7 @@ enum NPCNames
NPC_NULL = 0, NPC_NULL = 0,
NPC_EXP = 1, NPC_EXP = 1,
NPC_ENEMY_BEHEMOTH = 2, NPC_ENEMY_BEHEMOTH = 2,
NPC_NULL_DELETES_ITSELF = 3, NPC_DAMAGE_TEXT_HOLDER = 3,
NPC_SMOKE = 4, NPC_SMOKE = 4,
// To be continued // To be continued
NPC_ENEMY_FROG = 104, NPC_ENEMY_FROG = 104,

View file

@ -13,17 +13,6 @@
#define SE_MAX 160 // According to the Organya source code release, this is the real name for this constant #define SE_MAX 160 // According to the Organya source code release, this is the real name for this constant
extern LPDIRECTSOUND lpDS;
extern LPDIRECTSOUNDBUFFER lpSECONDARYBUFFER[SE_MAX];
BOOL InitDirectSound(HWND hwnd);
void EndDirectSound(void);
void PlaySoundObject(int no, int mode);
void ChangeSoundFrequency(int no, unsigned long rate);
void ChangeSoundVolume(int no, long volume);
void ChangeSoundPan(int no, long pan);
int MakePixToneObject(const PIXTONEPARAMETER *ptp, int ptp_num, int no);
enum SoundEffectNames enum SoundEffectNames
{ {
// To be continued // To be continued
@ -37,3 +26,14 @@ enum SoundEffectNames
SND_EXPLOSION = 72, SND_EXPLOSION = 72,
// To be continued // To be continued
}; };
extern LPDIRECTSOUND lpDS;
extern LPDIRECTSOUNDBUFFER lpSECONDARYBUFFER[SE_MAX];
BOOL InitDirectSound(HWND hwnd);
void EndDirectSound(void);
void PlaySoundObject(int no, int mode);
void ChangeSoundFrequency(int no, unsigned long rate);
void ChangeSoundVolume(int no, long volume);
void ChangeSoundPan(int no, long pan);
int MakePixToneObject(const PIXTONEPARAMETER *ptp, int ptp_num, int no);