Skip to content

Commit

Permalink
Boss Slow Constants
Browse files Browse the repository at this point in the history
Modify noslow to be a bit more readable, and added constant flags.

* BOSS_SLOW_OFF
* BOSS_SLOW_ON
  • Loading branch information
DCurrent committed May 4, 2017
1 parent ff7ad7a commit 3702489
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
10 changes: 8 additions & 2 deletions engine/openbor.h
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,12 @@ typedef enum
ANI_PROP_WEAPONFRAME // SUB Specify with a frame when to switch to a weapon model
} e_animation_properties;

typedef enum
{
BOSS_SLOW_OFF,
BOSS_SLOW_ON
} e_boss_slow_flag;

typedef enum
{
LEVEL_PROP_AUTO_SCROLL_DIRECTION, // int bgdir;
Expand All @@ -607,7 +613,7 @@ typedef enum
LEVEL_PROP_BOSS_COUNT, // int bosses;
LEVEL_PROP_BOSS_MUSIC_NAME, // char bossmusic[256];
LEVEL_PROP_BOSS_MUSIC_OFFSET, // unsigned bossmusic_offset;
LEVEL_PROP_BOSS_SLOW, // int noslow;
LEVEL_PROP_BOSS_SLOW, // int boss_slow;
LEVEL_PROP_CAMERA_OFFSET_X, // int cameraxoffset;
LEVEL_PROP_CAMERA_OFFSET_Z, // int camerazoffset;
LEVEL_PROP_COMPLETE_FORCE, // int forcefinishlevel;
Expand Down Expand Up @@ -2482,7 +2488,7 @@ typedef struct
int type; // Used to specify which level type (1 = bonus, else regular)
int nospecial; // Used to specify if you can use your special during bonus levels
int nohurt; // Used to specify if you can hurt the other player during bonus levels
int noslow; // Flag so the level doesn't slow down after a boss is defeated
int boss_slow; // Flag so the level doesn't slow down after a boss is defeated
int nohit; // Not able to grab / hit other player on a per level basis
int forcefinishlevel; // flag to forca to finish a level
s_axis_f *spawn; // Used to determine the spawn position of players
Expand Down
4 changes: 4 additions & 0 deletions engine/source/scriptlib/constant.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ int mapstrings_transconst(ScriptVariant **varlist, int paramCount)
ICMPCONST(FLAG_FORWARD)
ICMPCONST(FLAG_BACKWARD)

// Boss no slow flags.
ICMPCONST(BOSS_SLOW_OFF)
ICMPCONST(BOSS_SLOW_ON)

// Level Properties.
ICMPCONST(LEVEL_PROP_AUTO_SCROLL_DIRECTION)
ICMPCONST(LEVEL_PROP_AUTO_SCROLL_X)
Expand Down
4 changes: 2 additions & 2 deletions engine/source/scriptlib/level.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ HRESULT openbor_get_level_property(ScriptVariant **varlist, ScriptVariant **pret
case LEVEL_PROP_BOSS_SLOW:

ScriptVariant_ChangeType(*pretvar, VT_INTEGER);
(*pretvar)->lVal = (LONG)handle->noslow;
(*pretvar)->lVal = (LONG)handle->boss_slow;
break;

case LEVEL_PROP_CAMERA_OFFSET_X:
Expand Down Expand Up @@ -1023,7 +1023,7 @@ HRESULT openbor_set_level_property(ScriptVariant **varlist, ScriptVariant **pret
goto error_local;
}

handle->noslow = temp_int;
handle->boss_slow = temp_int;
break;

case LEVEL_PROP_CAMERA_OFFSET_X:
Expand Down

0 comments on commit 3702489

Please sign in to comment.