From 370248916bf0713b7d9d7aa86d0f0a2346505969 Mon Sep 17 00:00:00 2001 From: "Damon V. Caskey" Date: Thu, 4 May 2017 13:07:11 -0400 Subject: [PATCH] Boss Slow Constants Modify noslow to be a bit more readable, and added constant flags. * BOSS_SLOW_OFF * BOSS_SLOW_ON --- engine/openbor.h | 10 ++++++++-- engine/source/scriptlib/constant.c | 4 ++++ engine/source/scriptlib/level.c | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/engine/openbor.h b/engine/openbor.h index d0217aed6..57a5af2f7 100644 --- a/engine/openbor.h +++ b/engine/openbor.h @@ -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; @@ -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; @@ -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 diff --git a/engine/source/scriptlib/constant.c b/engine/source/scriptlib/constant.c index 1d3dd153f..3804e18da 100644 --- a/engine/source/scriptlib/constant.c +++ b/engine/source/scriptlib/constant.c @@ -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) diff --git a/engine/source/scriptlib/level.c b/engine/source/scriptlib/level.c index de5fe3080..5302bf3fe 100644 --- a/engine/source/scriptlib/level.c +++ b/engine/source/scriptlib/level.c @@ -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: @@ -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: