diff --git a/2dlib/gr.h b/2dlib/gr.h index 76f89baf2..63e868f78 100644 --- a/2dlib/gr.h +++ b/2dlib/gr.h @@ -352,7 +352,7 @@ class grSurface { // this is a software bitmap not video driver dependant // ---------------------------------------------------------------------------- -class grMemorySurface : public grSurface { +class grMemorySurface final : public grSurface { bool m_FirstTimeInit; // do special stuff if we are initializing for first time bool m_AllowInit; // we only allow initialization if we didn't create it. @@ -375,11 +375,11 @@ class grMemorySurface : public grSurface { // this is a hardware bitmap allocated from the video driver // ---------------------------------------------------------------------------- -class grHardwareSurface : public grSurface { +class grHardwareSurface final : public grSurface { public: - grHardwareSurface(); + grHardwareSurface() = default; grHardwareSurface(int w, int h, int bpp, unsigned flags = 0, const char *name = NULL); - virtual ~grHardwareSurface(); + virtual ~grHardwareSurface() = default; bool create(int w, int h, int bpp, unsigned flags = 0, const char *name = NULL); }; @@ -390,12 +390,12 @@ class grHardwareSurface : public grSurface { // is used by the grViewport class to draw onto the screen // ---------------------------------------------------------------------------- -class grScreen : public grSurface { +class grScreen final : public grSurface { friend class grViewport; public: grScreen(int w, int h, int bpp, const char *name = NULL); - virtual ~grScreen(); + virtual ~grScreen() = default; void flip(); }; diff --git a/2dlib/hardsurf.cpp b/2dlib/hardsurf.cpp index 16f4aeaae..f93d8f1ff 100644 --- a/2dlib/hardsurf.cpp +++ b/2dlib/hardsurf.cpp @@ -42,13 +42,9 @@ // constructor and destructor // ---------------------------------------------------------------------------- -grHardwareSurface::grHardwareSurface() : grSurface() {} - grHardwareSurface::grHardwareSurface(int w, int h, int bpp, unsigned flags, const char *name) : grSurface(w, h, bpp, SURFTYPE_GENERIC, flags, name) {} -grHardwareSurface::~grHardwareSurface() {} - // ---------------------------------------------------------------------------- // initialize a hardware surface with these values // ---------------------------------------------------------------------------- diff --git a/2dlib/memsurf.cpp b/2dlib/memsurf.cpp index cab2d97de..e27063e43 100644 --- a/2dlib/memsurf.cpp +++ b/2dlib/memsurf.cpp @@ -140,8 +140,6 @@ bool grMemorySurface::init(int w, int h, int bpp, char *data, int rowsize, unsig // internal functions // --------------------------------------------------------------------------- -static mem_bitmap grMemSurf_object; - bool gr_bm_mem_Blt16(ddgr_surface *dsf, int dx, int dy, ddgr_surface *ssf, int sx, int sy, int sw, int sh); bool gr_bm_mem_Blt16ck(ddgr_surface *dsf, int dx, int dy, ddgr_surface *ssf, int sx, int sy, int sw, int sh); diff --git a/2dlib/pentext.cpp b/2dlib/pentext.cpp index 6d93fbc90..5c64ecb0c 100644 --- a/2dlib/pentext.cpp +++ b/2dlib/pentext.cpp @@ -96,7 +96,6 @@ #define STR_BUF_SIZE 512 static char Str_buf[STR_BUF_SIZE]; // String buffer for variable arguments -static char Draw_str_buf[STR_BUF_SIZE]; // used to buffer words in a string // --------------------------------------------------------------------------- // Viewport font and text funcitons diff --git a/2dlib/screen.cpp b/2dlib/screen.cpp index 279505c1b..82a40f060 100644 --- a/2dlib/screen.cpp +++ b/2dlib/screen.cpp @@ -56,8 +56,6 @@ grScreen::grScreen(int w, int h, int bpp, const char *name) : grSurface(w, h, bpp, SURFTYPE_VIDEOSCREEN, SURFFLAG_BACKBUFFER, name) {} -grScreen::~grScreen() {} - // --------------------------------------------------------------------------- // screen refresh routines // --------------------------------------------------------------------------- diff --git a/AudioEncode/adecode.cpp b/AudioEncode/adecode.cpp index 478ee147b..8b6dc7474 100644 --- a/AudioEncode/adecode.cpp +++ b/AudioEncode/adecode.cpp @@ -23,7 +23,7 @@ using namespace AudioDecoder; namespace { -class InternalAudioDecoder : public IAudioDecoder { +class InternalAudioDecoder final : public IAudioDecoder { public: InternalAudioDecoder(ReadDataFunction readerFunction, void *pReaderData); ~InternalAudioDecoder(); diff --git a/AudioEncode/adecode.h b/AudioEncode/adecode.h index 0b858cc25..2ffd31072 100644 --- a/AudioEncode/adecode.h +++ b/AudioEncode/adecode.h @@ -25,7 +25,7 @@ namespace AudioDecoder { class IAudioDecoder { public: - virtual ~IAudioDecoder() {} + virtual ~IAudioDecoder() = default; // Read data from the audio decoder. // pBuffer: The buffer to receive the data from diff --git a/Descent3/AIGoal.cpp b/Descent3/AIGoal.cpp index 22858d65a..d425e6262 100644 --- a/Descent3/AIGoal.cpp +++ b/Descent3/AIGoal.cpp @@ -868,7 +868,6 @@ void GoalClearAll(object *obj) { int GoalAllocSlot(object *obj, int level, float influence) { float lowest_influence_slot = -1.0; float lowest_influence = MAX_INFLUENCE + 1.0; - int alloc_slot = AI_INVALID_INDEX; ai_frame *ai_info = obj->ai_info; int cur_slot; @@ -1421,8 +1420,6 @@ bool GoalIsGoalEnabled(object *obj, int goal_index) { if (cur_goal->flags & GF_OBJ_IS_TARGET) { gobj = ObjGet(obj->ai_info->target_handle); } else if (cur_goal->flags & (GF_OBJS_ARE_SPECIES | GF_OBJS_ARE_ENEMIES | GF_OBJS_ARE_FRIENDS)) { - bool done = false; - if (cur_goal->flags & (GF_OBJS_ARE_SPECIES | GF_OBJS_ARE_FRIENDS)) { // chrishack -- not done } diff --git a/Descent3/AImain.cpp b/Descent3/AImain.cpp index ef3c18396..eaea662d2 100644 --- a/Descent3/AImain.cpp +++ b/Descent3/AImain.cpp @@ -1804,7 +1804,6 @@ bool move_relative_object_vec(object *obj, vector *vec, object *target, float ci vector from_target; vector opposite_fvec; vector goal_pos; - ai_frame *ai_info = obj->ai_info; bool f_done = false; from_target = obj->pos - target->pos; @@ -2862,8 +2861,7 @@ void AISeeTarget(object *obj, bool f_see) { // Note: Player position is also updated in the visibility test function // for MIN_VIS_RECENT_CHECK_INTERVAL seconds - object *targetptr; - object *other_obj = targetptr = ObjGet(ai_info->target_handle); + object *targetptr = ObjGet(ai_info->target_handle); if (targetptr) { if (f_see) @@ -4533,7 +4531,6 @@ void ai_move(object *obj) { bool f_dodge = false; // Are there any dodge goals bool f_avoid = false; // Are there any avoid goals int highest_influence_goal = -1; - float highest_influence = 0.0f; float highest_speed = 0.0f; bool f_turned = true; bool f_goal_found = false; @@ -4814,8 +4811,6 @@ void ai_move(object *obj) { bool f_orient = AITurnTowardsMatrix(obj, obj->ai_info->max_turn_rate, &orient); if (f_at_pos && f_orient) { - int goal_index = cur_goal - ai_info->goals; - if (cur_goal->type == AIG_PLACE_OBJ_ON_OBJ) { UnattachFromParent(child_obj); AttachObject(g_obj, c_ap, child_obj, p_ap, true); @@ -4850,8 +4845,6 @@ void ai_move(object *obj) { } if (f_at_pos) { - int goal_index = cur_goal - ai_info->goals; - AttachObject(obj, p_ap, g_obj, rad); if (cur_goal->g_info.attach_info.flags & GAF_TEMP_CLEAR_ROBOT_COLLISIONS) { diff --git a/Descent3/BOA.cpp b/Descent3/BOA.cpp index 79cb11c1b..e73028b11 100644 --- a/Descent3/BOA.cpp +++ b/Descent3/BOA.cpp @@ -1332,7 +1332,6 @@ void ValidateRoomPathPoint(int room, char *message, int len) { if (IsPathPointValid(room, &pos)) return; - bool f_found = false; // vector best_pnt; // float best_distance; diff --git a/Descent3/BriefingParse.cpp b/Descent3/BriefingParse.cpp index d356d0c06..0dfbdcd04 100644 --- a/Descent3/BriefingParse.cpp +++ b/Descent3/BriefingParse.cpp @@ -73,29 +73,6 @@ #include "pserror.h" #include "voice.h" -// constructor -CBriefParse::CBriefParse() { - AddTextEffect = NULL; - AddBmpEffect = NULL; - AddMovieEffect = NULL; - AddBkgEffect = NULL; - AddPolyEffect = NULL; - AddSoundEffect = NULL; - AddButtonEffect = NULL; - StartScreen = NULL; - EndScreen = NULL; - LoopCallback = NULL; - SetTitle = NULL; - SetStatic = NULL; - SetGlitch = NULL; - AddVoice = NULL; - linenum = 0; - parse_error = false; -} - -// destructor -CBriefParse::~CBriefParse() {} - // SetCallbacks // // Registers (or changes) the callbacks of the class @@ -298,7 +275,6 @@ static int ReadFullLine(char **data, CFILE *ifile) { // Parses the briefing file (calling the callbacks throughout), check return code int CBriefParse::ParseBriefing(const char *filename) { CFILE *ifile; - bool retvalue = false; bool voice_def_screen = false; char text_buf[8192], *text_ptr = NULL; bool abort = 0; @@ -308,7 +284,6 @@ int CBriefParse::ParseBriefing(const char *filename) { int beffect = bfxNONE; int x = 0, y = 0; char filen[40]; - bool emergency_exit = false; // the following block of 'globals' are for when parsing a text block, the information is stored // here until a $endtext is hit diff --git a/Descent3/BriefingParse.h b/Descent3/BriefingParse.h index 5eae21c1b..3e8e33603 100644 --- a/Descent3/BriefingParse.h +++ b/Descent3/BriefingParse.h @@ -85,26 +85,24 @@ struct tTextBufferDesc { class CBriefParse { public: - CBriefParse(); - ~CBriefParse(); void SetCallbacks(tBriefParseCallbacks *cb); int ParseBriefing(const char *filename); private: - void (*AddTextEffect)(TCTEXTDESC* desc, char *text, char *description, int id); - void (*AddBmpEffect)(TCBMPDESC* desc, char *description); - void (*AddMovieEffect)(TCMOVIEDESC* desc, char *description); - void (*AddBkgEffect)(TCBKGDESC* desc, char *description); - void (*AddPolyEffect)(TCPOLYDESC* desc, char *description); - void (*AddSoundEffect)(TCSNDDESC* desc, char *description); - void (*AddButtonEffect)(TCBUTTONDESC* desc, char *description, int id); - void (*StartScreen)(int screen_num, char *desc, char *layout, uint32_t mask_set, uint32_t mask_unset); - void (*EndScreen)(); - bool (*LoopCallback)(); - void (*SetTitle)(char *title); - void (*SetStatic)(float amount); - void (*SetGlitch)(float amount); - void (*AddVoice)(char *filename, int flags, char *description); + void (*AddTextEffect)(TCTEXTDESC* desc, char *text, char *description, int id) = nullptr; + void (*AddBmpEffect)(TCBMPDESC* desc, char *description) = nullptr; + void (*AddMovieEffect)(TCMOVIEDESC* desc, char *description) = nullptr; + void (*AddBkgEffect)(TCBKGDESC* desc, char *description) = nullptr; + void (*AddPolyEffect)(TCPOLYDESC* desc, char *description) = nullptr; + void (*AddSoundEffect)(TCSNDDESC* desc, char *description) = nullptr; + void (*AddButtonEffect)(TCBUTTONDESC* desc, char *description, int id) = nullptr; + void (*StartScreen)(int screen_num, char *desc, char *layout, uint32_t mask_set, uint32_t mask_unset) = nullptr; + void (*EndScreen)() = nullptr; + bool (*LoopCallback)() = nullptr; + void (*SetTitle)(char *title) = nullptr; + void (*SetStatic)(float amount) = nullptr; + void (*SetGlitch)(float amount) = nullptr; + void (*AddVoice)(char *filename, int flags, char *description) = nullptr; void ParseError(const char *msg, const char *p = NULL); const char *ParseComma(const char *p); @@ -117,8 +115,8 @@ class CBriefParse { bool ParseButtonEffect(const char *p); bool ParseTextEffect(const char *p, tTextBufferDesc *tbd); - int linenum; - bool parse_error; + int linenum = 0; + bool parse_error = false; }; #endif diff --git a/Descent3/Controls.cpp b/Descent3/Controls.cpp index d956e13e9..4011a0c84 100644 --- a/Descent3/Controls.cpp +++ b/Descent3/Controls.cpp @@ -452,9 +452,7 @@ bool Control_poll_flag = false; // determines if system is polling controls now. static bool Control_system_init = false; static float Control_interval_time = 0.0f; static float Control_current_time; -static float Control_frametime; -static float Key_pitch_ramp_time = 0.0f; -static float Key_heading_ramp_time = 0.0f; +// static float Control_frametime; static tSensitivity Key_ramp; diff --git a/Descent3/Game2DLL.cpp b/Descent3/Game2DLL.cpp index cf080a73e..959c1a121 100644 --- a/Descent3/Game2DLL.cpp +++ b/Descent3/Game2DLL.cpp @@ -592,7 +592,7 @@ bool InitGameModule(const char *name, module *mod) { // Clear out error queue mod_GetLastError(); if (!mod_LoadModule(mod, tmp_dll_name)) { - int err = mod_GetLastError(); + mod_GetLastError(); LOG_WARNING.printf("You are missing the DLL %s!", name); return false; } @@ -640,7 +640,7 @@ int LoadGameDLL(const char *name, int num_teams_to_use) { mod_GetLastError(); DLLGameInit = (DLLGameInit_fp)mod_GetSymbol(&GameDLLHandle, "DLLGameInit", 12); if (!DLLGameInit) { - int err = mod_GetLastError(); + mod_GetLastError(); LOG_FATAL << "Couldn't get a handle to the dll function DLLGameInit!"; Int3(); FreeGameDLL(); @@ -650,7 +650,7 @@ int LoadGameDLL(const char *name, int num_teams_to_use) { mod_GetLastError(); DLLGameCall = (DLLGameCall_fp)mod_GetSymbol(&GameDLLHandle, "DLLGameCall", 8); if (!DLLGameCall) { - int err = mod_GetLastError(); + mod_GetLastError(); LOG_FATAL << "Couldn't get a handle to the dll function DLLGameCall!"; Int3(); FreeGameDLL(); @@ -660,7 +660,7 @@ int LoadGameDLL(const char *name, int num_teams_to_use) { mod_GetLastError(); DLLGameClose = (DLLGameClose_fp)mod_GetSymbol(&GameDLLHandle, "DLLGameClose", 0); if (!DLLGameClose) { - int err = mod_GetLastError(); + mod_GetLastError(); LOG_FATAL << "Couldn't get a handle to the dll function DLLGameClose!"; Int3(); FreeGameDLL(); @@ -670,7 +670,7 @@ int LoadGameDLL(const char *name, int num_teams_to_use) { mod_GetLastError(); DLLGetGameInfo = (DLLGetGameInfo_fp)mod_GetSymbol(&GameDLLHandle, "DLLGetGameInfo", 4); if (!DLLGetGameInfo) { - int err = mod_GetLastError(); + mod_GetLastError(); LOG_FATAL << "Couldn't get a handle to the dll function DLLGetGameInfo!"; Int3(); FreeGameDLL(); @@ -753,7 +753,7 @@ bool GetDLLGameInfo(const char *name, tDLLOptions *options) { mod_GetLastError(); modGetGameInfo = (DLLGetGameInfo_fp)mod_GetSymbol(&mod, "DLLGetGameInfo", 4); if (!modGetGameInfo) { - int err = mod_GetLastError(); + mod_GetLastError(); LOG_FATAL << "Couldn't get a handle to the dll function DLLGetGameInfo!"; Int3(); CloseGameModule(&mod); diff --git a/Descent3/Inventory.cpp b/Descent3/Inventory.cpp index 575fa668f..4d34ff015 100644 --- a/Descent3/Inventory.cpp +++ b/Descent3/Inventory.cpp @@ -417,7 +417,7 @@ bool Inventory::AddObject(int object_handle, int flags, const char *description) ASSERT(obj->type == OBJ_BUILDING || obj->type == OBJ_ROBOT || obj->type == OBJ_POWERUP || obj->type == OBJ_CLUTTER); - inven_item *current = root, *prev = root, *newnode; + inven_item *prev = root, *newnode; if (count == 0) { // there are no items in the list...time to add @@ -531,7 +531,7 @@ bool Inventory::AddCounterMeasure(int id, int aux_type, int aux_id, int flags, c return false; } - inven_item *current = root, *prev = root, *newnode; + inven_item *prev = root, *newnode; if (count == 0) { // there are no items in the list...time to add @@ -606,7 +606,7 @@ bool Inventory::AddObjectItem(int otype, int oid, int oauxt, int oauxi, int flag if (count >= MAX_UNIQUE_INVEN_ITEMS) return false; - inven_item *current = root, *prev = root, *newnode; + inven_item *prev = root, *newnode; if (count == 0) { // there are no items in the list...time to add diff --git a/Descent3/LoadLevel.cpp b/Descent3/LoadLevel.cpp index 02ac3bdd3..4638a4118 100644 --- a/Descent3/LoadLevel.cpp +++ b/Descent3/LoadLevel.cpp @@ -3686,13 +3686,11 @@ extern bool Disable_editor_rendering; // Returns 1 if file read ok, else 0 int LoadLevel(char *filename, void (*cb_fn)(const char *, int, int)) { CFILE *ifile; - char tag[4]; int n, i, retval = 1; int version; bool f_read_AABB = false; bool no_128s = true; - int total = 0; #ifdef EDITOR Disable_editor_rendering = 1; Num_failed_xlate_items = 0; diff --git a/Descent3/Mission.cpp b/Descent3/Mission.cpp index f10a5b051..9180c0dce 100644 --- a/Descent3/Mission.cpp +++ b/Descent3/Mission.cpp @@ -1197,7 +1197,6 @@ bool LoadMission(const char *mssn) { void FreeMission() { // Free up mission script - int i; //,j; // close MN3 file if there is one. mn3_Close(); // Tell Osiris to shutdown the Osiris Mission Memory System, freeing all memory @@ -1265,7 +1264,6 @@ bool LoadMissionLevel(int level) { } // Test to see if levels are valid bool boa = true, terrain = true; - char str[255]; if (BOAGetMineChecksum() != BOA_vis_checksum) boa = false; diff --git a/Descent3/ObjInit.cpp b/Descent3/ObjInit.cpp index 813932147..2df2fdfed 100644 --- a/Descent3/ObjInit.cpp +++ b/Descent3/ObjInit.cpp @@ -1054,8 +1054,6 @@ int ObjInitFireball(object *objp) { } int ObjInitMarker(object *objp) { int ret = 1; - static int first = 1; - static int polynum = -1; ASSERT(objp->type == OBJ_MARKER); // Set size & shields objp->shields = 100; diff --git a/Descent3/OsirisLoadandBind.cpp b/Descent3/OsirisLoadandBind.cpp index f99025269..a1bd4e717 100644 --- a/Descent3/OsirisLoadandBind.cpp +++ b/Descent3/OsirisLoadandBind.cpp @@ -2683,7 +2683,7 @@ bool Osiris_RestoreSystemState(CFILE *file) { return false; } - uint8_t version = (uint8_t)cf_ReadByte(file); + /* uint8_t version = */ cf_ReadByte(file); num_bytes_to_be_restored = cf_ReadInt(file); diff --git a/Descent3/Player.cpp b/Descent3/Player.cpp index 2264e9614..7d54094dd 100644 --- a/Descent3/Player.cpp +++ b/Descent3/Player.cpp @@ -2571,7 +2571,6 @@ void ResetPlayerControlType(int slot) { // Init physics object *playobj = &Objects[Players[slot].objnum]; - ship *ship = &Ships[Players[slot].ship_index]; playobj->mtype.phys_info = Ships[Players[slot].ship_index].phys_info; diff --git a/Descent3/TelCom.cpp b/Descent3/TelCom.cpp index 3eb970cdb..331e58cba 100644 --- a/Descent3/TelCom.cpp +++ b/Descent3/TelCom.cpp @@ -1144,7 +1144,6 @@ void TCMainMenuRenderCallback(void) { // Main menu bool TelComMainMenu(tTelComInfo *tcs) { - bool exitparse = false; int mm; mainmenu_system = -1; @@ -3304,7 +3303,7 @@ void PageInTexture(int n, bool resize); // Pages in all the necessary bitmaps, textures & sounds for the TelCom so that they are in memory void TelcomPageAllIn(void) { extern void UpdateInitMessage(float amount); // amount is 0 to 1 - const float TELCOM_SOUND_PORTION = 0.3f, TELCOM_BITMAP_PORTION = 0.3f, TELCOM_TEXTUREHI_PORTION = 0.2f, + const float TELCOM_SOUND_PORTION = 0.3f, TELCOM_BITMAP_PORTION = 0.3f, TELCOM_TEXTURELO_PORTION = 0.2f; int i; @@ -3719,7 +3718,6 @@ void TCSSSCallback(void) { vector view_pos; vector light_vec; matrix view_orient = IDENTITY_MATRIX; - matrix final_mat = IDENTITY_MATRIX; matrix rot_mat; // draw model. diff --git a/Descent3/TelComCargo.cpp b/Descent3/TelComCargo.cpp index 39854c706..579d5800a 100644 --- a/Descent3/TelComCargo.cpp +++ b/Descent3/TelComCargo.cpp @@ -148,7 +148,6 @@ bool TCCPlayerHasWeapon(int weapon_index) { int TCCargoCreateLine(int id, int y, const char *title, int type) { // char buffer[100]; int small_height = grfont_GetHeight(SM_FONT); - int big_height = grfont_GetHeight(BG_FONT); switch (id) { case LID_NONE: diff --git a/Descent3/TelcomEffectsRender.cpp b/Descent3/TelcomEffectsRender.cpp index b11654a6f..072c2e264 100644 --- a/Descent3/TelcomEffectsRender.cpp +++ b/Descent3/TelcomEffectsRender.cpp @@ -442,8 +442,6 @@ void RenderBmpBlur(tceffect *tce, float frametime, int xoff, int yoff, bool ok_t int sbm_handle = tce->bmpinfo.bm_handle; int dbm_handle = tce->bmpinfo.temp_bmhandle; bm_ClearBitmap(dbm_handle); - int x = 0; - int y = 0; bool done = false; if ((tce->flags == TC_BMPF_OUT) && (tce->bmpinfo.stage < 0)) done = true; @@ -636,7 +634,6 @@ void RenderBmpInvert(tceffect *tce, float frametime, int xoff, int yoff, bool ok uint8_t r, g, b; int bh = bm_h(srcbmph, 0); int bw = bm_w(srcbmph, 0); - int how_many = tce->bmpinfo.chunk_bmp.w * tce->bmpinfo.chunk_bmp.h; int how_many_across = tce->bmpinfo.chunk_bmp.w; int dim = bm_h(tce->bmpinfo.chunk_bmp.bm_array[0], 0); int shift; // speed up (since dim is always a power of 2) @@ -882,12 +879,10 @@ void RenderButton(tceffect *tce, float frametime, int xoff, int yoff, bool ok_to bool glow = false; while (PopEvent(tce, &evt)) { switch (evt.id) { - case TEVT_GAINFOCUS: { - int num = tce - TCEffects; - } break; - case TEVT_LOSTFOCUS: { - int num = tce - TCEffects; - } break; + case TEVT_GAINFOCUS: + break; + case TEVT_LOSTFOCUS: + break; case TEVT_MOUSEOVER: { if (tce->flags & OBF_GLOW) { if (tce->flags & OBF_MOUSEOVERFOCUS) { diff --git a/Descent3/TerrainSearch.cpp b/Descent3/TerrainSearch.cpp index 2d2403991..66fbce9f8 100644 --- a/Descent3/TerrainSearch.cpp +++ b/Descent3/TerrainSearch.cpp @@ -265,18 +265,12 @@ static uint16_t LOD_sort_num[MAX_TERRAIN_LOD]; // Variable to determine if we're in editor or game extern function_mode View_mode; -static vector TJoint_VectorAddZ; -static vector TJoint_VectorAddX; - // Since our terrain points increment in finite steps we can rotate 2 points (x,z) // just add them to a base point to get the final rotated point void PreRotateTerrain() { vector rvec = {1 * TERRAIN_SIZE, 0, 0}; vector fvec = {0, 0, 1 * TERRAIN_SIZE}; - vector tj_rvec = {4, 0, 0}; - vector tj_fvec = {0, 0, 4}; - TS_FVectorAdd = fvec * *TS_View_matrix; TS_RVectorAdd = rvec * *TS_View_matrix; @@ -792,7 +786,6 @@ float GetTerrainGroundPoint(vector *pos, vector *normal) { } int SimplifyVertexSlow(int x, int z, float delta) { - vector *eye = TS_View_position; g3Point p1, p2; p1.p3_codes = 0; diff --git a/Descent3/WeaponFire.cpp b/Descent3/WeaponFire.cpp index 936867a42..198d6423e 100644 --- a/Descent3/WeaponFire.cpp +++ b/Descent3/WeaponFire.cpp @@ -1210,8 +1210,6 @@ void AquireElectricalTarget(object *obj) { int CreateAndFireWeapon(vector *pos, vector *dir, object *parent, int weapon_num) { int objnum; object *obj; - int parentnum = parent - Objects; - uint8_t terrain = 0; ASSERT(Weapons[weapon_num].used); @@ -1344,9 +1342,6 @@ int CreateAndFireWeapon(vector *pos, vector *dir, object *parent, int weapon_num fate = fvi_FindIntersection(&fq, &hit_info); if (fate != HIT_NONE && fate != HIT_OUT_OF_TERRAIN_BOUNDS) { - float try_dist = vm_VectorDistance(&obj->pos, &end_pos); - float got_dist = vm_VectorDistance(&obj->pos, &hit_info.hit_pnt); - obj->ctype.laser_info.hit_pnt = hit_info.hit_pnt; obj->ctype.laser_info.hit_wall_pnt = hit_info.hit_face_pnt[0]; obj->ctype.laser_info.hit_room = hit_info.hit_room; diff --git a/Descent3/aipath.cpp b/Descent3/aipath.cpp index fd53ff795..b9c6cb2bc 100644 --- a/Descent3/aipath.cpp +++ b/Descent3/aipath.cpp @@ -231,9 +231,6 @@ static bool AIPathMoveToNextNode(ai_path_info *aip) { int c_path = aip->cur_path; int c_node = aip->cur_node; - int p_type = aip->path_type[c_path]; - int p_index = aip->path_id[c_path]; - c_node++; if (c_node <= aip->path_end_node[c_path]) { @@ -342,8 +339,6 @@ void AIPathMoveTurnTowardsNode(object *obj, vector *mdir, bool *f_moved) { bool f_reverse = (g_ptr->flags & GF_PATH_MOVE_REVERSE_DIR) != 0; - ai_frame *ai_info = obj->ai_info; - vector cur_pos; AIPathGetCurrentNodePos(aip, &cur_pos); diff --git a/Descent3/aiterrain.cpp b/Descent3/aiterrain.cpp index e31ed340d..ef08abbca 100644 --- a/Descent3/aiterrain.cpp +++ b/Descent3/aiterrain.cpp @@ -103,7 +103,6 @@ static void ai_check_terrain_node(int cur_node, int f_check_local_nodes) { int xcounter, ycounter; int xstart, xend; int ystart, yend; - int f_ignore_terrain_in_this_node = 0; // Chrishack -- Note diff --git a/Descent3/attach.cpp b/Descent3/attach.cpp index 0cc9e6a4c..04d366660 100644 --- a/Descent3/attach.cpp +++ b/Descent3/attach.cpp @@ -521,7 +521,6 @@ bool AttachObject(object *parent, char parent_ap, object *child, float percent_r ASSERT(child); poly_model *parent_pm = &Poly_models[parent->rtype.pobj_info.model_num]; - poly_model *child_pm = &Poly_models[parent->rtype.pobj_info.model_num]; if (parent_ap < 0 || parent_ap >= parent_pm->n_attach) { LOG_WARNING << "ATTACH: Parent AP invalid"; diff --git a/Descent3/audiotaunts.cpp b/Descent3/audiotaunts.cpp index 303beaa89..1f03e5653 100644 --- a/Descent3/audiotaunts.cpp +++ b/Descent3/audiotaunts.cpp @@ -96,7 +96,7 @@ bool taunt_PlayTauntFile(const char *filename) { if (!Audio_taunts_enabled) return false; - int ret = StreamPlay(filename, (MAX_GAME_VOLUME / 2.0f), 0); + StreamPlay(filename, (MAX_GAME_VOLUME / 2.0f), 0); return true; } diff --git a/Descent3/bnode.cpp b/Descent3/bnode.cpp index 1e9ad7d89..6c254fc61 100644 --- a/Descent3/bnode.cpp +++ b/Descent3/bnode.cpp @@ -322,9 +322,9 @@ int BNode_FindDirLocalVisibleBNode(int roomnum, vector *pos, vector *fvec, float float dot = *fvec * to; if (dot > 0.0f || f_retry) { - float node_size = 0.0f; + /* float node_size = 0.0f; - /* if(!f_retry) + if(!f_retry) { for(j = 0; j < bnlist->nodes[i].num_edges; j++) { diff --git a/Descent3/cockpit.cpp b/Descent3/cockpit.cpp index 617e917a5..1f81d071d 100644 --- a/Descent3/cockpit.cpp +++ b/Descent3/cockpit.cpp @@ -446,7 +446,6 @@ extern float GetTerrainDynamicScalar(vector *pos, int seg); extern void GetRoomDynamicScalar(vector *pos, room *rp, float *r, float *g, float *b); void RenderCockpit() { object *player_obj = &Objects[Players[Player_num].objnum]; - physics_info *player_phys = &player_obj->mtype.phys_info; vector view_pos, light_vec; matrix view_tmat; float view_z, view_y, view_x, keyframe; diff --git a/Descent3/config.cpp b/Descent3/config.cpp index 7ab97130d..d5dc55033 100644 --- a/Descent3/config.cpp +++ b/Descent3/config.cpp @@ -842,10 +842,10 @@ struct sound_menu { // retreive values from property sheet here. void finish() { - int iTemp; +#if defined(_DEBUG) char mixer_type = SOUND_MIXER_NONE; + int iTemp; -#if defined(_DEBUG) iTemp = *sndmixer; switch (iTemp) { diff --git a/Descent3/credits.cpp b/Descent3/credits.cpp index 584010def..ee4427551 100644 --- a/Descent3/credits.cpp +++ b/Descent3/credits.cpp @@ -349,10 +349,7 @@ void Credits_Display(void) { } int font_height = grfont_GetHeight(BIG_BRIEFING_FONT); - int total_pixel_height = font_height * count; - int cur_line = 0; - float total_pixel_count = 0; float cur_pixel_count = 0; float last_time = timer_GetTime(); diff --git a/Descent3/damage.cpp b/Descent3/damage.cpp index 7589de34f..6a9c00385 100644 --- a/Descent3/damage.cpp +++ b/Descent3/damage.cpp @@ -1210,7 +1210,6 @@ void KillObject(object *objp, object *killer, float damage, int death_flags, flo // If blast rings set, create 0-2 delayed blast rings if (death_flags & DF_BLAST_RING) { - float ring_size = OBJECT_OUTSIDE(objp) ? (objp->size * 3) : objp->size; int extras = ps_rand() % 3; for (int i = 0; i < extras; i++) CreateNewEvent(0, 0, (i * .1) + .1, objp, sizeof(*objp), DoBlastRingEvent); diff --git a/Descent3/debuggraph.cpp b/Descent3/debuggraph.cpp index 7663b230d..dbb1f7753 100644 --- a/Descent3/debuggraph.cpp +++ b/Descent3/debuggraph.cpp @@ -94,9 +94,6 @@ struct tAddDebugGraph { class tGraphNode { public: - tGraphNode() {} - ~tGraphNode() {} - ddgr_color color; void Initialize(tAddDebugGraph *data); diff --git a/Descent3/demofile.cpp b/Descent3/demofile.cpp index 2cef503d5..a65cb72b7 100644 --- a/Descent3/demofile.cpp +++ b/Descent3/demofile.cpp @@ -309,7 +309,6 @@ static float Demo_next_frame = 0; static float Demo_frame_time = 0; static float Demo_last_pinfo; float Demo_frame_ofs; -static int Demo_auto_idx = 0; uint32_t Demo_flags = 0; uint16_t Demo_obj_map[MAX_OBJECTS]; static bool Demo_turretchanged[MAX_OBJECTS]; @@ -553,7 +552,6 @@ void DemoReadTurretChanged(void) { int objnum; uint16_t num_turrets; float turr_time; - int count = 0; float do_time; do_time = cf_ReadFloat(Demo_cfp); @@ -599,7 +597,6 @@ void DemoWriteObjAnimChanged(uint16_t objnum) { void DemoReadObjAnimChanged(void) { custom_anim multi_anim_info; int objnum; - int count = 0; float changetime; changetime = cf_ReadFloat(Demo_cfp); objnum = cf_ReadShort(Demo_cfp); diff --git a/Descent3/fireball.cpp b/Descent3/fireball.cpp index 5b51c729e..3c16fe54b 100644 --- a/Descent3/fireball.cpp +++ b/Descent3/fireball.cpp @@ -1043,7 +1043,6 @@ void CreateSplintersFromBody(object *obj, float explosion_mag, float lifetime) { vector rot_vecs[MAX_SUBOBJECTS]; int num_splinters = 0; int i, t; - int parent_objnum = obj - Objects; matrix m; m = obj->orient; vm_TransposeMatrix(&m); @@ -2230,8 +2229,6 @@ void DrawBlastRingObject(object *obj) { float cur_size = lifenorm * obj->ctype.blast_info.max_size; int i; g3Point *pntlist[4]; - static int grav_first = 1; - static int grav_texture; if (obj->id == GRAVITY_FIELD_INDEX) cur_size = (1 - lifenorm) * obj->ctype.blast_info.max_size; diff --git a/Descent3/gauges.cpp b/Descent3/gauges.cpp index 35f6dc3eb..24f62a50e 100644 --- a/Descent3/gauges.cpp +++ b/Descent3/gauges.cpp @@ -370,7 +370,6 @@ void InitGauges(tStatMask gauge_mask) { // deinitializes cockpit gauges void CloseGauges() { for (int i = 0; i < NUM_GAUGES; i++) { - uint16_t mask = Gauge_mask & (1 << i); Gauge_list[i].monitor = NULL; } Gauge_mask = 0; diff --git a/Descent3/hud.cpp b/Descent3/hud.cpp index 13c780908..24b28a516 100644 --- a/Descent3/hud.cpp +++ b/Descent3/hud.cpp @@ -1498,7 +1498,6 @@ void RenderHUDItems(tStatMask stat_mask) { char *keyp = NULL; char *axis = NULL; player *pp = &Players[Player_num]; - int fidkey = -1, fidcont = -1; int hudconty = 130; RenderHUDTextFlags(0, GR_GREEN, HUD_ALPHA, 0, 15, hudconty, TXT_ENABLED_CONTROLS); diff --git a/Descent3/hud.h b/Descent3/hud.h index 3b94ea4b1..75502b51a 100644 --- a/Descent3/hud.h +++ b/Descent3/hud.h @@ -652,20 +652,18 @@ struct tMsgList { ////////////////////////////////////////////////////////////////////////////// class MsgListConsole { - tMsgList *m_list; + tMsgList *m_list = nullptr; int m_x, m_y, m_w, m_h; - int m_bufline, m_buflen, m_curmsgs, m_numlines; - bool m_opened; - char *m_buffer; + int m_bufline = 0, m_buflen, m_curmsgs, m_numlines; + bool m_opened = false; + char *m_buffer = nullptr; char m_title[32]; - char **m_conlines; - int n_conlines; + char **m_conlines = nullptr; + int n_conlines = 0; int m_keydownstate; // -1 for up key, 1 for down key, 0 for none. float m_keydowntime; public: - MsgListConsole(); - ~MsgListConsole(); bool Open(const char *title, int x, int y, int w, int h); // registers dimensions of box void Close(); void AttachMsgList(tMsgList *msglist); diff --git a/Descent3/huddisplay.cpp b/Descent3/huddisplay.cpp index 1d0e49d9f..4b8fa0092 100644 --- a/Descent3/huddisplay.cpp +++ b/Descent3/huddisplay.cpp @@ -667,9 +667,7 @@ void RenderHUDSecondary(tHUDItem *item) { int index = Players[Player_num].weapon[PW_SECONDARY].index; ship *ship = &Ships[Players[Player_num].ship_index]; otype_wb_info *wb = &ship->static_wb[index]; - weapon *wpn = GetWeaponFromIndex(Player_num, index); const char *text = TXT(Static_weapon_names_msg[index]); - float txt_w = (int)(grtext_GetLineWidth(text) / Hud_aspect_x) + 2; if (item->stat & STAT_GRAPHICAL) { int icon; diff --git a/Descent3/hudmessage.cpp b/Descent3/hudmessage.cpp index d5f83b6b5..a9ad06b39 100644 --- a/Descent3/hudmessage.cpp +++ b/Descent3/hudmessage.cpp @@ -520,8 +520,6 @@ bool AddMultipleLinesToHUDMessages(char *temp_message, ddgr_color color) { // Returns true if message added, or false if message not (because the previous message was the same) bool AddColoredHUDMessage(ddgr_color color, const char *format, ...) { std::va_list args; - char *message = NULL; - char *last_message = NULL; char temp_message[HUD_MESSAGE_LENGTH * 2]; va_start(args, format); @@ -556,8 +554,6 @@ bool AddFilteredColoredHUDMessage(ddgr_color color, const char *format, ...) { return false; // filter this message std::va_list args; - char *message = NULL; - char *last_message = NULL; char temp_message[HUD_MESSAGE_LENGTH * 2]; va_start(args, format); @@ -592,8 +588,6 @@ bool AddFilteredHUDMessage(const char *format, ...) { return false; // filter this message std::va_list args; - char *message = NULL; - char *last_message = NULL; char temp_message[HUD_MESSAGE_LENGTH * 2]; va_start(args, format); @@ -616,8 +610,6 @@ bool AddFilteredHUDMessage(const char *format, ...) { // Returns true if message added, or false if message not (because the previous message was the same) bool AddHUDMessage(const char *format, ...) { std::va_list args; - char *message = NULL; - char *last_message = NULL; char temp_message[HUD_MESSAGE_LENGTH * 2]; va_start(args, format); @@ -640,8 +632,6 @@ bool AddHUDMessage(const char *format, ...) { // Returns true if message added, or false if message not (because the previous message was the same) bool AddBlinkingHUDMessage(const char *format, ...) { std::va_list args; - char *message = NULL; - char *last_message = NULL; char temp_message[HUD_MESSAGE_LENGTH * 2]; va_start(args, format); @@ -908,7 +898,6 @@ void SendOffHUDInputMessage() { // Breaks up the input message so that if we overflow it starts on the next line nicely // Returns the number of characters in the next line int BreakupHUDInputMessage(char *str) { - int cur = 0; int last_space = -1; int len = strlen(HudInputMessage); @@ -1128,7 +1117,6 @@ void RenderScrollingHUDMessages() { char *message = HUD_messages[i]; int text_width = grtext_GetTextLineWidth(message); - int vp_width = Game_window_w; int y = (i * text_height) + Hud_scroll_offset; if (HUD_message_type[i] == HUD_MESSAGE_BLINKING) { @@ -1604,17 +1592,6 @@ const char *tMsgList::get(int i) { ////////////////////////////////////////////////////////////////////////////// -MsgListConsole::MsgListConsole() { - m_opened = false; - m_list = NULL; - m_buffer = NULL; - m_bufline = 0; - m_conlines = NULL; - n_conlines = 0; -} - -MsgListConsole::~MsgListConsole() {} - // registers dimensions of box bool MsgListConsole::Open(const char *title, int x, int y, int w, int h) { m_x = x; diff --git a/Descent3/init.cpp b/Descent3/init.cpp index a6090ddb0..3ac87a73d 100644 --- a/Descent3/init.cpp +++ b/Descent3/init.cpp @@ -1868,7 +1868,7 @@ void InitD3Systems1(bool editor) { gspy_Init(); // Sound initialization - int soundres = Sound_system.InitSoundLib(Descent, Sound_mixer, Sound_quality, false); + Sound_system.InitSoundLib(Descent, Sound_mixer, Sound_quality, false); // Initialize Cinematics system InitCinematics(); diff --git a/Descent3/lighting.cpp b/Descent3/lighting.cpp index 1a128b771..d0b457f5f 100644 --- a/Descent3/lighting.cpp +++ b/Descent3/lighting.cpp @@ -1059,7 +1059,6 @@ void ApplyLightingToRooms(vector *pos, int roomnum, float light_dist, float red_ int num_faces, i, t, lm_handle; uint16_t *dest_data; - int faces_misreported = 0; if (Dedicated_server) return; diff --git a/Descent3/lightmap_info.cpp b/Descent3/lightmap_info.cpp index 310298cee..a2e0a0144 100644 --- a/Descent3/lightmap_info.cpp +++ b/Descent3/lightmap_info.cpp @@ -35,8 +35,6 @@ lightmap_info *LightmapInfo = NULL; static uint16_t *Free_lmi_list = NULL; void CloseLightmapInfos() { - bool final_lightmap = true; - if (LightmapInfo) mem_free(LightmapInfo); diff --git a/Descent3/loadstate.cpp b/Descent3/loadstate.cpp index c64e4014e..c349e5d36 100644 --- a/Descent3/loadstate.cpp +++ b/Descent3/loadstate.cpp @@ -1308,8 +1308,6 @@ int LGSObjects(CFILE *fp, int version) { p_info->multi_turret_info.num_turrets = count; if ((count > 0) && (p_info->multi_turret_info.keyframes == NULL)) { - int cur = 0; - p_info->multi_turret_info.time = 0; p_info->multi_turret_info.keyframes = mem_rmalloc(count); p_info->multi_turret_info.last_keyframes = mem_rmalloc(count); @@ -1564,7 +1562,7 @@ int LGSObjSpecial(CFILE *fp, object *op) { // load spew int LGSSpew(CFILE *fp) { - int i, count = 0; + int i; // read GLOBAL value gs_ReadShort(fp, spew_count); diff --git a/Descent3/menu.cpp b/Descent3/menu.cpp index 0f7e6c5a0..450ff2b41 100644 --- a/Descent3/menu.cpp +++ b/Descent3/menu.cpp @@ -1105,7 +1105,7 @@ bool MenuNewGame() { std::vector filelist; int n_missions, res; bool found = false; - bool do_menu = true, load_mission = false, retval = true; + bool retval = true; #ifdef DEMO if (LoadMission("d3demo.mn3")) { CurrentPilotUpdateMissionStatus(true); diff --git a/Descent3/mmItem.cpp b/Descent3/mmItem.cpp index 43d2604b4..0c558b5f3 100644 --- a/Descent3/mmItem.cpp +++ b/Descent3/mmItem.cpp @@ -416,7 +416,6 @@ void mmInterface::OnDestroy() { // displays the copyright text void mmInterface::CopyrightText() { - int i; char type[16]; type[0] = 0; #ifdef DEMO @@ -464,8 +463,6 @@ void mmInterface::SetMusicRegion(int region) { // display menu scene void MenuScene() { - extern bool NewUI_wait_dialog; // is wait dialog up? - if (MM_object) { StartFrame(); diff --git a/Descent3/mmItem.h b/Descent3/mmItem.h index 55d5e0f22..010d6f57b 100644 --- a/Descent3/mmItem.h +++ b/Descent3/mmItem.h @@ -112,11 +112,9 @@ void MenuScene(); // display menu scene class tmmItemQueue { #define tmmItemSIZE 8 tmmItemFX m_items[tmmItemSIZE]; - int16_t m_head, m_tail; + int16_t m_head = 0, m_tail = 0; public: - tmmItemQueue() { m_head = m_tail = 0; }; - ~tmmItemQueue(){}; void send(tmmItemFX &item) { // sends an item onto the queue int16_t temp = m_tail + 1; if (temp == tmmItemSIZE) @@ -142,7 +140,7 @@ class tmmItemQueue { ////////////////////////////////////////////////////////////////////// class mmInterface; // class mmItem -class mmItem : public UIGadget { +class mmItem final : public UIGadget { char *m_text; // text for item int16_t m_alpha; // alpha for text item int16_t m_satcount; diff --git a/Descent3/multi.cpp b/Descent3/multi.cpp index 543d298ed..fa3e8cd34 100644 --- a/Descent3/multi.cpp +++ b/Descent3/multi.cpp @@ -2016,7 +2016,6 @@ int MultiStuffRobotPosition(uint16_t objectnum, uint8_t *data) { MultiAddByte(0, data, &count); vector *vel = &obj->mtype.phys_info.velocity; - vector *rotvel = &obj->mtype.phys_info.rotvel; MultiAddShort((vel->x * 128.0), data, &count); MultiAddShort((vel->y * 128.0), data, &count); @@ -3774,7 +3773,6 @@ int MultiFindFreeSlot() { void MultiDoAskToJoin(uint8_t *data, network_address *from_addr) { uint8_t outdata[MAX_GAME_DATA_SIZE]; int count = 0; - int incount = 0; int size; size = START_DATA(MP_JOIN_RESPONSE, outdata, &count); @@ -4098,8 +4096,6 @@ void MultiSendBlowupBuilding(int hit_objnum, int killer_objnum, float damage) { int size_offset = 0; uint8_t data[MAX_GAME_DATA_SIZE]; - uint16_t short_damage = damage; - size_offset = START_DATA(MP_BLOWUP_BUILDING, data, &count, 1); MultiAddShort(hit_objnum, data, &count); MultiAddShort(killer_objnum, data, &count); @@ -4577,8 +4573,6 @@ void MultiDoJoinObjects(uint8_t *data) { uint32_t checksum; matrix orient; - uint8_t name_len = 0; - uint8_t num_persist_vars = 0; vm_MakeIdentity(&orient); @@ -4997,7 +4991,7 @@ void MultiDoMessageToServer(uint8_t *data) { MULTI_ASSERT_NOMESSAGE(Netgame.local_role == LR_SERVER); SKIP_HEADER(data, &count); - uint8_t slot = MultiGetByte(data, &count); + /* uint8_t slot = */ MultiGetByte(data, &count); int towho = (int8_t)MultiGetByte(data, &count); uint8_t len = MultiGetByte(data, &count); @@ -5320,8 +5314,6 @@ void MultiSendObject(object *obj, uint8_t announce, uint8_t demo_record) { if (demo_record) obj->flags |= OF_CLIENTDEMOOBJECT; - object *parent_obj = ObjGetUltimateParent(obj); - size_offset = START_DATA(MP_OBJECT, data, &count, 1); uint32_t index = MultiGetMatchChecksum(obj->type, obj->id); @@ -5489,7 +5481,6 @@ int MultiStuffGuidedInfo(int slot, uint8_t *data) { // Do velocity vector *vel = &obj->mtype.phys_info.velocity; - vector *rotvel = &obj->mtype.phys_info.rotvel; MultiAddShort(vel->x * 128.0, data, &count); MultiAddShort(vel->y * 128.0, data, &count); @@ -5654,7 +5645,7 @@ void MultiDoRemoveObject(uint8_t *data) { SKIP_HEADER(data, &count); uint16_t server_objnum = MultiGetUshort(data, &count); - uint8_t type = MultiGetByte(data, &count); + /* uint8_t type = */ MultiGetByte(data, &count); uint8_t sound = MultiGetByte(data, &count); @@ -5866,7 +5857,7 @@ void MultiDoOnOff(uint8_t *data) { uint8_t slot = MultiGetByte(data, &count); uint8_t on = MultiGetByte(data, &count); uint8_t wb_index = MultiGetByte(data, &count); - uint8_t fire_mask = MultiGetByte(data, &count); + /* uint8_t fire_mask = */ MultiGetByte(data, &count); if (on) { Objects[Players[slot].objnum].weapon_fire_flags |= WFF_ON_OFF; @@ -7353,8 +7344,6 @@ void MultiAddObjWBAnimUpdate(int objnum) { int MultiStuffObjWBAnimUpdate(uint16_t objnum, uint8_t *data) { // multi_anim multi_anim_info; - int count = 0; - int size = 0; if (Netgame.local_role != LR_SERVER) { BailOnMultiplayer(NULL); @@ -7677,7 +7666,7 @@ void MultiDoFileDenied(uint8_t *data) { // We asked for a file, but the request was denied for some reason int count = 0; SKIP_HEADER(data, &count); - uint16_t filenum = MultiGetUshort(data, &count); + /* uint16_t filenum = */ MultiGetUshort(data, &count); uint16_t playernum = MultiGetUshort(data, &count); uint16_t filewho = MultiGetUshort(data, &count); LOG_DEBUG.printf("Got a file denied packet from %d", playernum); @@ -7802,7 +7791,6 @@ void SendDataChunk(int playernum) { try { cf_ReadBytes(readbuf, dataread, NetPlayers[playernum].file_xfer_cfile); } catch (cfile_error *cfe) { - int t = cfe->read_write; // this is is here to fix compile warning // Woops, can't read the file, better error out! MultiCancelFile(playernum, NetPlayers[playernum].file_xfer_id, NetPlayers[playernum].file_xfer_who); Int3(); @@ -8123,7 +8111,7 @@ void MultiDoPing(uint8_t *data, network_address *addr) { int size_offset; SKIP_HEADER(data, &count); - uint8_t slot = MultiGetByte(data, &count); + /* uint8_t slot = */ MultiGetByte(data, &count); float pingtime = MultiGetFloat(data, &count); // Now send a response @@ -9299,7 +9287,6 @@ void DoReqPlayerList(network_address *addr) { memset(outdata, 0, sizeof(outdata)); size = START_DATA(MP_PLAYERLIST_DATA, outdata, &count); - uint16_t icurrplayers = 0; int i = 0; if (Dedicated_server) { // Skip the server player diff --git a/Descent3/multi_connect.cpp b/Descent3/multi_connect.cpp index 388a3ac53..492068f1b 100644 --- a/Descent3/multi_connect.cpp +++ b/Descent3/multi_connect.cpp @@ -595,7 +595,6 @@ void MultiSendConnectionAccepted(int slotnum, SOCKET sock, network_address *addr int MultiPollForLevelInfo() { float start_time, ask_time, initial_start_time; - int connected = 0; uint8_t data[MAX_RECEIVE_SIZE]; network_address from_addr; @@ -903,7 +902,6 @@ void MultiCloseGame() { int SearchForLocalGamesTCP(uint32_t ask, uint16_t port) { int count = 0; int size; - int tries = 0; uint8_t data[MAX_GAME_DATA_SIZE]; network_address check_addr, from_addr; check_addr.connection_type = NP_TCP; @@ -932,7 +930,6 @@ int SearchForLocalGamesTCP(uint32_t ask, uint16_t port) { int SearchForGamesPXO(uint32_t ask, uint16_t port) { int count = 0; int size; - int tries = 0; uint8_t data[MAX_GAME_DATA_SIZE]; network_address check_addr, from_addr; check_addr.connection_type = NP_TCP; diff --git a/Descent3/multi_dll_mgr.cpp b/Descent3/multi_dll_mgr.cpp index d7e3d961d..85e36704b 100644 --- a/Descent3/multi_dll_mgr.cpp +++ b/Descent3/multi_dll_mgr.cpp @@ -638,14 +638,14 @@ int LoadMultiDLL(const char *name) { loaddll: if (!mod_LoadModule(&MultiDLLHandle, tmp_dll_name)) { - int err = mod_GetLastError(); + mod_GetLastError(); LOG_WARNING.printf("You are missing the DLL %s!", name); return 0; } DLLMultiInit = (DLLMultiInit_fp)mod_GetSymbol(&MultiDLLHandle, "DLLMultiInit", 4); if (!DLLMultiInit) { - int err = mod_GetLastError(); + mod_GetLastError(); LOG_FATAL << "Couldn't get a handle to the dll function DLLMultiInit!"; Int3(); FreeMultiDLL(); @@ -653,7 +653,7 @@ int LoadMultiDLL(const char *name) { } DLLMultiCall = (DLLMultiCall_fp)mod_GetSymbol(&MultiDLLHandle, "DLLMultiCall", 4); if (!DLLMultiCall) { - int err = mod_GetLastError(); + mod_GetLastError(); LOG_FATAL << "Couldn't get a handle to the dll function DLLMultiCall!"; Int3(); FreeMultiDLL(); @@ -661,7 +661,7 @@ int LoadMultiDLL(const char *name) { } DLLMultiClose = (DLLMultiClose_fp)mod_GetSymbol(&MultiDLLHandle, "DLLMultiClose", 0); if (!DLLMultiClose) { - int err = mod_GetLastError(); + mod_GetLastError(); LOG_FATAL << "Couldn't get a handle to the dll function DLLMultiClose!"; Int3(); FreeMultiDLL(); @@ -693,7 +693,7 @@ int LoadMultiDLL(const char *name) { DLLMultiScoreCall = (DLLMultiScoreCall_fp)mod_GetSymbol(&MultiDLLHandle, "DLLMultiScoreEvent", 8); if (!DLLMultiScoreCall) { - int err = mod_GetLastError(); + mod_GetLastError(); LOG_FATAL << "Couldn't get a handle to the dll function DLLMultiScoreCall!"; Int3(); Supports_score_api = false; @@ -712,7 +712,7 @@ void SetUITextItemText(UITextItem *uit, char *newtext, uint32_t color) { strcpy(uit->m_Text, newtext); uit->set_color(color); } -void *NewUIWindowCreate(int x, int y, int w, int h, int flags) { +UIObject *NewUIWindowCreate(int x, int y, int w, int h, int flags) { NewUIWindow *newwin; newwin = new NewUIWindow; newwin->Create(x, y, w, h, flags); @@ -721,14 +721,14 @@ void *NewUIWindowCreate(int x, int y, int w, int h, int flags) { void NewUIWindowDestroy(NewUIWindow *deswin) { deswin->Destroy(); } void NewUIWindowOpen(NewUIWindow *deswin) { deswin->Open(); } void NewUIWindowClose(NewUIWindow *deswin) { deswin->Close(); } -void *TextCreate(UIWindow *parentwin, UITextItem *textitem, int x, int y, int flags) { +UIObject *TextCreate(UIWindow *parentwin, UITextItem *textitem, int x, int y, int flags) { UIText *newtext; newtext = new UIText; newtext->Create(parentwin, textitem, x, y, flags); return newtext; } void TextSetTitle(UIText *text, UITextItem *textitem) { text->SetTitle(textitem); } -void *EditCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int flags) { +UIObject *EditCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int flags) { NewUIEdit *newedit; newedit = new NewUIEdit; newedit->Create(parentwin, id, x, y, w, h, flags); @@ -736,13 +736,13 @@ void *EditCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int fl } void EditSetText(NewUIEdit *item, const char *newtext) { item->SetText(newtext); } void EditGetText(NewUIEdit *item, char *buff, int len) { item->GetText(buff, len); } -void *ButtonCreate(UIWindow *parentwin, int id, UITextItem *titleitem, int x, int y, int w, int h, int flags) { +UIObject *ButtonCreate(UIWindow *parentwin, int id, UITextItem *titleitem, int x, int y, int w, int h, int flags) { UIButton *newbutt; newbutt = new UIButton; newbutt->Create(parentwin, id, titleitem, x, y, w, h, flags); return newbutt; } -void *ListCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int flags) { +UIObject *ListCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int flags) { NewUIListBox *newlist; newlist = new NewUIListBox; newlist->Create(parentwin, id, x, y, w, h, flags); @@ -777,7 +777,7 @@ void DatabaseWriteInt(const char *label, int val) { Database->write(label, val); } void DescentDefer(void) { Descent->defer(); } -void *NewUIGameWindowCreate(int x, int y, int w, int h, int flags) { +UIObject *NewUIGameWindowCreate(int x, int y, int w, int h, int flags) { NewUIGameWindow *newgamewin; newgamewin = new NewUIGameWindow; newgamewin->Create(x, y, w, h, flags); @@ -786,8 +786,8 @@ void *NewUIGameWindowCreate(int x, int y, int w, int h, int flags) { void NewUIGameWindowDestroy(NewUIGameWindow *item) { item->Destroy(); } void NewUIGameWindowOpen(NewUIGameWindow *item) { item->Open(); } void NewUIGameWindowClose(NewUIGameWindow *item) { item->Close(); } -void *HotSpotCreate(UIWindow *parentwin, int id, int key, UIItem *txtitemoff, UIItem *txtitemon, int x, int y, int w, - int h, int flags) { +UIObject *HotSpotCreate(UIWindow *parentwin, int id, int key, UIItem *txtitemoff, UIItem *txtitemon, + int x, int y, int w, int h, int flags) { UIHotspot *newhs; newhs = new UIHotspot; if (newhs) @@ -795,7 +795,7 @@ void *HotSpotCreate(UIWindow *parentwin, int id, int key, UIItem *txtitemoff, UI return newhs; } void HotSpotSetStates(UIHotspot *hs, UIItem *texton, UIItem *textoff) { hs->SetStates(textoff, texton); } -void *CheckBoxCreate(UIWindow *parent, int id, UIItem *title, int x, int y, int w, int h, int flags) { +UIObject *CheckBoxCreate(UIWindow *parent, int id, UIItem *title, int x, int y, int w, int h, int flags) { UICheckBox *newcb; newcb = new UICheckBox; if (newcb) @@ -831,7 +831,7 @@ int PollUI(void) { } return result; } -void *CreateNewUITextItem(const char *newtext, uint32_t color, int font) { +UIItem *CreateNewUITextItem(const char *newtext, uint32_t color, int font) { UITextItem *new_text_item; if (font == -1) { new_text_item = new UITextItem(newtext); @@ -855,7 +855,7 @@ void RemoveUITextItem(void *item) { UITextItem *old_text_item = (UITextItem *)item; delete old_text_item; } -void *CreateNewUIBmpItem(int handle, uint8_t alpha) { +UIItem *CreateNewUIBmpItem(int handle, uint8_t alpha) { UIBitmapItem *new_bmp_item; new_bmp_item = new UIBitmapItem(handle, alpha); return new_bmp_item; @@ -900,7 +900,7 @@ void CloseSplashScreen(void) { } else return; } -void *UIConsoleGadgetCreate(UIWindow *parentid, int id, int x, int y, int font, int cols, int rows, int flags) { +UIObject *UIConsoleGadgetCreate(UIWindow *parentid, int id, int x, int y, int font, int cols, int rows, int flags) { UIConsoleGadget *newconsole; newconsole = new UIConsoleGadget; newconsole->Create(parentid, id, x, y, BRIEFING_FONT, cols, rows, flags); @@ -922,7 +922,7 @@ void UIConsoleGadgetputs(UIConsoleGadget *item, const char *str) { item->puts(GR_RGB(r, g, b), str); } void NewUIWindowSetFocusOnEditGadget(UIEdit *item, UIWindow *parent) { item->Activate(); } -void *OldListCreate(UIWindow *parentitem, int id, int x, int y, int w, int h, int flags) { +UIObject *OldListCreate(UIWindow *parentitem, int id, int x, int y, int w, int h, int flags) { UIListBox *newoldlist; newoldlist = new UIListBox; newoldlist->Create(parentitem, id, x, y, w, h, flags); @@ -944,7 +944,7 @@ const char *OldListGetItem(UIListBox *item, int index) { } } int OldListGetSelectedIndex(UIListBox *item) { return item->GetSelectedIndex(); } -void *OldEditCreate(UIWindow *parentitem, int id, int x, int y, int w, int h, int flags) { +UIObject *OldEditCreate(UIWindow *parentitem, int id, int x, int y, int w, int h, int flags) { UIEdit *newoldedit; newoldedit = new UIEdit; newoldedit->Create(parentitem, id, x, y, w, h, flags); @@ -971,13 +971,13 @@ void SetOldEditBufferLen(UIEdit *item, int len) { item->SetBufferLen(len); } void NewUIWindowLoadBackgroundImage(NewUIWindow *item, const char *image_name) { item->LoadBackgroundImage(image_name); } -void DeleteUIItem(void *delitem) { delete delitem; } // !!! FIXME: this needs to change, but this deletes a lot of different things... +void DeleteUIItem(UIObject *delitem) { delete delitem; } void GadgetDestroy(UIGadget *item) { item->Destroy(); } -void *SliderCreate(UIWindow *parent, int id, int x, int y, int flags) { +UIObject *SliderCreate(UIWindow *parent, int id, int x, int y, int flags) { NewUISlider *slid; slid = new NewUISlider; slid->Create(parent, id, x, y, flags); - return (void *)slid; + return slid; } void SliderSetRange(UISlider *slider, int range) { slider->SetRange(range); } int SliderGetRange(UISlider *slider) { return slider->GetRange(); } diff --git a/Descent3/multi_dll_mgr.h b/Descent3/multi_dll_mgr.h index 5b0b9c314..b6f1ffdc8 100644 --- a/Descent3/multi_dll_mgr.h +++ b/Descent3/multi_dll_mgr.h @@ -120,15 +120,15 @@ int LoadMultiDLL(const char *name); void CallMultiDLL(int eventnum); void SetUITextItemText(UITextItem *uit, char *newtext, uint32_t color); -void *NewUIWindowCreate(int x, int y, int w, int h, int flags); +UIObject *NewUIWindowCreate(int x, int y, int w, int h, int flags); void NewUIWindowDestroy(NewUIWindow *deswin); void NewUIWindowOpen(NewUIWindow *deswin); void NewUIWindowClose(NewUIWindow *deswin); -void *TextCreate(UIWindow *parentwin, UITextItem *textitem, int x, int y, int flags); +UIObject *TextCreate(UIWindow *parentwin, UITextItem *textitem, int x, int y, int flags); void TextSetTitle(UIText *text, UITextItem *textitem); -void *EditCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int flags); -void *ButtonCreate(UIWindow *parentwin, int id, UITextItem *titleitem, int x, int y, int w, int h, int flags); -void *ListCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int flags); +UIObject *EditCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int flags); +UIObject *ButtonCreate(UIWindow *parentwin, int id, UITextItem *titleitem, int x, int y, int w, int h, int flags); +UIObject *ListCreate(UIWindow *parentwin, int id, int x, int y, int w, int h, int flags); void ListRemoveAll(UIListBox *item); void ListAddItem(UIListBox *item, UITextItem *uitext); void ListRemoveItem(UIListBox *item, UITextItem *txtitem); @@ -141,29 +141,29 @@ void EditGetText(NewUIEdit *item, char *buff, int len); void DatabaseRead(const char *label, char *entry, int *entrylen); void DatabaseWrite(const char *label, const char *entry, int entrylen); void DescentDefer(void); -void *NewUIGameWindowCreate(int x, int y, int w, int h, int flags = UIF_PROCESS_ALL); +UIObject *NewUIGameWindowCreate(int x, int y, int w, int h, int flags = UIF_PROCESS_ALL); void NewUIGameWindowDestroy(NewUIGameWindow *item); void NewUIGameWindowOpen(NewUIGameWindow *item); void NewUIGameWindowClose(NewUIGameWindow *item); -void *HotSpotCreate(UIWindow *parentwin, int id, int key, UIItem *txtitemoff, UIItem *txtitemon, int x, int y, int w, - int h, int flags); +UIObject *HotSpotCreate(UIWindow *parentwin, int id, int key, UIItem *txtitemoff, UIItem *txtitemon, + int x, int y, int w, int h, int flags); void HotSpotSetStates(UIHotspot *hs, UIItem *texton, UIItem *textoff); int PollUI(void); void RemoveUITextItem(void *item); -void *CreateNewUITextItem(const char *newtext, uint32_t color, int font = -1); +UIItem *CreateNewUITextItem(const char *newtext, uint32_t color, int font = -1); void RemoveUIBmpItem(void *item); -void *CreateNewUIBmpItem(int handle, uint8_t alpha); +UIItem *CreateNewUIBmpItem(int handle, uint8_t alpha); void CloseSplashScreen(void); void CreateSplashScreen(const char *msg, int usecancel); -void *UIConsoleGadgetCreate(UIWindow *parentid, int id, int x, int y, int font, int cols, int rows, int flags); +UIObject *UIConsoleGadgetCreate(UIWindow *parentid, int id, int x, int y, int font, int cols, int rows, int flags); void UIConsoleGadgetputs(UIConsoleGadget *item, const char *str); void NewUIWindowSetFocusOnEditGadget(UIEdit *item, UIWindow *parent); -void *OldListCreate(UIWindow *parentitem, int id, int x, int y, int w, int h, int flags); +UIObject *OldListCreate(UIWindow *parentitem, int id, int x, int y, int w, int h, int flags); void OldListRemoveAll(UIListBox *item); void OldListAddItem(UIListBox *item, UITextItem *uitext); void OldListRemoveItem(UIListBox *item, UITextItem *txtitem); void OldListSelectItem(UIListBox *item, UITextItem *txtitem); -void *OldEditCreate(UIWindow *parentitem, int id, int x, int y, int w, int h, int flags); +UIObject *OldEditCreate(UIWindow *parentitem, int id, int x, int y, int w, int h, int flags); void OldEditGetText(UIEdit *item, char *buff, int len); void OldEditSetText(UIEdit *item, const char *newtext); const char *OldListGetItem(UIListBox *item, int index); @@ -171,20 +171,20 @@ int OldListGetSelectedIndex(UIListBox *item); void ToggleUICallback(int state); void SetOldEditBufferLen(UIEdit *item, int len); void NewUIWindowLoadBackgroundImage(NewUIWindow *item, const char *image_name); -void DeleteUIItem(void *delitem); +void DeleteUIItem(UIObject *); void DatabaseReadInt(const char *label, int *val); void DatabaseWriteInt(const char *label, int val); void GadgetDestroy(UIGadget *item); int GetUIItemWidth(void *item); int GetUIItemHeight(void *item); -void *SliderCreate(UIWindow *parent, int id, int x, int y, int flags = 0); +UIObject *SliderCreate(UIWindow *parent, int id, int x, int y, int flags = 0); void SliderSetRange(UISlider *slider, int range); int SliderGetRange(UISlider *slider); void SliderSetPos(UISlider *slider, int pos); int SliderGetPos(UISlider *slider); void SliderSetSelectChangeCallback(UISlider *slider, void (*fn)(int)); void SliderSetSelectChangeCallbackWData(UISlider *slider, void (*fn)(int, void *), void *ptr); -void *CheckBoxCreate(UIWindow *parent, int id, UIItem *title, int x, int y, int w, int h, int flags); +UIObject *CheckBoxCreate(UIWindow *parent, int id, UIItem *title, int x, int y, int w, int h, int flags); void CheckBoxSetCheck(UICheckBox *cb, bool state); bool CheckBoxIsChecked(UICheckBox *cb); void GetUIItemPosition(UIObject *item, int *x, int *y, int *w, int *h); diff --git a/Descent3/multi_ui.cpp b/Descent3/multi_ui.cpp index b27cab6d0..090e26eca 100644 --- a/Descent3/multi_ui.cpp +++ b/Descent3/multi_ui.cpp @@ -723,10 +723,8 @@ void DoMultiAllowed(void) { int i; const char *p; int objid; - int *index_to_id = NULL; bool shipsallowed[MAX_SHIPS]; bool objsallowed[MAX_OBJECTS]; - ConfigItem **ship_list = NULL; size_t strMax = std::max(strlen(TXT_ALLOW), strlen(TXT_DISALLOW)) + 3; char *str = mem_rmalloc(strMax); @@ -1067,7 +1065,6 @@ void MultiGameOptionsMenu(int alloptions) { NewUIWindow main_wnd; main_wnd.Create(0, 0, rs.screen_width, rs.screen_height, UIF_PROCESS_ALL); - int num_text = 0, num_edit = 0; int return_id; int id = 0; diff --git a/Descent3/multisafe_server.cpp b/Descent3/multisafe_server.cpp index 503a42cc3..4fd31cff4 100644 --- a/Descent3/multisafe_server.cpp +++ b/Descent3/multisafe_server.cpp @@ -1147,9 +1147,6 @@ void MultiDoMSafePowerup(uint8_t *data) { // Sends a powerup over to be evaluated on the client machine void MultiSendMSafePowerup(msafe_struct *mstruct) { - int sequence = -1; - int to_slot = -1; - // ASSERT (Netgame.local_role==LR_SERVER); uint8_t data[MAX_GAME_DATA_SIZE]; diff --git a/Descent3/newui.cpp b/Descent3/newui.cpp index d5c3a1507..30a9231af 100644 --- a/Descent3/newui.cpp +++ b/Descent3/newui.cpp @@ -372,7 +372,6 @@ void GetCenteredTextPos(int width, int gap, int left_item_width, int middle_item int *mx, int *rx) { int center_x = width / 2; int width_of_items = 2 * gap + left_item_width + middle_item_width + right_item_width; - int center_of_items = width_of_items / 2; *lx = center_x - (width_of_items / 2); *mx = (*lx) + gap + left_item_width; diff --git a/Descent3/newui.h b/Descent3/newui.h index 973721b5c..f39824b79 100644 --- a/Descent3/newui.h +++ b/Descent3/newui.h @@ -373,7 +373,7 @@ const tUIClass newuiNewClass = 1000; // NewUIGameWindow // this draws a UI window, but with a not-so-cool faded background. -class NewUIWindow : public UIWindow { +class NewUIWindow final : public UIWindow { chunked_bitmap m_Chunk; public: @@ -411,7 +411,7 @@ class NewUIGameWindow : public newuiTiledWindow { // NewUIMessageBox // this draws a UI window, but with the cool standard game dialog background. -class NewUIMessageBox : public NewUIGameWindow { +class NewUIMessageBox final : public NewUIGameWindow { public: NewUIMessageBox(); @@ -421,7 +421,7 @@ class NewUIMessageBox : public NewUIGameWindow { // NewUISlider // this draws a nicer loking slider. -class NewUISlider : public UISlider { +class NewUISlider final : public UISlider { UIBitmapItem m_SliderBar; UIBitmapItem m_Slider; @@ -432,7 +432,7 @@ class NewUISlider : public UISlider { // NewUIEdit // this draws a nicer edit box -class NewUIEdit : public UIEdit { +class NewUIEdit final : public UIEdit { UIBitmapItem m_EditLeft; UIBitmapItem m_EditCen; UIBitmapItem m_EditRight; @@ -450,7 +450,7 @@ class NewUIEdit : public UIEdit { // NewUIListBox // this draws a nicer list box -class NewUIListBox : public UIListBox { +class NewUIListBox final : public UIListBox { UIBitmapItem m_BackNW; UIBitmapItem m_BackN; UIBitmapItem m_BackNE; @@ -475,7 +475,7 @@ class NewUIListBox : public UIListBox { // NewUIComboBox // displays a listbox just one item. -class NewUIComboBox : public UIComboBox { +class NewUIComboBox final : public UIComboBox { UIBitmapItem m_CmbLeft; UIBitmapItem m_CmbCen; UIBitmapItem m_CmbRight; @@ -493,7 +493,7 @@ class NewUIComboBox : public UIComboBox { // NewUIButton // a nicer fixed size button. -class NewUIButton : public UIButton { +class NewUIButton final : public UIButton { UIBitmapItem m_BtnUpL, m_BtnUpC, m_BtnUpR; UIBitmapItem m_BtnDownL, m_BtnDownC, m_BtnDownR; UIBitmapItem m_BtnHiliteL, m_BtnHiliteC, m_BtnHiliteR; diff --git a/Descent3/newui_core.cpp b/Descent3/newui_core.cpp index 7346455c6..7da027c62 100644 --- a/Descent3/newui_core.cpp +++ b/Descent3/newui_core.cpp @@ -3119,7 +3119,6 @@ void newuiListBox::OnDraw() { // draw text? int i; - uint8_t alpha = 255; bool auto_select = ((m_Flags & UILB_AUTOSELECT) > 0); bool use_scroll = true; @@ -3768,9 +3767,6 @@ void newuiComboBox::SetSelectChangeCallback(void (*fn)(int)) { selectchange_fn = // behavior when gadget is being drawn. void newuiComboBox::OnDraw() { m_barbmp->draw(0, 0); - bool auto_select = ((m_Flags & UILB_AUTOSELECT) > 0); - bool use_scroll = true; - ui_SetTextClip(m_boffs, 1, m_W - m_boffs - m_up_btn.W(), m_H - 1); // decide whether to show arrows. , tricky code. diff --git a/Descent3/newui_core.h b/Descent3/newui_core.h index d4c3a896c..447cc21c0 100644 --- a/Descent3/newui_core.h +++ b/Descent3/newui_core.h @@ -360,7 +360,7 @@ class newuiButton : virtual public UIButton { // CLASS a large option button used in menus. -class newuiMenuOptionButton : public newuiButton { +class newuiMenuOptionButton final : public newuiButton { public: void Create(newuiMenu *menu, newuiMenuOptionButton *last, int16_t id, const char *name, int16_t x, int16_t y, bool m_mono_press); @@ -376,14 +376,14 @@ class newuiMenuOptionButton : public newuiButton { newuiMenuOptionButton *m_prev_btn, *m_next_btn; }; -class newuiTinyButton : public newuiButton { +class newuiTinyButton final : public newuiButton { public: void Create(UIWindow *wnd, int16_t id, const char *name, int16_t x, int16_t y); }; // CLASS creates an arrow button that is sensitive to touch (when down, always select) -class newuiArrowButton : public newuiButton { +class newuiArrowButton final : public newuiButton { public: newuiArrowButton(){}; @@ -405,7 +405,7 @@ class newuiArrowButton : public newuiButton { #define SUBGADGET_UP 0x3 #define SUBGADGET_DOWN 0x4 -class newuiListBox : public UIGadget { +class newuiListBox final : public UIGadget { public: newuiListBox(); @@ -475,7 +475,7 @@ class newuiListBox : public UIGadget { // CLASS newuiComboBox -class newuiComboBox : public UIGadget { +class newuiComboBox final : public UIGadget { public: newuiComboBox(); @@ -526,7 +526,7 @@ class newuiComboBox : public UIGadget { // the new classic hotspot CLASS -class newuiHotspot : public UIGadget { +class newuiHotspot final : public UIGadget { private: char *m_title; int16_t m_alpha, m_alpha_adjust; @@ -624,7 +624,7 @@ class newuiMenu : public UIWindow { // CLASS, large (fullscreen) menu -class newuiLargeMenu : public newuiMenu { +class newuiLargeMenu final : public newuiMenu { public: // creates a menu void Create(); diff --git a/Descent3/object.cpp b/Descent3/object.cpp index 8701fd2a8..1ee5b8a69 100644 --- a/Descent3/object.cpp +++ b/Descent3/object.cpp @@ -1997,7 +1997,6 @@ void FreeAllObjects() { void ObjDeleteDead() { int i; object *objp; - int local_dead_player_object = -1; // Move all objects objp = Objects; @@ -2066,7 +2065,6 @@ void ObjDeleteDead() { if (IS_GUIDEBOT(objp)) { int i; - int handle = objp->handle; for (i = 0; i < MAX_PLAYERS; i++) { if (objp->handle == Buddy_handle[i]) { @@ -2615,7 +2613,6 @@ extern int DoAI; //-------------------------------------------------------------------- // Process an object for the current frame void ObjDoFrame(object *obj) { - int previous_room = obj->roomnum; float save_frametime = Frametime; ASSERT(obj->type != OBJ_NONE); @@ -3299,7 +3296,6 @@ bool ObjGetAnimUpdate(uint16_t objnum, custom_anim *multi_anim_info) { if ((objnum >= 0) && (obj->type != OBJ_NONE) && (obj->type != OBJ_WEAPON) && (obj->flags & OF_POLYGON_OBJECT)) { polyobj_info *pm = &obj->rtype.pobj_info; - ai_frame *ai_info = obj->ai_info; multi_anim_info->server_time = Gametime; multi_anim_info->server_anim_frame = (uint16_t)(pm->anim_frame * 256.0f); @@ -3367,8 +3363,6 @@ void SetObjectControlType(object *obj, int control_type) { p_info->multi_turret_info.num_turrets = count; if ((count > 0) && (p_info->multi_turret_info.keyframes == NULL)) { - int cur = 0; - p_info->multi_turret_info.time = 0; p_info->multi_turret_info.keyframes = mem_rmalloc(count); p_info->multi_turret_info.last_keyframes = mem_rmalloc(count); @@ -3431,7 +3425,6 @@ void ObjGetTurretUpdate(uint16_t objnum, multi_turret *multi_turret_info) { void ObjSetTurretUpdate(uint16_t objnum, multi_turret *multi_turret_info) { object *obj = &Objects[objnum]; - poly_model *pm = &Poly_models[obj->rtype.pobj_info.model_num]; polyobj_info *p_info = &obj->rtype.pobj_info; if ((objnum >= 0) && (obj->type != OBJ_NONE) && (obj->type != OBJ_WEAPON) && (obj->flags & OF_POLYGON_OBJECT) && diff --git a/Descent3/object_lighting.cpp b/Descent3/object_lighting.cpp index ada517e1c..18897f7f8 100644 --- a/Descent3/object_lighting.cpp +++ b/Descent3/object_lighting.cpp @@ -237,8 +237,6 @@ void DoObjectLight(object *obj) { hit_info.hit_pnt -= obj->orient.fvec / 4; - float dist = vm_VectorDistanceQuick(&hit_info.hit_pnt, &obj->pos); - // Now light up the hit area if (ROOMNUM_OUTSIDE(hit_info.hit_room)) ApplyLightingToTerrain(&hit_info.hit_pnt, CELLNUM(hit_info.hit_room), FAST_HEADLIGHT_SIZE, @@ -470,7 +468,6 @@ void ClearObjectLightmaps(object *obj) { poly_model *pm = &Poly_models[obj->rtype.pobj_info.model_num]; ASSERT(pm->n_models < MAX_SUBOBJECTS); - int faceCount = 0; for (Mnum = 0; Mnum < pm->n_models; Mnum++) { if (!IsNonRenderableSubmodel(pm, Mnum)) { mem_free(obj->lm_object.lightmap_faces[Mnum][0].u2); diff --git a/Descent3/osiris_predefs.cpp b/Descent3/osiris_predefs.cpp index 762bf8e84..b871da61c 100644 --- a/Descent3/osiris_predefs.cpp +++ b/Descent3/osiris_predefs.cpp @@ -1877,7 +1877,6 @@ int osipf_AIGoalAdd(int objhandle, int goal_type, int level, float influence, in // Pop Goal Local Variables va_start(marker, flags); int i_value = va_arg(marker, int); - int j_value = va_arg(marker, int); va_end(marker); // Do the actual goal and return; diff --git a/Descent3/pilot.cpp b/Descent3/pilot.cpp index 94df967f0..ee4e3b88a 100644 --- a/Descent3/pilot.cpp +++ b/Descent3/pilot.cpp @@ -1804,7 +1804,7 @@ bool PltCopyKeyConfig(pilot *src, pilot *dest) { // UI3DWindow class // // UI class for displaying a polymodel on the UIWindow, rotating 30 deg/sec -class UI3DWindow : public UIStatic { +class UI3DWindow final : public UIStatic { public: void OnDraw(); }; @@ -1812,20 +1812,19 @@ class UI3DWindow : public UIStatic { // UIBmpWindow class // // UI class for displaying a bitmap on a UIWindow -class UIBmpWindow : public UIStatic { +class UIBmpWindow final : public UIStatic { public: UIBmpWindow(); - ~UIBmpWindow(); void SetInfo(bool animated, int handle); void OnDraw(); private: void DrawBorder(); - bool animated; - int bm_handle; + bool animated = false; + int bm_handle = -1; float start_time; UIText text; - bool created; + bool created = false; }; // struct ship_pos @@ -2957,14 +2956,9 @@ void UI3DWindow::OnDraw() { } UIBmpWindow::UIBmpWindow() { - animated = false; - bm_handle = -1; start_time = timer_GetTime(); - created = false; } -UIBmpWindow::~UIBmpWindow() {} - void UIBmpWindow::SetInfo(bool anim, int handle) { animated = anim; bm_handle = handle; diff --git a/Descent3/procedurals.cpp b/Descent3/procedurals.cpp index 456a7d3a3..c1316a8c6 100644 --- a/Descent3/procedurals.cpp +++ b/Descent3/procedurals.cpp @@ -215,7 +215,6 @@ void InitProcedurals() { float fg = gcount; int g = std::min((fg * lo_norm) + (7.0 * hi_norm), 7.0); for (t = 0; t < 32; t++) { - int index = gcount * 32 + t; WaterProcTableLo[i][gcount * 32 + t] |= (g << 5); } } @@ -224,8 +223,6 @@ void InitProcedurals() { int g = std::min((fg * lo_norm) + (24.0 * hi_norm), 24.0); for (t = 0; t < 32; t++) { - int index = t * 4 + gcount; - WaterProcTableHi[i][t * 4 + gcount] |= (g << 5); } } @@ -483,8 +480,6 @@ static inline void PlaceProcPoint(int x, int y, uint8_t color) { } // Adds a sphere lightning bolt void AddProcSphereLightning(int handle, static_proc_element *proc) { - int procnum = proc - GameTextures[handle].procedural->static_proc_elements; - if (Detail_settings.Procedurals_enabled) { if (proc->frequency != 0 && ((FrameCount) % proc->frequency) != 0) return; @@ -1149,7 +1144,6 @@ void EvaluateWaterProcedural(int handle) { if (procedural->memory_type != PROC_MEMORY_TYPE_WATER) AllocateMemoryForWaterProcedural(handle); - int dest_bitmap = procedural->procedural_bitmap; for (int i = 0; i < procedural->num_static_elements; i++) { static_proc_element *proc = &procedural->static_proc_elements[i]; switch (proc->type) { diff --git a/Descent3/render.cpp b/Descent3/render.cpp index 005abd6b9..db7b5ad1c 100644 --- a/Descent3/render.cpp +++ b/Descent3/render.cpp @@ -76,8 +76,6 @@ void RotateRoomPoints(room *rp, vector4 *world_vecs); #endif - -static int Faces_rendered = 0; extern float GetFPS(); extern uint8_t Outline_release_mode; // 3d point for each vertex for use during rendering a room @@ -709,7 +707,6 @@ void RotateAllExternalRooms() { room *rp = &Rooms[roomnum]; MakePointsFromMinMax(corners, &rp->min_xyz, &rp->max_xyz); - uint8_t andbyte = 0xff; g3Point pnt; External_room_codes[i] = 0xff; External_room_project_net[i] = 0; @@ -2446,7 +2443,7 @@ void RenderSingleLightGlow(int index) { // Draws a glow around a light void RenderSingleLightGlow2(int index) { static int first = 1; - static int normal_handle, star_handle; + static int star_handle; int bm_handle; room *rp = &Rooms[LightGlows[index].roomnum]; face *fp = &rp->faces[LightGlows[index].facenum]; @@ -2773,7 +2770,6 @@ void BuildMirroredRoomList() { cc.cc_and = 0xff; cc.cc_or = 0; int nv = fp->num_verts; - int clipped = 0; for (i = 0; i < fp->num_verts; i++) { vector temp_vec; @@ -2859,7 +2855,6 @@ void RenderMirroredRoom(room *rp) { #endif uint16_t save_flags[MAX_FACES_PER_ROOM]; bool restore_index = true; - int save_index = Global_buffer_index; // Save old rotated points if (rp->wpb_index == -1) { @@ -3001,7 +2996,6 @@ static int obj_sort_func(const obj_sort_item *a, const obj_sort_item *b) { static inline void IsRoomDynamicValid(room *rp, int x, int y, int z, float *r, float *g, float *b) { int w = rp->volume_width; int h = rp->volume_height; - int d = rp->volume_depth; uint8_t color = rp->volume_lights[(z * w * h) + (y * w) + x]; @@ -3058,9 +3052,6 @@ void GetRoomDynamicScalar(vector *pos, room *rp, float *r, float *g, float *b) { IsRoomDynamicValid(rp, int_x, next_y, next_z, &back_values_r[1], &back_values_g[1], &back_values_b[1]); IsRoomDynamicValid(rp, next_x, next_y, next_z, &back_values_r[2], &back_values_g[2], &back_values_b[2]); IsRoomDynamicValid(rp, next_x, int_y, next_z, &back_values_r[3], &back_values_g[3], &back_values_b[3]); - // Do front edge - int left_out = 0; - int right_out = 0; // Left edge left_norm_r = ((1 - fl_y) * front_values_r[0]) + (fl_y * front_values_r[1]); left_norm_g = ((1 - fl_y) * front_values_g[0]) + (fl_y * front_values_g[1]); diff --git a/Descent3/renderobject.cpp b/Descent3/renderobject.cpp index 082943092..547781364 100644 --- a/Descent3/renderobject.cpp +++ b/Descent3/renderobject.cpp @@ -996,7 +996,6 @@ void DrawDebugInfo(object *obj) { // Draw a shard void DrawShardObject(object *obj) { shard_info_s *si = &obj->rtype.shard_info; - bool flip = 0; g3Point rotated_points[3]; g3Point *pointlist[3]; uint8_t codes_and = 0xff; @@ -1335,7 +1334,6 @@ void RenderObject(object *obj) { float curr_alpha = 1.0f - alpha_step; float curr_t = t_interval; - float full_time = AFT / total_time; // how much of the interval we want to go across for (i = 0; i < num_iterations; i++) { if (!GetLinearPosition(positions, times, MAX_POSITION_HISTORY + 1, curr_t, &obj->pos)) @@ -1980,7 +1978,6 @@ void DrawPlayerDamageDisk(object *obj) { return; rend_SetZBias(-obj->size); int bm_handle; - int objnum = obj - Objects; float rot_temp = .25; // Higher is faster int int_game = Gametime / rot_temp; float diff = Gametime - (int_game * rot_temp); diff --git a/Descent3/scorch.cpp b/Descent3/scorch.cpp index 9f911031e..f1be9b912 100644 --- a/Descent3/scorch.cpp +++ b/Descent3/scorch.cpp @@ -293,9 +293,6 @@ struct { // Draw the scorch(es) for a given face void DrawScorches(int roomnum, int facenum) { - int i; - scorch *sp; - if (!Detail_settings.Scorches_enabled) return; diff --git a/Descent3/screens.cpp b/Descent3/screens.cpp index 978bfd5c4..c7cc0cdbd 100644 --- a/Descent3/screens.cpp +++ b/Descent3/screens.cpp @@ -221,8 +221,10 @@ #define BACKGROUND_VIS 0 #define OVERLAY_VIS 1 +/* static int Stat_ratings[] = {TXI_SCRNNONE, TXI_SCRNFEEBLE, TXI_SCRNPOOR, TXI_SCRNAVG, TXI_SCRNGOOD, TXI_SCRNEXCELLENT, TXI_SCRNSUPREME}; +*/ static struct { int state; diff --git a/Descent3/sdlmain.cpp b/Descent3/sdlmain.cpp index 3b04e6b8f..98352e5eb 100644 --- a/Descent3/sdlmain.cpp +++ b/Descent3/sdlmain.cpp @@ -127,7 +127,7 @@ void install_signal_handlers() { SetUnhandledExceptionFilter(RecordExceptionInfo // --------------------------------------------------------------------------- // Define our operating system specific extensions to the gameos system // --------------------------------------------------------------------------- -class oeD3LnxApp : public oeLnxApplication { +class oeD3LnxApp final : public oeLnxApplication { bool shutdown, final_shutdown; int old_screen_mode; @@ -142,7 +142,7 @@ class oeD3LnxApp : public oeLnxApplication { void run() { Descent3(); }; }; -class oeD3LnxDatabase : public oeLnxAppDatabase { +class oeD3LnxDatabase final : public oeLnxAppDatabase { public: oeD3LnxDatabase() { char path[_MAX_PATH]; diff --git a/Descent3/terrain.cpp b/Descent3/terrain.cpp index d982bc4b9..48b3e6b15 100644 --- a/Descent3/terrain.cpp +++ b/Descent3/terrain.cpp @@ -565,7 +565,6 @@ void BuildTerrainNormals() { for (z = 0, i = 0; i < TERRAIN_DEPTH - simplemul; i += simplemul, z++) { for (x = 0, t = 0; t < TERRAIN_WIDTH - simplemul; t += simplemul, x++) { - terrain_segment *tseg = &Terrain_seg[i * TERRAIN_WIDTH + t]; terrain_segment *tseg0 = &Terrain_seg[i * TERRAIN_WIDTH + t]; terrain_segment *tseg1 = &Terrain_seg[(i + simplemul) * TERRAIN_WIDTH + t]; terrain_segment *tseg2 = &Terrain_seg[((i + simplemul) * TERRAIN_WIDTH) + t + simplemul]; diff --git a/Descent3/terrainrender.cpp b/Descent3/terrainrender.cpp index bafca29ee..65e912f3e 100644 --- a/Descent3/terrainrender.cpp +++ b/Descent3/terrainrender.cpp @@ -1306,8 +1306,6 @@ void RenderTerrain(uint8_t from_mine, int left, int top, int right, int bot) { // Get the size of the current render window int render_width, render_height; rend_GetProjectionParameters(&render_width, &render_height); - float w2 = ((float)render_width - 1) / 2.0f; - float h2 = ((float)render_height - 1) / 2.0f; // Set up vars for (psuedo-)clipping window if (left < 0) { @@ -2689,7 +2687,7 @@ void DisplayTerrainList(int cellcount, bool from_automap) { rend_SetWrapType(WT_WRAP); } // Arrays for drawing -static int src[256]; +// static int src[256]; static g3Point base[256]; static g3Point *slist[256]; // Draws the 2 triangles of the Terrainlist[index] (software) diff --git a/Descent3/trigger.cpp b/Descent3/trigger.cpp index c1355f6f4..ef94e829b 100644 --- a/Descent3/trigger.cpp +++ b/Descent3/trigger.cpp @@ -167,7 +167,6 @@ void FreeTriggers() { // Generates an error if the trigger cannot be found // Paramaters: roomnum,facenum - the room and face with the trigger trigger *FindTrigger(int roomnum, int facenum) { - face *fp = &Rooms[roomnum].faces[facenum]; trigger *tp; int i; diff --git a/Descent3/viseffect.cpp b/Descent3/viseffect.cpp index 6152f97cc..74004c1c3 100644 --- a/Descent3/viseffect.cpp +++ b/Descent3/viseffect.cpp @@ -936,9 +936,7 @@ void CreateRandomParticles(int num_sparks, vector *pos, int roomnum, int bm_hand void DrawVisFadingLine(vis_effect *vis) { float norm_time; float time_live = Gametime - vis->creation_time; - float size = vis->size; - int visnum = vis - VisEffects; norm_time = time_live / vis->lifetime; if (norm_time >= 1) @@ -1087,7 +1085,6 @@ void DrawVisRainDrop(vis_effect *vis) { float time_live = Gametime - vis->creation_time; float size = vis->size; - int visnum = vis - VisEffects; int bm_handle; fireball *fb = &Fireballs[vis->id]; @@ -1147,7 +1144,6 @@ void DrawVisSnowflake(vis_effect *vis) { float time_live = Gametime - vis->creation_time; float size = vis->size; - int visnum = vis - VisEffects; int bm_handle; fireball *fb = &Fireballs[vis->id]; @@ -1464,9 +1460,7 @@ void DrawVisAxisBillboard(vis_effect *vis) { float norm_time, alpha_norm = 1; float uchange = 0, vchange = 0; float time_live = Gametime - vis->creation_time; - float size = vis->size; - int visnum = vis - VisEffects; int bm_handle; int i; @@ -1485,8 +1479,6 @@ void DrawVisAxisBillboard(vis_effect *vis) { pntlist[i] = &pnts[i]; } - fireball *fb = &Fireballs[vis->id]; - norm_time = time_live / vis->lifetime; if (vis->flags & VF_EXPAND) @@ -1572,11 +1564,8 @@ void DrawVisAxisBillboard(vis_effect *vis) { // Draws a bitmap that can orient around an axis void DrawVisBillboardSmoketrail(vis_effect *vis) { float norm_time, alpha_norm = 1; - float uchange = 0, vchange = 0; float time_live = Gametime - vis->creation_time; - float size = vis->size; - int visnum = vis - VisEffects; int bm_handle; // Get corners of this billboard @@ -1601,8 +1590,6 @@ void DrawVisBillboardSmoketrail(vis_effect *vis) { if (!GetBillboardCorners(pnts, &top_point, &bot_point, width)) return; - fireball *fb = &Fireballs[vis->id]; - for (int i = 0; i < 4; i++) { pnts[i].p3_flags |= PF_UV | PF_RGBA; pntlist[i] = &pnts[i]; diff --git a/Descent3/voice.cpp b/Descent3/voice.cpp index b889df501..2d76b9d96 100644 --- a/Descent3/voice.cpp +++ b/Descent3/voice.cpp @@ -152,9 +152,9 @@ void StartVoice(char *filename, int flags) { return; } - bool compressed = (flags & VF_COMPRESSED) ? true : false; - bool bit8 = (flags & VF_8BIT) ? true : false; - bool stereo = (flags & VF_STEREO) ? true : false; + // bool compressed = (flags & VF_COMPRESSED) ? true : false; + // bool bit8 = (flags & VF_8BIT) ? true : false; + // bool stereo = (flags & VF_STEREO) ? true : false; int vf = 0; diff --git a/Descent3/weather.cpp b/Descent3/weather.cpp index 29fb42bba..ec2515e49 100644 --- a/Descent3/weather.cpp +++ b/Descent3/weather.cpp @@ -155,7 +155,6 @@ void DoRainEffect() { if (visnum >= 0) { vis_effect *vis = &VisEffects[visnum]; float life = .2f; - float size = .7 + ((ps_rand() % 10) / 20.0); vis->lifeleft = life; vis->lifetime = life; vis->end_pos = norm; diff --git a/bitmap/bitmain.cpp b/bitmap/bitmain.cpp index bcaffd36d..38586bf1f 100644 --- a/bitmap/bitmain.cpp +++ b/bitmap/bitmain.cpp @@ -575,8 +575,6 @@ int bm_AllocNoMemBitmap(int w, int h) { // Searches thru all bitmaps for a specific name, returns -1 if not found // or index of bitmap with name int bm_FindBitmapName(const char *name) { - int num_counted = 0; - bms_bitmap fbmp; strcpy(fbmp.name, name); bm_Node *fnode = bm_findNode(&fbmp); @@ -641,8 +639,6 @@ int bm_TestName(const char *src) { strncpy(namedest, filename, limit); namedest[limit] = 0; - int cur_len = strlen(namedest); - // Now, make sure there are no other bitmaps with this name strcat(namedest, ".ogf"); if ((i = bm_FindBitmapName(namedest)) == -1) @@ -652,7 +648,6 @@ int bm_TestName(const char *src) { // gets the filename from a path, plus appends our .ogf extension void bm_ChangeEndName(const char *src, char *dest) { uint32_t i, limit; - int last = -1; int curnum = -1; char namedest[256 + 16]; char path[256], ext[256], filename[256]; diff --git a/bitmap/iff.cpp b/bitmap/iff.cpp index de93cb28c..acc875709 100644 --- a/bitmap/iff.cpp +++ b/bitmap/iff.cpp @@ -382,7 +382,7 @@ int bm_iff_parse_file(CFILE *ifile, iff_bitmap_header *bmheader, iff_bitmap_head switch (sig) { case IFF_SIG_FORM: { - int newsig = bm_iff_get_sig(ifile); + bm_iff_get_sig(ifile); bmheader->type = TYPE_PBM; break; } diff --git a/cfile/inffile.h b/cfile/inffile.h index 50c9d26b0..6111290dc 100644 --- a/cfile/inffile.h +++ b/cfile/inffile.h @@ -42,10 +42,10 @@ enum InfFileError { INFFILE_SYMBOL = 1024, }; -class InfFile { +class InfFile final { public: InfFile(); - virtual ~InfFile(); + ~InfFile(); // opens an inf file, pass in a lexical analyzer that will return a command index. // tag_check is a string that must appear at the very beginning of the file. diff --git a/ddio/controller.h b/ddio/controller.h index d4793cba2..b6c8dd51b 100644 --- a/ddio/controller.h +++ b/ddio/controller.h @@ -203,7 +203,7 @@ static inline uint16_t makeshort(uint8_t h, uint8_t l) { return static_cast class tList { template class tQueue { T m_items[t_LEN]; - int16_t m_head, m_tail; + int16_t m_head = 0, m_tail = 0; public: - tQueue() { m_head = m_tail = 0; }; - ~tQueue(){}; - void send(T &item) { // sends an item onto the queue int16_t temp = m_tail + 1; if (temp == t_LEN) diff --git a/libmve/mveplay.cpp b/libmve/mveplay.cpp index 9df8560c6..cd2267e46 100644 --- a/libmve/mveplay.cpp +++ b/libmve/mveplay.cpp @@ -174,7 +174,7 @@ static int create_audiobuf_handler(unsigned char major, unsigned char minor, uns int flags = get_ushort(data + 2); int sample_rate = get_ushort(data + 4); - int desired_buffer = get_int(data + 6); + // int desired_buffer = get_int(data + 6); int channels = (flags & MVE_AUDIO_FLAGS_STEREO) ? 2 : 1; int sample_size = (flags & MVE_AUDIO_FLAGS_16BIT) ? 2 : 1; @@ -338,12 +338,12 @@ static int video_codemap_handler(unsigned char major, unsigned char minor, unsig static int video_data_handler(unsigned char major, unsigned char minor, unsigned char *data, int len, void *context) { unsigned char *temp; - short nFrameHot = get_short(data); - short nFrameCold = get_short(data + 2); - short nXoffset = get_short(data + 4); - short nYoffset = get_short(data + 6); - short nXsize = get_short(data + 8); - short nYsize = get_short(data + 10); + // short nFrameHot = get_short(data); + // short nFrameCold = get_short(data + 2); + // short nXoffset = get_short(data + 4); + // short nYoffset = get_short(data + 6); + // short nXsize = get_short(data + 8); + // short nYsize = get_short(data + 10); unsigned short nFlags = get_ushort(data + 12); if (nFlags & 1) { diff --git a/manage/gamefilepage.cpp b/manage/gamefilepage.cpp index 1c03e3e70..b3d4bcf4e 100644 --- a/manage/gamefilepage.cpp +++ b/manage/gamefilepage.cpp @@ -76,7 +76,7 @@ int mng_ReadNewGamefilePage(CFILE *infile, mngs_gamefile_page *gamefilepage) { ASSERT(infile != NULL); memset(gamefilepage, 0, sizeof(mngs_gamefile_page)); - int version = cf_ReadShort(infile); + /* int version = */ cf_ReadShort(infile); cf_ReadString(gamefilepage->gamefile_struct.name, PAGENAME_LEN, infile); cf_ReadString(gamefilepage->gamefile_struct.dir_name, PAGENAME_LEN, infile); diff --git a/manage/manage.cpp b/manage/manage.cpp index 97736b03d..bf9d4b532 100644 --- a/manage/manage.cpp +++ b/manage/manage.cpp @@ -1480,7 +1480,7 @@ void mng_TransferPages() { continue; } pagetype = cf_ReadByte(infile); - int len = cf_ReadInt(infile); + /* int len = */ cf_ReadInt(infile); switch (pagetype) { case PAGETYPE_TEXTURE: mng_ReadNewTexturePage(infile, &texpage); @@ -2208,7 +2208,7 @@ int mng_ReplacePage(char *srcname, char *destname, int handle, int dest_pagetype // If local is 1, deletes from the local table file int mng_DeletePage(char *name, int dest_pagetype, int local) { CFILE *infile, *outfile; - uint8_t pagetype, replaced = 0; + uint8_t pagetype; int done = 0; int deleted = 0; diff --git a/manage/megapage.cpp b/manage/megapage.cpp index abde9a3df..e0d03407b 100644 --- a/manage/megapage.cpp +++ b/manage/megapage.cpp @@ -176,7 +176,7 @@ int mng_ReadNewMegacellPage(CFILE *infile, mngs_megacell_page *megacellpage) { int i; ASSERT(infile != NULL); memset(megacellpage, 0, sizeof(mngs_megacell_page)); - int version = cf_ReadShort(infile); + /* int version = */ cf_ReadShort(infile); cf_ReadString(megacellpage->megacell_struct.name, PAGENAME_LEN, infile); diff --git a/manage/pagelock.cpp b/manage/pagelock.cpp index c5ca71522..74c21be62 100644 --- a/manage/pagelock.cpp +++ b/manage/pagelock.cpp @@ -225,7 +225,6 @@ void mng_InitPagelocks() { // Returns pointer to locker's name, or NULL if the file is unlocked char *mng_CheckIfLockerPresent() { CFILE *infile; - int i = 0; static char lockname[200]; ASSERT(Network_up); @@ -380,7 +379,6 @@ int mng_CheckIfPageLocked(mngs_Pagelock *pl) { r = 2; } else { if (!stricmp(pl->name, testlock.name)) { - int test = 0; if (pl->pagetype == testlock.pagetype) { if (!stricmp(testlock.holder, "UNLOCKED")) r = 0; @@ -602,7 +600,7 @@ int mng_DeletePagelock(char *name, int pagetype) { // Given a list of names and a pagetype, deletes the ones already inside the lock file int mng_DeletePagelockSeries(char *names[], int num, int pagetype) { CFILE *infile, *outfile; - int done = 0, deleted = 0; + int done = 0; mngs_Pagelock temp_pl; infile = (CFILE *)cfopen(TableLockFilename, "rb"); @@ -656,7 +654,7 @@ int mng_DeletePagelockSeries(char *names[], int num, int pagetype) { // Goes through the pagelock table and deletes all duplicate entries int mng_DeleteDuplicatePagelocks() { CFILE *infile; //,*outfile; - int done = 0, deleted = 0; + int done = 0; mngs_Pagelock temp_pl; mngs_Pagelock *already_read; int num = 0, duplicates = 0, i; @@ -727,7 +725,7 @@ int mng_UnlockPagelockSeries(const char *names[], int *pagetypes, int num) { memset(already_done, 0, 500); CFILE *infile, *outfile; - int done = 0, deleted = 0; + int done = 0; mngs_Pagelock temp_pl; int total = 0; diff --git a/manage/soundpage.cpp b/manage/soundpage.cpp index bab72d600..883631a5d 100644 --- a/manage/soundpage.cpp +++ b/manage/soundpage.cpp @@ -221,7 +221,7 @@ void mng_WriteNewSoundPage(CFILE *outfile, mngs_sound_page *soundpage) { // Reads a sound page from an open file. Returns 0 on error. int mng_ReadNewSoundPage(CFILE *infile, mngs_sound_page *soundpage) { ASSERT(infile != NULL); - int version = cf_ReadShort(infile); + /* int version = */ cf_ReadShort(infile); // read in name,rawfile name cf_ReadString(soundpage->sound_struct.name, PAGENAME_LEN, infile); cf_ReadString(soundpage->raw_name, PAGENAME_LEN, infile); diff --git a/manage/texpage.cpp b/manage/texpage.cpp index 53b4ae3c6..581b53fa0 100644 --- a/manage/texpage.cpp +++ b/manage/texpage.cpp @@ -762,9 +762,8 @@ int mng_ReadNewTexturePage(CFILE *infile, mngs_texture_page *texpage) { // If local is 1, deletes from the local table file int mng_DeleteTexPageSeries(char *names[], int num_textures, int local) { CFILE *infile, *outfile; - uint8_t pagetype, replaced = 0; + uint8_t pagetype; int done = 0; - int deleted = 0; memset(&texpage1, 0, sizeof(mngs_texture_page)); if (local) @@ -796,7 +795,7 @@ int mng_DeleteTexPageSeries(char *names[], int num_textures, int local) { continue; } pagetype = cf_ReadByte(infile); - int len = cf_ReadInt(infile); + /* int len = */ cf_ReadInt(infile); // If not a texture page, just read it in and write it right back out if (pagetype != PAGETYPE_TEXTURE) { diff --git a/model/newstyle.cpp b/model/newstyle.cpp index cf7d39400..aec00dee1 100644 --- a/model/newstyle.cpp +++ b/model/newstyle.cpp @@ -510,7 +510,6 @@ inline void RenderSubmodelLightmapFace(poly_model *pm, bsp_info *sm, int facenum inline void RenderSubmodelFaceFogged(poly_model *pm, bsp_info *sm, int facenum) { g3Point *pointlist[100]; polyface *fp = &sm->faces[facenum]; - int modelnum = sm - pm->submodel; int t; for (t = 0; t < fp->nverts; t++) { @@ -561,7 +560,6 @@ inline void RenderSubmodelFaceFogged(poly_model *pm, bsp_info *sm, int facenum) inline void RenderSubmodelFaceSpecular(poly_model *pm, bsp_info *sm, int facenum) { g3Point *pointlist[100]; polyface *fp = &sm->faces[facenum]; - int modelnum = sm - pm->submodel; int t; bool smooth = 0; @@ -623,7 +621,6 @@ inline void RenderSubmodelFaceSpecular(poly_model *pm, bsp_info *sm, int facenum // Draws a glowing cone of light that represents thrusters void DrawThrusterEffect(vector *pos, float r, float g, float b, vector *norm, float size, float length) { vector cur_pos = *pos; - float cur_length = 0; vector glow_pos[MAX_PARTS]; float glow_size[MAX_PARTS]; int total_parts = 0; @@ -702,7 +699,6 @@ void RenderSubmodelFacesSorted(poly_model *pm, bsp_info *sm) { int rcount; int model_render_order[MAX_POLYGON_VECS]; - int modelnum = sm - pm->submodel; ASSERT(sm->nverts < MAX_POLYGON_VECS); diff --git a/model/polymodel.cpp b/model/polymodel.cpp index 1bec6b1b9..da3615a76 100644 --- a/model/polymodel.cpp +++ b/model/polymodel.cpp @@ -2441,8 +2441,6 @@ void SetModelAngles(poly_model *po, const float *normalized_angles) { // Now do a parametric adjustment on the angles - int cur_angle = 0; - // If we're already at the high point of the interpolation then just // stuff some values if (cur_state == po->num_key_angles - 1) { @@ -2555,7 +2553,6 @@ void SetModelInterpPos(poly_model *po, const float *normalized_pos) { // Now do a parametric adjustment on the positions - vector total_delta_pos = {0, 0, 0}; vector subpos; vector final_pos; @@ -3122,7 +3119,6 @@ int CountFacesInPolymodel(poly_model *pm) { // of that point void GetPolyModelPointInWorld(vector *dest, poly_model *pm, vector *wpos, matrix *orient, int subnum, vector *pos, vector *norm) { - bsp_info *sm = &pm->submodel[subnum]; float normalized_time[MAX_SUBOBJECTS]; int i; @@ -3174,8 +3170,6 @@ void GetPolyModelPointInWorld(vector *dest, poly_model *pm, vector *wpos, matrix void GetPolyModelPointInWorld(vector *dest, poly_model *pm, vector *wpos, matrix *orient, int subnum, float *normalized_time, vector *pos, vector *norm) { - bsp_info *sm = &pm->submodel[subnum]; - ASSERT(!(pm->flags & PMF_NOT_RESIDENT)); if (!pm->new_style) diff --git a/module/module.cpp b/module/module.cpp index 121b69077..8dd725607 100644 --- a/module/module.cpp +++ b/module/module.cpp @@ -233,7 +233,6 @@ bool mod_FreeModule(module *handle) { // mod_GetLastError to see if there was an error symstr is the name of the function you want to get the symbol for (Do // NOT give any pre/suffix to this name) parmbytes is the size (in bytes) of the parameter list the function should have MODPROCADDRESS mod_GetSymbol(module *handle, const char *symstr, uint8_t parmbytes) { - char buffer[256]; MODPROCADDRESS sym; if (!handle) { ModLastError = MODERR_INVALIDHANDLE; @@ -248,6 +247,7 @@ MODPROCADDRESS mod_GetSymbol(module *handle, const char *symstr, uint8_t parmbyt return nullptr; } #if defined(WIN32) + char buffer[256]; // We need to first form the correct symbol name (for Windows) if (parmbytes == 255) sprintf(buffer, "%s", symstr); diff --git a/netcon/descent3onlineclient/odtclient.cpp b/netcon/descent3onlineclient/odtclient.cpp index 195eb899c..c12174b5d 100644 --- a/netcon/descent3onlineclient/odtclient.cpp +++ b/netcon/descent3onlineclient/odtclient.cpp @@ -376,37 +376,37 @@ int MainMultiplayerMenu() { DLLToggleUICallback(0); ChatStarted = 1; - void *title_text = DLLCreateNewUITextItem(TXT_ODT_CONNECTING, UICOL_WINDOW_TITLE); + auto title_text = DLLCreateNewUITextItem(TXT_ODT_CONNECTING, UICOL_WINDOW_TITLE); - void *cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI); - void *cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO); + auto cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI); + auto cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO); - void *exit_on_text = DLLCreateNewUITextItem(TXT_ODT_EXIT, UICOL_HOTSPOT_HI); - void *exit_off_text = DLLCreateNewUITextItem(TXT_ODT_EXIT, UICOL_HOTSPOT_LO); + auto exit_on_text = DLLCreateNewUITextItem(TXT_ODT_EXIT, UICOL_HOTSPOT_HI); + auto exit_off_text = DLLCreateNewUITextItem(TXT_ODT_EXIT, UICOL_HOTSPOT_LO); - void *priv_msg_on_text = DLLCreateNewUITextItem(TXT_ODT_SENDPRIV, UICOL_HOTSPOT_HI); - void *priv_msg_off_text = DLLCreateNewUITextItem(TXT_ODT_SENDPRIV, UICOL_HOTSPOT_LO); + auto priv_msg_on_text = DLLCreateNewUITextItem(TXT_ODT_SENDPRIV, UICOL_HOTSPOT_HI); + auto priv_msg_off_text = DLLCreateNewUITextItem(TXT_ODT_SENDPRIV, UICOL_HOTSPOT_LO); - void *join_lobby_on_text = DLLCreateNewUITextItem(TXT_ODT_JOINPRIV, UICOL_HOTSPOT_HI); - void *join_lobby_off_text = DLLCreateNewUITextItem(TXT_ODT_JOINPRIV, UICOL_HOTSPOT_LO); + auto join_lobby_on_text = DLLCreateNewUITextItem(TXT_ODT_JOINPRIV, UICOL_HOTSPOT_HI); + auto join_lobby_off_text = DLLCreateNewUITextItem(TXT_ODT_JOINPRIV, UICOL_HOTSPOT_LO); - void *join_chan_on_text = DLLCreateNewUITextItem(TXT_ODT_JOINCHAN, UICOL_HOTSPOT_HI); - void *join_chan_off_text = DLLCreateNewUITextItem(TXT_ODT_JOINCHAN, UICOL_HOTSPOT_LO); + auto join_chan_on_text = DLLCreateNewUITextItem(TXT_ODT_JOINCHAN, UICOL_HOTSPOT_HI); + auto join_chan_off_text = DLLCreateNewUITextItem(TXT_ODT_JOINCHAN, UICOL_HOTSPOT_LO); - void *find_pilot_on_text = DLLCreateNewUITextItem(TXT_ODT_FINDPILOT, UICOL_HOTSPOT_HI); - void *find_pilot_off_text = DLLCreateNewUITextItem(TXT_ODT_FINDPILOT, UICOL_HOTSPOT_LO); + auto find_pilot_on_text = DLLCreateNewUITextItem(TXT_ODT_FINDPILOT, UICOL_HOTSPOT_HI); + auto find_pilot_off_text = DLLCreateNewUITextItem(TXT_ODT_FINDPILOT, UICOL_HOTSPOT_LO); - void *game_on_text = DLLCreateNewUITextItem(TXT_ODT_JOINSTARTGAME, UICOL_HOTSPOT_HI); - void *game_off_text = DLLCreateNewUITextItem(TXT_ODT_JOINSTARTGAME, UICOL_HOTSPOT_LO); + auto game_on_text = DLLCreateNewUITextItem(TXT_ODT_JOINSTARTGAME, UICOL_HOTSPOT_HI); + auto game_off_text = DLLCreateNewUITextItem(TXT_ODT_JOINSTARTGAME, UICOL_HOTSPOT_LO); - void *send_on_text = DLLCreateNewUITextItem(TXT_ODT_SEND, UICOL_HOTSPOT_HI); - void *send_off_text = DLLCreateNewUITextItem(TXT_ODT_SEND, UICOL_HOTSPOT_LO); + auto send_on_text = DLLCreateNewUITextItem(TXT_ODT_SEND, UICOL_HOTSPOT_HI); + auto send_off_text = DLLCreateNewUITextItem(TXT_ODT_SEND, UICOL_HOTSPOT_LO); char fmtlobbytext[200]; snprintf(fmtlobbytext, sizeof(fmtlobbytext), TXT_ODT_YOUAREINLOBBY, Ourlobby); - void *lobby_text = DLLCreateNewUITextItem(fmtlobbytext, UICOL_TEXT_AUX); + auto lobby_text = DLLCreateNewUITextItem(fmtlobbytext, UICOL_TEXT_AUX); - void *blank_text = DLLCreateNewUITextItem(TXT_ODT_BLANK, UICOL_TEXT_AUX); + auto blank_text = DLLCreateNewUITextItem(TXT_ODT_BLANK, UICOL_TEXT_AUX); char sendline[MAX_CHAT_SEND_LEN]; int exit_menu = 0; int ret = 0; @@ -436,41 +436,41 @@ int MainMultiplayerMenu() { } // Create our buttons - void *main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL); + auto main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL); // void HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, // int h, int flags,int winnum) - void *exit_hs = DLLHotSpotCreate(main_wnd, 5, KEY_ESC, exit_off_text, exit_on_text, 33, 427, 70, 15, 0); + /* auto exit_hs = */ DLLHotSpotCreate(main_wnd, 5, KEY_ESC, exit_off_text, exit_on_text, 33, 427, 70, 15, 0); - void *priv_hs = DLLHotSpotCreate(main_wnd, 6, 0, priv_msg_off_text, priv_msg_on_text, 328, 403, 170, 15, 0); + auto priv_hs = DLLHotSpotCreate(main_wnd, 6, 0, priv_msg_off_text, priv_msg_on_text, 328, 403, 170, 15, 0); #define JOIN_ROW 131 - void *join_lobby_hs = + auto join_lobby_hs = DLLHotSpotCreate(main_wnd, 7, 0, join_lobby_off_text, join_lobby_on_text, 400, JOIN_ROW, 170, 15, 0); - void *join_chan_hs = + auto join_chan_hs = DLLHotSpotCreate(main_wnd, 14, 0, join_chan_off_text, join_chan_on_text, 178, JOIN_ROW, 170, 15, 0); - void *find_hs = DLLHotSpotCreate(main_wnd, 9, 0, find_pilot_off_text, find_pilot_on_text, 156, 403, 140, 15, 0); + auto find_hs = DLLHotSpotCreate(main_wnd, 9, 0, find_pilot_off_text, find_pilot_on_text, 156, 403, 140, 15, 0); - void *game_hs = DLLHotSpotCreate(main_wnd, 11, 0, game_off_text, game_on_text, 505, 431, 135, 15, 0); + auto game_hs = DLLHotSpotCreate(main_wnd, 11, 0, game_off_text, game_on_text, 505, 431, 135, 15, 0); - void *enter_hs = DLLHotSpotCreate(main_wnd, 15, KEY_ENTER, send_off_text, send_on_text, 550, 370, 70, 15, 0); + auto enter_hs = DLLHotSpotCreate(main_wnd, 15, KEY_ENTER, send_off_text, send_on_text, 550, 370, 70, 15, 0); // lobby_text - void *lobby_txt_gadget = DLLTextCreate(main_wnd, lobby_text, 200, 450, UIF_CENTER); + auto lobby_txt_gadget = DLLTextCreate(main_wnd, lobby_text, 200, 450, UIF_CENTER); // User list box, id #10 - void *user_list = DLLOldListCreate(main_wnd, 10, colx1 + 20, 100, 108, 265, 0); + auto user_list = DLLOldListCreate(main_wnd, 10, colx1 + 20, 100, 108, 265, 0); // Channel list box, id #14 - void *chan_list = DLLOldListCreate(main_wnd, 14, colx2, 25, 470, 96, 0); + auto chan_list = DLLOldListCreate(main_wnd, 14, colx2, 25, 470, 96, 0); // Edit box for typing in chat, id # 15 - void *send_edit = DLLOldEditCreate(main_wnd, 15, colx2 + 10, 372, 390, 20, UIED_AUTOSELECT); + auto send_edit = DLLOldEditCreate(main_wnd, 15, colx2 + 10, 372, 390, 20, UIED_AUTOSELECT); DLLNewUIWindowLoadBackgroundImage(main_wnd, "d3online_main.ogf"); DLLSetOldEditBufferLen(send_edit, 100); - void *console_item = DLLUIConsoleGadgetCreate(main_wnd, 16, colx2, 165, 0, 51, 16, 0); + auto console_item = DLLUIConsoleGadgetCreate(main_wnd, 16, colx2, 165, 0, 51, 16, 0); pconsole = console_item; DLLNewUIWindowOpen(main_wnd); @@ -1062,45 +1062,44 @@ int SearchMasterTrackerGameMenu() { float last_req_time; float last_master_req_time; char selgame[200]; - void *return_text_on = DLLCreateNewUITextItem(TXT_ODT_RETURNTOCHAT, UICOL_HOTSPOT_HI); - void *return_text_off = DLLCreateNewUITextItem(TXT_ODT_RETURNTOCHAT, UICOL_HOTSPOT_LO); - void *game_head_text = DLLCreateNewUITextItem(TXT_ODT_GAMELISTHDR, UICOL_TEXT_NORMAL); - void *exit_on_text = DLLCreateNewUITextItem(TXT_ODT_EXIT, UICOL_HOTSPOT_HI); - void *exit_off_text = DLLCreateNewUITextItem(TXT_ODT_EXIT, UICOL_HOTSPOT_LO); - void *join_on_text = DLLCreateNewUITextItem(TXT_ODT_JOINSEL, UICOL_HOTSPOT_HI); - void *join_off_text = DLLCreateNewUITextItem(TXT_ODT_JOINSEL, UICOL_HOTSPOT_LO); - void *start_on_text = DLLCreateNewUITextItem(TXT_ODT_STARTNEW, UICOL_HOTSPOT_HI); - void *start_off_text = DLLCreateNewUITextItem(TXT_ODT_STARTNEW, UICOL_HOTSPOT_LO); - - void *gname_on_text = DLLCreateNewUITextItem(TXT_ODT_GAMENAME2, UICOL_HOTSPOT_HI); - void *gname_off_text = DLLCreateNewUITextItem(TXT_ODT_GAMENAME2, UICOL_HOTSPOT_LO); - void *gtype_on_text = DLLCreateNewUITextItem(TXT_ODT_GAMETYPE, UICOL_HOTSPOT_HI); - void *gtype_off_text = DLLCreateNewUITextItem(TXT_ODT_GAMETYPE, UICOL_HOTSPOT_LO); - void *msn_on_text = DLLCreateNewUITextItem(TXT_ODT_MISSION, UICOL_HOTSPOT_HI); - void *msn_off_text = DLLCreateNewUITextItem(TXT_ODT_MISSION, UICOL_HOTSPOT_LO); - void *lvl_on_text = DLLCreateNewUITextItem(TXT_ODT_LEVEL, UICOL_HOTSPOT_HI); - void *lvl_off_text = DLLCreateNewUITextItem(TXT_ODT_LEVEL, UICOL_HOTSPOT_LO); - void *plrs_on_text = DLLCreateNewUITextItem(TXT_ODT_PLAYERS, UICOL_HOTSPOT_HI); - void *plrs_off_text = DLLCreateNewUITextItem(TXT_ODT_PLAYERS, UICOL_HOTSPOT_LO); - void *ping_on_text = DLLCreateNewUITextItem(TXT_ODT_PING, UICOL_HOTSPOT_HI); - void *ping_off_text = DLLCreateNewUITextItem(TXT_ODT_PING, UICOL_HOTSPOT_LO); + auto return_text_on = DLLCreateNewUITextItem(TXT_ODT_RETURNTOCHAT, UICOL_HOTSPOT_HI); + auto return_text_off = DLLCreateNewUITextItem(TXT_ODT_RETURNTOCHAT, UICOL_HOTSPOT_LO); + auto game_head_text = DLLCreateNewUITextItem(TXT_ODT_GAMELISTHDR, UICOL_TEXT_NORMAL); + auto exit_on_text = DLLCreateNewUITextItem(TXT_ODT_EXIT, UICOL_HOTSPOT_HI); + auto exit_off_text = DLLCreateNewUITextItem(TXT_ODT_EXIT, UICOL_HOTSPOT_LO); + auto join_on_text = DLLCreateNewUITextItem(TXT_ODT_JOINSEL, UICOL_HOTSPOT_HI); + auto join_off_text = DLLCreateNewUITextItem(TXT_ODT_JOINSEL, UICOL_HOTSPOT_LO); + auto start_on_text = DLLCreateNewUITextItem(TXT_ODT_STARTNEW, UICOL_HOTSPOT_HI); + auto start_off_text = DLLCreateNewUITextItem(TXT_ODT_STARTNEW, UICOL_HOTSPOT_LO); + + auto gname_on_text = DLLCreateNewUITextItem(TXT_ODT_GAMENAME2, UICOL_HOTSPOT_HI); + auto gname_off_text = DLLCreateNewUITextItem(TXT_ODT_GAMENAME2, UICOL_HOTSPOT_LO); + auto gtype_on_text = DLLCreateNewUITextItem(TXT_ODT_GAMETYPE, UICOL_HOTSPOT_HI); + auto gtype_off_text = DLLCreateNewUITextItem(TXT_ODT_GAMETYPE, UICOL_HOTSPOT_LO); + auto msn_on_text = DLLCreateNewUITextItem(TXT_ODT_MISSION, UICOL_HOTSPOT_HI); + auto msn_off_text = DLLCreateNewUITextItem(TXT_ODT_MISSION, UICOL_HOTSPOT_LO); + auto lvl_on_text = DLLCreateNewUITextItem(TXT_ODT_LEVEL, UICOL_HOTSPOT_HI); + auto lvl_off_text = DLLCreateNewUITextItem(TXT_ODT_LEVEL, UICOL_HOTSPOT_LO); + auto plrs_on_text = DLLCreateNewUITextItem(TXT_ODT_PLAYERS, UICOL_HOTSPOT_HI); + auto plrs_off_text = DLLCreateNewUITextItem(TXT_ODT_PLAYERS, UICOL_HOTSPOT_LO); + auto ping_on_text = DLLCreateNewUITextItem(TXT_ODT_PING, UICOL_HOTSPOT_HI); + auto ping_off_text = DLLCreateNewUITextItem(TXT_ODT_PING, UICOL_HOTSPOT_LO); char fmt_textstr[200]; snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_ODT_MAKEGAMEDEFAULT, 28); - void *default_on_text = DLLCreateNewUITextItem(fmt_textstr, UICOL_HOTSPOT_HI); + auto default_on_text = DLLCreateNewUITextItem(fmt_textstr, UICOL_HOTSPOT_HI); snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_ODT_MAKEGAMEDEFAULT, 28); - void *default_off_text = DLLCreateNewUITextItem(fmt_textstr, UICOL_HOTSPOT_LO); - void *game_hdr_text = DLLCreateNewUITextItem(TXT_ODT_GAME_HDR, UICOL_WINDOW_TITLE); + auto default_off_text = DLLCreateNewUITextItem(fmt_textstr, UICOL_HOTSPOT_LO); + auto game_hdr_text = DLLCreateNewUITextItem(TXT_ODT_GAME_HDR, UICOL_WINDOW_TITLE); - void *info_on_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_HI); - void *info_off_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_LO); + auto info_on_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_HI); + auto info_off_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_LO); memset(Gamelist, 0, sizeof(Gamelist)); NextGameItemNo = 0; - void *return_hs; - void *set_dft_hs; + UIObject *set_dft_hs; void *net_game_txt_items[MAX_NET_GAMES]; int a; @@ -1112,16 +1111,16 @@ int SearchMasterTrackerGameMenu() { DLLSetScreenMode(SM_MENU); *DLLNewUIWindow_alpha = 255; - void *main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL); + auto main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL); - void *screen_header = DLLTextCreate(main_wnd, game_hdr_text, 5, 15, UIF_CENTER); + auto screen_header = DLLTextCreate(main_wnd, game_hdr_text, 5, 15, UIF_CENTER); cury += 30; - void *start_hs = DLLHotSpotCreate(main_wnd, 7, KEY_S, start_off_text, start_on_text, 320, cury, 150, 15, UIF_CENTER); + auto start_hs = DLLHotSpotCreate(main_wnd, 7, KEY_S, start_off_text, start_on_text, 320, cury, 150, 15, UIF_CENTER); cury += 30; int setdfty; - return_hs = DLLHotSpotCreate(main_wnd, 8, KEY_R, return_text_off, return_text_on, 490, cury, 250, 15, UIF_CENTER); + auto return_hs = DLLHotSpotCreate(main_wnd, 8, KEY_R, return_text_off, return_text_on, 490, cury, 250, 15, UIF_CENTER); cury += 20; if (Bypass_chat) { @@ -1143,29 +1142,29 @@ int SearchMasterTrackerGameMenu() { cury += 30; } - void *gname_hs = DLLHotSpotCreate(main_wnd, SORT_GAMENAME, 0, gname_off_text, gname_on_text, 44, cury, - DLLgrtext_GetTextLineWidth(TXT_ODT_GAMENAME2) + 1, 15, 0); - void *gtype_hs = DLLHotSpotCreate(main_wnd, SORT_GAMETYPE, 0, gtype_off_text, gtype_on_text, 215, cury, - DLLgrtext_GetTextLineWidth(TXT_ODT_GAMETYPE) + 1, 15, 0); - void *msn_hs = DLLHotSpotCreate(main_wnd, SORT_MISSION, 0, msn_off_text, msn_on_text, 320, cury, - DLLgrtext_GetTextLineWidth(TXT_ODT_MISSION) + 1, 15, 0); - void *lvl_hs = DLLHotSpotCreate(main_wnd, SORT_LEVEL, 0, lvl_off_text, lvl_on_text, 428, cury, - DLLgrtext_GetTextLineWidth(TXT_ODT_LEVEL) + 1, 15, 0); - void *players_hs = DLLHotSpotCreate(main_wnd, SORT_PLAYERS, 0, plrs_off_text, plrs_on_text, 479, cury, - DLLgrtext_GetTextLineWidth(TXT_ODT_PLAYERS) + 1, 15, 0); - void *ping_hs = DLLHotSpotCreate(main_wnd, SORT_PING, 0, ping_off_text, ping_on_text, 549, cury, - DLLgrtext_GetTextLineWidth(TXT_ODT_PING) + 1, 15, 0); + auto gname_hs = DLLHotSpotCreate(main_wnd, SORT_GAMENAME, 0, gname_off_text, gname_on_text, 44, cury, + DLLgrtext_GetTextLineWidth(TXT_ODT_GAMENAME2) + 1, 15, 0); + auto gtype_hs = DLLHotSpotCreate(main_wnd, SORT_GAMETYPE, 0, gtype_off_text, gtype_on_text, 215, cury, + DLLgrtext_GetTextLineWidth(TXT_ODT_GAMETYPE) + 1, 15, 0); + auto msn_hs = DLLHotSpotCreate(main_wnd, SORT_MISSION, 0, msn_off_text, msn_on_text, 320, cury, + DLLgrtext_GetTextLineWidth(TXT_ODT_MISSION) + 1, 15, 0); + auto lvl_hs = DLLHotSpotCreate(main_wnd, SORT_LEVEL, 0, lvl_off_text, lvl_on_text, 428, cury, + DLLgrtext_GetTextLineWidth(TXT_ODT_LEVEL) + 1, 15, 0); + auto players_hs = DLLHotSpotCreate(main_wnd, SORT_PLAYERS, 0, plrs_off_text, plrs_on_text, 479, cury, + DLLgrtext_GetTextLineWidth(TXT_ODT_PLAYERS) + 1, 15, 0); + auto ping_hs = DLLHotSpotCreate(main_wnd, SORT_PING, 0, ping_off_text, ping_on_text, 549, cury, + DLLgrtext_GetTextLineWidth(TXT_ODT_PING) + 1, 15, 0); cury += 15; - void *game_list = DLLListCreate(main_wnd, 6, 10, cury, 600, 230, UIF_CENTER | UILB_NOSORT); + auto game_list = DLLListCreate(main_wnd, 6, 10, cury, 600, 230, UIF_CENTER | UILB_NOSORT); cury += 260; int curyButtomMenu = cury; - void *join_hs = + auto join_hs = DLLHotSpotCreate(main_wnd, 6, KEY_ENTER, join_off_text, join_on_text, 100, curyButtomMenu, 130, 15, 0); - void *exit_hs = DLLHotSpotCreate(main_wnd, 5, KEY_ESC, exit_off_text, exit_on_text, 400, curyButtomMenu, 70, 15, 0); + auto exit_hs = DLLHotSpotCreate(main_wnd, 5, KEY_ESC, exit_off_text, exit_on_text, 400, curyButtomMenu, 70, 15, 0); - void *info_hs = DLLHotSpotCreate(main_wnd, GET_INFO_ID, KEY_I, info_off_text, info_on_text, 1, 1, 1, 1, 0); + auto info_hs = DLLHotSpotCreate(main_wnd, GET_INFO_ID, KEY_I, info_off_text, info_on_text, 1, 1, 1, 1, 0); DLLNewUIWindowLoadBackgroundImage(main_wnd, "d3online_game.ogf"); @@ -1181,14 +1180,14 @@ int SearchMasterTrackerGameMenu() { *DLLNum_network_games_known = 0; DLLmprintf(0, "Waiting for Mastertracker response.\n"); - void *ui_directip_counter = DLLCreateNewUITextItem("0 Server", GR_LIGHTGRAY); - void *directip_counter = DLLTextCreate(main_wnd, ui_directip_counter, 290, curyButtomMenu, 130); + auto ui_directip_counter = DLLCreateNewUITextItem("0 Server", GR_LIGHTGRAY); + auto directip_counter = DLLTextCreate(main_wnd, ui_directip_counter, 290, curyButtomMenu, 130); int currentNumServers = 0; // Menu loop while (!exit_menu) { if (ChatStarted) - const char *p = GetChatText(); + GetChatText(); DLLDescentDefer(); @@ -1500,14 +1499,14 @@ int JoinNewLobby(const char *lobby) { int rcode; const char *p; DLLmprintf(0, "Entering new lobby"); - void *title_text = DLLCreateNewUITextItem(TXT_ODT_ENTERINGLOBBY, UICOL_WINDOW_TITLE); + auto title_text = DLLCreateNewUITextItem(TXT_ODT_ENTERINGLOBBY, UICOL_WINDOW_TITLE); - void *cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI); - void *cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO); + auto cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI); + auto cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO); - void *main_wnd = DLLNewUIGameWindowCreate(0, 256, 128, 128, UIF_CENTER | UIF_PROCESS_ALL | NUWF_TITLEMED); - void *title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); - void *cancel_hs = + auto main_wnd = DLLNewUIGameWindowCreate(0, 256, 128, 128, UIF_CENTER | UIF_PROCESS_ALL | NUWF_TITLEMED); + auto title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); + auto cancel_hs = DLLHotSpotCreate(main_wnd, 5, KEY_ESC, cancel_off_text, cancel_on_text, 20, 100, 70, 15, UIF_CENTER); DLLNewUIGameWindowOpen(main_wnd); @@ -1557,29 +1556,29 @@ const char *SendWhisper(const char *name) { char message[MAX_CHAT_SEND_LEN]; char pilot_name[MAX_CHAT_SEND_LEN]; static char fmt_msg[MAX_CHAT_SEND_LEN * 2]; - void *title_text = DLLCreateNewUITextItem(TXT_ODT_PRIVATEMESSAGE, UICOL_WINDOW_TITLE); + auto title_text = DLLCreateNewUITextItem(TXT_ODT_PRIVATEMESSAGE, UICOL_WINDOW_TITLE); - void *cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI); - void *cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO); - void *send_on_text = DLLCreateNewUITextItem(TXT_ODT_SEND, UICOL_HOTSPOT_HI); - void *send_off_text = DLLCreateNewUITextItem(TXT_ODT_SEND, UICOL_HOTSPOT_LO); + auto cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI); + auto cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO); + auto send_on_text = DLLCreateNewUITextItem(TXT_ODT_SEND, UICOL_HOTSPOT_HI); + auto send_off_text = DLLCreateNewUITextItem(TXT_ODT_SEND, UICOL_HOTSPOT_LO); - void *pilot_text = DLLCreateNewUITextItem(TXT_ODT_PILOTNAME, UICOL_TEXT_NORMAL); - void *message_text = DLLCreateNewUITextItem(TXT_ODT_MESSAGE, UICOL_TEXT_NORMAL); + auto pilot_text = DLLCreateNewUITextItem(TXT_ODT_PILOTNAME, UICOL_TEXT_NORMAL); + auto message_text = DLLCreateNewUITextItem(TXT_ODT_MESSAGE, UICOL_TEXT_NORMAL); - void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 384, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED); + auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 384, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED); - void *title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); - void *pilot = DLLTextCreate(main_wnd, pilot_text, 50, 55, 0); - void *message_t = DLLTextCreate(main_wnd, message_text, 50, 110, 0); - void *user_edit = DLLEditCreate(main_wnd, 10, 50, 75, 130, 15, 0); - void *msg_edit = DLLEditCreate(main_wnd, 3, 50, 130, 200, 15, 0); + auto title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); + auto pilot = DLLTextCreate(main_wnd, pilot_text, 50, 55, 0); + auto message_t = DLLTextCreate(main_wnd, message_text, 50, 110, 0); + auto user_edit = DLLEditCreate(main_wnd, 10, 50, 75, 130, 15, 0); + auto msg_edit = DLLEditCreate(main_wnd, 3, 50, 130, 200, 15, 0); // HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, int h, // int flags,int winnum) - void *cancel_hs = + auto cancel_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, cancel_on_text, cancel_off_text, 130, 256 - 80, 60, 20, 0); - void *send_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, send_on_text, send_off_text, 60, 256 - 80, 60, 20, 0); + auto send_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, send_on_text, send_off_text, 60, 256 - 80, 60, 20, 0); DLLNewUIGameWindowOpen(main_wnd); DLLEditSetText(user_edit, name); @@ -1638,27 +1637,27 @@ int JoinPrivateLobby() { char message[MAX_CHAT_SEND_LEN]; char priv_channel[MAX_CHAT_SEND_LEN]; - void *title_text = DLLCreateNewUITextItem(TXT_ODT_JOINPRIV, UICOL_WINDOW_TITLE); + auto title_text = DLLCreateNewUITextItem(TXT_ODT_JOINPRIV, UICOL_WINDOW_TITLE); - void *cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI); - void *cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO); - void *join_on_text = DLLCreateNewUITextItem(TXT_ODT_JOIN, UICOL_HOTSPOT_HI); - void *join_off_text = DLLCreateNewUITextItem(TXT_ODT_JOIN, UICOL_HOTSPOT_LO); + auto cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI); + auto cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO); + auto join_on_text = DLLCreateNewUITextItem(TXT_ODT_JOIN, UICOL_HOTSPOT_HI); + auto join_off_text = DLLCreateNewUITextItem(TXT_ODT_JOIN, UICOL_HOTSPOT_LO); - void *channel_text = DLLCreateNewUITextItem(TXT_ODT_CHANNELNAME, UICOL_TEXT_NORMAL); + auto channel_text = DLLCreateNewUITextItem(TXT_ODT_CHANNELNAME, UICOL_TEXT_NORMAL); - void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLELARGE); + auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLELARGE); - void *title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); - void *channel_t = DLLTextCreate(main_wnd, channel_text, 50, 95, UIF_CENTER); - void *chan_edit = DLLEditCreate(main_wnd, 3, 50, 115, 130, 15, UIF_CENTER); + auto title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); + auto channel_t = DLLTextCreate(main_wnd, channel_text, 50, 95, UIF_CENTER); + auto chan_edit = DLLEditCreate(main_wnd, 3, 50, 115, 130, 15, UIF_CENTER); // DLLNewUIWindowSetFocusOnEditGadget(chan_edit,main_wnd); // HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, int h, // int flags,int winnum) - void *cancel_hs = + auto cancel_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, cancel_on_text, cancel_off_text, 130, 256 - 80, 60, 20, 0); - void *join_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, join_on_text, join_off_text, 60, 256 - 80, 60, 20, 0); + auto join_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, join_on_text, join_off_text, 60, 256 - 80, 60, 20, 0); DLLNewUIGameWindowOpen(main_wnd); while (!exit_menu) { int res; @@ -1725,27 +1724,27 @@ int FindPilot() { char message[MAX_CHAT_SEND_LEN]; char pilot_name[MAX_CHAT_SEND_LEN]; static char fmt_msg[MAX_CHAT_SEND_LEN * 2]; - void *title_text = DLLCreateNewUITextItem(TXT_ODT_FINDPILOT, UICOL_WINDOW_TITLE); + auto title_text = DLLCreateNewUITextItem(TXT_ODT_FINDPILOT, UICOL_WINDOW_TITLE); - void *cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI); - void *cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO); - void *search_on_text = DLLCreateNewUITextItem(TXT_ODT_SEARCH, UICOL_HOTSPOT_HI); - void *search_off_text = DLLCreateNewUITextItem(TXT_ODT_SEARCH, UICOL_HOTSPOT_LO); + auto cancel_on_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_HI); + auto cancel_off_text = DLLCreateNewUITextItem(TXT_ODT_CANCEL, UICOL_HOTSPOT_LO); + auto search_on_text = DLLCreateNewUITextItem(TXT_ODT_SEARCH, UICOL_HOTSPOT_HI); + auto search_off_text = DLLCreateNewUITextItem(TXT_ODT_SEARCH, UICOL_HOTSPOT_LO); - void *pilot_text = DLLCreateNewUITextItem(TXT_ODT_PILOTNAME, UICOL_TEXT_NORMAL); + auto pilot_text = DLLCreateNewUITextItem(TXT_ODT_PILOTNAME, UICOL_TEXT_NORMAL); - void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED); + auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED); - void *title_t = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); - void *pilot_t = DLLTextCreate(main_wnd, pilot_text, 50, 95, UIF_CENTER); - void *pilot_edit = DLLEditCreate(main_wnd, 3, 50, 115, 130, 15, UIF_CENTER); + auto title_t = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); + auto pilot_t = DLLTextCreate(main_wnd, pilot_text, 50, 95, UIF_CENTER); + auto pilot_edit = DLLEditCreate(main_wnd, 3, 50, 115, 130, 15, UIF_CENTER); // DLLNewUIWindowSetFocusOnEditGadget(pilot_edit,main_wnd); // HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, int h, // int flags,int winnum) - void *cancel_hs = + auto cancel_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, cancel_on_text, cancel_off_text, 130, 256 - 80, 60, 20, 0); - void *search_hs = + auto search_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, search_on_text, search_off_text, 60, 256 - 80, 60, 20, 0); DLLNewUIGameWindowOpen(main_wnd); while (!exit_menu) { diff --git a/netcon/includes/con_dll.h b/netcon/includes/con_dll.h index 9cc7cf963..e1ce14de2 100644 --- a/netcon/includes/con_dll.h +++ b/netcon/includes/con_dll.h @@ -329,13 +329,15 @@ struct multi_api { int *vp[200]; // variable pointers }; +class UIItem; + typedef void (*GetMultiAPI_fp)(multi_api *api); GetMultiAPI_fp DLLGetMultiAPI; typedef void (*SetUITextItemText_fp)(void *uit, char *newtext, uint32_t color); SetUITextItemText_fp DLLSetUITextItemText; -typedef void *(*NewUIWindowCreate_fp)(int x, int y, int w, int h, int flags); +typedef UIObject *(*NewUIWindowCreate_fp)(int x, int y, int w, int h, int flags); NewUIWindowCreate_fp DLLNewUIWindowCreate; typedef void (*NewUIWindowDestroy_fp)(void *deswin); @@ -347,16 +349,16 @@ NewUIWindowOpen_fp DLLNewUIWindowOpen; typedef void (*NewUIWindowClose_fp)(void *deswin); NewUIWindowClose_fp DLLNewUIWindowClose; -typedef void *(*TextCreate_fp)(void *parentwin, void *textitem, int x, int y, int flags); +typedef UIObject *(*TextCreate_fp)(void *parentwin, void *textitem, int x, int y, int flags); TextCreate_fp DLLTextCreate; -typedef void *(*EditCreate_fp)(void *parentwin, int id, int x, int y, int w, int h, int flags); +typedef UIObject *(*EditCreate_fp)(void *parentwin, int id, int x, int y, int w, int h, int flags); EditCreate_fp DLLEditCreate; -typedef void *(*ButtonCreate_fp)(void *parentwin, int id, void *titleitem, int x, int y, int w, int h, int flags); +typedef UIObject *(*ButtonCreate_fp)(void *parentwin, int id, void *titleitem, int x, int y, int w, int h, int flags); ButtonCreate_fp DLLButtonCreate; -typedef void *(*ListCreate_fp)(void *parentwin, int id, int x, int y, int w, int h, int flags); +typedef UIObject *(*ListCreate_fp)(void *parentwin, int id, int x, int y, int w, int h, int flags); ListCreate_fp DLLListCreate; typedef void (*ListRemoveAll_fp)(void *item); @@ -415,7 +417,7 @@ ValidateUser_fp DLLValidateUser; typedef void( *PollPTrackNet_fp) (); PollPTrackNet_fp DLLPollPTrackNet; */ -typedef void *(*NewUIGameWindowCreate_fp)(int x, int y, int w, int h, int flags); +typedef UIObject *(*NewUIGameWindowCreate_fp)(int x, int y, int w, int h, int flags); NewUIGameWindowCreate_fp DLLNewUIGameWindowCreate; typedef void (*NewUIGameWindowDestroy_fp)(void *item); @@ -467,8 +469,8 @@ nw_GetHostAddressFromNumbers_fp DLLnw_GetHostAddressFromNumbers; typedef int (*nw_GetProtocolType_fp)(void); nw_GetProtocolType_fp DLLnw_GetProtocolType; -typedef void *(*HotSpotCreate_fp)(void *parentwin, int id, int key, void *txtitemoff, void *txtitemon, int x, int y, - int w, int h, int flags); +typedef UIObject *(*HotSpotCreate_fp)(void *parentwin, int id, int key, void *txtitemoff, void *txtitemon, + int x, int y, int w, int h, int flags); HotSpotCreate_fp DLLHotSpotCreate; typedef int (*PollUI_fp)(void); @@ -480,9 +482,9 @@ GetMissionName_fp DLLGetMissionName; typedef void (*RemoveUITextItem_fp)(void *item); RemoveUITextItem_fp DLLRemoveUITextItem; -typedef void *(*CreateNewUITextItem_fp)(const char *newtext, uint32_t color, int font); +typedef UIItem *(*CreateNewUITextItem_fp)(const char *newtext, uint32_t color, int font); CreateNewUITextItem_fp DLLCreateNewUITextItemFP; -static inline void *DLLCreateNewUITextItem(const char *newtext, uint32_t color, int font = -1) { +static inline UIItem *DLLCreateNewUITextItem(const char *newtext, uint32_t color, int font = -1) { return DLLCreateNewUITextItemFP(newtext, color, font); } @@ -498,8 +500,8 @@ CreateSplashScreen_fp DLLCreateSplashScreen; typedef void (*CloseSplashScreen_fp)(void); CloseSplashScreen_fp DLLCloseSplashScreen; -typedef void *(*UIConsoleGadgetCreate_fp)(void *parentid, int id, int x, int y, int font, int cols, int rows, - int flags); +typedef UIObject *(*UIConsoleGadgetCreate_fp)(void *parentid, int id, int x, int y, int font, + int cols, int rows, int flags); UIConsoleGadgetCreate_fp DLLUIConsoleGadgetCreate; typedef void (*UIConsoleGadgetputs_fp)(void *item, const char *str); @@ -508,10 +510,10 @@ UIConsoleGadgetputs_fp DLLUIConsoleGadgetputs; typedef void (*NewUIWindowSetFocusOnEditGadget_fp)(void *item, void *parent); NewUIWindowSetFocusOnEditGadget_fp DLLNewUIWindowSetFocusOnEditGadget; -typedef void *(*OldEditCreate_fp)(void *parentitem, int id, int x, int y, int w, int h, int flags); +typedef UIObject *(*OldEditCreate_fp)(void *parentitem, int id, int x, int y, int w, int h, int flags); OldEditCreate_fp DLLOldEditCreate; -typedef void *(*OldListCreate_fp)(void *parentitem, int id, int x, int y, int w, int h, int flags); +typedef UIObject *(*OldListCreate_fp)(void *parentitem, int id, int x, int y, int w, int h, int flags); OldListCreate_fp DLLOldListCreate; typedef void (*OldListRemoveAll_fp)(void *item); @@ -550,7 +552,7 @@ SetOldEditBufferLen_fp DLLSetOldEditBufferLen; typedef void (*NewUIWindowLoadBackgroundImage_fp)(void *item, const char *image_name); NewUIWindowLoadBackgroundImage_fp DLLNewUIWindowLoadBackgroundImage; -typedef void (*DeleteUIItem_fp)(void *delitem); +typedef void (*DeleteUIItem_fp)(UIObject *); DeleteUIItem_fp DLLDeleteUIItem; typedef int (*SearchForLocalGamesIPX_fp)(network_address *check_addr); @@ -915,29 +917,29 @@ void MultiplayerOptionsMenu(); char dll_text[MAX_DLLS][_MAX_PATH]; int StartMultiplayerGameMenu() { - void *game_name_text = DLLCreateNewUITextItem(TXT(10), UICOL_TEXT_NORMAL, -1); // TXT_LC_GAMENAME - void *mission_name_text = DLLCreateNewUITextItem(TXT(11), UICOL_TEXT_NORMAL, -1); // TXT_LC_MSNNAME - void *script_name_text = DLLCreateNewUITextItem(TXT(12), UICOL_TEXT_NORMAL, -1); // TXT_LC_SCRIPTNAME + auto game_name_text = DLLCreateNewUITextItem(TXT(10), UICOL_TEXT_NORMAL, -1); // TXT_LC_GAMENAME + auto mission_name_text = DLLCreateNewUITextItem(TXT(11), UICOL_TEXT_NORMAL, -1); // TXT_LC_MSNNAME + auto script_name_text = DLLCreateNewUITextItem(TXT(12), UICOL_TEXT_NORMAL, -1); // TXT_LC_SCRIPTNAME - void *start_game_on_text = DLLCreateNewUITextItem(TXT(13), UICOL_HOTSPOT_HI, -1); // TXT_LC_STARTGAME - void *multiplayer_opts_on_text = DLLCreateNewUITextItem(TXT(14), UICOL_HOTSPOT_HI, -1); // TXT_LC_MPLYROPTIONS - void *exit_on_text = DLLCreateNewUITextItem(TXT(5), UICOL_HOTSPOT_HI, -1); // TXT_LC_PREVMENU + auto start_game_on_text = DLLCreateNewUITextItem(TXT(13), UICOL_HOTSPOT_HI, -1); // TXT_LC_STARTGAME + auto multiplayer_opts_on_text = DLLCreateNewUITextItem(TXT(14), UICOL_HOTSPOT_HI, -1); // TXT_LC_MPLYROPTIONS + auto exit_on_text = DLLCreateNewUITextItem(TXT(5), UICOL_HOTSPOT_HI, -1); // TXT_LC_PREVMENU - void *start_game_off_text = DLLCreateNewUITextItem(TXT(13), UICOL_HOTSPOT_LO, -1); // TXT_LC_STARTGAME - void *multiplayer_opts_off_text = DLLCreateNewUITextItem(TXT(14), UICOL_HOTSPOT_LO, -1); // TXT_LC_MPLYROPTIONS - void *exit_off_text = DLLCreateNewUITextItem(TXT(5), UICOL_HOTSPOT_LO, -1); // TXT_LC_PREVMENU + auto start_game_off_text = DLLCreateNewUITextItem(TXT(13), UICOL_HOTSPOT_LO, -1); // TXT_LC_STARTGAME + auto multiplayer_opts_off_text = DLLCreateNewUITextItem(TXT(14), UICOL_HOTSPOT_LO, -1); // TXT_LC_MPLYROPTIONS + auto exit_off_text = DLLCreateNewUITextItem(TXT(5), UICOL_HOTSPOT_LO, -1); // TXT_LC_PREVMENU - void *save_settings_txt_on = DLLCreateNewUITextItem(TXT_DLL_SAVESETTINGS, UICOL_HOTSPOT_HI, -1); - void *save_settings_txt_off = DLLCreateNewUITextItem(TXT_DLL_SAVESETTINGS, UICOL_HOTSPOT_LO, -1); + auto save_settings_txt_on = DLLCreateNewUITextItem(TXT_DLL_SAVESETTINGS, UICOL_HOTSPOT_HI, -1); + auto save_settings_txt_off = DLLCreateNewUITextItem(TXT_DLL_SAVESETTINGS, UICOL_HOTSPOT_LO, -1); - void *load_settings_txt_on = DLLCreateNewUITextItem(TXT_DLL_LOADSETTINGS, UICOL_HOTSPOT_HI, -1); - void *load_settings_txt_off = DLLCreateNewUITextItem(TXT_DLL_LOADSETTINGS, UICOL_HOTSPOT_LO, -1); + auto load_settings_txt_on = DLLCreateNewUITextItem(TXT_DLL_LOADSETTINGS, UICOL_HOTSPOT_HI, -1); + auto load_settings_txt_off = DLLCreateNewUITextItem(TXT_DLL_LOADSETTINGS, UICOL_HOTSPOT_LO, -1); - void *start_text = DLLCreateNewUITextItem(TXT(13), UICOL_WINDOW_TITLE, DLL_BIG_BRIEFING_FONT); + auto start_text = DLLCreateNewUITextItem(TXT(13), UICOL_WINDOW_TITLE, DLL_BIG_BRIEFING_FONT); - void *blank_text = DLLCreateNewUITextItem("", GR_BLACK, -1); + auto blank_text = DLLCreateNewUITextItem("", GR_BLACK, -1); // Name -> UI item - std::map dll_ui_items; + std::map dll_ui_items; char str[100]; int exit_menu = 0; int cury = 40; @@ -947,60 +949,60 @@ int StartMultiplayerGameMenu() { rendering_state rs; DLLrend_GetRenderState(&rs); - void *main_wnd = DLLNewUIWindowCreate(0, 0, rs.screen_width, rs.screen_height, UIF_PROCESS_ALL); + auto main_wnd = DLLNewUIWindowCreate(0, 0, rs.screen_width, rs.screen_height, UIF_PROCESS_ALL); - void *start_title = DLLTextCreate(main_wnd, start_text, 0, cury, UIF_CENTER); + auto start_title = DLLTextCreate(main_wnd, start_text, 0, cury, UIF_CENTER); cury += 35; // Mission name - void *mission_text = DLLTextCreate(main_wnd, game_name_text, 0, cury, UIF_CENTER); + auto mission_text = DLLTextCreate(main_wnd, game_name_text, 0, cury, UIF_CENTER); cury += 15; - void *mission_name_edit = DLLEditCreate(main_wnd, id++, 10, cury, 300, 15, UIF_CENTER); + auto mission_name_edit = DLLEditCreate(main_wnd, id++, 10, cury, 300, 15, UIF_CENTER); cury += 18; cury += 30; // mission name - void *game_name = DLLTextCreate(main_wnd, mission_name_text, 45, cury, 0); + auto game_name = DLLTextCreate(main_wnd, mission_name_text, 45, cury, 0); cury += 15; - void *list_1 = DLLListCreate(main_wnd, id++, 40, cury, 200, 100, 0); + auto list_1 = DLLListCreate(main_wnd, id++, 40, cury, 200, 100, 0); // Back up the same line! cury -= 15; // Script box - void *script_name = DLLTextCreate(main_wnd, script_name_text, 370, cury, 0); + auto script_name = DLLTextCreate(main_wnd, script_name_text, 370, cury, 0); cury += 18; - void *script_list = DLLListCreate(main_wnd, id++, 360, cury, 200, 100, 0); + auto script_list = DLLListCreate(main_wnd, id++, 360, cury, 200, 100, 0); cury += 118; cury += 40; // Start button int start_button = UID_OK; - void *start_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, start_game_off_text, start_game_on_text, 10, cury, 180, - 30, UIF_FIT | UIF_CENTER); + auto start_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, start_game_off_text, start_game_on_text, 10, cury, 180, + 30, UIF_FIT | UIF_CENTER); cury += 18; // Option button int option_button = id; - void *option_hs = DLLHotSpotCreate(main_wnd, id++, KEY_O, multiplayer_opts_off_text, multiplayer_opts_on_text, 10, - cury, 180, 30, UIF_FIT | UIF_CENTER); + auto option_hs = DLLHotSpotCreate(main_wnd, id++, KEY_O, multiplayer_opts_off_text, multiplayer_opts_on_text, 10, + cury, 180, 30, UIF_FIT | UIF_CENTER); cury += 18; // cancel button int save_button = id; - void *save_hs = DLLHotSpotCreate(main_wnd, id++, 0, save_settings_txt_off, save_settings_txt_on, 10, cury, 180, 30, - UIF_FIT | UIF_CENTER); + auto save_hs = DLLHotSpotCreate(main_wnd, id++, 0, save_settings_txt_off, save_settings_txt_on, 10, cury, 180, 30, + UIF_FIT | UIF_CENTER); cury += 18; int load_button = id; - void *load_hs = DLLHotSpotCreate(main_wnd, id++, 0, load_settings_txt_off, load_settings_txt_on, 10, cury, 180, 30, - UIF_FIT | UIF_CENTER); + auto load_hs = DLLHotSpotCreate(main_wnd, id++, 0, load_settings_txt_off, load_settings_txt_on, 10, cury, 180, 30, + UIF_FIT | UIF_CENTER); cury += 18; int cancel_button = UID_CANCEL; - void *cancel_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, exit_off_text, exit_on_text, 10, cury, 180, 30, - UIF_FIT | UIF_CENTER); + auto cancel_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, exit_off_text, exit_on_text, 10, cury, 180, 30, + UIF_FIT | UIF_CENTER); // put the multiplayer dll's into the listbox char buffer[_MAX_PATH]; @@ -1065,9 +1067,9 @@ int StartMultiplayerGameMenu() { #endif const char *p; #else - void *msn_single_ti = DLLCreateNewUITextItem("Polaris", UICOL_LISTBOX_LO); - void *msn_multi_ti = DLLCreateNewUITextItem("The Core", UICOL_LISTBOX_LO); - void *msn_multi_2 = DLLCreateNewUITextItem("Taurus", UICOL_LISTBOX_LO); + auto msn_single_ti = DLLCreateNewUITextItem("Polaris", UICOL_LISTBOX_LO); + auto msn_multi_ti = DLLCreateNewUITextItem("The Core", UICOL_LISTBOX_LO); + auto msn_multi_2 = DLLCreateNewUITextItem("Taurus", UICOL_LISTBOX_LO); DLLListAddItem(list_1, msn_single_ti); DLLListAddItem(list_1, msn_multi_ti); DLLListAddItem(list_1, msn_multi_2); diff --git a/netcon/inetfile/CFtp.cpp b/netcon/inetfile/CFtp.cpp index dfeef42b7..6fe9f5008 100644 --- a/netcon/inetfile/CFtp.cpp +++ b/netcon/inetfile/CFtp.cpp @@ -134,7 +134,6 @@ CFtpGet::CFtpGet(char *URL, char *localfile, char *Username, char *Password) { } m_ListenSock = socket(AF_INET, SOCK_STREAM, 0); if (INVALID_SOCKET == m_ListenSock) { - int iWinsockErr = WSAGetLastError(); m_State = FTP_STATE_SOCKET_ERROR; return; } else { @@ -145,7 +144,6 @@ CFtpGet::CFtpGet(char *URL, char *localfile, char *Username, char *Password) { // Bind the listen socket if (bind(m_ListenSock, (SOCKADDR *)&listensockaddr, sizeof(SOCKADDR))) { // Couldn't bind the socket - int iWinsockErr = WSAGetLastError(); m_State = FTP_STATE_SOCKET_ERROR; return; } @@ -153,7 +151,6 @@ CFtpGet::CFtpGet(char *URL, char *localfile, char *Username, char *Password) { // Listen for the server connection if (listen(m_ListenSock, 1)) { // Couldn't listen on the socket - int iWinsockErr = WSAGetLastError(); m_State = FTP_STATE_SOCKET_ERROR; return; } @@ -339,7 +336,6 @@ uint32_t CFtpGet::GetFile() { close(m_ListenSock); #endif if (m_DataSock == INVALID_SOCKET) { - int iWinsockErr = WSAGetLastError(); m_State = FTP_STATE_SOCKET_ERROR; return 0; } @@ -363,7 +359,6 @@ uint32_t CFtpGet::IssuePort() { // Get the address for the hListenSocket iLength = sizeof(listenaddr); if (getsockname(m_ListenSock, (SOCKADDR *)&listenaddr, &iLength) == SOCKET_ERROR) { - int iWinsockErr = WSAGetLastError(); m_State = FTP_STATE_SOCKET_ERROR; return 0; } @@ -374,7 +369,6 @@ uint32_t CFtpGet::IssuePort() { // Now, reuse the socket address structure to // get the IP address from the control socket. if (getsockname(m_ControlSock, (SOCKADDR *)&listenaddr, &iLength) == SOCKET_ERROR) { - int iWinsockErr = WSAGetLastError(); m_State = FTP_STATE_SOCKET_ERROR; return 0; } @@ -411,7 +405,6 @@ uint32_t CFtpGet::IssuePort() { if (nReplyCode != 250 || (ReadFTPServerReply() != 200)) // ummmmmmmm #endif { - int iWinsockErr = WSAGetLastError(); m_State = FTP_STATE_SOCKET_ERROR; return 0; } @@ -445,7 +438,6 @@ int CFtpGet::ConnectControlSocket() { return 0; // Now we will connect to the host if (connect(m_ControlSock, (SOCKADDR *)&hostaddr, sizeof(SOCKADDR))) { - int iWinsockErr = WSAGetLastError(); m_State = FTP_STATE_CANT_CONNECT; return 0; } @@ -479,7 +471,6 @@ uint32_t CFtpGet::SendFTPCommand(char *command) { FlushControlChannel(); // Send the FTP command if (SOCKET_ERROR == (send(m_ControlSock, command, strlen(command), 0))) { - int iWinsockErr = WSAGetLastError(); // Return 999 to indicate an error has occurred return (999); } @@ -579,7 +570,6 @@ uint32_t CFtpGet::ReadDataChannel() { void CFtpGet::FlushControlChannel() { fd_set read_fds; TIMEVAL timeout; - int bytesin = 0; char flushbuff[3]; timeout.tv_sec = 0; diff --git a/netcon/lanclient/lanclient.cpp b/netcon/lanclient/lanclient.cpp index 17b7d5485..7a1af55ea 100644 --- a/netcon/lanclient/lanclient.cpp +++ b/netcon/lanclient/lanclient.cpp @@ -406,19 +406,19 @@ namespace lanclient { int MainMultiplayerMenu() { char selgame[200] = ""; - void *join_LC_text = DLLCreateNewUITextItem(TXT_LC_RETURNMAIN, GR_BLACK); // return_menu - void *list_head_txt = DLLCreateNewUITextItem(TXT_LC_GAMELISTHDR, UICOL_TEXT_NORMAL); - void *exit_on_text = DLLCreateNewUITextItem(TXT_LC_EXIT, UICOL_HOTSPOT_HI); - void *exit_off_text = DLLCreateNewUITextItem(TXT_LC_EXIT, UICOL_HOTSPOT_LO); - void *join_on_text = DLLCreateNewUITextItem(TXT_LC_JOINSEL, UICOL_HOTSPOT_HI); - void *join_off_text = DLLCreateNewUITextItem(TXT_LC_JOINSEL, UICOL_HOTSPOT_LO); - void *start_on_text = DLLCreateNewUITextItem(TXT_LC_STARTNEW, UICOL_HOTSPOT_HI); - void *start_off_text = DLLCreateNewUITextItem(TXT_LC_STARTNEW, UICOL_HOTSPOT_LO); - void *srch_on_text = DLLCreateNewUITextItem(TXT_LC_SRCHADDR, UICOL_HOTSPOT_HI); - void *srch_off_text = DLLCreateNewUITextItem(TXT_LC_SRCHADDR, UICOL_HOTSPOT_LO); - void *scan_on_text = DLLCreateNewUITextItem(TXT_LC_SCANLOCAL, UICOL_HOTSPOT_HI); - void *scan_off_text = DLLCreateNewUITextItem(TXT_LC_SCANLOCAL, UICOL_HOTSPOT_LO); - void *game_hdr_text = DLLCreateNewUITextItem(TXT_LC_GAMEHEADER, UICOL_WINDOW_TITLE, DLL_BIG_BRIEFING_FONT); + auto join_LC_text = DLLCreateNewUITextItem(TXT_LC_RETURNMAIN, GR_BLACK); // return_menu + auto list_head_txt = DLLCreateNewUITextItem(TXT_LC_GAMELISTHDR, UICOL_TEXT_NORMAL); + auto exit_on_text = DLLCreateNewUITextItem(TXT_LC_EXIT, UICOL_HOTSPOT_HI); + auto exit_off_text = DLLCreateNewUITextItem(TXT_LC_EXIT, UICOL_HOTSPOT_LO); + auto join_on_text = DLLCreateNewUITextItem(TXT_LC_JOINSEL, UICOL_HOTSPOT_HI); + auto join_off_text = DLLCreateNewUITextItem(TXT_LC_JOINSEL, UICOL_HOTSPOT_LO); + auto start_on_text = DLLCreateNewUITextItem(TXT_LC_STARTNEW, UICOL_HOTSPOT_HI); + auto start_off_text = DLLCreateNewUITextItem(TXT_LC_STARTNEW, UICOL_HOTSPOT_LO); + auto srch_on_text = DLLCreateNewUITextItem(TXT_LC_SRCHADDR, UICOL_HOTSPOT_HI); + auto srch_off_text = DLLCreateNewUITextItem(TXT_LC_SRCHADDR, UICOL_HOTSPOT_LO); + auto scan_on_text = DLLCreateNewUITextItem(TXT_LC_SCANLOCAL, UICOL_HOTSPOT_HI); + auto scan_off_text = DLLCreateNewUITextItem(TXT_LC_SCANLOCAL, UICOL_HOTSPOT_LO); + auto game_hdr_text = DLLCreateNewUITextItem(TXT_LC_GAMEHEADER, UICOL_WINDOW_TITLE, DLL_BIG_BRIEFING_FONT); int exit_menu = 0; void *net_game_txt_items[MAX_NET_GAMES]; @@ -432,27 +432,27 @@ int MainMultiplayerMenu() { DLLSetScreenMode(SM_MENU); *DLLNewUIWindow_alpha = 255; - void *main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL); + auto main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL); - void *info_on_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_HI); - void *info_hs = DLLHotSpotCreate(main_wnd, GET_INFO_ID, KEY_I, info_on_text, info_on_text, 1, 1, 1, 1, 0); + auto info_on_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_HI); + auto info_hs = DLLHotSpotCreate(main_wnd, GET_INFO_ID, KEY_I, info_on_text, info_on_text, 1, 1, 1, 1, 0); - void *screen_header = DLLTextCreate(main_wnd, game_hdr_text, 45, cury, UIF_CENTER); + auto screen_header = DLLTextCreate(main_wnd, game_hdr_text, 45, cury, UIF_CENTER); cury += 35; - void *start_hs = DLLHotSpotCreate(main_wnd, 7, KEY_S, start_off_text, start_on_text, 320, cury, 150, 15, UIF_CENTER); + auto start_hs = DLLHotSpotCreate(main_wnd, 7, KEY_S, start_off_text, start_on_text, 320, cury, 150, 15, UIF_CENTER); cury += 25; - void *srch_hs = DLLHotSpotCreate(main_wnd, 9, KEY_A, srch_off_text, srch_on_text, 320, cury, 250, 15, UIF_CENTER); + auto srch_hs = DLLHotSpotCreate(main_wnd, 9, KEY_A, srch_off_text, srch_on_text, 320, cury, 250, 15, UIF_CENTER); cury += 25; - void *edit_box = DLLEditCreate(main_wnd, 9, 10, cury, 300, 15, UIF_CENTER); + auto edit_box = DLLEditCreate(main_wnd, 9, 10, cury, 300, 15, UIF_CENTER); cury += 35; - void *scan_hs = DLLHotSpotCreate(main_wnd, 8, KEY_L, scan_off_text, scan_on_text, 320, cury, 200, 15, UIF_CENTER); + auto scan_hs = DLLHotSpotCreate(main_wnd, 8, KEY_L, scan_off_text, scan_on_text, 320, cury, 200, 15, UIF_CENTER); cury += 50; - void *list_header = DLLTextCreate(main_wnd, list_head_txt, 45, cury, 0); + auto list_header = DLLTextCreate(main_wnd, list_head_txt, 45, cury, 0); cury += 13; - void *main_list = DLLListCreate(main_wnd, UID_OK, 10, cury, 600, 170, UIF_CENTER | UILB_NOSORT); + auto main_list = DLLListCreate(main_wnd, UID_OK, 10, cury, 600, 170, UIF_CENTER | UILB_NOSORT); cury += 200; - void *join_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, join_off_text, join_on_text, 100, cury, 130, 15, 0); - void *exit_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, exit_off_text, exit_on_text, 400, cury, 70, 15, 0); + auto join_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, join_off_text, join_on_text, 100, cury, 130, 15, 0); + auto exit_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, exit_off_text, exit_on_text, 400, cury, 70, 15, 0); char szdip[30] = ""; int diplen = 29; DLLDatabaseRead("DirectIP", szdip, &diplen); diff --git a/netcon/mtclient/mt_net.cpp b/netcon/mtclient/mt_net.cpp index ba3122f88..d8c669e21 100644 --- a/netcon/mtclient/mt_net.cpp +++ b/netcon/mtclient/mt_net.cpp @@ -182,7 +182,6 @@ void InitMTSockets() { } { - static HOSTENT lhe; memset(&sockaddr, 0, sizeof(SOCKADDR_IN)); gtrackaddr.sin_family = AF_INET; gtrackaddr.sin_addr.s_addr = INADDR_ANY; diff --git a/netcon/mtclient/mtclient.cpp b/netcon/mtclient/mtclient.cpp index bb30d5d7a..413ecc6ec 100644 --- a/netcon/mtclient/mtclient.cpp +++ b/netcon/mtclient/mtclient.cpp @@ -824,21 +824,21 @@ void DLLFUNCCALL DLLMultiCall(int eventnum) { int LoginMasterTracker() { - void *title_text = DLLCreateNewUITextItem(TXT_PXO_LOGINMASTERTRKR, UICOL_WINDOW_TITLE); - void *cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI); - void *login_on_text = DLLCreateNewUITextItem(TXT_PXO_LOGIN, UICOL_HOTSPOT_HI); + auto title_text = DLLCreateNewUITextItem(TXT_PXO_LOGINMASTERTRKR, UICOL_WINDOW_TITLE); + auto cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI); + auto login_on_text = DLLCreateNewUITextItem(TXT_PXO_LOGIN, UICOL_HOTSPOT_HI); - void *cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO); - void *login_off_text = DLLCreateNewUITextItem(TXT_PXO_LOGIN, UICOL_HOTSPOT_LO); + auto cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO); + auto login_off_text = DLLCreateNewUITextItem(TXT_PXO_LOGIN, UICOL_HOTSPOT_LO); - void *login_id_text = DLLCreateNewUITextItem(TXT_PXO_LOGINID, UICOL_TEXT_NORMAL); - void *tracker_id_text = DLLCreateNewUITextItem(TXT_PXO_TRACKERID, UICOL_TEXT_NORMAL); - void *password_text = DLLCreateNewUITextItem(TXT_PXO_PASSWORD, UICOL_TEXT_NORMAL); + auto login_id_text = DLLCreateNewUITextItem(TXT_PXO_LOGINID, UICOL_TEXT_NORMAL); + auto tracker_id_text = DLLCreateNewUITextItem(TXT_PXO_TRACKERID, UICOL_TEXT_NORMAL); + auto password_text = DLLCreateNewUITextItem(TXT_PXO_PASSWORD, UICOL_TEXT_NORMAL); - void *new_prof_on_text = DLLCreateNewUITextItem(TXT_PXO_CREATENEWPROFILE, UICOL_HOTSPOT_HI); - void *new_prof_off_text = DLLCreateNewUITextItem(TXT_PXO_CREATENEWPROFILE, UICOL_HOTSPOT_LO); + auto new_prof_on_text = DLLCreateNewUITextItem(TXT_PXO_CREATENEWPROFILE, UICOL_HOTSPOT_HI); + auto new_prof_off_text = DLLCreateNewUITextItem(TXT_PXO_CREATENEWPROFILE, UICOL_HOTSPOT_LO); - void *blank_text = DLLCreateNewUITextItem(TXT_PXO_BLANK, GR_BLACK); + auto blank_text = DLLCreateNewUITextItem(TXT_PXO_BLANK, GR_BLACK); int exit_menu = 0; int ret = 0; @@ -846,26 +846,26 @@ int LoginMasterTracker() { int loginlen = LOGIN_LEN; int passlen = PASSWORD_LEN; - void *main_wnd = DLLNewUIGameWindowCreate(TRACKER_MENU_X, TRACKER_MENU_Y, TRACKER_MENU_W, TRACKER_MENU_H, - UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED); + auto main_wnd = DLLNewUIGameWindowCreate(TRACKER_MENU_X, TRACKER_MENU_Y, TRACKER_MENU_W, TRACKER_MENU_H, + UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED); - void *title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); + auto title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); - void *password = DLLTextCreate(main_wnd, password_text, 30, 130, UIF_CENTER); - void *login_id = DLLTextCreate(main_wnd, login_id_text, 50, 80, UIF_CENTER); + auto password = DLLTextCreate(main_wnd, password_text, 30, 130, UIF_CENTER); + auto login_id = DLLTextCreate(main_wnd, login_id_text, 50, 80, UIF_CENTER); - void *pass_edit = DLLEditCreate(main_wnd, UID_OK, 100, 140, 130, 15, UIF_CENTER | UIED_PASSWORD); + auto pass_edit = DLLEditCreate(main_wnd, UID_OK, 100, 140, 130, 15, UIF_CENTER | UIED_PASSWORD); - void *login_hs = + auto login_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, login_off_text, login_on_text, 60, TRACKER_MENU_H - 80, 60, 20, 0); - void *cancel_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, cancel_off_text, cancel_on_text, 130, - TRACKER_MENU_H - 80, 60, 20, 0); + auto cancel_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, cancel_off_text, cancel_on_text, 130, + TRACKER_MENU_H - 80, 60, 20, 0); - void *new_id_hs = + auto new_id_hs = DLLHotSpotCreate(main_wnd, 4, KEY_N, new_prof_off_text, new_prof_on_text, 0, 45, 120, 20, UIF_CENTER | UIF_FIT); - void *login_edit = DLLEditCreate(main_wnd, 3, 100, 90, 130, 15, UIF_CENTER); + auto login_edit = DLLEditCreate(main_wnd, 3, 100, 90, 130, 15, UIF_CENTER); // Read defaults @@ -1027,40 +1027,40 @@ int MainMultiplayerMenu() { DLLToggleUICallback(0); ChatStarted = 1; - void *title_text = DLLCreateNewUITextItem(TXT_PXO_CONNECTING, UICOL_WINDOW_TITLE); + auto title_text = DLLCreateNewUITextItem(TXT_PXO_CONNECTING, UICOL_WINDOW_TITLE); - void *cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI); - void *cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO); + auto cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI); + auto cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO); - void *exit_on_text = DLLCreateNewUITextItem(TXT_PXO_EXIT, UICOL_HOTSPOT_HI); - void *exit_off_text = DLLCreateNewUITextItem(TXT_PXO_EXIT, UICOL_HOTSPOT_LO); + auto exit_on_text = DLLCreateNewUITextItem(TXT_PXO_EXIT, UICOL_HOTSPOT_HI); + auto exit_off_text = DLLCreateNewUITextItem(TXT_PXO_EXIT, UICOL_HOTSPOT_LO); - void *priv_msg_on_text = DLLCreateNewUITextItem(TXT_PXO_SENDPRIV, UICOL_HOTSPOT_HI); - void *priv_msg_off_text = DLLCreateNewUITextItem(TXT_PXO_SENDPRIV, UICOL_HOTSPOT_LO); + auto priv_msg_on_text = DLLCreateNewUITextItem(TXT_PXO_SENDPRIV, UICOL_HOTSPOT_HI); + auto priv_msg_off_text = DLLCreateNewUITextItem(TXT_PXO_SENDPRIV, UICOL_HOTSPOT_LO); - void *join_lobby_on_text = DLLCreateNewUITextItem(TXT_PXO_JOINPRIV, UICOL_HOTSPOT_HI); - void *join_lobby_off_text = DLLCreateNewUITextItem(TXT_PXO_JOINPRIV, UICOL_HOTSPOT_LO); + auto join_lobby_on_text = DLLCreateNewUITextItem(TXT_PXO_JOINPRIV, UICOL_HOTSPOT_HI); + auto join_lobby_off_text = DLLCreateNewUITextItem(TXT_PXO_JOINPRIV, UICOL_HOTSPOT_LO); - void *join_chan_on_text = DLLCreateNewUITextItem(TXT_PXO_JOINCHAN, UICOL_HOTSPOT_HI); - void *join_chan_off_text = DLLCreateNewUITextItem(TXT_PXO_JOINCHAN, UICOL_HOTSPOT_LO); + auto join_chan_on_text = DLLCreateNewUITextItem(TXT_PXO_JOINCHAN, UICOL_HOTSPOT_HI); + auto join_chan_off_text = DLLCreateNewUITextItem(TXT_PXO_JOINCHAN, UICOL_HOTSPOT_LO); - void *find_pilot_on_text = DLLCreateNewUITextItem(TXT_PXO_FINDPILOT, UICOL_HOTSPOT_HI); - void *find_pilot_off_text = DLLCreateNewUITextItem(TXT_PXO_FINDPILOT, UICOL_HOTSPOT_LO); + auto find_pilot_on_text = DLLCreateNewUITextItem(TXT_PXO_FINDPILOT, UICOL_HOTSPOT_HI); + auto find_pilot_off_text = DLLCreateNewUITextItem(TXT_PXO_FINDPILOT, UICOL_HOTSPOT_LO); - void *get_pilot_on_text = DLLCreateNewUITextItem(TXT_PXO_GETPILOTINFO, UICOL_HOTSPOT_HI); - void *get_pilot_off_text = DLLCreateNewUITextItem(TXT_PXO_GETPILOTINFO, UICOL_HOTSPOT_LO); + auto get_pilot_on_text = DLLCreateNewUITextItem(TXT_PXO_GETPILOTINFO, UICOL_HOTSPOT_HI); + auto get_pilot_off_text = DLLCreateNewUITextItem(TXT_PXO_GETPILOTINFO, UICOL_HOTSPOT_LO); - void *game_on_text = DLLCreateNewUITextItem(TXT_PXO_JOINSTARTGAME, UICOL_HOTSPOT_HI); - void *game_off_text = DLLCreateNewUITextItem(TXT_PXO_JOINSTARTGAME, UICOL_HOTSPOT_LO); + auto game_on_text = DLLCreateNewUITextItem(TXT_PXO_JOINSTARTGAME, UICOL_HOTSPOT_HI); + auto game_off_text = DLLCreateNewUITextItem(TXT_PXO_JOINSTARTGAME, UICOL_HOTSPOT_LO); - void *send_on_text = DLLCreateNewUITextItem(TXT_PXO_SEND, UICOL_HOTSPOT_HI); - void *send_off_text = DLLCreateNewUITextItem(TXT_PXO_SEND, UICOL_HOTSPOT_LO); + auto send_on_text = DLLCreateNewUITextItem(TXT_PXO_SEND, UICOL_HOTSPOT_HI); + auto send_off_text = DLLCreateNewUITextItem(TXT_PXO_SEND, UICOL_HOTSPOT_LO); char fmtlobbytext[200]; snprintf(fmtlobbytext, sizeof(fmtlobbytext), TXT_PXO_YOUAREINLOBBY, Ourlobby); - void *lobby_text = DLLCreateNewUITextItem(fmtlobbytext, UICOL_TEXT_AUX); + auto lobby_text = DLLCreateNewUITextItem(fmtlobbytext, UICOL_TEXT_AUX); - void *blank_text = DLLCreateNewUITextItem(TXT_PXO_BLANK, UICOL_TEXT_AUX); + auto blank_text = DLLCreateNewUITextItem(TXT_PXO_BLANK, UICOL_TEXT_AUX); char sendline[MAX_CHAT_SEND_LEN]; int exit_menu = 0; int ret = 0; @@ -1069,8 +1069,8 @@ int MainMultiplayerMenu() { int i; float lastlisttime = 0; float lastchanlisttime = 0; - void *chan_ti[MAX_CHAT_CHANNELS]; - void *user_ti[CHAT_MAX_USERLIST]; + UIItem *chan_ti[MAX_CHAT_CHANNELS]; + UIItem *user_ti[CHAT_MAX_USERLIST]; char selpilot[MAX_CHAT_SEND_LEN]; char oldselchan[200]; for (i = 0; i < MAX_CHAT_CHANNELS; i++) @@ -1090,40 +1090,40 @@ int MainMultiplayerMenu() { } // Create our buttons - void *main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL); + auto main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL); // void HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, // int h, int flags,int winnum) - void *exit_hs = DLLHotSpotCreate(main_wnd, 5, KEY_ESC, exit_off_text, exit_on_text, 33, 427, 70, 15, 0); + /* auto exit_hs = */ DLLHotSpotCreate(main_wnd, 5, KEY_ESC, exit_off_text, exit_on_text, 33, 427, 70, 15, 0); - void *priv_hs = DLLHotSpotCreate(main_wnd, 6, 0, priv_msg_off_text, priv_msg_on_text, 328, 403, 170, 15, 0); + auto priv_hs = DLLHotSpotCreate(main_wnd, 6, 0, priv_msg_off_text, priv_msg_on_text, 328, 403, 170, 15, 0); #define JOIN_ROW 131 - void *join_lobby_hs = + auto join_lobby_hs = DLLHotSpotCreate(main_wnd, 7, 0, join_lobby_off_text, join_lobby_on_text, 400, JOIN_ROW, 170, 15, 0); - void *join_chan_hs = + auto join_chan_hs = DLLHotSpotCreate(main_wnd, 14, 0, join_chan_off_text, join_chan_on_text, 178, JOIN_ROW, 170, 15, 0); - void *find_hs = DLLHotSpotCreate(main_wnd, 9, 0, find_pilot_off_text, find_pilot_on_text, 156, 403, 140, 15, 0); - void *get_pilot_hs = + auto find_hs = DLLHotSpotCreate(main_wnd, 9, 0, find_pilot_off_text, find_pilot_on_text, 156, 403, 140, 15, 0); + auto get_pilot_hs = DLLHotSpotCreate(main_wnd, 10, 0, get_pilot_off_text, get_pilot_on_text, colx1 + 10, 372, 130, 15, 0); - void *game_hs = DLLHotSpotCreate(main_wnd, 11, 0, game_off_text, game_on_text, 505, 431, 135, 15, 0); + auto game_hs = DLLHotSpotCreate(main_wnd, 11, 0, game_off_text, game_on_text, 505, 431, 135, 15, 0); - void *enter_hs = DLLHotSpotCreate(main_wnd, 15, KEY_ENTER, send_off_text, send_on_text, 550, 370, 70, 15, 0); + auto enter_hs = DLLHotSpotCreate(main_wnd, 15, KEY_ENTER, send_off_text, send_on_text, 550, 370, 70, 15, 0); // lobby_text - void *lobby_txt_gadget = DLLTextCreate(main_wnd, lobby_text, 200, 450, UIF_CENTER); + auto lobby_txt_gadget = DLLTextCreate(main_wnd, lobby_text, 200, 450, UIF_CENTER); // User list box, id #10 - void *user_list = DLLOldListCreate(main_wnd, 10, colx1 + 20, 100, 108, 265, 0); + auto user_list = DLLOldListCreate(main_wnd, 10, colx1 + 20, 100, 108, 265, 0); // Channel list box, id #14 - void *chan_list = DLLOldListCreate(main_wnd, 14, colx2, 25, 470, 96, 0); + auto chan_list = DLLOldListCreate(main_wnd, 14, colx2, 25, 470, 96, 0); // Edit box for typing in chat, id # 15 - void *send_edit = DLLOldEditCreate(main_wnd, 15, colx2 + 10, 372, 390, 20, UIED_AUTOSELECT); + auto send_edit = DLLOldEditCreate(main_wnd, 15, colx2 + 10, 372, 390, 20, UIED_AUTOSELECT); DLLNewUIWindowLoadBackgroundImage(main_wnd, "pxomain.ogf"); DLLSetOldEditBufferLen(send_edit, 100); - void *console_item = DLLUIConsoleGadgetCreate(main_wnd, 16, colx2, 165, 0, 51, 16, 0); + auto console_item = DLLUIConsoleGadgetCreate(main_wnd, 16, colx2, 165, 0, 51, 16, 0); pconsole = console_item; DLLNewUIWindowOpen(main_wnd); @@ -1251,9 +1251,9 @@ int MainMultiplayerMenu() { oldseluser[0] = 0; if (oldsel) strcpy(oldseluser, oldsel); - void *old_ti = nullptr; // = DLLCreateNewUITextItem(TXT_PXO_JOINSTARTGAME,GR_WHITE); + UIItem *old_ti = nullptr; // = DLLCreateNewUITextItem(TXT_PXO_JOINSTARTGAME,GR_WHITE); // int oldsel = DLLOldListGetSelectedIndex(user_list); - // void * old_ti = + // UIItem * old_ti = DLLOldListRemoveAll(user_list); for (i = 0; i < CHAT_MAX_USERLIST; i++) { @@ -1371,7 +1371,6 @@ int MainMultiplayerMenu() { memset(fmtchan, 0, 500); - int textx = 0; int charpos = 0; int endpos; #define LIST_ROW1 90 @@ -1737,46 +1736,44 @@ int SearchMasterTrackerGameMenu() { int i = 0; float last_req_time; char selgame[200]; - void *selti = nullptr; - void *return_text_on = DLLCreateNewUITextItem(TXT_PXO_RETURNTOCHAT, UICOL_HOTSPOT_HI); - void *return_text_off = DLLCreateNewUITextItem(TXT_PXO_RETURNTOCHAT, UICOL_HOTSPOT_LO); - void *game_head_text = DLLCreateNewUITextItem(TXT_PXO_GAMELISTHDR, UICOL_TEXT_NORMAL); - void *exit_on_text = DLLCreateNewUITextItem(TXT_PXO_EXIT, UICOL_HOTSPOT_HI); - void *exit_off_text = DLLCreateNewUITextItem(TXT_PXO_EXIT, UICOL_HOTSPOT_LO); - void *join_on_text = DLLCreateNewUITextItem(TXT_PXO_JOINSEL, UICOL_HOTSPOT_HI); - void *join_off_text = DLLCreateNewUITextItem(TXT_PXO_JOINSEL, UICOL_HOTSPOT_LO); - void *start_on_text = DLLCreateNewUITextItem(TXT_PXO_STARTNEW, UICOL_HOTSPOT_HI); - void *start_off_text = DLLCreateNewUITextItem(TXT_PXO_STARTNEW, UICOL_HOTSPOT_LO); - - void *gname_on_text = DLLCreateNewUITextItem(TXT_PXO_GAMENAME2, UICOL_HOTSPOT_HI); - void *gname_off_text = DLLCreateNewUITextItem(TXT_PXO_GAMENAME2, UICOL_HOTSPOT_LO); - void *gtype_on_text = DLLCreateNewUITextItem(TXT_PXO_GAMETYPE, UICOL_HOTSPOT_HI); - void *gtype_off_text = DLLCreateNewUITextItem(TXT_PXO_GAMETYPE, UICOL_HOTSPOT_LO); - void *msn_on_text = DLLCreateNewUITextItem(TXT_PXO_MISSION, UICOL_HOTSPOT_HI); - void *msn_off_text = DLLCreateNewUITextItem(TXT_PXO_MISSION, UICOL_HOTSPOT_LO); - void *lvl_on_text = DLLCreateNewUITextItem(TXT_PXO_LEVEL, UICOL_HOTSPOT_HI); - void *lvl_off_text = DLLCreateNewUITextItem(TXT_PXO_LEVEL, UICOL_HOTSPOT_LO); - void *plrs_on_text = DLLCreateNewUITextItem(TXT_PXO_PLAYERS, UICOL_HOTSPOT_HI); - void *plrs_off_text = DLLCreateNewUITextItem(TXT_PXO_PLAYERS, UICOL_HOTSPOT_LO); - void *ping_on_text = DLLCreateNewUITextItem(TXT_PXO_PING, UICOL_HOTSPOT_HI); - void *ping_off_text = DLLCreateNewUITextItem(TXT_PXO_PING, UICOL_HOTSPOT_LO); + auto return_text_on = DLLCreateNewUITextItem(TXT_PXO_RETURNTOCHAT, UICOL_HOTSPOT_HI); + auto return_text_off = DLLCreateNewUITextItem(TXT_PXO_RETURNTOCHAT, UICOL_HOTSPOT_LO); + auto game_head_text = DLLCreateNewUITextItem(TXT_PXO_GAMELISTHDR, UICOL_TEXT_NORMAL); + auto exit_on_text = DLLCreateNewUITextItem(TXT_PXO_EXIT, UICOL_HOTSPOT_HI); + auto exit_off_text = DLLCreateNewUITextItem(TXT_PXO_EXIT, UICOL_HOTSPOT_LO); + auto join_on_text = DLLCreateNewUITextItem(TXT_PXO_JOINSEL, UICOL_HOTSPOT_HI); + auto join_off_text = DLLCreateNewUITextItem(TXT_PXO_JOINSEL, UICOL_HOTSPOT_LO); + auto start_on_text = DLLCreateNewUITextItem(TXT_PXO_STARTNEW, UICOL_HOTSPOT_HI); + auto start_off_text = DLLCreateNewUITextItem(TXT_PXO_STARTNEW, UICOL_HOTSPOT_LO); + + auto gname_on_text = DLLCreateNewUITextItem(TXT_PXO_GAMENAME2, UICOL_HOTSPOT_HI); + auto gname_off_text = DLLCreateNewUITextItem(TXT_PXO_GAMENAME2, UICOL_HOTSPOT_LO); + auto gtype_on_text = DLLCreateNewUITextItem(TXT_PXO_GAMETYPE, UICOL_HOTSPOT_HI); + auto gtype_off_text = DLLCreateNewUITextItem(TXT_PXO_GAMETYPE, UICOL_HOTSPOT_LO); + auto msn_on_text = DLLCreateNewUITextItem(TXT_PXO_MISSION, UICOL_HOTSPOT_HI); + auto msn_off_text = DLLCreateNewUITextItem(TXT_PXO_MISSION, UICOL_HOTSPOT_LO); + auto lvl_on_text = DLLCreateNewUITextItem(TXT_PXO_LEVEL, UICOL_HOTSPOT_HI); + auto lvl_off_text = DLLCreateNewUITextItem(TXT_PXO_LEVEL, UICOL_HOTSPOT_LO); + auto plrs_on_text = DLLCreateNewUITextItem(TXT_PXO_PLAYERS, UICOL_HOTSPOT_HI); + auto plrs_off_text = DLLCreateNewUITextItem(TXT_PXO_PLAYERS, UICOL_HOTSPOT_LO); + auto ping_on_text = DLLCreateNewUITextItem(TXT_PXO_PING, UICOL_HOTSPOT_HI); + auto ping_off_text = DLLCreateNewUITextItem(TXT_PXO_PING, UICOL_HOTSPOT_LO); char fmt_textstr[200]; snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_PXO_MAKEGAMEDEFAULT, 28); - void *default_on_text = DLLCreateNewUITextItem(fmt_textstr, UICOL_HOTSPOT_HI); + auto default_on_text = DLLCreateNewUITextItem(fmt_textstr, UICOL_HOTSPOT_HI); snprintf(fmt_textstr, sizeof(fmt_textstr), TXT_PXO_MAKEGAMEDEFAULT, 28); - void *default_off_text = DLLCreateNewUITextItem(fmt_textstr, UICOL_HOTSPOT_LO); - void *game_hdr_text = DLLCreateNewUITextItem(TXT_PXO_GAME_HDR, UICOL_WINDOW_TITLE); + auto default_off_text = DLLCreateNewUITextItem(fmt_textstr, UICOL_HOTSPOT_LO); + auto game_hdr_text = DLLCreateNewUITextItem(TXT_PXO_GAME_HDR, UICOL_WINDOW_TITLE); - void *info_on_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_HI); - void *info_off_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_LO); + auto info_on_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_HI); + auto info_off_text = DLLCreateNewUITextItem("", UICOL_HOTSPOT_LO); memset(PXOGamelist, 0, sizeof(PXOGamelist)); NextGameItemNo = 0; - void *return_hs; - void *set_dft_hs; + UIObject *set_dft_hs; void *net_game_txt_items[MAX_NET_GAMES]; int a; @@ -1788,16 +1785,16 @@ int SearchMasterTrackerGameMenu() { DLLSetScreenMode(SM_MENU); *DLLNewUIWindow_alpha = 255; - void *main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL); + auto main_wnd = DLLNewUIWindowCreate(0, 0, 640, 480, UIF_PROCESS_ALL); - void *screen_header = DLLTextCreate(main_wnd, game_hdr_text, 5, 15, UIF_CENTER); + auto screen_header = DLLTextCreate(main_wnd, game_hdr_text, 5, 15, UIF_CENTER); cury += 30; - void *start_hs = DLLHotSpotCreate(main_wnd, 7, KEY_S, start_off_text, start_on_text, 320, cury, 150, 15, UIF_CENTER); + auto start_hs = DLLHotSpotCreate(main_wnd, 7, KEY_S, start_off_text, start_on_text, 320, cury, 150, 15, UIF_CENTER); cury += 30; // 25; int setdfty; - return_hs = DLLHotSpotCreate(main_wnd, 8, KEY_R, return_text_off, return_text_on, 490, cury, 250, 15, UIF_CENTER); + auto return_hs = DLLHotSpotCreate(main_wnd, 8, KEY_R, return_text_off, return_text_on, 490, cury, 250, 15, UIF_CENTER); cury += 20; if (Bypass_chat) { @@ -1818,33 +1815,32 @@ int SearchMasterTrackerGameMenu() { set_dft_hs = DLLHotSpotCreate(main_wnd, 9, 0, default_off_text, default_on_text, 490, cury, 300, 15, UIF_CENTER); cury += 30; } - // void * game_head = DLLTextCreate(main_wnd,game_head_text,45,cury,0); - - void *gname_hs = DLLHotSpotCreate(main_wnd, SORT_GAMENAME, 0, gname_off_text, gname_on_text, 44, cury, - DLLgrtext_GetTextLineWidth(TXT_PXO_GAMENAME2) + 1, 15, 0); - void *gtype_hs = DLLHotSpotCreate(main_wnd, SORT_GAMETYPE, 0, gtype_off_text, gtype_on_text, 215, cury, - DLLgrtext_GetTextLineWidth(TXT_PXO_GAMETYPE) + 1, 15, 0); - void *msn_hs = DLLHotSpotCreate(main_wnd, SORT_MISSION, 0, msn_off_text, msn_on_text, 320, cury, - DLLgrtext_GetTextLineWidth(TXT_PXO_MISSION) + 1, 15, 0); - void *lvl_hs = DLLHotSpotCreate(main_wnd, SORT_LEVEL, 0, lvl_off_text, lvl_on_text, 428, cury, - DLLgrtext_GetTextLineWidth(TXT_PXO_LEVEL) + 1, 15, 0); - void *players_hs = DLLHotSpotCreate(main_wnd, SORT_PLAYERS, 0, plrs_off_text, plrs_on_text, 479, cury, - DLLgrtext_GetTextLineWidth(TXT_PXO_PLAYERS) + 1, 15, 0); - void *ping_hs = DLLHotSpotCreate(main_wnd, SORT_PING, 0, ping_off_text, ping_on_text, 549, cury, - DLLgrtext_GetTextLineWidth(TXT_PXO_PING) + 1, 15, 0); + // auto game_head = DLLTextCreate(main_wnd,game_head_text,45,cury,0); + + auto gname_hs = DLLHotSpotCreate(main_wnd, SORT_GAMENAME, 0, gname_off_text, gname_on_text, 44, cury, + DLLgrtext_GetTextLineWidth(TXT_PXO_GAMENAME2) + 1, 15, 0); + auto gtype_hs = DLLHotSpotCreate(main_wnd, SORT_GAMETYPE, 0, gtype_off_text, gtype_on_text, 215, cury, + DLLgrtext_GetTextLineWidth(TXT_PXO_GAMETYPE) + 1, 15, 0); + auto msn_hs = DLLHotSpotCreate(main_wnd, SORT_MISSION, 0, msn_off_text, msn_on_text, 320, cury, + DLLgrtext_GetTextLineWidth(TXT_PXO_MISSION) + 1, 15, 0); + auto lvl_hs = DLLHotSpotCreate(main_wnd, SORT_LEVEL, 0, lvl_off_text, lvl_on_text, 428, cury, + DLLgrtext_GetTextLineWidth(TXT_PXO_LEVEL) + 1, 15, 0); + auto players_hs = DLLHotSpotCreate(main_wnd, SORT_PLAYERS, 0, plrs_off_text, plrs_on_text, 479, cury, + DLLgrtext_GetTextLineWidth(TXT_PXO_PLAYERS) + 1, 15, 0); + auto ping_hs = DLLHotSpotCreate(main_wnd, SORT_PING, 0, ping_off_text, ping_on_text, 549, cury, + DLLgrtext_GetTextLineWidth(TXT_PXO_PING) + 1, 15, 0); cury += 15; - void *game_list = DLLListCreate(main_wnd, 6, 10, cury, 600, 230, UIF_CENTER | UILB_NOSORT); + auto game_list = DLLListCreate(main_wnd, 6, 10, cury, 600, 230, UIF_CENTER | UILB_NOSORT); cury += 260; - void *join_hs = DLLHotSpotCreate(main_wnd, 6, KEY_ENTER, join_off_text, join_on_text, 100, cury, 130, 15, 0); - void *exit_hs = DLLHotSpotCreate(main_wnd, 5, KEY_ESC, exit_off_text, exit_on_text, 400, cury, 70, 15, 0); + auto join_hs = DLLHotSpotCreate(main_wnd, 6, KEY_ENTER, join_off_text, join_on_text, 100, cury, 130, 15, 0); + auto exit_hs = DLLHotSpotCreate(main_wnd, 5, KEY_ESC, exit_off_text, exit_on_text, 400, cury, 70, 15, 0); - void *info_hs = DLLHotSpotCreate(main_wnd, GET_INFO_ID, KEY_I, info_off_text, info_on_text, 1, 1, 1, 1, 0); + auto info_hs = DLLHotSpotCreate(main_wnd, GET_INFO_ID, KEY_I, info_off_text, info_on_text, 1, 1, 1, 1, 0); DLLNewUIWindowLoadBackgroundImage(main_wnd, "pxogame.ogf"); DLLNewUIWindowOpen(main_wnd); *DLLNum_network_games_known = 0; - int lastgamesfound = 0; int itemp; last_req_time = DLLtimer_GetTime(); RequestGameList(); @@ -1854,7 +1850,7 @@ int SearchMasterTrackerGameMenu() { // Menu loop while (!exit_menu) { if (ChatStarted) - const char *p = GetChatText(); + GetChatText(); DLLDescentDefer(); IdleGameTracker(); @@ -2304,14 +2300,14 @@ int JoinNewLobby(const char *lobby) { int rcode; const char *p; DLLmprintf(0, "Entering new lobby"); - void *title_text = DLLCreateNewUITextItem(TXT_PXO_ENTERINGLOBBY, UICOL_WINDOW_TITLE); + auto title_text = DLLCreateNewUITextItem(TXT_PXO_ENTERINGLOBBY, UICOL_WINDOW_TITLE); - void *cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI); - void *cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO); + auto cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI); + auto cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO); - void *main_wnd = DLLNewUIGameWindowCreate(0, 256, 128, 128, UIF_CENTER | UIF_PROCESS_ALL | NUWF_TITLEMED); - void *title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); - void *cancel_hs = + auto main_wnd = DLLNewUIGameWindowCreate(0, 256, 128, 128, UIF_CENTER | UIF_PROCESS_ALL | NUWF_TITLEMED); + auto title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); + auto cancel_hs = DLLHotSpotCreate(main_wnd, 5, KEY_ESC, cancel_off_text, cancel_on_text, 20, 100, 70, 15, UIF_CENTER); DLLNewUIGameWindowOpen(main_wnd); do { @@ -2360,29 +2356,29 @@ const char *SendWhisper(const char *name) { char message[MAX_CHAT_SEND_LEN]; char pilot_name[MAX_CHAT_SEND_LEN]; static char fmt_msg[MAX_CHAT_SEND_LEN * 2]; - void *title_text = DLLCreateNewUITextItem(TXT_PXO_PRIVATEMESSAGE, UICOL_WINDOW_TITLE); + auto title_text = DLLCreateNewUITextItem(TXT_PXO_PRIVATEMESSAGE, UICOL_WINDOW_TITLE); - void *cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI); - void *cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO); - void *send_on_text = DLLCreateNewUITextItem(TXT_PXO_SEND, UICOL_HOTSPOT_HI); - void *send_off_text = DLLCreateNewUITextItem(TXT_PXO_SEND, UICOL_HOTSPOT_LO); + auto cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI); + auto cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO); + auto send_on_text = DLLCreateNewUITextItem(TXT_PXO_SEND, UICOL_HOTSPOT_HI); + auto send_off_text = DLLCreateNewUITextItem(TXT_PXO_SEND, UICOL_HOTSPOT_LO); - void *pilot_text = DLLCreateNewUITextItem(TXT_PXO_PILOTNAME, UICOL_TEXT_NORMAL); - void *message_text = DLLCreateNewUITextItem(TXT_PXO_MESSAGE, UICOL_TEXT_NORMAL); + auto pilot_text = DLLCreateNewUITextItem(TXT_PXO_PILOTNAME, UICOL_TEXT_NORMAL); + auto message_text = DLLCreateNewUITextItem(TXT_PXO_MESSAGE, UICOL_TEXT_NORMAL); - void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 384, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED); + auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 384, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED); - void *title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); - void *pilot = DLLTextCreate(main_wnd, pilot_text, 50, 55, 0); - void *message_t = DLLTextCreate(main_wnd, message_text, 50, 110, 0); - void *user_edit = DLLEditCreate(main_wnd, 10, 50, 75, 130, 15, 0); - void *msg_edit = DLLEditCreate(main_wnd, 3, 50, 130, 200, 15, 0); + auto title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); + auto pilot = DLLTextCreate(main_wnd, pilot_text, 50, 55, 0); + auto message_t = DLLTextCreate(main_wnd, message_text, 50, 110, 0); + auto user_edit = DLLEditCreate(main_wnd, 10, 50, 75, 130, 15, 0); + auto msg_edit = DLLEditCreate(main_wnd, 3, 50, 130, 200, 15, 0); // HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, int h, // int flags,int winnum) - void *cancel_hs = + auto cancel_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, cancel_on_text, cancel_off_text, 130, 256 - 80, 60, 20, 0); - void *send_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, send_on_text, send_off_text, 60, 256 - 80, 60, 20, 0); + auto send_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, send_on_text, send_off_text, 60, 256 - 80, 60, 20, 0); DLLNewUIGameWindowOpen(main_wnd); // DLLNewUIWindowSetFocusOnEditGadget(msg_edit,main_wnd); DLLEditSetText(user_edit, name); @@ -2443,27 +2439,27 @@ int JoinPrivateLobby() { char message[MAX_CHAT_SEND_LEN]; char priv_channel[MAX_CHAT_SEND_LEN]; - void *title_text = DLLCreateNewUITextItem(TXT_PXO_JOINPRIV, UICOL_WINDOW_TITLE); + auto title_text = DLLCreateNewUITextItem(TXT_PXO_JOINPRIV, UICOL_WINDOW_TITLE); - void *cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI); - void *cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO); - void *join_on_text = DLLCreateNewUITextItem(TXT_PXO_JOIN, UICOL_HOTSPOT_HI); - void *join_off_text = DLLCreateNewUITextItem(TXT_PXO_JOIN, UICOL_HOTSPOT_LO); + auto cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI); + auto cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO); + auto join_on_text = DLLCreateNewUITextItem(TXT_PXO_JOIN, UICOL_HOTSPOT_HI); + auto join_off_text = DLLCreateNewUITextItem(TXT_PXO_JOIN, UICOL_HOTSPOT_LO); - void *channel_text = DLLCreateNewUITextItem(TXT_PXO_CHANNELNAME, UICOL_TEXT_NORMAL); + auto channel_text = DLLCreateNewUITextItem(TXT_PXO_CHANNELNAME, UICOL_TEXT_NORMAL); - void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLELARGE); + auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLELARGE); - void *title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); - void *channel_t = DLLTextCreate(main_wnd, channel_text, 50, 95, UIF_CENTER); - void *chan_edit = DLLEditCreate(main_wnd, 3, 50, 115, 130, 15, UIF_CENTER); + auto title = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); + auto channel_t = DLLTextCreate(main_wnd, channel_text, 50, 95, UIF_CENTER); + auto chan_edit = DLLEditCreate(main_wnd, 3, 50, 115, 130, 15, UIF_CENTER); // DLLNewUIWindowSetFocusOnEditGadget(chan_edit,main_wnd); // HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, int h, // int flags,int winnum) - void *cancel_hs = + auto cancel_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, cancel_on_text, cancel_off_text, 130, 256 - 80, 60, 20, 0); - void *join_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, join_on_text, join_off_text, 60, 256 - 80, 60, 20, 0); + auto join_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, join_on_text, join_off_text, 60, 256 - 80, 60, 20, 0); DLLNewUIGameWindowOpen(main_wnd); while (!exit_menu) { int res; @@ -2530,27 +2526,27 @@ int FindPilot() { char message[MAX_CHAT_SEND_LEN]; char pilot_name[MAX_CHAT_SEND_LEN]; static char fmt_msg[MAX_CHAT_SEND_LEN * 2]; - void *title_text = DLLCreateNewUITextItem(TXT_PXO_FINDPILOT, UICOL_WINDOW_TITLE); + auto title_text = DLLCreateNewUITextItem(TXT_PXO_FINDPILOT, UICOL_WINDOW_TITLE); - void *cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI); - void *cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO); - void *search_on_text = DLLCreateNewUITextItem(TXT_PXO_SEARCH, UICOL_HOTSPOT_HI); - void *search_off_text = DLLCreateNewUITextItem(TXT_PXO_SEARCH, UICOL_HOTSPOT_LO); + auto cancel_on_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_HI); + auto cancel_off_text = DLLCreateNewUITextItem(TXT_PXO_CANCEL, UICOL_HOTSPOT_LO); + auto search_on_text = DLLCreateNewUITextItem(TXT_PXO_SEARCH, UICOL_HOTSPOT_HI); + auto search_off_text = DLLCreateNewUITextItem(TXT_PXO_SEARCH, UICOL_HOTSPOT_LO); - void *pilot_text = DLLCreateNewUITextItem(TXT_PXO_PILOTNAME, UICOL_TEXT_NORMAL); + auto pilot_text = DLLCreateNewUITextItem(TXT_PXO_PILOTNAME, UICOL_TEXT_NORMAL); - void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED); + auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED); - void *title_t = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); - void *pilot_t = DLLTextCreate(main_wnd, pilot_text, 50, 95, UIF_CENTER); - void *pilot_edit = DLLEditCreate(main_wnd, 3, 50, 115, 130, 15, UIF_CENTER); + auto title_t = DLLTextCreate(main_wnd, title_text, 0, 7, UIF_CENTER); + auto pilot_t = DLLTextCreate(main_wnd, pilot_text, 50, 95, UIF_CENTER); + auto pilot_edit = DLLEditCreate(main_wnd, 3, 50, 115, 130, 15, UIF_CENTER); // DLLNewUIWindowSetFocusOnEditGadget(pilot_edit,main_wnd); // HotSpotCreate(int item,int parentitem, int id, int key, int txtitemoff, int txtitemon, int x, int y, int w, int h, // int flags,int winnum) - void *cancel_hs = + auto cancel_hs = DLLHotSpotCreate(main_wnd, UID_CANCEL, KEY_ESC, cancel_on_text, cancel_off_text, 130, 256 - 80, 60, 20, 0); - void *search_hs = + auto search_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, search_on_text, search_off_text, 60, 256 - 80, 60, 20, 0); DLLNewUIGameWindowOpen(main_wnd); while (!exit_menu) { @@ -2688,26 +2684,26 @@ int GetPilotStats(const char *pilot) { char tmp_text[MAX_CHAT_SEND_LEN]; vmt_descent3_struct d3_pilot_info; - void *eff_text; - void *time_text; - void *main_wnd; - void *title_t; - void *kill_t; - void *death_t; - void *suicide_t; - void *eff_t; - void *time_in_game_t; - void *pilot_t; - void *rank_t; - - void *title_text; - void *pilot_name_text; - void *close_on_text; - void *close_off_text; - void *kills_text; - void *deaths_text; - void *suicide_text; - void *rank_text; + UIItem *eff_text; + UIItem *time_text; + UIObject *main_wnd; + UIObject *title_t; + UIObject *kill_t; + UIObject *death_t; + UIObject *suicide_t; + UIObject *eff_t; + UIObject *time_in_game_t; + UIObject *pilot_t; + UIObject *rank_t; + + UIItem *title_text; + UIItem *pilot_name_text; + UIItem *close_on_text; + UIItem *close_off_text; + UIItem *kills_text; + UIItem *deaths_text; + UIItem *suicide_text; + UIItem *rank_text; DLLCreateSplashScreen(TXT_PXO_GETTINGPILOTSTAT, 1); // Cancel previously active lookups @@ -3017,8 +3013,7 @@ int ShowMessageOfTheDay(void) { int motdlen = MAX_MOTD_LEN; int res; int rval = 0; - static void *main_wnd; - void *close_hs; + static UIObject *main_wnd; int last_motd_version = 0; @@ -3032,17 +3027,17 @@ int ShowMessageOfTheDay(void) { DLLDatabaseWriteInt("MOTDVersion", Motd_version); - void *close_on_text = DLLCreateNewUITextItem(TXT_PXO_CLOSE, UICOL_HOTSPOT_HI); - void *close_off_text = DLLCreateNewUITextItem(TXT_PXO_CLOSE, UICOL_HOTSPOT_LO); - void *motd_text = DLLCreateNewUITextItem("PXO Message of the day", UICOL_WINDOW_TITLE); + auto close_on_text = DLLCreateNewUITextItem(TXT_PXO_CLOSE, UICOL_HOTSPOT_HI); + auto close_off_text = DLLCreateNewUITextItem(TXT_PXO_CLOSE, UICOL_HOTSPOT_LO); + auto motd_text = DLLCreateNewUITextItem("PXO Message of the day", UICOL_WINDOW_TITLE); main_wnd = DLLNewUIGameWindowCreate(0, 0, MOTD_WIDTH, MOTD_HEIGHT, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLELARGE); - void *console_item = DLLUIConsoleGadgetCreate(main_wnd, 15, 20, 30, 0, 40, 20, 0); - void *title = DLLTextCreate(main_wnd, motd_text, 0, 7, UIF_CENTER); + auto console_item = DLLUIConsoleGadgetCreate(main_wnd, 15, 20, 30, 0, 40, 20, 0); + auto title = DLLTextCreate(main_wnd, motd_text, 0, 7, UIF_CENTER); - close_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, close_off_text, close_on_text, 60, MOTD_HEIGHT - 60, 60, 20, - UIF_CENTER); + auto close_hs = DLLHotSpotCreate(main_wnd, UID_OK, KEY_ENTER, close_off_text, close_on_text, 60, MOTD_HEIGHT - 60, 60, 20, + UIF_CENTER); DLLDatabaseRead("LastMOTD", szlastmotd, &motdlen); diff --git a/netgames/anarchy/anarchy.cpp b/netgames/anarchy/anarchy.cpp index 8c0934154..54f9a00a8 100644 --- a/netgames/anarchy/anarchy.cpp +++ b/netgames/anarchy/anarchy.cpp @@ -822,7 +822,6 @@ void DisplayHUDScores(struct tHUDItem *hitem) { int height = DLLgrfont_GetHeight((DMFCBase->GetGameFontTranslateArray())[HUD_FONT_INDEX]) + 3; uint8_t alpha = DMFCBase->ConvertHUDAlpha((uint8_t)((DisplayScoreScreen) ? 128 : 255)); int y = (DMFCBase->GetGameWindowH() / 2) - ((height * 5) / 2); - int x = 520; ddgr_color color = 0; int rank = 1; diff --git a/netgames/ctf/ctf.cpp b/netgames/ctf/ctf.cpp index ce558f9bf..c3b1779ce 100644 --- a/netgames/ctf/ctf.cpp +++ b/netgames/ctf/ctf.cpp @@ -859,7 +859,6 @@ void OnClientCollide(uint8_t *data) { int pnum = me_obj->id; // player number int pteam = DMFCBase->GetPlayerTeam(pnum); // player's team int i; - bool play_return_home_msg = false; for (i = 0; i < CTFNumOfTeams; i++) { if (it_obj->id == FlagIDs[i]) @@ -876,7 +875,6 @@ void OnClientCollide(uint8_t *data) { // Did player collide with his own team's flag? if (fteam == pteam) { - int16_t flag_count = 0; vector fpos; int groom; int flagcount; @@ -963,7 +961,6 @@ void OnClientCollide(uint8_t *data) { TeamScores[pteam] += score; OverallTeamScores[pteam] += score; - int newscore = TeamScores[pteam]; switch (flagcount) { case 1: { @@ -1121,7 +1118,6 @@ void OnClientLevelEnd(void) { DMFCBase->OnClientLevelEnd(); } void OnPlayerChangeTeam(int player_num, int newteam, bool announce, bool spew_onrespawn) { DMFCBase->OnPlayerChangeTeam(player_num, newteam, announce, spew_onrespawn); - player_record *pr = DMFCBase->GetPlayerRecordByPnum(player_num); } // OnClientPlayerKilled @@ -2183,8 +2179,6 @@ bool AddFlagToPlayer(int pnum, int team, int flagobjnum) { // RemoveFlagFromPlayer // removes a flag from a player bool RemoveFlagFromPlayer(int pnum, int team) { - int flagobjnum = -1; - if (DMFCBase->GetLocalRole() == LR_SERVER) { if (ChildFlags[team] == OBJECT_HANDLE_NONE) diff --git a/netgames/dmfc/dmfcfunctions.cpp b/netgames/dmfc/dmfcfunctions.cpp index 6489f5f29..409e68a41 100644 --- a/netgames/dmfc/dmfcfunctions.cpp +++ b/netgames/dmfc/dmfcfunctions.cpp @@ -231,14 +231,14 @@ bool (*DLLApplyDamageToPlayer)(object *playerobj, object *killer, int damage_typ int server_says, int weapon_id, bool playsound); int (*DLLMultiMatchGeneric)(uint32_t unique_id); void (*DLLSetUITextItemText)(void *uit, char *newtext, uint32_t color); -void *(*DLLNewUIWindowCreate)(int x, int y, int w, int h, int flags); +UIObject *(*DLLNewUIWindowCreate)(int x, int y, int w, int h, int flags); void (*DLLNewUIWindowDestroy)(void *deswin); void (*DLLNewUIWindowOpen)(void *deswin); void (*DLLNewUIWindowClose)(void *deswin); -void *(*DLLTextCreate)(void *parentwin, void *textitem, int x, int y, int flags); -void *(*DLLEditCreate)(void *parentwin, int id, int x, int y, int w, int h, int flags); -void *(*DLLButtonCreate)(void *parentwin, int id, void *titleitem, int x, int y, int w, int h, int flags); -void *(*DLLListCreate)(void *parentwin, int id, int x, int y, int w, int h, int flags); +UIObject *(*DLLTextCreate)(void *parentwin, void *textitem, int x, int y, int flags); +UIObject *(*DLLEditCreate)(void *parentwin, int id, int x, int y, int w, int h, int flags); +UIObject *(*DLLButtonCreate)(void *parentwin, int id, void *titleitem, int x, int y, int w, int h, int flags); +UIObject *(*DLLListCreate)(void *parentwin, int id, int x, int y, int w, int h, int flags); void (*DLLListRemoveAll)(void *item); void (*DLLListAddItem)(void *item, void *uitext); void (*DLLListRemoveItem)(void *item, void *txtitem); @@ -252,27 +252,26 @@ int (*DLLDoUI)(void); int (*DLLDoMessageBox)(const char *title, const char *msg, int type, ddgr_color title_color, ddgr_color text_color); void (*DLLDescentDefer)(void); -void *(*DLLNewUIGameWindowCreate)(int x, int y, int w, int h, int flags); +UIObject *(*DLLNewUIGameWindowCreate)(int x, int y, int w, int h, int flags); void (*DLLNewUIGameWindowDestroy)(void *item); void (*DLLNewUIGameWindowOpen)(void *item); void (*DLLNewUIGameWindowClose)(void *item); -void *(*DLLHotSpotCreate)(void *parentwin, int id, int key, void *txtitemoff, void *txtitemon, int x, - int y, int w, int h, int flags); +UIObject *(*DLLHotSpotCreate)(void *parentwin, int id, int key, void *txtitemoff, void *txtitemon, int x, + int y, int w, int h, int flags); int (*DLLPollUI)(void); void (*DLLRemoveUITextItem)(void *item); -void *(*DLLCreateNewUITextItem)(const char *newtext, uint32_t color, int font); +UIItem *(*DLLCreateNewUITextItem)(const char *newtext, uint32_t color, int font); void (*DLLRemoveUIBmpItem)(void *item); -void *(*DLLCreateNewUIBmpItem)(int handle, uint8_t alpha); -void *(*DLLUIConsoleGadgetCreate)(void *parentid, int id, int x, int y, int font, int cols, int rows, - int flags); +UIItem *(*DLLCreateNewUIBmpItem)(int handle, uint8_t alpha); +UIObject *(*DLLUIConsoleGadgetCreate)(void *parentid, int id, int x, int y, int font, int cols, int rows, int flags); void (*DLLUIConsoleGadgetputs)(void *item, const char *str); void (*DLLNewUIWindowSetFocusOnEditGadget)(void *item, void *parent); -void *(*DLLOldListCreate)(void *parentitem, int id, int x, int y, int w, int h, int flags); +UIObject *(*DLLOldListCreate)(void *parentitem, int id, int x, int y, int w, int h, int flags); void (*DLLOldListRemoveAll)(void *item); void (*DLLOldListAddItem)(void *item, void *uitext); void (*DLLOldListRemoveItem)(void *item, void *txtitem); void (*DLLOldListSelectItem)(void *item, void *txtitem); -void *(*DLLOldEditCreate)(void *parentitem, int id, int x, int y, int w, int h, int flags); +UIObject *(*DLLOldEditCreate)(void *parentitem, int id, int x, int y, int w, int h, int flags); void (*DLLOldEditGetText)(void *item, char *buff, int len); void (*DLLOldEditSetText)(void *item, const char *newtext); char *(*DLLOldListGetItem)(void *item, int index); @@ -280,7 +279,7 @@ int (*DLLOldListGetSelectedIndex)(void *item); void (*DLLToggleUICallback)(int state); void (*DLLSetOldEditBufferLen)(void *item, int len); void (*DLLNewUIWindowLoadBackgroundImage)(void *item, const char *image_name); -void (*DLLDeleteUIItem)(void *delitem); +void (*DLLDeleteUIItem)(UIObject *); void (*DLLHotSpotSetStates)(void *hs, void *texton, void *textoff); void (*DLLSetUICallback)(void (*fn)()); void (*DLLGetUICallback)(void **fn); @@ -304,7 +303,7 @@ bool (*DLLAttachObject)(object *parent, char parent_ap, object *child, char chil bool (*DLLObjGet)(int handle, object **obj); int (*DLLGetUIItemWidth)(void *item); int (*DLLGetUIItemHeight)(void *item); -void *(*DLLSliderCreate)(void *parent, int id, int x, int y, int flags); +UIObject *(*DLLSliderCreate)(void *parent, int id, int x, int y, int flags); void (*DLLSliderSetRange)(void *slider, int range); int (*DLLSliderGetRange)(void *slider); void (*DLLSliderSetPos)(void *slider, int pos); @@ -320,7 +319,7 @@ void (*DLLMultiSetLogoState)(bool state); void (*DLLPlayerSpewInventory)(object *obj, bool spew_energy_and_shield, bool spew_nonspewable); int (*DLLPlayerGetRandomStartPosition)(int slot); void (*DLLInitPlayerNewShip)(int slot, int inven_reset); -void *(*DLLCheckBoxCreate)(void *parent, int id, void *title, int x, int y, int w, int h, int flags); +UIObject *(*DLLCheckBoxCreate)(void *parent, int id, void *title, int x, int y, int w, int h, int flags); void (*DLLCheckBoxSetCheck)(void *cb, bool state); bool (*DLLCheckBoxIsChecked)(void *cb); uint32_t (*DLLnw_GetHostAddressFromNumbers)(char *str); diff --git a/netgames/dmfc/dmfcinputcommand.cpp b/netgames/dmfc/dmfcinputcommand.cpp index 6be7eb622..a5d351f4a 100644 --- a/netgames/dmfc/dmfcinputcommand.cpp +++ b/netgames/dmfc/dmfcinputcommand.cpp @@ -921,7 +921,6 @@ void DMFCInputCommand_Piggyback(const char *input_string) { } char s[20]; - bool turn_on = true; object *pobj; int pnum = basethis->GetPlayerNum(); pobj = &basethis->Objects[basethis->Players[pnum].objnum]; diff --git a/netgames/dmfc/dmfcinternal.h b/netgames/dmfc/dmfcinternal.h index 4ea01aabd..45a68b08c 100644 --- a/netgames/dmfc/dmfcinternal.h +++ b/netgames/dmfc/dmfcinternal.h @@ -358,7 +358,7 @@ class PInfo { int m_slot; }; -class MenuItem : public IMenuItem { +class MenuItem final : public IMenuItem { public: MenuItem(); MenuItem(const char *title, char type, uint8_t flags, void (*fp)(int), ...); // the last parameters are the state items, which @@ -455,7 +455,7 @@ struct tBanItem { }; // This class handles displaying and processing a customizable and detailed stats screen (in-game) -class CDmfcStats : public IDmfcStats { +class CDmfcStats final : public IDmfcStats { public: // constuctor/destructor CDmfcStats(); diff --git a/netgames/dmfc/dmfcui.cpp b/netgames/dmfc/dmfcui.cpp index d1ca289b8..2c2e05859 100644 --- a/netgames/dmfc/dmfcui.cpp +++ b/netgames/dmfc/dmfcui.cpp @@ -122,8 +122,8 @@ extern DMFCBase *basethis; struct tTeamPlacementDialogInfo { - void *lb[DLLMAX_TEAMS]; - void *text[DLLMAX_PLAYERS]; + UIObject *lb[DLLMAX_TEAMS]; + UIItem *text[DLLMAX_PLAYERS]; int trans[DLLMAX_TEAMS][DLLMAX_PLAYERS]; void (*old_callback)(); }; @@ -297,10 +297,10 @@ void DMFCBase::DoDMFCUITeamPlacement(bool clients_wait, bool called_by_level_sta } bool exit_menu = false; - void *list_red = NULL, *list_blue = NULL, *list_green = NULL, *list_yellow = NULL; - void *icon_b_hs[DLLMAX_TEAMS][DLLMAX_TEAMS - 1]; - void *icon_hs[DLLMAX_TEAMS][DLLMAX_TEAMS - 1]; - void *team_text[DLLMAX_TEAMS]; + UIObject *list_red = NULL, *list_blue = NULL, *list_green = NULL, *list_yellow = NULL; + UIItem *icon_b_hs[DLLMAX_TEAMS][DLLMAX_TEAMS - 1]; + UIObject *icon_hs[DLLMAX_TEAMS][DLLMAX_TEAMS - 1]; + UIObject *team_text[DLLMAX_TEAMS]; int count; int id_list[DLLMAX_TEAMS * (DLLMAX_TEAMS - 1)]; @@ -340,26 +340,26 @@ void DMFCBase::DoDMFCUITeamPlacement(bool clients_wait, bool called_by_level_sta ////////////////////////////////////////////////// // Text Items - void *start_game_text_off = + auto start_game_text_off = DLLCreateNewUITextItem((called_by_level_start) ? DTXT_UI_STARTGAME : DTXT_UI_RETURNTOGAME, UICOL_HOTSPOT_LO, -1); - void *start_game_text_on = + auto start_game_text_on = DLLCreateNewUITextItem((called_by_level_start) ? DTXT_UI_STARTGAME : DTXT_UI_RETURNTOGAME, UICOL_HOTSPOT_HI, -1); - void *client_wait_txt = DLLCreateNewUITextItem(DTXT_UI_CLIENTSWAIT, UICOL_HOTSPOT_LO, -1); - void *window_title = DLLCreateNewUITextItem(DTXT_UI_TEAMSETUP, UICOL_WINDOW_TITLE, -1); + auto client_wait_txt = DLLCreateNewUITextItem(DTXT_UI_CLIENTSWAIT, UICOL_HOTSPOT_LO, -1); + auto window_title = DLLCreateNewUITextItem(DTXT_UI_TEAMSETUP, UICOL_WINDOW_TITLE, -1); /////////////////////////////////////////////////// // Main Window - void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 512, 384, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED); + auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 512, 384, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED); /////////////////////////////////////////////////// // Item placement int cury; count = GetNumTeams(); - void *start_game_hs = DLLHotSpotCreate(main_wnd, UID_OK, K_ENTER, start_game_text_off, start_game_text_on, 40, + auto start_game_hs = DLLHotSpotCreate(main_wnd, UID_OK, K_ENTER, start_game_text_off, start_game_text_on, 40, 384 - OKCANCEL_YOFFSET, 130, 15, UIF_CENTER); - void *window_title_text = DLLTextCreate(main_wnd, window_title, 0, 7, UIF_CENTER | UIF_FIT); - void *client_wait_cb; + auto window_title_text = DLLTextCreate(main_wnd, window_title, 0, 7, UIF_CENTER | UIF_FIT); + UIObject *client_wait_cb; if (count > 2) { client_wait_cb = DLLCheckBoxCreate(main_wnd, 128, client_wait_txt, 256 - (DLLGetUIItemWidth(client_wait_txt) / 2), @@ -709,8 +709,8 @@ void DMFCBase::DoDMFCUITeamPlacement(bool clients_wait, bool called_by_level_sta struct tWaitForPlayers { float last_update; void (*old_callback)(void); - void *listbox; - void *text[DLLMAX_PLAYERS]; + UIObject *listbox; + UIItem *text[DLLMAX_PLAYERS]; int indexmap[DLLMAX_PLAYERS]; }; tWaitForPlayers wfpi; @@ -782,28 +782,28 @@ void DMFCBase::DoDMFCUIWaitForPlayers(bool clients_wait) { /////////////////////////////////////////////////// // Text Items - void *start_game_text_off = DLLCreateNewUITextItem(DTXT_UI_STARTGAME, UICOL_HOTSPOT_LO, -1); - void *start_game_text_on = DLLCreateNewUITextItem(DTXT_UI_STARTGAME, UICOL_HOTSPOT_HI, -1); - void *client_wait_txt = DLLCreateNewUITextItem(DTXT_UI_CLIENTSWAIT, UICOL_HOTSPOT_LO, -1); - void *window_title = DLLCreateNewUITextItem(DTXT_UI_WAITFORPLAYERS, UICOL_WINDOW_TITLE, -1); - void *kick_text_off = DLLCreateNewUITextItem(DTXT_UI_KICKPLAYER, UICOL_HOTSPOT_LO, -1); - void *kick_text_on = DLLCreateNewUITextItem(DTXT_UI_KICKPLAYER, UICOL_HOTSPOT_HI, -1); - void *ban_text_off = DLLCreateNewUITextItem(DTXT_UI_BANPLAYER, UICOL_HOTSPOT_LO, -1); - void *ban_text_on = DLLCreateNewUITextItem(DTXT_UI_BANPLAYER, UICOL_HOTSPOT_HI, -1); + auto start_game_text_off = DLLCreateNewUITextItem(DTXT_UI_STARTGAME, UICOL_HOTSPOT_LO, -1); + auto start_game_text_on = DLLCreateNewUITextItem(DTXT_UI_STARTGAME, UICOL_HOTSPOT_HI, -1); + auto client_wait_txt = DLLCreateNewUITextItem(DTXT_UI_CLIENTSWAIT, UICOL_HOTSPOT_LO, -1); + auto window_title = DLLCreateNewUITextItem(DTXT_UI_WAITFORPLAYERS, UICOL_WINDOW_TITLE, -1); + auto kick_text_off = DLLCreateNewUITextItem(DTXT_UI_KICKPLAYER, UICOL_HOTSPOT_LO, -1); + auto kick_text_on = DLLCreateNewUITextItem(DTXT_UI_KICKPLAYER, UICOL_HOTSPOT_HI, -1); + auto ban_text_off = DLLCreateNewUITextItem(DTXT_UI_BANPLAYER, UICOL_HOTSPOT_LO, -1); + auto ban_text_on = DLLCreateNewUITextItem(DTXT_UI_BANPLAYER, UICOL_HOTSPOT_HI, -1); /////////////////////////////////////////////////// // Main Window - void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 512, 384, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED); + auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 512, 384, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED); /////////////////////////////////////////////////// // Item placement int cury = 30; bool exit_menu = false; - void *start_game_hs = DLLHotSpotCreate(main_wnd, UID_OK, K_ENTER, start_game_text_off, start_game_text_on, 40, + auto start_game_hs = DLLHotSpotCreate(main_wnd, UID_OK, K_ENTER, start_game_text_off, start_game_text_on, 40, 384 - OKCANCEL_YOFFSET, 130, 15, UIF_CENTER); - void *window_title_text = DLLTextCreate(main_wnd, window_title, 0, 7, UIF_CENTER | UIF_FIT); - void *client_wait_cb = + auto window_title_text = DLLTextCreate(main_wnd, window_title, 0, 7, UIF_CENTER | UIF_FIT); + auto client_wait_cb = DLLCheckBoxCreate(main_wnd, 128, client_wait_txt, 30, 369 - OKCANCEL_YOFFSET, 130, 15, UIF_FIT | UIF_CENTER); wfpi.listbox = DLLListCreate(main_wnd, -1, 40, cury, 256, 288, UIF_CENTER); DLLCheckBoxSetCheck(client_wait_cb, clients_wait); @@ -812,9 +812,9 @@ void DMFCBase::DoDMFCUIWaitForPlayers(bool clients_wait) { DLLGetUIItemPosition(wfpi.listbox, &l_x, &l_y, &l_w, &l_h); l_x = l_x + l_w + 10; l_y = (l_y + (l_h / 2)) - 15; - void *kick_hs = DLLHotSpotCreate(main_wnd, 10, -1, kick_text_off, kick_text_on, l_x, l_y, 130, 15, UIF_FIT); + auto kick_hs = DLLHotSpotCreate(main_wnd, 10, -1, kick_text_off, kick_text_on, l_x, l_y, 130, 15, UIF_FIT); l_y += 15; - void *ban_hs = DLLHotSpotCreate(main_wnd, 20, -1, ban_text_off, ban_text_on, l_x, l_y, 130, 15, UIF_FIT); + auto ban_hs = DLLHotSpotCreate(main_wnd, 20, -1, ban_text_off, ban_text_on, l_x, l_y, 130, 15, UIF_FIT); ////////////////////////////////////////////////// // Process all diff --git a/netgames/entropy/EntropyBase.cpp b/netgames/entropy/EntropyBase.cpp index f03c6125a..db53a01bf 100644 --- a/netgames/entropy/EntropyBase.cpp +++ b/netgames/entropy/EntropyBase.cpp @@ -1738,7 +1738,6 @@ void DisplayWelcomeMessage(int player_num) { } void OnLabSpewTimer(void) { - int max_rooms = DMFCBase->GetHighestRoomIndex() + 1; int objnum; int index; int virus_count; diff --git a/netgames/entropy/EntropyRoom.cpp b/netgames/entropy/EntropyRoom.cpp index 87f094118..2706e6fa7 100644 --- a/netgames/entropy/EntropyRoom.cpp +++ b/netgames/entropy/EntropyRoom.cpp @@ -132,16 +132,16 @@ void DoServerConfigureDialog(void) { char tempbuffer[20]; bool exit_menu = false; - void *start_game_text_off = DLLCreateNewUITextItem(TXT_STARTGAME, GR_WHITE, -1); - void *start_game_text_on = DLLCreateNewUITextItem(TXT_STARTGAME, GR_RED, -1); - void *virus_pk_text = DLLCreateNewUITextItem(TXT_VIRUSCREDIT, GR_WHITE, -1); + auto start_game_text_off = DLLCreateNewUITextItem(TXT_STARTGAME, GR_WHITE, -1); + auto start_game_text_on = DLLCreateNewUITextItem(TXT_STARTGAME, GR_RED, -1); + auto virus_pk_text = DLLCreateNewUITextItem(TXT_VIRUSCREDIT, GR_WHITE, -1); - void *main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER); + auto main_wnd = DLLNewUIGameWindowCreate(0, 0, 256, 256, UIF_PROCESS_ALL | UIF_CENTER); int cury = 20; - void *virus_pk_edit = DLLEditCreate(main_wnd, 13, 40, cury, 80, 15, 0); + auto virus_pk_edit = DLLEditCreate(main_wnd, 13, 40, cury, 80, 15, 0); cury += 35; - void *start_game_hs = + auto start_game_hs = DLLHotSpotCreate(main_wnd, UID_OK, K_ENTER, start_game_text_off, start_game_text_on, 40, cury, 130, 15, 0); cury += 20; diff --git a/netgames/hoard/hoard.cpp b/netgames/hoard/hoard.cpp index 9dc343f1b..2149f7152 100644 --- a/netgames/hoard/hoard.cpp +++ b/netgames/hoard/hoard.cpp @@ -74,7 +74,6 @@ IDMFC *DMFCBase = NULL; static IDmfcStats *dstat = NULL; -static IMenuItem *OSMenuSave = NULL; static object *dObjects = NULL; static player *dPlayers = NULL; @@ -1268,7 +1267,6 @@ void DisplayHUDScores(struct tHUDItem *hitem) { if (DisplayScoreScreen) return; - int x = 520; int height = DLLgrfont_GetHeight((DMFCBase->GetGameFontTranslateArray())[HUD_FONT_INDEX]) + 3; uint8_t alpha = DMFCBase->ConvertHUDAlpha((uint8_t)((DisplayScoreScreen) ? 128 : 255)); int y = (DMFCBase->GetGameWindowH() / 2) - ((height * 5) / 2); diff --git a/netgames/hoard/hoard_ui.cpp b/netgames/hoard/hoard_ui.cpp index f8176b071..fa031d172 100644 --- a/netgames/hoard/hoard_ui.cpp +++ b/netgames/hoard/hoard_ui.cpp @@ -93,31 +93,31 @@ void DisplayHoardConfigDialog(tGameConfig *config) { // text items // ---------- - void *start_game_text_off = DLLCreateNewUITextItem(TXT_RETURNTOGAME, UICOL_HOTSPOT_LO, -1); - void *start_game_text_on = DLLCreateNewUITextItem(TXT_RETURNTOGAME, UICOL_HOTSPOT_HI, -1); - void *window_title = DLLCreateNewUITextItem(TXT_GAMECONFIG, UICOL_WINDOW_TITLE, -1); - void *min_count_label_ti = DLLCreateNewUITextItem(TXT_MINIMUMORBS, UICOL_TEXT_NORMAL, -1); - void *slider_val_ti = DLLCreateNewUITextItem(buffer, UICOL_TEXT_NORMAL, -1); + auto start_game_text_off = DLLCreateNewUITextItem(TXT_RETURNTOGAME, UICOL_HOTSPOT_LO, -1); + auto start_game_text_on = DLLCreateNewUITextItem(TXT_RETURNTOGAME, UICOL_HOTSPOT_HI, -1); + auto window_title = DLLCreateNewUITextItem(TXT_GAMECONFIG, UICOL_WINDOW_TITLE, -1); + auto min_count_label_ti = DLLCreateNewUITextItem(TXT_MINIMUMORBS, UICOL_TEXT_NORMAL, -1); + auto slider_val_ti = DLLCreateNewUITextItem(buffer, UICOL_TEXT_NORMAL, -1); // main window // ----------- - void *main_wnd = DLLNewUIGameWindowCreate(0, 0, WINDOW_W, WINDOW_H, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED); + auto main_wnd = DLLNewUIGameWindowCreate(0, 0, WINDOW_W, WINDOW_H, UIF_PROCESS_ALL | UIF_CENTER | NUWF_TITLEMED); // item placement // -------------- int cury = 35; int left_x_col = 20; - void *start_game_hs = DLLHotSpotCreate(main_wnd, UID_OK, K_ENTER, start_game_text_off, start_game_text_on, 40, + auto start_game_hs = DLLHotSpotCreate(main_wnd, UID_OK, K_ENTER, start_game_text_off, start_game_text_on, 40, WINDOW_H - OKCANCEL_YOFFSET, 130, 15, UIF_CENTER); - void *window_title_text = DLLTextCreate(main_wnd, window_title, 0, 7, UIF_CENTER | UIF_FIT); - void *min_count_label = DLLTextCreate(main_wnd, min_count_label_ti, left_x_col, cury, UIF_FIT | UIF_CENTER); + auto window_title_text = DLLTextCreate(main_wnd, window_title, 0, 7, UIF_CENTER | UIF_FIT); + auto min_count_label = DLLTextCreate(main_wnd, min_count_label_ti, left_x_col, cury, UIF_FIT | UIF_CENTER); cury += 15; - void *count_slider = DLLSliderCreate(main_wnd, 31, 0, cury, UIF_CENTER | UIF_FIT); + auto count_slider = DLLSliderCreate(main_wnd, 31, 0, cury, UIF_CENTER | UIF_FIT); cury += 30; DLLSliderSetRange(count_slider, 11); DLLSliderSetPos(count_slider, config->min_hoard - 1); - void *slider_val = DLLTextCreate(main_wnd, slider_val_ti, left_x_col, cury, UIF_FIT | UIF_CENTER); + auto slider_val = DLLTextCreate(main_wnd, slider_val_ti, left_x_col, cury, UIF_FIT | UIF_CENTER); // show window // ----------- diff --git a/netgames/hyperanarchy/hyperanarchy.cpp b/netgames/hyperanarchy/hyperanarchy.cpp index 7830b472d..11dac65e4 100644 --- a/netgames/hyperanarchy/hyperanarchy.cpp +++ b/netgames/hyperanarchy/hyperanarchy.cpp @@ -1149,7 +1149,6 @@ void DisplayHUDScores(struct tHUDItem *hitem) { int height = DLLgrfont_GetHeight((DMFCBase->GetGameFontTranslateArray())[HUD_FONT_INDEX]) + 3; uint8_t alpha = DMFCBase->ConvertHUDAlpha((uint8_t)((DisplayScoreScreen) ? 128 : 255)); int y = (DMFCBase->GetGameWindowH() / 2) - ((height * 5) / 2); - int x = 510; int rank = 1; ddgr_color color = 0; bool hasorb; diff --git a/netgames/includes/gamedll_header.h b/netgames/includes/gamedll_header.h index d04a4c7f5..90dd15148 100644 --- a/netgames/includes/gamedll_header.h +++ b/netgames/includes/gamedll_header.h @@ -142,6 +142,9 @@ struct game_api { tOSIRISModuleInit *osiris_functions; }; +class UIItem; +class UIObject; + // Descent3 function prototypes. NOTE: These must match the real D3 prototypes. typedef void (*GetGameAPI_fp)(game_api *); @@ -611,7 +614,7 @@ DMFCDLLOUT(MultiMatchGeneric_fp DLLMultiMatchGeneric;) typedef void (*SetUITextItemText_fp)(void *uit, char *newtext, uint32_t color); DMFCDLLOUT(SetUITextItemText_fp DLLSetUITextItemText;) -typedef void *(*NewUIWindowCreate_fp)(int x, int y, int w, int h, int flags); +typedef UIObject *(*NewUIWindowCreate_fp)(int x, int y, int w, int h, int flags); DMFCDLLOUT(NewUIWindowCreate_fp DLLNewUIWindowCreate;) typedef void (*NewUIWindowDestroy_fp)(void *deswin); @@ -623,19 +626,19 @@ DMFCDLLOUT(NewUIWindowOpen_fp DLLNewUIWindowOpen;) typedef void (*NewUIWindowClose_fp)(void *deswin); DMFCDLLOUT(NewUIWindowClose_fp DLLNewUIWindowClose;) -typedef void *(*TextCreate_fp)(void *parentwin, void *textitem, int x, int y, int flags); +typedef UIObject *(*TextCreate_fp)(void *parentwin, void *textitem, int x, int y, int flags); DMFCDLLOUT(TextCreate_fp DLLTextCreate;) typedef void (*TextSetTitle_fp)(void *text, void *textitem); DMFCDLLOUT(TextSetTitle_fp DLLTextSetTitle;) -typedef void *(*EditCreate_fp)(void *parentwin, int id, int x, int y, int w, int h, int flags); +typedef UIObject *(*EditCreate_fp)(void *parentwin, int id, int x, int y, int w, int h, int flags); DMFCDLLOUT(EditCreate_fp DLLEditCreate;) -typedef void *(*ButtonCreate_fp)(void *parentwin, int id, void *titleitem, int x, int y, int w, int h, int flags); +typedef UIObject *(*ButtonCreate_fp)(void *parentwin, int id, void *titleitem, int x, int y, int w, int h, int flags); DMFCDLLOUT(ButtonCreate_fp DLLButtonCreate;) -typedef void *(*ListCreate_fp)(void *parentwin, int id, int x, int y, int w, int h, int flags); +typedef UIObject *(*ListCreate_fp)(void *parentwin, int id, int x, int y, int w, int h, int flags); DMFCDLLOUT(ListCreate_fp DLLListCreate;) typedef void (*ListRemoveAll_fp)(void *item); @@ -672,7 +675,7 @@ typedef int (*GetUIItemHeight_fp)(void *item); DMFCDLLOUT(GetUIItemHeight_fp DLLGetUIItemHeight;) // UI CheckBox functions -typedef void *(*CheckBoxCreate_fp)(void *parent, int id, void *title, int x, int y, int w, int h, int flags); +typedef UIObject *(*CheckBoxCreate_fp)(void *parent, int id, void *title, int x, int y, int w, int h, int flags); DMFCDLLOUT(CheckBoxCreate_fp DLLCheckBoxCreate;) typedef void (*CheckBoxSetCheck_fp)(void *cb, bool state); @@ -695,8 +698,7 @@ DMFCDLLOUT(DoMessageBox_fp DLLDoMessageBox;) typedef void (*DescentDefer_fp)(void); DMFCDLLOUT(DescentDefer_fp DLLDescentDefer;) -// typedef void *(*NewUIGameWindowCreate_fp)(int x, int y, int w, int h, int flags=UIF_PROCESS_ALL); -typedef void *(*NewUIGameWindowCreate_fp)(int x, int y, int w, int h, int flags); +typedef UIObject *(*NewUIGameWindowCreate_fp)(int x, int y, int w, int h, int flags); DMFCDLLOUT(NewUIGameWindowCreate_fp DLLNewUIGameWindowCreate;) typedef void (*NewUIGameWindowDestroy_fp)(void *item); @@ -708,8 +710,8 @@ DMFCDLLOUT(NewUIGameWindowOpen_fp DLLNewUIGameWindowOpen;) typedef void (*NewUIGameWindowClose_fp)(void *item); DMFCDLLOUT(NewUIGameWindowClose_fp DLLNewUIGameWindowClose;) -typedef void *(*HotSpotCreate_fp)(void *parentwin, int id, int key, void *txtitemoff, void *txtitemon, int x, int y, - int w, int h, int flags); +typedef UIObject *(*HotSpotCreate_fp)(void *parentwin, int id, int key, void *txtitemoff, void *txtitemon, + int x, int y, int w, int h, int flags); DMFCDLLOUT(HotSpotCreate_fp DLLHotSpotCreate;) typedef int (*PollUI_fp)(void); @@ -718,18 +720,17 @@ DMFCDLLOUT(PollUI_fp DLLPollUI;) typedef void (*RemoveUITextItem_fp)(void *item); DMFCDLLOUT(RemoveUITextItem_fp DLLRemoveUITextItem;) -// typedef void *(*CreateNewUITextItem_fp)(const char *newtext,uint32_t color,int font=-1); -typedef void *(*CreateNewUITextItem_fp)(const char *newtext, uint32_t color, int font); +typedef UIItem *(*CreateNewUITextItem_fp)(const char *newtext, uint32_t color, int font); DMFCDLLOUT(CreateNewUITextItem_fp DLLCreateNewUITextItem;) typedef void (*RemoveUIBmpItem_fp)(void *item); DMFCDLLOUT(RemoveUIBmpItem_fp DLLRemoveUIBmpItem;) -typedef void *(*CreateNewUIBmpItem_fp)(int handle, uint8_t alpha); +typedef UIItem *(*CreateNewUIBmpItem_fp)(int handle, uint8_t alpha); DMFCDLLOUT(CreateNewUIBmpItem_fp DLLCreateNewUIBmpItem;) -typedef void *(*UIConsoleGadgetCreate_fp)(void *parentid, int id, int x, int y, int font, int cols, int rows, - int flags); +typedef UIObject *(*UIConsoleGadgetCreate_fp)(void *parentid, int id, int x, int y, int font, + int cols, int rows, int flags); DMFCDLLOUT(UIConsoleGadgetCreate_fp DLLUIConsoleGadgetCreate;) typedef void (*UIConsoleGadgetputs_fp)(void *item, const char *str); @@ -738,7 +739,7 @@ DMFCDLLOUT(UIConsoleGadgetputs_fp DLLUIConsoleGadgetputs;) typedef void (*NewUIWindowSetFocusOnEditGadget_fp)(void *item, void *parent); DMFCDLLOUT(NewUIWindowSetFocusOnEditGadget_fp DLLNewUIWindowSetFocusOnEditGadget;) -typedef void *(*OldListCreate_fp)(void *parentitem, int id, int x, int y, int w, int h, int flags); +typedef UIObject *(*OldListCreate_fp)(void *parentitem, int id, int x, int y, int w, int h, int flags); DMFCDLLOUT(OldListCreate_fp DLLOldListCreate;) typedef void (*OldListRemoveAll_fp)(void *item); @@ -753,7 +754,7 @@ DMFCDLLOUT(OldListRemoveItem_fp DLLOldListRemoveItem;) typedef void (*OldListSelectItem_fp)(void *item, void *txtitem); DMFCDLLOUT(OldListSelectItem_fp DLLOldListSelectItem;) -typedef void *(*OldEditCreate_fp)(void *parentitem, int id, int x, int y, int w, int h, int flags); +typedef UIObject *(*OldEditCreate_fp)(void *parentitem, int id, int x, int y, int w, int h, int flags); DMFCDLLOUT(OldEditCreate_fp DLLOldEditCreate;) typedef void (*OldEditGetText_fp)(void *item, char *buff, int len); @@ -777,7 +778,7 @@ DMFCDLLOUT(SetOldEditBufferLen_fp DLLSetOldEditBufferLen;) typedef void (*NewUIWindowLoadBackgroundImage_fp)(void *item, const char *image_name); DMFCDLLOUT(NewUIWindowLoadBackgroundImage_fp DLLNewUIWindowLoadBackgroundImage;) -typedef void (*DeleteUIItem_fp)(void *delitem); +typedef void (*DeleteUIItem_fp)(UIObject *); DMFCDLLOUT(DeleteUIItem_fp DLLDeleteUIItem;) typedef void (*HotSpotSetStates_fp)(void *hs, void *texton, void *textoff); @@ -805,8 +806,7 @@ DMFCDLLOUT(ui_HideCursor_fp DLLHideCursor;) typedef void (*GameFrame_fp)(void); DMFCDLLOUT(GameFrame_fp DLLGameFrame;) -// typedef void *(*SliderCreate_fp)(void *parent, int id, int x, int y, int flags=0); -typedef void *(*SliderCreate_fp)(void *parent, int id, int x, int y, int flags); +typedef UIObject *(*SliderCreate_fp)(void *parent, int id, int x, int y, int flags); DMFCDLLOUT(SliderCreate_fp DLLSliderCreate;) typedef void (*SliderSetRange_fp)(void *slider, int range); diff --git a/netgames/monsterball/monsterball.cpp b/netgames/monsterball/monsterball.cpp index eb333184e..5a28bae4b 100644 --- a/netgames/monsterball/monsterball.cpp +++ b/netgames/monsterball/monsterball.cpp @@ -262,7 +262,6 @@ static int Highlight_bmp; static int LastHitPnum = -1; static bool players_sorted = false; // the Sorted*[] have been sorted -static bool DisplayPowerBBlink = true; static bool DisplayScoreBlink = true; static bool DisplayScoreScreen = false; static bool display_my_welcome = false; @@ -1696,8 +1695,6 @@ void DisplayHUDScores(struct tHUDItem *hitem) { int score_width = DLLgrtext_GetTextLineWidth("888"); int name_x = DMFCBase->GetGameWindowW() - name_width - score_width - 10; int score_x = DMFCBase->GetGameWindowW() - score_width - 5; - int icon_size = height - 3; - int icon_x = name_x - icon_size - 3; DLLgrtext_SetAlpha(alpha); char name[256]; @@ -1921,9 +1918,6 @@ void HandleMonsterballCollideWithWeapon(object *ball, weapon_collide_info *winfo void bump_object(object *object0, vector *rotvel, vector *velocity, vector *pos, matrix *orient, float mass, float size, vector *collision_point, vector *collision_normal, float rot_scalar, float vel_scalar) { - object *t = NULL; - object *other = NULL; - ASSERT(std::isfinite(rotvel->x)); ASSERT(std::isfinite(rotvel->y)); ASSERT(std::isfinite(rotvel->z)); diff --git a/netgames/roboanarchy/roboanarchy.cpp b/netgames/roboanarchy/roboanarchy.cpp index 678c3fbc9..e49f1b074 100644 --- a/netgames/roboanarchy/roboanarchy.cpp +++ b/netgames/roboanarchy/roboanarchy.cpp @@ -817,7 +817,6 @@ void DisplayHUDScores(struct tHUDItem *hitem) { int height = DLLgrfont_GetHeight((DMFCBase->GetGameFontTranslateArray())[HUD_FONT_INDEX]) + 3; uint8_t alpha = DMFCBase->ConvertHUDAlpha((uint8_t)((DisplayScoreScreen) ? 128 : 255)); int y = (DMFCBase->GetGameWindowH() / 2) - ((height * 5) / 2); - int x = 520; ddgr_color color; int rank = 1; diff --git a/networking/networking.cpp b/networking/networking.cpp index 20338821e..04f4d12eb 100644 --- a/networking/networking.cpp +++ b/networking/networking.cpp @@ -408,9 +408,6 @@ static int16_t Packet_free_list[MAX_PACKET_BUFFERS]; // contains i static int Num_packet_buffers; static int Largest_packet_index = 0; -static int Uncompressed_outgoing_data_len = 0; -static int Compressed_outgoing_data_len = 0; - int Next_packet_id; int Last_packet_id; @@ -466,8 +463,6 @@ struct reliable_net_rcvbuffer { uint8_t buffer[NETBUFFERSIZE]; }; -static SOCKET Reliable_UDP_socket = INVALID_SOCKET; - static float first_sent_iamhere = 0; static float last_sent_iamhere = 0; @@ -577,14 +572,7 @@ void nw_InitNetworking(int iReadBufSizeOverride) { WORD ver = MAKEWORD(1, 1); #endif - static char exewithpath[_MAX_PATH * 2]; - static char exefile[_MAX_PATH * 2]; - static char ourargs[_MAX_PATH * 2]; - static char exedir[_MAX_PATH * 2]; - static char exeext[_MAX_PATH]; - static char *fixdir; static char szconntype[100]; - int parmlen; int len = 99; Database->read("NetworkConnection", szconntype, &len); if (stricmp(szconntype, "DIALUP") == 0) { @@ -612,10 +600,17 @@ void nw_InitNetworking(int iReadBufSizeOverride) { } #ifdef WIN32 if (!dp_DidLobbyLaunchGame()) { + static char exewithpath[_MAX_PATH * 2]; + static char exefile[_MAX_PATH * 2]; + static char ourargs[_MAX_PATH * 2]; + static char exedir[_MAX_PATH * 2]; + static char exeext[_MAX_PATH]; + static char *fixdir; + // Tell direct play about this game char *p = GetCommandLine(); LOG_DEBUG.printf("Command line: %s", p); - parmlen = strlen(p); + int parmlen = strlen(p); int a; for (a = 0; a < parmlen; ++a) { @@ -851,7 +846,6 @@ void nw_GetNumbersFromHostAddress(network_address *address, char *str) { // returns the ip address of this computer uint32_t nw_GetThisIP() { SOCKADDR_IN local_address; - int address_size = sizeof(SOCKADDR); if (Net_fixed_ip != INADDR_NONE) { return Net_fixed_ip; @@ -1078,7 +1072,6 @@ int nw_SendReliable(uint32_t socketid, uint8_t *data, int length, bool urgent) { int use_buffer = -1; reliable_socket *rsocket; reliable_header send_header; - int send_this_packet = 1; if (length == 0) { LOG_ERROR << "Attempting to send 0 byte network packet in nw_SendReliable()"; @@ -1252,12 +1245,9 @@ void nw_DoNetworkIdle(void) { void nw_WorkReliable(uint8_t *data, int len, network_address *naddr) { int i; - int rcode = -1; int16_t max_len = NETBUFFERSIZE; static reliable_header rcv_buff; static SOCKADDR rcv_addr; - int bytesin = 0; - int addrlen = sizeof(SOCKADDR); uint32_t rcvid; // The id of who we actually received a packet from, as opposed to socketid parm if (NP_TCP == naddr->connection_type) { @@ -2505,11 +2495,6 @@ int nw_DoReceiveCallbacks(void) { void nw_ReliableResend(void) { int i, j; int rcode = -1; - int16_t max_len = NETBUFFERSIZE; - static reliable_header rcv_buff; - static SOCKADDR rcv_addr; - int bytesin = 0; - int addrlen = sizeof(SOCKADDR); reliable_socket *rsocket = NULL; // Go through each reliable socket that is connected and do any needed work. for (j = 0; j < MAXRELIABLESOCKETS; j++) { diff --git a/physics/collide.cpp b/physics/collide.cpp index ec059dc71..77c52fd2c 100644 --- a/physics/collide.cpp +++ b/physics/collide.cpp @@ -1573,7 +1573,6 @@ void ConvertAxisAmountToEuler(vector *n, float *w, vector *e) { float t; float scale = *w / .0001f; - float w_n = .0001f; vector s_result; if (*w == 0.0f) { @@ -2159,7 +2158,6 @@ void collide_generic_and_weapon(object *robotobj, object *weapon, vector *collis float damage_to_apply; uint8_t electrical = (Weapons[weapon->id].flags & WF_ELECTRICAL) ? 1 : 0; bool f_stick = ((weapon->mtype.phys_info.flags & PF_STICK) != 0); - bool f_energy = ((Weapons[weapon->id].flags & WF_MATTER_WEAPON) == 0); int damage_type; // Check for lava & volatile surfaces on an object diff --git a/physics/findintersection.cpp b/physics/findintersection.cpp index bedcd0770..d52cde6d0 100644 --- a/physics/findintersection.cpp +++ b/physics/findintersection.cpp @@ -2123,7 +2123,6 @@ int fvi_QuickDistObjectList(vector *pos, int init_room_index, float rad, int16_t fvi_wall_max_xyz = fvi_max_xyz; if (ROOMNUM_OUTSIDE(init_room_index)) { - int num_cells = 0; int next_y_delta; int xstart, xend, ystart, yend; int check_x, check_y; @@ -3326,7 +3325,6 @@ void check_hit_obj(int objnum) { vector hit_point; float cur_dist; const object *obj = &Objects[objnum]; - bool f_x = false; int collision_type; int m_obj_index = fvi_query_ptr->thisobjnum; object *m_obj = &Objects[m_obj_index]; @@ -4461,7 +4459,6 @@ int fvi_room(int room_index, int from_portal, int room_obj) { int portal_num; // vector col_point[32]; // vector col_normal[32]; - int num_cols = 0; object *this_obj; uint8_t msector = 0; diff --git a/physics/physics.cpp b/physics/physics.cpp index 31badcd17..e2c23b41f 100644 --- a/physics/physics.cpp +++ b/physics/physics.cpp @@ -1948,7 +1948,6 @@ void do_walking_sim(object *obj) { vector total_force = Zero_vector; // Constant force acting on an object bool f_continue_sim; // Should we run another simulation loop - bool f_start_fvi_record = true; // Records the rooms that are passed thru poly_model *pm = &Poly_models[obj->rtype.pobj_info.model_num]; @@ -1974,8 +1973,6 @@ void do_walking_sim(object *obj) { obj->flags &= (~OF_STOPPED_THIS_FRAME); // Do rotation velocity/accel stuff - bool f_rotated = false; - if (!(fabs(pi->velocity.x) > .000001 || fabs(pi->velocity.y) > .000001 || fabs(pi->velocity.z) > .000001 || fabs(pi->thrust.x) > .000001 || fabs(pi->thrust.y) > .000001 || fabs(pi->thrust.z) > .000001 || fabs(pi->rotvel.x) > .000001 || fabs(pi->rotvel.y) > .000001 || fabs(pi->rotvel.z) > .000001 || diff --git a/scripts/AIGame.cpp b/scripts/AIGame.cpp index dfc24899b..b329a80d5 100644 --- a/scripts/AIGame.cpp +++ b/scripts/AIGame.cpp @@ -343,8 +343,7 @@ static int GetObjectType(int object); class BaseObjScript { public: - BaseObjScript(); - ~BaseObjScript(); + virtual ~BaseObjScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -361,13 +360,12 @@ struct pest_data { int foot_sounds[3]; }; -class Pest : public BaseObjScript { +class Pest final : public BaseObjScript { private: - pest_data *memory; + pest_data *memory = nullptr; void DoInit(int me_handle); public: - Pest() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -384,15 +382,14 @@ struct stinger_data { char f_very_hurt; }; -class Stinger : public BaseObjScript { +class Stinger final : public BaseObjScript { private: - stinger_data *memory; + stinger_data *memory = nullptr; void DoInit(int me_handle); void DoInterval(int me_handle); public: - Stinger() { memory = NULL; } int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -443,9 +440,9 @@ struct superthief_data { bool laser_on; }; -class SuperThief : public BaseObjScript { +class SuperThief final : public BaseObjScript { private: - superthief_data *memory; + superthief_data *memory = nullptr; bool DoSteal(int me, int it); void SpewEverything(int me); @@ -460,7 +457,6 @@ class SuperThief : public BaseObjScript { void DoInterval(int me_handle); public: - SuperThief() { memory = NULL; } int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -499,9 +495,9 @@ struct humonculous_data { int16_t flags; }; -class Humonculous : public BaseObjScript { +class Humonculous final : public BaseObjScript { private: - humonculous_data *memory; + humonculous_data *memory = nullptr; void DetermineDeathPos(int me, vector *dpos, int *droom); bool SetMode(int me, uint16_t mode); @@ -510,7 +506,6 @@ class Humonculous : public BaseObjScript { bool DoNotify(int me, tOSIRISEventInfo *data); public: - Humonculous() { memory = NULL; } int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -529,14 +524,13 @@ struct dragon_data { int tentacle[6]; }; -class Dragon : public BaseObjScript { +class Dragon final : public BaseObjScript { private: - dragon_data *memory; + dragon_data *memory = nullptr; void DoInit(int me_handle); public: - Dragon() { memory = NULL; } int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -549,14 +543,13 @@ struct tracker_data { int hatch_object; }; -class Tracker : public BaseObjScript { +class Tracker final : public BaseObjScript { private: - tracker_data *memory; + tracker_data *memory = nullptr; void DoInit(int me_handle); public: - Tracker() { memory = NULL; } int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -571,14 +564,13 @@ struct lance_data { int mode; }; -class Lance : public BaseObjScript { +class Lance final : public BaseObjScript { private: void DoInit(int me_handle); void DoFrame(int me_handle); - lance_data *memory; + lance_data *memory = nullptr; public: - Lance() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -591,13 +583,12 @@ struct flak_data { float death_time; }; -class Flak : public BaseObjScript { +class Flak final : public BaseObjScript { private: - flak_data *memory; + flak_data *memory = nullptr; void DoInit(int me_handle); public: - Flak() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -605,13 +596,12 @@ class Flak : public BaseObjScript { // Seeker class //------------------ -class Seeker : public BaseObjScript { +class Seeker final : public BaseObjScript { private: void DoInit(int me); void DoCollide(int me); public: - Seeker() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -623,13 +613,12 @@ struct supertrooper_data { int body_handle; }; -class SuperTrooper : public BaseObjScript { +class SuperTrooper final : public BaseObjScript { private: - supertrooper_data *memory; + supertrooper_data *memory = nullptr; void DoInit(int me_handle); public: - SuperTrooper() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -666,16 +655,15 @@ struct sparky_data { float spin_time; }; -class Sparky : public BaseObjScript { +class Sparky final : public BaseObjScript { private: - sparky_data *memory; + sparky_data *memory = nullptr; void DoInit(int me); void DoFrame(int me); bool DoNotify(int me_handle, tOSIRISEventInfo *data); void SetMode(int me, char mode); public: - Sparky() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -726,9 +714,9 @@ struct hellion_data { int camera[2]; }; -class Hellion : public BaseObjScript { +class Hellion final : public BaseObjScript { private: - hellion_data *memory; + hellion_data *memory = nullptr; void DoInit(int me); void RemapAlert(int me, float start, float end, float time); void RemapWB(int me, float start, float fire, int fire_sound, float end, float time, float latency, int index, @@ -738,7 +726,6 @@ class Hellion : public BaseObjScript { void SetMode(int me, char mode); public: - Hellion() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -795,9 +782,9 @@ struct mantaray_data { }; -class MantaRay : public BaseObjScript { +class MantaRay final : public BaseObjScript { private: - mantaray_data *memory; + mantaray_data *memory = nullptr; void DoInit(int me); void DoSquadieFrame(int me); @@ -812,7 +799,6 @@ class MantaRay : public BaseObjScript { void UpdateSquad(int me); public: - MantaRay() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -842,9 +828,9 @@ struct skiff_data { }; -class Skiff : public BaseObjScript { +class Skiff final : public BaseObjScript { private: - skiff_data *memory; + skiff_data *memory = nullptr; void DoInit(int me); void DoSquadieFrame(int me); @@ -859,7 +845,6 @@ class Skiff : public BaseObjScript { void UpdateSquad(int me); public: - Skiff() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -892,9 +877,9 @@ struct spyhunter_data { }; -class SpyHunter : public BaseObjScript { +class SpyHunter final : public BaseObjScript { private: - spyhunter_data *memory; + spyhunter_data *memory = nullptr; void DoInit(int me); void DoFrame(int me); void DoSummon(int me); @@ -902,7 +887,6 @@ class SpyHunter : public BaseObjScript { void SetMode(int me, char mode); public: - SpyHunter() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -922,15 +906,14 @@ struct sniper_data { float base_acc; }; -class Sniper : public BaseObjScript { - sniper_data *memory; +class Sniper final : public BaseObjScript { + sniper_data *memory = nullptr; void DoInit(int me); void DoFrame(int me); bool DoNotify(int me_handle, tOSIRISEventInfo *data); void SetMode(int me, char mode); public: - Sniper() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -950,15 +933,14 @@ struct snipernorun_data { float base_acc; }; -class SniperNoRun : public BaseObjScript { - snipernorun_data *memory; +class SniperNoRun final : public BaseObjScript { + snipernorun_data *memory = nullptr; void DoInit(int me); void DoFrame(int me); bool DoNotify(int me_handle, tOSIRISEventInfo *data); void SetMode(int me, char mode); public: - SniperNoRun() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -975,15 +957,14 @@ struct evadermoda_data { float base_acc; }; -class EvaderModA : public BaseObjScript { - evadermoda_data *memory; +class EvaderModA final : public BaseObjScript { + evadermoda_data *memory = nullptr; void DoInit(int me); void DoFrame(int me); bool DoNotify(int me_handle, tOSIRISEventInfo *data); void SetMode(int me, char mode); public: - EvaderModA() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1003,15 +984,14 @@ struct flameras_data { bool f_firing_ok; }; -class FlameRAS : public BaseObjScript { - flameras_data *memory; +class FlameRAS final : public BaseObjScript { + flameras_data *memory = nullptr; void DoInit(int me); void DoFrame(int me); bool DoNotify(int me_handle, tOSIRISEventInfo *data); void SetMode(int me, char mode); public: - FlameRAS() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1041,15 +1021,14 @@ struct jugg_data { char flags; }; -class Jugg : public BaseObjScript { +class Jugg final : public BaseObjScript { private: - jugg_data *memory; + jugg_data *memory = nullptr; void DoInit(int me_handle); void DoFrame(int me_handle); void SetMode(int me, char mode); public: - Jugg() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1067,14 +1046,13 @@ struct dtower_data { float last_frame; }; -class DTower : public BaseObjScript { +class DTower final : public BaseObjScript { private: - dtower_data *memory; + dtower_data *memory = nullptr; void DoInit(int me_handle); void DoFrame(int me_handle); public: - DTower() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1090,14 +1068,13 @@ struct dcollector_data { bool f_dead; }; -class DCollector : public BaseObjScript { +class DCollector final : public BaseObjScript { private: - dcollector_data *memory; + dcollector_data *memory = nullptr; void DoInit(int me_handle); void DoFrame(int me_handle); public: - DCollector() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1110,14 +1087,13 @@ struct cball_data { float mode_time; }; -class CBall : public BaseObjScript { +class CBall final : public BaseObjScript { private: - cball_data *memory; + cball_data *memory = nullptr; void DoInit(int me_handle); void DoFrame(int me_handle); public: - CBall() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1131,14 +1107,13 @@ struct sixgun_data { float circle_dist; }; -class SixGun : public BaseObjScript { +class SixGun final : public BaseObjScript { private: - sixgun_data *memory; + sixgun_data *memory = nullptr; void DoInit(int me_handle); bool DoNotify(int me_handle, tOSIRISEVTAINOTIFY *notify); public: - SixGun() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1150,9 +1125,9 @@ struct explodetimeout_data { float life_left; }; -class ExplodeTimeOut : public BaseObjScript { +class ExplodeTimeOut final : public BaseObjScript { private: - explodetimeout_data *memory; + explodetimeout_data *memory = nullptr; void DoInit(int me_handle); public: @@ -1187,16 +1162,15 @@ struct sickle_data { }; -class Sickle : public BaseObjScript { +class Sickle final : public BaseObjScript { private: - sickle_data *memory; + sickle_data *memory = nullptr; void SetMode(int me, char mode); void DoInit(int me_handle); void DoFrame(int me_handle); bool DoNotify(int me_handle, tOSIRISEVTAINOTIFY *notify); public: - Sickle() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1208,13 +1182,12 @@ struct tBettyBombInfo { bool explode; }; -class BettyBomb : public BaseObjScript { +class BettyBomb final : public BaseObjScript { public: - BettyBomb() { memory = NULL; } int16_t CallEvent(int event, tOSIRISEventInfo *data); private: - tBettyBombInfo *memory; + tBettyBombInfo *memory = nullptr; }; struct tBettyInfo { @@ -1222,16 +1195,15 @@ struct tBettyInfo { float lasttime; }; -class BettyScript : public BaseObjScript { +class BettyScript final : public BaseObjScript { public: - BettyScript() { memory = NULL; } int16_t CallEvent(int event, tOSIRISEventInfo *data); protected: void DoInit(int me); private: - tBettyInfo *memory; + tBettyInfo *memory = nullptr; }; //----------------- @@ -1242,9 +1214,8 @@ struct tChaffInfo { bool killme; }; -class ChaffScript : public BaseObjScript { +class ChaffScript final : public BaseObjScript { public: - ChaffScript() { memory = NULL; } int16_t CallEvent(int event, tOSIRISEventInfo *data); protected: @@ -1252,7 +1223,7 @@ class ChaffScript : public BaseObjScript { void DoInterval(int handle); private: - tChaffInfo *memory; + tChaffInfo *memory = nullptr; }; struct tChaffChunkInfo { @@ -1260,9 +1231,8 @@ struct tChaffChunkInfo { float lifeleft; }; -class ChaffChunkScript : public BaseObjScript { +class ChaffChunkScript final : public BaseObjScript { public: - ChaffChunkScript() { memory = NULL; } int16_t CallEvent(int event, tOSIRISEventInfo *data); protected: @@ -1271,20 +1241,19 @@ class ChaffChunkScript : public BaseObjScript { void DoCollide(tOSIRISEventInfo *data); private: - tChaffChunkInfo *memory; + tChaffChunkInfo *memory = nullptr; }; //------------------ // ProxMine class //------------------ -class ProxMine : public BaseObjScript { +class ProxMine final : public BaseObjScript { private: void DoInit(int me); void DoCollide(int me); public: - ProxMine() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1292,9 +1261,8 @@ class ProxMine : public BaseObjScript { // Gunboy class //------------------ -class Gunboy : public BaseObjScript { +class Gunboy final : public BaseObjScript { public: - Gunboy() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1308,14 +1276,13 @@ struct gbpowerup_data { float time_till_next_hud_message; }; -class GBPowerup : public BaseObjScript { +class GBPowerup final : public BaseObjScript { private: - gbpowerup_data *memory; + gbpowerup_data *memory = nullptr; void DoInit(int me); void DoFrame(int me); public: - GBPowerup() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1330,14 +1297,13 @@ struct joshbell_data { int bell_sound; }; -class JoshBell : public BaseObjScript { +class JoshBell final : public BaseObjScript { private: - joshbell_data *memory; + joshbell_data *memory = nullptr; void DoInit(int me); void DoCollide(int me); public: - JoshBell() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1345,12 +1311,11 @@ class JoshBell : public BaseObjScript { // Explode On Contact //----------------- -class ExplodeOnContact : public BaseObjScript { +class ExplodeOnContact final : public BaseObjScript { private: void DoCollide(int me, int it_handle); public: - ExplodeOnContact() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1358,12 +1323,11 @@ class ExplodeOnContact : public BaseObjScript { // Destroy On Contact //----------------- -class DestroyOnContact : public BaseObjScript { +class DestroyOnContact final : public BaseObjScript { private: void DoCollide(int me, int it_handle); public: - DestroyOnContact() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1570,9 +1534,9 @@ struct guidebot_data { uint16_t powerup_ids[6]; }; -class GuideBot : public BaseObjScript { +class GuideBot final : public BaseObjScript { private: - guidebot_data *memory; + guidebot_data *memory = nullptr; void DoMessage(const char *str, bool f_high_priority, const char *sound_name = NULL, bool f_sound_2d = false); // void InitPowerup(int me, char pow_id); // void DoPowerupFrame(int me); @@ -1591,7 +1555,6 @@ class GuideBot : public BaseObjScript { void AddGetToGoalCommonGoals(int me); public: - GuideBot() { memory = NULL; } int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1705,9 +1668,9 @@ struct thief_data { float aggression; }; -class Thief : public BaseObjScript { +class Thief final : public BaseObjScript { private: - thief_data *memory; + thief_data *memory = nullptr; void DoMessage(const char *str); void SetMode(int me, int mode); @@ -1726,7 +1689,6 @@ class Thief : public BaseObjScript { void DoSubModeFrame(int me); public: - Thief() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1873,7 +1835,6 @@ bool SuperThief::DoNotify(int me, tOSIRISEVTAINOTIFY *notify) { bool SuperThief::DoSteal(int me, int it) { int max_tries = numSuperThiefableItems; - float gen_perc, perc_chance; ; int i; int count_max, count_num; @@ -2105,11 +2066,9 @@ void SuperThief::CheckAndFireSecondary(int me) { void SuperThief::DoInterval(int me) { bool f_force_ranged = false; - int target_handle; float anim_frame; float shields; int flags; - msafe_struct m; int room; vector pos; @@ -2130,7 +2089,7 @@ void SuperThief::DoInterval(int me) { end_pos += orient.fvec * 2000.0f; int fvi_flags = FQ_CHECK_OBJS | FQ_IGNORE_POWERUPS | FQ_IGNORE_WEAPONS; - int fate = FVI_RayCast(me, &pos, &end_pos, room, 0.0f, fvi_flags, &ray); + FVI_RayCast(me, &pos, &end_pos, room, 0.0f, fvi_flags, &ray); Obj_Value(memory->camera_obj, VF_SET, OBJV_I_ROOMNUM, &ray.hit_room); Obj_Value(memory->camera_obj, VF_SET, OBJV_V_POS, &ray.hit_point); @@ -2174,7 +2133,6 @@ void SuperThief::DoInterval(int me) { if (memory->last_frame < 234.0f && anim_frame >= 234.0f) { msafe_struct mstruct; - int type; memory->laser_on = true; memory->camera_obj = Obj_Create(OBJ_POWERUP, Obj_FindID("Invisiblepowerup"), room, &pos, NULL, me); @@ -2299,14 +2257,13 @@ struct fireatdist_data { bool last_f_fire; }; -class FireAtDist : public BaseObjScript { +class FireAtDist final : public BaseObjScript { private: - fireatdist_data *memory; + fireatdist_data *memory = nullptr; void DoInit(int me_handle); void DoFrame(int me_handle); public: - FireAtDist() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -2319,14 +2276,13 @@ struct hateptmc_data { float time_till_pulse; }; -class HatePTMC : public BaseObjScript { +class HatePTMC final : public BaseObjScript { private: - hateptmc_data *memory; + hateptmc_data *memory = nullptr; void DoInit(int me_handle); void DoFrame(int me_handle); public: - HatePTMC() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -2342,15 +2298,14 @@ struct tubbs_data { float full_anger_time; }; -class Tubbs : public BaseObjScript { +class Tubbs final : public BaseObjScript { private: - tubbs_data *memory; + tubbs_data *memory = nullptr; void DoInit(int me); void DoFrame(int me); bool DoNotify(int me, tOSIRISEVTAINOTIFY *notify); public: - Tubbs() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -2366,16 +2321,15 @@ struct oldscratch_data { float full_anger_time; }; -class OldScratch : public BaseObjScript { +class OldScratch final : public BaseObjScript { private: - oldscratch_data *memory; + oldscratch_data *memory = nullptr; bool DoSteal(int me, int it); void DoInit(int me); void DoFrame(int me); bool DoNotify(int me, tOSIRISEVTAINOTIFY *notify); public: - OldScratch() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -2427,9 +2381,9 @@ struct barnswallow_data { int flags; }; -class BarnSwallow : public BaseObjScript { +class BarnSwallow final : public BaseObjScript { private: - barnswallow_data *memory; + barnswallow_data *memory = nullptr; void DoInit(int me); bool SendCommand(int me, int it, char command, int value = 0); bool ReceiveCommand(int me, int it, gb_com *command); @@ -2441,7 +2395,6 @@ class BarnSwallow : public BaseObjScript { bool SetMode(int me, char mode, int it = OBJECT_HANDLE_NONE); public: - BarnSwallow() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -2809,10 +2762,6 @@ static inline bool IsGoalFinishedNotify(int index) { //============================================ // Script Implementation //============================================ -BaseObjScript::BaseObjScript() {} - -BaseObjScript::~BaseObjScript() {} - int16_t BaseObjScript::CallEvent(int event, tOSIRISEventInfo *data) { return CONTINUE_CHAIN | CONTINUE_DEFAULT; } //----------------- @@ -3114,7 +3063,6 @@ const int16_t hm_valid_next_modes[11] = { void Humonculous::DetermineDeathPos(int me, vector *dpos, int *droom) { float best_dist = 100000000.0f; - int best_dp; vector dp[6]; int dr[6]; int i; @@ -3674,7 +3622,7 @@ void Humonculous::DoInterval(int me) { int flags = FQ_CHECK_OBJS | FQ_IGNORE_POWERUPS | FQ_IGNORE_WEAPONS | FQ_IGNORE_MOVING_OBJECTS | FQ_IGNORE_NON_LIGHTMAP_OBJECTS; - int fate = FVI_RayCast(me, &start_pos, &end_pos, start_room, 0.0f, flags, &ray); + FVI_RayCast(me, &start_pos, &end_pos, start_room, 0.0f, flags, &ray); memory->land_pos = ray.hit_point; memory->land_pos.y += memory->ground_pnt_offset; @@ -3744,7 +3692,7 @@ void Humonculous::DoInterval(int me) { int flags = FQ_CHECK_OBJS | FQ_IGNORE_POWERUPS | FQ_IGNORE_WEAPONS | FQ_IGNORE_MOVING_OBJECTS | FQ_IGNORE_NON_LIGHTMAP_OBJECTS; - int fate = FVI_RayCast(me, &start_pos, &end_pos, start_room, 0.0f, flags, &ray); + FVI_RayCast(me, &start_pos, &end_pos, start_room, 0.0f, flags, &ray); memory->land_pos = ray.hit_point; memory->land_pos.y += memory->ground_pnt_offset; @@ -4129,10 +4077,6 @@ void Jugg::SetMode(int me, char mode) { } void Jugg::DoInit(int me) { - int head_object; - int belly_object; - int turret_object; - int flame_object; int i; tOSIRISMEMCHUNK ch; @@ -4170,7 +4114,6 @@ void Jugg::DoInit(int me) { void Jugg::DoFrame(int me) { float current_anim_frame; - matrix orient; int flags; Obj_Value(me, VF_GET, OBJV_F_ANIM_FRAME, ¤t_anim_frame); @@ -4264,12 +4207,6 @@ int16_t Jugg::CallEvent(int event, tOSIRISEventInfo *data) { //--------------- void DTower::DoInit(int me) { - int head_object; - int belly_object; - int turret_object; - int flame_object; - int i; - tOSIRISMEMCHUNK ch; ch.id = 4; ch.size = sizeof(dtower_data); @@ -5044,7 +4981,6 @@ bool GuideBot::DoExternalCommands(int me, gb_com *command, int it) { int rhandle[32]; bool rdone[32]; int handle[32]; - bool done[32]; int i; int rnum_items; int num_items; @@ -5362,7 +5298,6 @@ bool GuideBot::DoExternalCommands(int me, gb_com *command, int it) { if (fate == HIT_NONE) { msafe_struct mstruct; - int type; Obj_Value(memory->me, VF_GET, OBJV_I_ROOMNUM, &mstruct.roomnum); Obj_Value(memory->me, VF_GET, OBJV_V_POS, &mstruct.pos); @@ -5478,7 +5413,6 @@ bool GuideBot::DoExternalCommands(int me, gb_com *command, int it) { } else if (command->action == COM_GET_MENU) { int i; gb_menu *menu = (gb_menu *)command->ptr; - int cur_command = 0; strcpy(menu->title, TXT_GB_MENUTITLE); @@ -5600,7 +5534,6 @@ bool GuideBot::DoExternalCommands(int me, gb_com *command, int it) { } void GuideBot::DoCollide(int me, tOSIRISEVTCOLLIDE *evt_collide) { - int obj_type; int its_parent; float rand_val; @@ -5655,7 +5588,6 @@ void GuideBot::DoCollide(int me, tOSIRISEVTCOLLIDE *evt_collide) { bool GuideBot::DoUse(int me) { int p_handle; - int sad_sound; int buddy_handle; // NOTE: Use is done on the inventory item and/or the real guidebot @@ -5686,12 +5618,6 @@ bool GuideBot::DoUse(int me) { } bool GuideBot::DoInit(int me, bool f_reinit) { - vector fvec; - vector vel; - bool f_valid; - matrix orient; - vector pos; - int room; int i; tOSIRISMEMCHUNK ch; @@ -5871,7 +5797,6 @@ void GuideBot::DoPowerupCheck(int me) { } if (f_for_me) { - tOSIRISEventInfo data; gb_com command; command.action = COM_POWERUP_NOTIFY; @@ -5886,7 +5811,6 @@ void GuideBot::DoPowerupCheck(int me) { } void GuideBot::DoFrame(int me) { - int dir_index; int flags; float anim; float last_mode_time; @@ -6652,9 +6576,6 @@ void Thief::SetMode(int me, int new_mode) { } void Thief::DoInit(int me) { - - int room; - vector pos; tOSIRISMEMCHUNK ch; ch.id = 4; ch.size = sizeof(thief_data); @@ -7121,18 +7042,10 @@ void Sickle::DoInit(int me) { void Sickle::DoFrame(int me) { vector uvec; - vector start_pos; - vector end_pos; - int flags; - int fate; - int start_room; - int ceiling_room; float anim_frame; int new_mode; - vector vel; float last_see_time; float last_hear_time; - char movement_type; float temp_time; float temp_time2; @@ -7564,10 +7477,9 @@ int16_t Tubbs::CallEvent(int event, tOSIRISEventInfo *data) { bool OldScratch::DoSteal(int me, int it) { int max_tries = numSuperThiefableItems; - float gen_perc, perc_chance; ; int i; - int count_max, count_num; + int count_max; bool *attempted_steals; attempted_steals = (bool *)malloc(numSuperThiefableItems * sizeof(bool)); @@ -7917,7 +7829,6 @@ bool BarnSwallow::SendCommand(int me, int it, char action, int value) { } void BarnSwallow::DoInit(int me) { - int i; tOSIRISMEMCHUNK ch; ch.id = 4; ch.size = sizeof(barnswallow_data); @@ -8124,7 +8035,6 @@ void BarnSwallow::DoFrame(int me) { if (rand_val > 95) // Find a remote powerup and go get it { int i; - bool f_ok = true; // for(i = 0; i < memory->num_friends; i++) // { @@ -8216,7 +8126,6 @@ bool BarnSwallow::SetMode(int me, char mode, int it) { switch (mode) { case BSM_NEST: { - int room; float max_speed; vector pos; @@ -8911,7 +8820,6 @@ void Hellion::DoFrame(int me) { vector normal; vector pos; int room; - vector end_pos; for (i = 0; i < 2; i++) { int my_room; @@ -8921,7 +8829,7 @@ void Hellion::DoFrame(int me) { Obj_Value(me, VF_GET, OBJV_I_ROOMNUM, &my_room); Obj_GetGunPos(me, i + 1, &pos, &normal); - int rfate = FVI_RayCast(me, &my_pos, &pos, my_room, 0.0f, 0, &ray); + FVI_RayCast(me, &my_pos, &pos, my_room, 0.0f, 0, &ray); room = ray.hit_room; matrix orient; @@ -10469,11 +10377,8 @@ bool EvaderModA::DoNotify(int me_handle, tOSIRISEventInfo *data) { return true; void EvaderModA::SetMode(int me, char mode) { switch (mode) { case EMA_GET_BEHIND: { - vector pos; int vec; - int flags = GF_NOTIFIES | GF_ORIENT_TARGET; - if ((rand() % 100) > 50) { vec = GST_NEG_FVEC; memory->time_till_next_mode = 7.0f * (float)rand() / (float)RAND_MAX + 2.0f; @@ -10587,11 +10492,8 @@ bool FlameRAS::DoNotify(int me_handle, tOSIRISEventInfo *data) { return true; } void FlameRAS::SetMode(int me, char mode) { switch (mode) { case EMA_GET_BEHIND: { - vector pos; int vec; - int flags = GF_NOTIFIES | GF_ORIENT_TARGET; - if ((rand() % 100) > 50) { vec = GST_NEG_FVEC; memory->time_till_next_mode = 7.0f * (float)rand() / (float)RAND_MAX + 2.0f; @@ -10852,8 +10754,8 @@ int16_t BettyBomb::CallEvent(int event, tOSIRISEventInfo *data) { if (parent != OBJECT_HANDLE_NONE && child_id != -1) { int child_handle; - matrix orient, o, otemp, o1; - vector vel, pos, v, vtemp; + matrix orient; + vector vel, pos, v; int room; Obj_Value(parent, VF_GET, OBJV_M_ORIENT, &orient); @@ -10942,7 +10844,7 @@ int16_t BettyScript::CallEvent(int event, tOSIRISEventInfo *data) { // create our memory DoInit(data->me_handle); - int parent, type; + int parent; vector vel; parent = GetObjectParent(data->me_handle); diff --git a/scripts/AIGame3.cpp b/scripts/AIGame3.cpp index b7374af2e..382bb1fe6 100644 --- a/scripts/AIGame3.cpp +++ b/scripts/AIGame3.cpp @@ -310,7 +310,7 @@ int CreateAndAttach(int me, const char *child_name, uint8_t child_type, char par } int FindClosestPlayer(int objhandle) { - vector objpos, playerpos; + vector objpos; float closest_dist = FLT_MAX; int closest_player = OBJECT_HANDLE_NONE; msafe_struct mstruct; @@ -601,8 +601,7 @@ static tScriptInfo ScriptInfo[NUM_IDS] = { class BaseObjScript { public: - BaseObjScript(); - ~BaseObjScript(); + virtual ~BaseObjScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -803,9 +802,9 @@ struct alienorganism_data { }; // Alien Organism class definition -class AlienOrganism : public BaseObjScript { +class AlienOrganism final : public BaseObjScript { private: - alienorganism_data *memory; + alienorganism_data *memory = nullptr; void SetMode(int me, char mode); void DoTakeoff(int me, float takeoff_speed, float speed_variance); @@ -865,7 +864,6 @@ class AlienOrganism : public BaseObjScript { void DoSquadieFrame(int me); public: - AlienOrganism() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -983,9 +981,9 @@ struct heavytrooper_data { }; // Heavy Trooper class definition -class HeavyTrooper : public BaseObjScript { +class HeavyTrooper final : public BaseObjScript { private: - heavytrooper_data *memory; + heavytrooper_data *memory = nullptr; void SetMode(int me, char mode); @@ -1002,7 +1000,6 @@ class HeavyTrooper : public BaseObjScript { void EnableGunAttack(int me, bool enable = true); public: - HeavyTrooper() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1078,9 +1075,9 @@ struct lifter_data { }; // Lifter class definition -class Lifter : public BaseObjScript { +class Lifter final : public BaseObjScript { private: - lifter_data *memory; + lifter_data *memory = nullptr; void SetMode(int me, char mode); @@ -1104,7 +1101,6 @@ class Lifter : public BaseObjScript { void UpdateLiftBeam(int me); public: - Lifter() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1292,9 +1288,9 @@ struct alienboss_data { }; // Alien Boss class definition -class AlienBoss : public BaseObjScript { +class AlienBoss final : public BaseObjScript { private: - alienboss_data *memory; + alienboss_data *memory = nullptr; void SetMode(int me, char mode); void DoTakeoff(int me, float takeoff_speed, float speed_variance); @@ -1330,7 +1326,6 @@ class AlienBoss : public BaseObjScript { void DoCustomLookups(void); public: - AlienBoss() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1383,9 +1378,9 @@ struct securitycamera_data { }; // Security Camera class definition -class SecurityCamera : public BaseObjScript { +class SecurityCamera final : public BaseObjScript { private: - securitycamera_data *memory; + securitycamera_data *memory = nullptr; void SetMode(int me, char mode); @@ -1399,7 +1394,6 @@ class SecurityCamera : public BaseObjScript { bool ReceiveCommand(int me, int it, char command, void *ptr); public: - SecurityCamera() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1427,9 +1421,9 @@ struct crowdcontrol_data { }; // Security Camera class definition -class CrowdControl : public BaseObjScript { +class CrowdControl final : public BaseObjScript { private: - crowdcontrol_data *memory; + crowdcontrol_data *memory = nullptr; void DoInit(int me_handle); void DoFrame(int me_handle); @@ -1439,7 +1433,6 @@ class CrowdControl : public BaseObjScript { bool ReceiveCommand(int me, int it, char command, void *ptr); public: - CrowdControl() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1631,10 +1624,6 @@ int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state) { return 0; } //============================================ // Script Implementation //============================================ -BaseObjScript::BaseObjScript() {} - -BaseObjScript::~BaseObjScript() {} - int16_t BaseObjScript::CallEvent(int event, tOSIRISEventInfo *data) { return CONTINUE_CHAIN | CONTINUE_DEFAULT; } //--------------------- @@ -2217,7 +2206,6 @@ void AlienOrganism::UpdateSquadieFormationGoal(int me) { } void AlienOrganism::SetWanderGoal(int me) { - vector pos; int room = 0; float dist = 15.0f; @@ -2557,7 +2545,6 @@ void AlienOrganism::UpdateEnergyBeams(int me) { void AlienOrganism::UpdateEnergyEffect(int me) { int room; vector pos; - int weapon_id; // See if this object has an energy charge if (memory->energy_charges > 0.0f) { @@ -2586,7 +2573,6 @@ void AlienOrganism::SetMode(int me, char mode) { int flags; char movement_type; - vector vel; // Clear out any goals AI_SafeSetType(me, AIT_AIS); @@ -2614,7 +2600,7 @@ void AlienOrganism::SetMode(int me, char mode) { ray_info ray; int fate; vector end_pos, landing_pos; - int end_room, landing_room; + int landing_room; // If currently landed, set take off velocity DoTakeoff(me, 8.0f, 3.0f); @@ -3087,7 +3073,6 @@ void AlienOrganism::DoTakeoff(int me, float takeoff_speed, float speed_variance) // Processes the AI Initialize event void AlienOrganism::DoInit(int me) { - int flags; msafe_struct m; m.objhandle = me; @@ -3211,8 +3196,8 @@ void AlienOrganism::DoInit(int me) { bool AlienOrganism::FindHome(int me) { int num_attempts; bool home_found; - vector start_pos, target_pos, landed_pos, home_dir; - int start_room, landed_room; + vector start_pos, target_pos, home_dir; + int start_room; matrix start_orient; int flags, fate; ray_info ray; @@ -3311,7 +3296,7 @@ void AlienOrganism::DoSquadieFrame(int me) { float slowdown = 1.0f; if (dist <= ALIEN_APPROACH_DIST) { matrix leader_orient; - vector dir, leader_pos; + vector dir; // See if we are in front of leader Obj_Value(memory->leader_handle, VF_GET, OBJV_M_ORIENT, &leader_orient); @@ -3348,11 +3333,8 @@ void AlienOrganism::DoSquadieFrame(int me) { // Processes the AI Frame Interval Event void AlienOrganism::DoFrame(int me) { - vector uvec; int flags; float anim_frame; - int new_mode; - vector vel; float last_see_time, last_see_game_time; float last_hear_time, last_hear_game_time; float last_perceive_time; @@ -4788,8 +4770,8 @@ bool Lifter::OkToPull(int me, bool initial_check /*=true*/) { // see if anything is in the way ray_info ray; int flags, fate; - vector start_pos, end_pos, landing_pos; - int start_room, landing_room; + vector start_pos, end_pos; + int start_room; float target_size; Obj_Value(me, VF_GET, OBJV_V_POS, &start_pos); @@ -5504,7 +5486,6 @@ bool AlienBoss::IsOnFire(int me) { return (Obj_IsEffect(me, EF_NAPALMED)); } // Sets wandering destination goal for boss void AlienBoss::SetWanderGoal(int me) { - vector pos; int room = 0; float dist = 15.0f; @@ -5733,7 +5714,6 @@ void AlienBoss::SetMode(int me, char mode) { int flags; char movement_type; - vector vel; // Clear out any goals AI_SafeSetType(me, AIT_AIS); @@ -5762,7 +5742,7 @@ void AlienBoss::SetMode(int me, char mode) { ray_info ray; int fate; vector end_pos, landing_pos; - int end_room, landing_room; + int landing_room; // If currently landed, set take off velocity DoTakeoff(me, 8.0f, 3.0f); @@ -6178,7 +6158,6 @@ void AlienBoss::DoTakeoff(int me, float takeoff_speed, float speed_variance) { // Processes the AI Initialize event void AlienBoss::DoInit(int me) { - int flags; msafe_struct m; m.objhandle = me; @@ -6362,8 +6341,8 @@ bool AlienBoss::DoStingAttack(int me) { // see if anything is in the way ray_info ray; int flags, fate; - vector start_pos, end_pos, landing_pos; - int start_room, landing_room; + vector start_pos, end_pos; + int start_room; float target_size; Obj_Value(me, VF_GET, OBJV_V_POS, &start_pos); @@ -6393,7 +6372,6 @@ bool AlienBoss::DoStingAttack(int me) { // Processes the AI Frame Interval Event void AlienBoss::DoFrame(int me) { - int flags; float anim_frame; float last_see_time, last_see_game_time; float last_hear_time, last_hear_game_time; @@ -7015,7 +6993,6 @@ bool SecurityCamera::ReceiveCommand(int me, int it, char command, void *ptr) { // Sets the Current Mode void SecurityCamera::SetMode(int me, char mode) { - int flags; float curr_anim_frame; // Get the current animation frame @@ -7122,7 +7099,7 @@ void SecurityCamera::DoFrame(int me) { vector local_vec_to_target, world_vec_to_target, dir, local_fvec; matrix orient; double theta; - float frame_offset, dot, curr_frame, dest_frame, anim_time, next_frame; + float frame_offset, dot, curr_frame, dest_frame, anim_time; // Get the vec to target in local security camera space Obj_Value(me, VF_GET, OBJV_M_ORIENT, &orient); @@ -7339,7 +7316,7 @@ void CrowdControl::DoFrame(int me) { if (!memory->disable_check && qObjExists(memory->follow_handle)) { vector my_vel, my_pos, leader_pos, leader_dir; matrix my_orient; - float my_max_speed, dist, new_speed; + float dist, new_speed; Obj_Value(me, VF_GET, OBJV_V_VELOCITY, &my_vel); Obj_Value(me, VF_GET, OBJV_V_POS, &my_pos); diff --git a/scripts/BatteriesIncluded.cpp b/scripts/BatteriesIncluded.cpp index 9a5746736..88f47e776 100644 --- a/scripts/BatteriesIncluded.cpp +++ b/scripts/BatteriesIncluded.cpp @@ -97,197 +97,196 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001C : public BaseScript { +class TriggerScript_001C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001B : public BaseScript { +class TriggerScript_001B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001A : public BaseScript { +class TriggerScript_001A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0019 : public BaseScript { +class TriggerScript_0019 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0018 : public BaseScript { +class TriggerScript_0018 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0017 : public BaseScript { +class TriggerScript_0017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0014 : public BaseScript { +class TriggerScript_0014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0025 : public BaseScript { +class TriggerScript_0025 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0024 : public BaseScript { +class TriggerScript_0024 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0023 : public BaseScript { +class TriggerScript_0023 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0021 : public BaseScript { +class TriggerScript_0021 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0020 : public BaseScript { +class TriggerScript_0020 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001E : public BaseScript { +class TriggerScript_001E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001D : public BaseScript { +class TriggerScript_001D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0022 : public BaseScript { +class TriggerScript_0022 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001F : public BaseScript { +class TriggerScript_001F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1272,10 +1271,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -1302,8 +1297,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); diff --git a/scripts/BossCamera.cpp b/scripts/BossCamera.cpp index 4c467cd60..a82703dc1 100644 --- a/scripts/BossCamera.cpp +++ b/scripts/BossCamera.cpp @@ -61,17 +61,16 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -515,10 +514,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -539,8 +534,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); } break; diff --git a/scripts/CanyonsCTF.cpp b/scripts/CanyonsCTF.cpp index bc53160a0..546288e3f 100644 --- a/scripts/CanyonsCTF.cpp +++ b/scripts/CanyonsCTF.cpp @@ -59,12 +59,11 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -493,10 +492,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -523,8 +518,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); } break; diff --git a/scripts/CellTestLevel.cpp b/scripts/CellTestLevel.cpp index 6d8628e69..e227fec16 100644 --- a/scripts/CellTestLevel.cpp +++ b/scripts/CellTestLevel.cpp @@ -59,12 +59,11 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -495,10 +494,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -525,8 +520,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); diff --git a/scripts/ChrisTest.cpp b/scripts/ChrisTest.cpp index 4fce894a9..0d9e8a2f1 100644 --- a/scripts/ChrisTest.cpp +++ b/scripts/ChrisTest.cpp @@ -61,17 +61,16 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1004 : public BaseScript { +class CustomObjectScript_1004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -531,10 +530,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -555,8 +550,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -604,8 +597,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1004::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 003: Script Description Goes Here if (1) { aStoreObjectInPositionClipboard(Object_handles[0]); diff --git a/scripts/Geodomes.cpp b/scripts/Geodomes.cpp index 2802bed7b..dfe63e66d 100644 --- a/scripts/Geodomes.cpp +++ b/scripts/Geodomes.cpp @@ -64,32 +64,31 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1081 : public BaseScript { +class CustomObjectScript_1081 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1080 : public BaseScript { +class CustomObjectScript_1080 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_107A : public BaseScript { +class CustomObjectScript_107A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_107B : public BaseScript { +class CustomObjectScript_107B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -582,10 +581,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -606,8 +601,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); diff --git a/scripts/HalfPipe.cpp b/scripts/HalfPipe.cpp index a7cffd385..0224445e5 100644 --- a/scripts/HalfPipe.cpp +++ b/scripts/HalfPipe.cpp @@ -64,32 +64,31 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -585,10 +584,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -609,8 +604,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); diff --git a/scripts/InfernalBolt.cpp b/scripts/InfernalBolt.cpp index f9ff47c66..60a4e4785 100644 --- a/scripts/InfernalBolt.cpp +++ b/scripts/InfernalBolt.cpp @@ -62,22 +62,21 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0803 : public BaseScript { +class CustomObjectScript_0803 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_101E : public BaseScript { +class CustomObjectScript_101E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -571,10 +570,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -595,8 +590,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); diff --git a/scripts/Inversion.cpp b/scripts/Inversion.cpp index 0864847ee..1e7a2f85b 100644 --- a/scripts/Inversion.cpp +++ b/scripts/Inversion.cpp @@ -81,112 +81,111 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0810 : public BaseScript { +class CustomObjectScript_0810 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0811 : public BaseScript { +class CustomObjectScript_0811 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0812 : public BaseScript { +class CustomObjectScript_0812 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0813 : public BaseScript { +class CustomObjectScript_0813 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0876 : public BaseScript { +class CustomObjectScript_0876 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0875 : public BaseScript { +class CustomObjectScript_0875 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0859 : public BaseScript { +class CustomObjectScript_0859 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_085A : public BaseScript { +class CustomObjectScript_085A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -977,10 +976,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -1007,8 +1002,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 002: BlueUnSpark if ((qUserFlag(0) == true) && (qRoomHasPlayer(Room_indexes[0]) == false)) { aSoundPlayObject(Sound_indexes[0], Object_handles[0], 1.000000f); @@ -1062,8 +1055,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -1111,8 +1102,6 @@ int16_t CustomObjectScript_0810::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 016: Switch-12 Initialize if (1) { aObjPlayAnim(data->me_handle, 3, 6, 1.000000f, 0); @@ -1123,8 +1112,6 @@ int16_t CustomObjectScript_0810::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 014: Switch-12 Off if (1) { aRoomSetWind(Room_indexes[6], 0.000000f, 0.000000f, 0.000000f, 1.000000f); @@ -1162,8 +1149,6 @@ int16_t CustomObjectScript_0811::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 015: Switch-11 Initialize if (1) { aObjPlayAnim(data->me_handle, 3, 6, 1.000000f, 0); @@ -1174,8 +1159,6 @@ int16_t CustomObjectScript_0811::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 013: Switch-11 Off if (1) { aRoomSetWind(Room_indexes[6], 0.000000f, 0.000000f, 0.000000f, 1.000000f); @@ -1213,7 +1196,6 @@ int16_t CustomObjectScript_0812::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; // Script 026: Switch-22 Initialize if (1) { @@ -1225,8 +1207,6 @@ int16_t CustomObjectScript_0812::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 027: Switch-22 Off if (1) { aRoomSetWind(Room_indexes[7], 0.000000f, 0.000000f, 0.000000f, 1.000000f); @@ -1264,8 +1244,6 @@ int16_t CustomObjectScript_0813::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 023: Switch-21 Initialize if (1) { aObjPlayAnim(data->me_handle, 3, 6, 1.000000f, 0); @@ -1276,8 +1254,6 @@ int16_t CustomObjectScript_0813::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 024: Switch-21 Off if (1) { aRoomSetWind(Room_indexes[7], 0.000000f, 0.000000f, 0.000000f, 1.000000f); @@ -1315,8 +1291,6 @@ int16_t CustomObjectScript_0876::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 032: BSwitch-22 Initialize if (1) { aObjPlayAnim(data->me_handle, 3, 6, 1.000000f, 0); @@ -1327,8 +1301,6 @@ int16_t CustomObjectScript_0876::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 036: BSwitch-22 Off if (1) { aRoomSetWind(Room_indexes[8], 0.000000f, 0.000000f, 0.000000f, 1.000000f); @@ -1366,8 +1338,6 @@ int16_t CustomObjectScript_0875::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 031: BSwitch-21 Initialize if (1) { aObjPlayAnim(data->me_handle, 3, 6, 1.000000f, 0); @@ -1378,8 +1348,6 @@ int16_t CustomObjectScript_0875::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 035: BSwitch-21 Off if (1) { aRoomSetWind(Room_indexes[8], 0.000000f, 0.000000f, 0.000000f, 1.000000f); @@ -1417,8 +1385,6 @@ int16_t CustomObjectScript_0859::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 030: BSwitch-12 Initialize if (1) { aObjPlayAnim(data->me_handle, 3, 6, 1.000000f, 0); @@ -1429,8 +1395,6 @@ int16_t CustomObjectScript_0859::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 034: BSwitch-12 Off if (1) { aRoomSetWind(Room_indexes[9], 0.000000f, 0.000000f, 0.000000f, 1.000000f); @@ -1468,8 +1432,6 @@ int16_t CustomObjectScript_085A::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 029: BSwitch-11 Initialize if (1) { aObjPlayAnim(data->me_handle, 3, 6, 1.000000f, 0); @@ -1480,8 +1442,6 @@ int16_t CustomObjectScript_085A::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 033: BSwitch-11 Off if (1) { aRoomSetWind(Room_indexes[9], 0.000000f, 0.000000f, 0.000000f, 1.000000f); diff --git a/scripts/LEVEL0.cpp b/scripts/LEVEL0.cpp index 71319b99a..a95f10b2f 100644 --- a/scripts/LEVEL0.cpp +++ b/scripts/LEVEL0.cpp @@ -83,122 +83,121 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_3855 : public BaseScript { +class CustomObjectScript_3855 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10DC : public BaseScript { +class CustomObjectScript_10DC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10E0 : public BaseScript { +class CustomObjectScript_10E0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10DF : public BaseScript { +class CustomObjectScript_10DF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08E8 : public BaseScript { +class CustomObjectScript_08E8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_584D : public BaseScript { +class CustomObjectScript_584D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0816 : public BaseScript { +class CustomObjectScript_0816 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_301B : public BaseScript { +class CustomObjectScript_301B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18DB : public BaseScript { +class CustomObjectScript_18DB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1001,10 +1000,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -1025,8 +1020,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 008: Fire Sphere Room if ((qUserFlag(2) == false) && (qUserFlag(3) == false)) { aRoomSetDamage(Room_indexes[7], 1.000000f, 1); @@ -1038,8 +1031,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -1481,8 +1472,6 @@ int16_t TriggerScript_000C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 016: Goal Zero Completed & Waypoint 3 if (1) { aGoalCompleted(Goal_indexes[5], 1); @@ -1500,8 +1489,6 @@ int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0001::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 017: Waypoint 1 if (1) { aSetWaypoint(1); @@ -1545,8 +1532,6 @@ int16_t TriggerScript_0002::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0003::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 019: Waypoint 4 if (1) { aSetWaypoint(4); @@ -1563,8 +1548,6 @@ int16_t TriggerScript_0003::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0004::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 020: Waypoint 5 if (1) { aSetWaypoint(5); @@ -1581,8 +1564,6 @@ int16_t TriggerScript_0004::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0006::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 021: Waypoint 6 Left if (1) { aSetWaypoint(6); @@ -1599,8 +1580,6 @@ int16_t TriggerScript_0006::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0005::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 022: Waypoint 6 Right if (1) { aSetWaypoint(6); diff --git a/scripts/LEVEL15.cpp b/scripts/LEVEL15.cpp index a16fe9859..de51823ca 100644 --- a/scripts/LEVEL15.cpp +++ b/scripts/LEVEL15.cpp @@ -117,292 +117,291 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10FD : public BaseScript { +class CustomObjectScript_10FD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084D : public BaseScript { +class CustomObjectScript_084D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084E : public BaseScript { +class CustomObjectScript_084E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084F : public BaseScript { +class CustomObjectScript_084F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084C : public BaseScript { +class CustomObjectScript_084C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1913 : public BaseScript { +class CustomObjectScript_1913 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0851 : public BaseScript { +class CustomObjectScript_0851 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0850 : public BaseScript { +class CustomObjectScript_0850 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0852 : public BaseScript { +class CustomObjectScript_0852 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0858 : public BaseScript { +class CustomObjectScript_0858 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0857 : public BaseScript { +class CustomObjectScript_0857 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0856 : public BaseScript { +class CustomObjectScript_0856 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0855 : public BaseScript { +class CustomObjectScript_0855 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_399D : public BaseScript { +class CustomObjectScript_399D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_210D : public BaseScript { +class CustomObjectScript_210D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_210E : public BaseScript { +class CustomObjectScript_210E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_190F : public BaseScript { +class CustomObjectScript_190F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2801 : public BaseScript { +class CustomObjectScript_2801 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1828 : public BaseScript { +class CustomObjectScript_1828 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1015 : public BaseScript { +class CustomObjectScript_1015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0848 : public BaseScript { +class CustomObjectScript_0848 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0849 : public BaseScript { +class CustomObjectScript_0849 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0847 : public BaseScript { +class CustomObjectScript_0847 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_3831 : public BaseScript { +class CustomObjectScript_3831 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2111 : public BaseScript { +class CustomObjectScript_2111 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0AB1 : public BaseScript { +class CustomObjectScript_0AB1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0020 : public BaseScript { +class TriggerScript_0020 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001E : public BaseScript { +class TriggerScript_001E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001C : public BaseScript { +class TriggerScript_001C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001A : public BaseScript { +class TriggerScript_001A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0017 : public BaseScript { +class TriggerScript_0017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001B : public BaseScript { +class TriggerScript_001B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0018 : public BaseScript { +class TriggerScript_0018 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001F : public BaseScript { +class TriggerScript_001F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001D : public BaseScript { +class TriggerScript_001D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0014 : public BaseScript { +class TriggerScript_0014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0019 : public BaseScript { +class TriggerScript_0019 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -2438,10 +2437,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -2462,8 +2457,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 035: Locate Back-up Reactor Goal Completed if ((ScriptActionCtr_035 < 1) && (qRoomHasPlayer(Room_indexes[12]) == true)) { aGoalCompleted(Goal_indexes[2], 1); @@ -2474,8 +2467,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(uservars_as_int); @@ -2694,8 +2685,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_PLAYER_MOVIE_END: { - tOSIRISEVTPLAYERMOVIEEND *event_data = &data->evt_player_movie_end; - // Script 059: Music Outside Init if (1) { aMusicSetRegionAll(1); diff --git a/scripts/Level12.cpp b/scripts/Level12.cpp index 264f193d7..4b9af2d81 100644 --- a/scripts/Level12.cpp +++ b/scripts/Level12.cpp @@ -174,577 +174,576 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09DF : public BaseScript { +class CustomObjectScript_09DF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09DD : public BaseScript { +class CustomObjectScript_09DD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09DC : public BaseScript { +class CustomObjectScript_09DC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09DE : public BaseScript { +class CustomObjectScript_09DE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09DB : public BaseScript { +class CustomObjectScript_09DB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1090 : public BaseScript { +class CustomObjectScript_1090 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1173 : public BaseScript { +class CustomObjectScript_1173 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_087C : public BaseScript { +class CustomObjectScript_087C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_087B : public BaseScript { +class CustomObjectScript_087B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_087A : public BaseScript { +class CustomObjectScript_087A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0879 : public BaseScript { +class CustomObjectScript_0879 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0878 : public BaseScript { +class CustomObjectScript_0878 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_204D : public BaseScript { +class CustomObjectScript_204D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0880 : public BaseScript { +class CustomObjectScript_0880 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1077 : public BaseScript { +class CustomObjectScript_1077 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1871 : public BaseScript { +class CustomObjectScript_1871 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08AF : public BaseScript { +class CustomObjectScript_08AF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08B0 : public BaseScript { +class CustomObjectScript_08B0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08B1 : public BaseScript { +class CustomObjectScript_08B1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_107D : public BaseScript { +class CustomObjectScript_107D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_117F : public BaseScript { +class CustomObjectScript_117F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1180 : public BaseScript { +class CustomObjectScript_1180 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1168 : public BaseScript { +class CustomObjectScript_1168 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1081 : public BaseScript { +class CustomObjectScript_1081 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08B5 : public BaseScript { +class CustomObjectScript_08B5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08FD : public BaseScript { +class CustomObjectScript_08FD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0949 : public BaseScript { +class CustomObjectScript_0949 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0846 : public BaseScript { +class CustomObjectScript_0846 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0954 : public BaseScript { +class CustomObjectScript_0954 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0955 : public BaseScript { +class CustomObjectScript_0955 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0956 : public BaseScript { +class CustomObjectScript_0956 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0957 : public BaseScript { +class CustomObjectScript_0957 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08C2 : public BaseScript { +class CustomObjectScript_08C2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18C3 : public BaseScript { +class CustomObjectScript_18C3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0952 : public BaseScript { +class CustomObjectScript_0952 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0953 : public BaseScript { +class CustomObjectScript_0953 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0950 : public BaseScript { +class CustomObjectScript_0950 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0951 : public BaseScript { +class CustomObjectScript_0951 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_104E : public BaseScript { +class CustomObjectScript_104E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1969 : public BaseScript { +class CustomObjectScript_1969 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_216B : public BaseScript { +class CustomObjectScript_216B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_096C : public BaseScript { +class CustomObjectScript_096C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_096E : public BaseScript { +class CustomObjectScript_096E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_096D : public BaseScript { +class CustomObjectScript_096D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0977 : public BaseScript { +class CustomObjectScript_0977 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08E2 : public BaseScript { +class CustomObjectScript_08E2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_097C : public BaseScript { +class CustomObjectScript_097C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_097B : public BaseScript { +class CustomObjectScript_097B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_097A : public BaseScript { +class CustomObjectScript_097A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08E9 : public BaseScript { +class CustomObjectScript_08E9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08E8 : public BaseScript { +class CustomObjectScript_08E8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_105A : public BaseScript { +class CustomObjectScript_105A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_097D : public BaseScript { +class CustomObjectScript_097D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1801 : public BaseScript { +class CustomObjectScript_1801 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_103C : public BaseScript { +class CustomObjectScript_103C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0984 : public BaseScript { +class CustomObjectScript_0984 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_098C : public BaseScript { +class CustomObjectScript_098C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0992 : public BaseScript { +class CustomObjectScript_0992 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_20BC : public BaseScript { +class CustomObjectScript_20BC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C6 : public BaseScript { +class CustomObjectScript_09C6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C7 : public BaseScript { +class CustomObjectScript_09C7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C8 : public BaseScript { +class CustomObjectScript_09C8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11C5 : public BaseScript { +class CustomObjectScript_11C5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11C4 : public BaseScript { +class CustomObjectScript_11C4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_21BC : public BaseScript { +class CustomObjectScript_21BC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11B5 : public BaseScript { +class CustomObjectScript_11B5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2886 : public BaseScript { +class CustomObjectScript_2886 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11B4 : public BaseScript { +class CustomObjectScript_11B4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1885 : public BaseScript { +class CustomObjectScript_1885 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_28BB : public BaseScript { +class CustomObjectScript_28BB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_186E : public BaseScript { +class CustomObjectScript_186E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18F0 : public BaseScript { +class CustomObjectScript_18F0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_19BE : public BaseScript { +class CustomObjectScript_19BE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18F1 : public BaseScript { +class CustomObjectScript_18F1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_19C0 : public BaseScript { +class CustomObjectScript_19C0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18EE : public BaseScript { +class CustomObjectScript_18EE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_20CD : public BaseScript { +class CustomObjectScript_20CD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_28CC : public BaseScript { +class CustomObjectScript_28CC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10B2 : public BaseScript { +class CustomObjectScript_10B2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18C1 : public BaseScript { +class CustomObjectScript_18C1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_21B8 : public BaseScript { +class CustomObjectScript_21B8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_21B9 : public BaseScript { +class CustomObjectScript_21B9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_080A : public BaseScript { +class CustomObjectScript_080A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_080C : public BaseScript { +class CustomObjectScript_080C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0811 : public BaseScript { +class CustomObjectScript_0811 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001E : public BaseScript { +class TriggerScript_001E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001F : public BaseScript { +class TriggerScript_001F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0021 : public BaseScript { +class TriggerScript_0021 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0020 : public BaseScript { +class TriggerScript_0020 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001A : public BaseScript { +class TriggerScript_001A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0019 : public BaseScript { +class TriggerScript_0019 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001B : public BaseScript { +class TriggerScript_001B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0018 : public BaseScript { +class TriggerScript_0018 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0017 : public BaseScript { +class TriggerScript_0017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001D : public BaseScript { +class TriggerScript_001D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001C : public BaseScript { +class TriggerScript_001C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -3121,10 +3120,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -3145,8 +3140,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -3363,8 +3356,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_PLAYER_MOVIE_END: { - tOSIRISEVTPLAYERMOVIEEND *event_data = &data->evt_player_movie_end; - // Script 003: Disable Player if ((ScriptActionCtr_003 < 1) && (1)) { aObjSaveHandle(qPlayerClosest(Object_handles[9], -1), 0); @@ -3397,8 +3388,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09DF::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 149: Flamer-4 if (1) { if (qUserFlag(3) == true) { @@ -3429,8 +3418,6 @@ int16_t CustomObjectScript_09DF::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09DD::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 148: Flamer-3 if (1) { if (qUserFlag(2) == true) { @@ -3461,8 +3448,6 @@ int16_t CustomObjectScript_09DD::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09DC::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 147: Flamer-2 if (1) { if (qUserFlag(1) == true) { @@ -3493,8 +3478,6 @@ int16_t CustomObjectScript_09DC::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09DE::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 146: Flamer-1 if (1) { if (qUserFlag(0) == true) { @@ -3547,8 +3530,6 @@ int16_t CustomObjectScript_09DB::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 150: Flamer-Main if (1) { if (qUserFlag(4) == true) { @@ -3810,8 +3791,6 @@ int16_t CustomObjectScript_0880::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1077::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 046: Compactor 2 Slamming if ((ScriptActionCtr_046 < 1) && (1)) { aSoundPlayObject(Sound_indexes[3], data->me_handle, 1.000000f); @@ -3831,8 +3810,6 @@ int16_t CustomObjectScript_1077::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1871::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 005: Compactor 1 Slamming if ((ScriptActionCtr_005 < 1) && (1)) { aSoundPlayObject(Sound_indexes[3], data->me_handle, 1.000000f); @@ -3852,8 +3829,6 @@ int16_t CustomObjectScript_1871::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08AF::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 019: FlickerForcefield-1 (3) if (1) { aObjGhostSet(1, data->me_handle); @@ -3866,8 +3841,6 @@ int16_t CustomObjectScript_08AF::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 021: FlickerForcefield-2 (3) if (1) { if (qUserVarValue(5) == 0.000000f) { @@ -3892,8 +3865,6 @@ int16_t CustomObjectScript_08AF::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08B0::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 018: FlickerForcefield-1 (2) if (1) { aObjGhostSet(1, data->me_handle); @@ -3906,8 +3877,6 @@ int16_t CustomObjectScript_08B0::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 020: FlickerForcefield-2 (2) if (1) { if (qUserVarValue(1) == 0.000000f) { @@ -3932,8 +3901,6 @@ int16_t CustomObjectScript_08B0::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08B1::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 007: FlickerForcefield-1 (1) if (1) { aObjGhostSet(1, data->me_handle); @@ -3946,8 +3913,6 @@ int16_t CustomObjectScript_08B1::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 008: FlickerForcefield-2 (1) if (1) { if (qUserVarValue(0) == 0.000000f) { @@ -3998,8 +3963,6 @@ int16_t CustomObjectScript_107D::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 118: Arena 42 Special Timer if ((ScriptActionCtr_118 < 1) && (1)) { aSoundPlayObject(Sound_indexes[5], Object_handles[44], 1.000000f); @@ -4044,8 +4007,6 @@ int16_t CustomObjectScript_117F::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 116: Arena 41 Special Timer if ((ScriptActionCtr_116 < 1) && (1)) { aSoundPlayObject(Sound_indexes[5], Object_handles[45], 1.000000f); @@ -4085,8 +4046,6 @@ int16_t CustomObjectScript_1180::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 111: Arena 3 Special Timer if ((ScriptActionCtr_111 < 1) && (1)) { aSoundPlayObject(Sound_indexes[5], Object_handles[46], 1.000000f); @@ -4126,8 +4085,6 @@ int16_t CustomObjectScript_1168::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 109: Arena 2 Special Timer if ((ScriptActionCtr_109 < 1) && (1)) { aSoundPlayObject(Sound_indexes[5], Object_handles[47], 1.000000f); @@ -4146,8 +4103,6 @@ int16_t CustomObjectScript_1168::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1081::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 105: ArenaBotsINIT if (1) { aObjMakeInvuln(Object_handles[27], 999999); @@ -4215,8 +4170,6 @@ int16_t CustomObjectScript_1081::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 106: Arena 1 Special Timer if ((ScriptActionCtr_106 < 1) && (1)) { aSoundPlayObject(Sound_indexes[5], Object_handles[48], 1.000000f); @@ -4256,8 +4209,6 @@ int16_t CustomObjectScript_08B5::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08FD::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 025: RandomRedExtraSpew if (1) { aTurnOnSpew(Object_handles[51], 0, 7, 1.000000f, 0.010000f, 98304, 0, 1.200000f, 0.150000f, -1.000000f, 4.000000f, @@ -4289,8 +4240,6 @@ int16_t CustomObjectScript_08FD::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0949::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 031: ArenaSpewers if (1) { aTurnOnSpew(Object_handles[59], 0, 8, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.140000f, -1.000000f, 4.000000f, @@ -4314,8 +4263,6 @@ int16_t CustomObjectScript_0949::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0846::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 006: Repair INIT if (1) { aUserVarSet(3, 0.000000f); @@ -4466,8 +4413,6 @@ int16_t CustomObjectScript_08C2::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 038: ToggleRepair-23 if ((ScriptActionCtr_038 < 1) && (1)) { aUserVarInc(3); @@ -4525,8 +4470,6 @@ int16_t CustomObjectScript_18C3::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 035: ToggleRepair-13 if ((ScriptActionCtr_035 < 1) && (1)) { aUserVarInc(2); @@ -4670,8 +4613,6 @@ int16_t CustomObjectScript_104E::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 049: CowardFF-22 if (1) { if (((qUserVarValue(4) == 0.000000f) || (qUserVarValue(4) == 2.000000f)) && (qUserVarValue(6) == 1.000000f)) { @@ -4716,8 +4657,6 @@ int16_t CustomObjectScript_1969::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 051: CowFF-INIT if (1) { aUserVarSet(4, 0.000000f); @@ -4729,8 +4668,6 @@ int16_t CustomObjectScript_1969::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 048: CowardFF-12 if (1) { if (((qUserVarValue(6) == 0.000000f) || (qUserVarValue(6) == 2.000000f)) && (qUserVarValue(4) == 1.000000f)) { @@ -4760,8 +4697,6 @@ int16_t CustomObjectScript_1969::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_216B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 052: CowPipe-INIT if (1) { aObjMakeInvuln(Object_handles[79], 999999); @@ -4875,8 +4810,6 @@ int16_t CustomObjectScript_096D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0977::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 066: Gasser INIT if (1) { aUserVarSet(7, 0.000000f); @@ -4889,8 +4822,6 @@ int16_t CustomObjectScript_0977::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 065: Gasser (Arena3) if (1) { if (qUserVarValue(7) == 1.000000f) { @@ -4953,8 +4884,6 @@ int16_t CustomObjectScript_097C::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 074: RedDummy-3 Explode if (1) { if (((ScriptActionCtr_073 > 0) == true) && ((ScriptActionCtr_070 > 0) == true)) { @@ -4988,8 +4917,6 @@ int16_t CustomObjectScript_097B::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 073: RedDummy-2 Explode if (1) { if (((ScriptActionCtr_074 > 0) == true) && ((ScriptActionCtr_070 > 0) == true)) { @@ -5023,8 +4950,6 @@ int16_t CustomObjectScript_097A::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 070: RedDummy-1 Explode if (1) { if (((ScriptActionCtr_073 > 0) == true) && ((ScriptActionCtr_074 > 0) == true)) { @@ -5073,8 +4998,6 @@ int16_t CustomObjectScript_08E9::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 075: SRepair-INIT if (1) { aUserVarSet(8, 0.000000f); @@ -5092,8 +5015,6 @@ int16_t CustomObjectScript_08E9::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 077: SRSwitch-1 Timer if (1) { aUserVarSet(8, 1.000000f); @@ -5140,8 +5061,6 @@ int16_t CustomObjectScript_08E8::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 080: SRSwitch-2 Timer if (1) { aUserVarSet(9, 1.000000f); @@ -5260,8 +5179,6 @@ int16_t CustomObjectScript_1801::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 104: EBHostile if (1) { aSoundPlayObject(Sound_indexes[5], Object_handles[151], 1.000000f); @@ -5280,8 +5197,6 @@ int16_t CustomObjectScript_1801::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_103C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 011: Level1Paths if (1) { aAIFlags(1, 32800, Object_handles[117]); @@ -5313,8 +5228,6 @@ int16_t CustomObjectScript_103C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0984::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 012: Level2Paths if (1) { aAIFlags(1, 32800, Object_handles[124]); @@ -5358,8 +5271,6 @@ int16_t CustomObjectScript_0984::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_098C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 113: Level3Paths if (1) { aAIFlags(1, 32800, Object_handles[115]); @@ -5387,8 +5298,6 @@ int16_t CustomObjectScript_098C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0992::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 114: Level4Paths if (1) { aAIFlags(1, 32800, Object_handles[149]); @@ -5422,8 +5331,6 @@ int16_t CustomObjectScript_20BC::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 119: Arena Waiters INIT if (1) { aAIFlags(1, 131104, Object_handles[153]); @@ -6117,8 +6024,6 @@ int16_t CustomObjectScript_0811::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0012::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 152: Escaping Begin if ((ScriptActionCtr_152 < 1) && (1)) { aSoundPlaySteaming("VoxL12SpecificD.osf", 1.000000f); @@ -6322,8 +6227,6 @@ int16_t TriggerScript_0008::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_001E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 117: Arena 42 Special Enter if ((ScriptActionCtr_117 < 1) && (1)) { aDoorLockUnlock(1, Door_handles[4]); @@ -6348,8 +6251,6 @@ int16_t TriggerScript_001E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_001F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 115: Arena 41 Special Enter if ((ScriptActionCtr_115 < 1) && (1)) { aDoorLockUnlock(1, Door_handles[5]); @@ -6374,8 +6275,6 @@ int16_t TriggerScript_001F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0001::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 014: ExitSequenceTest if (1) { aGoalCompleted(Goal_indexes[2], 1); @@ -6393,8 +6292,6 @@ int16_t TriggerScript_0001::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 098: L2Migration-2 if ((ScriptActionCtr_098 < 1) && ((ScriptActionCtr_097 > 0) == false)) { aAIGoalFollowPathSimple(Object_handles[137], Path_indexes[23], 4352, -1, 3); @@ -6414,8 +6311,6 @@ int16_t TriggerScript_000B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 097: L2Migration-1 if ((ScriptActionCtr_097 < 1) && ((ScriptActionCtr_098 > 0) == false)) { aAIGoalFollowPathSimple(Object_handles[137], Path_indexes[23], 4352, -1, 3); @@ -6435,8 +6330,6 @@ int16_t TriggerScript_000A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 099: L2Surprise if ((ScriptActionCtr_099 < 1) && (1)) { aAIGoalFollowPathSimple(Object_handles[141], Path_indexes[24], 4352, -1, 3); @@ -6456,8 +6349,6 @@ int16_t TriggerScript_000C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 100: L2GenericRoomEnter if ((ScriptActionCtr_100 < 1) && (1)) { aSetObjectTimer(Object_handles[39], 5.000000f, -1); @@ -6474,8 +6365,6 @@ int16_t TriggerScript_000D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0021::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 133: MainGuardMessage-2 if ((ScriptActionCtr_133 < 1) && ((ScriptActionCtr_095 > 0) == false)) { aDoorLockUnlock(1, Door_handles[4]); @@ -6494,8 +6383,6 @@ int16_t TriggerScript_0021::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0020::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 095: MainGuardMessage-1 if ((ScriptActionCtr_095 < 1) && ((ScriptActionCtr_133 > 0) == false)) { aDoorLockUnlock(1, Door_handles[4]); diff --git a/scripts/Level16.cpp b/scripts/Level16.cpp index c3e9edd9f..184e9aedb 100644 --- a/scripts/Level16.cpp +++ b/scripts/Level16.cpp @@ -67,42 +67,41 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_4010 : public BaseScript { +class CustomObjectScript_4010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0804 : public BaseScript { +class CustomObjectScript_0804 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -656,10 +655,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -680,8 +675,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 011: AreasVisited if (qUserVarValueInt(4) == 3) { aSetLevelTimer(200.000000f, 3); @@ -693,8 +686,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); diff --git a/scripts/Level6.cpp b/scripts/Level6.cpp index d3d1735d3..996b3da7d 100644 --- a/scripts/Level6.cpp +++ b/scripts/Level6.cpp @@ -117,292 +117,291 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_208F : public BaseScript { +class CustomObjectScript_208F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_20BE : public BaseScript { +class CustomObjectScript_20BE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_206F : public BaseScript { +class CustomObjectScript_206F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10A5 : public BaseScript { +class CustomObjectScript_10A5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_081D : public BaseScript { +class CustomObjectScript_081D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_081E : public BaseScript { +class CustomObjectScript_081E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08F7 : public BaseScript { +class CustomObjectScript_08F7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_081C : public BaseScript { +class CustomObjectScript_081C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_081B : public BaseScript { +class CustomObjectScript_081B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10C7 : public BaseScript { +class CustomObjectScript_10C7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18B9 : public BaseScript { +class CustomObjectScript_18B9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2051 : public BaseScript { +class CustomObjectScript_2051 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1826 : public BaseScript { +class CustomObjectScript_1826 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08FD : public BaseScript { +class CustomObjectScript_08FD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_180A : public BaseScript { +class CustomObjectScript_180A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_216E : public BaseScript { +class CustomObjectScript_216E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_3167 : public BaseScript { +class CustomObjectScript_3167 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1964 : public BaseScript { +class CustomObjectScript_1964 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_316A : public BaseScript { +class CustomObjectScript_316A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_216B : public BaseScript { +class CustomObjectScript_216B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001F : public BaseScript { +class TriggerScript_001F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0020 : public BaseScript { +class TriggerScript_0020 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001C : public BaseScript { +class TriggerScript_001C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001E : public BaseScript { +class TriggerScript_001E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001B : public BaseScript { +class TriggerScript_001B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0019 : public BaseScript { +class TriggerScript_0019 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001D : public BaseScript { +class TriggerScript_001D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001A : public BaseScript { +class TriggerScript_001A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0018 : public BaseScript { +class TriggerScript_0018 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0014 : public BaseScript { +class TriggerScript_0014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0017 : public BaseScript { +class TriggerScript_0017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0025 : public BaseScript { +class TriggerScript_0025 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0024 : public BaseScript { +class TriggerScript_0024 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0021 : public BaseScript { +class TriggerScript_0021 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0022 : public BaseScript { +class TriggerScript_0022 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -2384,10 +2383,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -2408,8 +2403,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 009: Collectors & Builders Key Correctly Placed if ((ScriptActionCtr_009 < 1) && ((qObjRoom(Object_handles[10]) == Room_indexes[2]) && (qObjRoom(Object_handles[7]) == Room_indexes[3]))) { @@ -2484,8 +2477,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(uservars_as_int); @@ -2837,8 +2828,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_PLAYER_MOVIE_END: { - tOSIRISEVTPLAYERMOVIEEND *event_data = &data->evt_player_movie_end; - // Script 010: Voice Over Intro if ((ScriptActionCtr_010 < 1) && (1)) { aSoundPlaySteaming("VoxL06StartLevel.osf", 1.000000f); @@ -3071,8 +3060,6 @@ int16_t CustomObjectScript_206F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_10A5::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 087: LightningTest if (0 == true) { aLightningCreate(Object_handles[14], Object_handles[15], 10.000000f, 4.000000f, 1, Texture_indexes[0], 0.300000f, @@ -3138,8 +3125,6 @@ int16_t CustomObjectScript_081E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08F7::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 002: DisablePlatformMovement if (1) { aObjGravityEnable(0, data->me_handle); @@ -3150,8 +3135,6 @@ int16_t CustomObjectScript_08F7::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 001: DoStuffWhenPlatformHits if ((ScriptActionCtr_001 < 1) && (qObjRoom(data->me_handle) == Room_indexes[4])) { aSetLevelTimer(0.150000f, 11); @@ -3303,8 +3286,6 @@ int16_t CustomObjectScript_2051::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1826::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 051: BlowUpSlagHeap if ((ScriptActionCtr_051 < 1) && (qObjAnimFrame(Object_handles[24]) != 126.000000f)) { aObjDestroy(Object_handles[26]); @@ -3358,8 +3339,6 @@ int16_t CustomObjectScript_1826::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 026: MessagePlayerSeesBoss if ((ScriptActionCtr_026 < 1) && (1)) { aSetLevelTimer(3.000000f, 6); @@ -3408,8 +3387,6 @@ int16_t CustomObjectScript_08FD::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 068: Start2ndPartCinematicAlt if ((ScriptActionCtr_068 < 2) && (1)) { if (ScriptActionCtr_068 == 0) { @@ -3452,8 +3429,6 @@ int16_t CustomObjectScript_180A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_216E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 097: DroppingRocks01 if ((ScriptActionCtr_097 < 1) && (qObjectPosition(data->me_handle, 1) < -490.000000f)) { aMiscViewerShake(40.000000f); @@ -3472,8 +3447,6 @@ int16_t CustomObjectScript_216E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_3167::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 096: DroppingRocks02 if ((ScriptActionCtr_096 < 1) && (qObjectPosition(data->me_handle, 1) < -490.000000f)) { aMiscViewerShake(40.000000f); @@ -3492,8 +3465,6 @@ int16_t CustomObjectScript_3167::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1964::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 100: DroppingRocks03 if ((ScriptActionCtr_100 < 1) && (qObjectPosition(data->me_handle, 1) < -490.000000f)) { aMiscViewerShake(40.000000f); @@ -3512,8 +3483,6 @@ int16_t CustomObjectScript_1964::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_316A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 099: DroppingRocks04 if ((ScriptActionCtr_099 < 1) && (qObjectPosition(data->me_handle, 1) < -490.000000f)) { aMiscViewerShake(40.000000f); @@ -3532,8 +3501,6 @@ int16_t CustomObjectScript_316A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_216B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 098: DroppingRocks05 if ((ScriptActionCtr_098 < 1) && (qObjectPosition(data->me_handle, 1) < -490.000000f)) { aMiscViewerShake(40.000000f); diff --git a/scripts/Level9.cpp b/scripts/Level9.cpp index fc69d0e40..f434198ae 100644 --- a/scripts/Level9.cpp +++ b/scripts/Level9.cpp @@ -105,232 +105,231 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_081B : public BaseScript { +class CustomObjectScript_081B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18D5 : public BaseScript { +class CustomObjectScript_18D5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18D6 : public BaseScript { +class CustomObjectScript_18D6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1030 : public BaseScript { +class CustomObjectScript_1030 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1038 : public BaseScript { +class CustomObjectScript_1038 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0869 : public BaseScript { +class CustomObjectScript_0869 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_086A : public BaseScript { +class CustomObjectScript_086A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_106E : public BaseScript { +class CustomObjectScript_106E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_106F : public BaseScript { +class CustomObjectScript_106F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_106D : public BaseScript { +class CustomObjectScript_106D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_106C : public BaseScript { +class CustomObjectScript_106C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_100F : public BaseScript { +class CustomObjectScript_100F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0871 : public BaseScript { +class CustomObjectScript_0871 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0811 : public BaseScript { +class CustomObjectScript_0811 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0810 : public BaseScript { +class CustomObjectScript_0810 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_080E : public BaseScript { +class CustomObjectScript_080E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0873 : public BaseScript { +class CustomObjectScript_0873 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0872 : public BaseScript { +class CustomObjectScript_0872 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2070 : public BaseScript { +class CustomObjectScript_2070 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18AA : public BaseScript { +class CustomObjectScript_18AA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18C1 : public BaseScript { +class CustomObjectScript_18C1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0948 : public BaseScript { +class CustomObjectScript_0948 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0949 : public BaseScript { +class CustomObjectScript_0949 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18AC : public BaseScript { +class CustomObjectScript_18AC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_094E : public BaseScript { +class CustomObjectScript_094E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1584,10 +1583,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -1608,8 +1603,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -1750,8 +1743,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_PLAYER_MOVIE_END: { - tOSIRISEVTPLAYERMOVIEEND *event_data = &data->evt_player_movie_end; - // Script 034: Message for Transmitter if (1) { aShowHUDMessage(Message_strings[1]); @@ -1783,8 +1774,6 @@ int16_t CustomObjectScript_081B::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 080: MEGA Init if ((ScriptActionCtr_080 < 1) && (1)) { aUserVarSet(5, 2400.000000f); @@ -2113,8 +2102,6 @@ int16_t CustomObjectScript_081B::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 083: End Level After Camera if ((ScriptActionCtr_083 < 1) && (qUserFlag(2) == true)) { aEndLevel(); @@ -2131,8 +2118,6 @@ int16_t CustomObjectScript_081B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_18D5::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_GOALCOMPLETE: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_goalcomplete; - // Script 059: Recovery-2 Return if ((ScriptActionCtr_059 < 1) && (1)) { aAIGoalFollowPathSimple(data->me_handle, Path_indexes[12], 4352, -1, 3); @@ -2149,8 +2134,6 @@ int16_t CustomObjectScript_18D5::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_18D6::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_GOALCOMPLETE: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_goalcomplete; - // Script 058: Recovery-1 Return if ((ScriptActionCtr_058 < 1) && (1)) { aAIGoalFollowPathSimple(data->me_handle, Path_indexes[12], 4352, -1, 3); @@ -2883,8 +2866,6 @@ int16_t CustomObjectScript_094E::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 084: Transmitter Give if ((ScriptActionCtr_084 < 1) && (qObjType(qPlayerClosest(data->me_handle, -1)) == 4)) { aAddObjectToInventory(data->me_handle, qPlayerClosest(data->me_handle, -1), 0); @@ -2917,8 +2898,6 @@ int16_t CustomObjectScript_094E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0001::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 010: EndLevel-Factory if ((ScriptActionCtr_010 < 1) && (qUserFlag(4) == true)) { aStartEndlevelSequencePath(Path_indexes[13], Path_indexes[14], 12.000000f, Message_strings[8]); diff --git a/scripts/LevelS1.cpp b/scripts/LevelS1.cpp index 25ab0f0e0..ec94fe88e 100644 --- a/scripts/LevelS1.cpp +++ b/scripts/LevelS1.cpp @@ -68,47 +68,46 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0804 : public BaseScript { +class CustomObjectScript_0804 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -699,10 +698,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -723,8 +718,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 011: AreasVisited if ((ScriptActionCtr_011 < 1) && (qUserVarValueInt(4) == 3)) { aGoalCompleted(Goal_indexes[3], 1); @@ -756,8 +749,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); diff --git a/scripts/Merc02.cpp b/scripts/Merc02.cpp index bed94d7d2..ff697725d 100644 --- a/scripts/Merc02.cpp +++ b/scripts/Merc02.cpp @@ -123,322 +123,321 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1119 : public BaseScript { +class CustomObjectScript_1119 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10EC : public BaseScript { +class CustomObjectScript_10EC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08F6 : public BaseScript { +class CustomObjectScript_08F6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08F8 : public BaseScript { +class CustomObjectScript_08F8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08F7 : public BaseScript { +class CustomObjectScript_08F7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08FB : public BaseScript { +class CustomObjectScript_08FB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08FC : public BaseScript { +class CustomObjectScript_08FC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08FE : public BaseScript { +class CustomObjectScript_08FE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08FD : public BaseScript { +class CustomObjectScript_08FD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08FF : public BaseScript { +class CustomObjectScript_08FF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0900 : public BaseScript { +class CustomObjectScript_0900 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0901 : public BaseScript { +class CustomObjectScript_0901 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0902 : public BaseScript { +class CustomObjectScript_0902 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1017 : public BaseScript { +class CustomObjectScript_1017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0818 : public BaseScript { +class CustomObjectScript_0818 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1019 : public BaseScript { +class CustomObjectScript_1019 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10CF : public BaseScript { +class CustomObjectScript_10CF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_30B2 : public BaseScript { +class CustomObjectScript_30B2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10B1 : public BaseScript { +class CustomObjectScript_10B1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1040 : public BaseScript { +class CustomObjectScript_1040 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1041 : public BaseScript { +class CustomObjectScript_1041 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_103F : public BaseScript { +class CustomObjectScript_103F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08DE : public BaseScript { +class CustomObjectScript_08DE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_110E : public BaseScript { +class CustomObjectScript_110E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10CD : public BaseScript { +class CustomObjectScript_10CD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08A6 : public BaseScript { +class CustomObjectScript_08A6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08A5 : public BaseScript { +class CustomObjectScript_08A5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1112 : public BaseScript { +class CustomObjectScript_1112 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0913 : public BaseScript { +class CustomObjectScript_0913 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083D : public BaseScript { +class CustomObjectScript_083D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084A : public BaseScript { +class CustomObjectScript_084A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1048 : public BaseScript { +class CustomObjectScript_1048 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1111 : public BaseScript { +class CustomObjectScript_1111 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1067 : public BaseScript { +class CustomObjectScript_1067 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_088C : public BaseScript { +class CustomObjectScript_088C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_108B : public BaseScript { +class CustomObjectScript_108B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0883 : public BaseScript { +class CustomObjectScript_0883 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1884 : public BaseScript { +class CustomObjectScript_1884 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_106F : public BaseScript { +class CustomObjectScript_106F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1071 : public BaseScript { +class CustomObjectScript_1071 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0894 : public BaseScript { +class CustomObjectScript_0894 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0893 : public BaseScript { +class CustomObjectScript_0893 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0806 : public BaseScript { +class CustomObjectScript_0806 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1842 : public BaseScript { +class CustomObjectScript_1842 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_082F : public BaseScript { +class CustomObjectScript_082F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1112,8 +1111,8 @@ bool qBeamHittingPlayer(int beam1_handle, int beam2_handle) { // see if anything is in the way ray_info ray; int flags, fate; - vector start_pos, end_pos, landing_pos; - int start_room, landing_room; + vector start_pos, end_pos; + int start_room; if (!qObjExists(beam1_handle)) return false; @@ -2394,10 +2393,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -2424,8 +2419,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 050: Check Laser Room 1's Beams if (qUserFlag(14) == false) { if ((qBeamHittingPlayer(Object_handles[31], Object_handles[32]) == true) || @@ -2486,8 +2479,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -3609,8 +3600,6 @@ int16_t CustomObjectScript_1119::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 086: Give Closest Player the Infected Data Cartridge if ((ScriptActionCtr_086 < 1) && (qObjType(qPlayerClosest(data->me_handle, 8)) == 4)) { aAddObjectToInventoryNamed(data->me_handle, qPlayerClosest(data->me_handle, 8), Message_strings[1], 0); @@ -4488,8 +4477,6 @@ int16_t CustomObjectScript_0913::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_083D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 100: Check Restricted Access Entrance Camera if ((ScriptActionCtr_100 < 1) && (qSecurityCameraAlerted(data->me_handle) == true)) { aSoundPlaySteaming("VoxMerc02FPA1.osf", 1.000000f); @@ -4506,8 +4493,6 @@ int16_t CustomObjectScript_083D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_084A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 101: Check Restricted Hall A Camera 1 if ((ScriptActionCtr_101 < 1) && (qSecurityCameraAlerted(data->me_handle) == true)) { aShowHUDMessage(Message_strings[28]); @@ -4548,8 +4533,6 @@ int16_t CustomObjectScript_1048::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1111::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 102: Check Restricted Hall A Camera 2 if ((ScriptActionCtr_102 < 1) && (qSecurityCameraAlerted(data->me_handle) == true)) { aShowHUDMessage(Message_strings[28]); @@ -4590,8 +4573,6 @@ int16_t CustomObjectScript_1067::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_088C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 103: Check Armory Camera if ((ScriptActionCtr_103 < 1) && (qSecurityCameraAlerted(data->me_handle) == true)) { aShowHUDMessage(Message_strings[28]); @@ -4632,8 +4613,6 @@ int16_t CustomObjectScript_108B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0883::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 104: Check Res Hall C Camera if ((ScriptActionCtr_104 < 1) && (qSecurityCameraAlerted(data->me_handle) == true)) { aShowHUDMessage(Message_strings[28]); @@ -4674,8 +4653,6 @@ int16_t CustomObjectScript_1884::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_106F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 105: Check Hall C Camera 1 if ((ScriptActionCtr_105 < 1) && (qSecurityCameraAlerted(data->me_handle) == true)) { aShowHUDMessage(Message_strings[28]); @@ -4716,8 +4693,6 @@ int16_t CustomObjectScript_1071::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0894::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 106: Check Hall C Camera 2 if ((ScriptActionCtr_106 < 1) && (qSecurityCameraAlerted(data->me_handle) == true)) { aShowHUDMessage(Message_strings[28]); @@ -4831,8 +4806,6 @@ int16_t CustomObjectScript_082F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0006::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 051: Laser Room 1 Monitor Hit if ((ScriptActionCtr_051 < 1) && (qUserFlag(14) == true)) { aPortalRenderSet(0, 0, Room_indexes[1], 1); @@ -4851,8 +4824,6 @@ int16_t TriggerScript_0006::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0005::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 040: Laser Room 2 Monitor 1 Hit if ((ScriptActionCtr_040 < 1) && (qUserFlag(13) == true)) { aUserVarInc(4); @@ -4879,8 +4850,6 @@ int16_t TriggerScript_0005::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0004::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 041: Laser Room 2 Monitor 2 Hit if ((ScriptActionCtr_041 < 1) && (qUserFlag(13) == true)) { aUserVarInc(4); @@ -4907,8 +4876,6 @@ int16_t TriggerScript_0004::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 012: Gate Monitor 1 Hit if ((ScriptActionCtr_012 < 1) && (qUserFlag(2) == true)) { aUserVarInc(1); @@ -4935,8 +4902,6 @@ int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0001::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 013: Gate Monitor 2 Hit if ((ScriptActionCtr_013 < 1) && (qUserFlag(2) == true)) { aUserVarInc(1); diff --git a/scripts/Merc1.cpp b/scripts/Merc1.cpp index aee67bd18..791949a74 100644 --- a/scripts/Merc1.cpp +++ b/scripts/Merc1.cpp @@ -173,572 +173,571 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2027 : public BaseScript { +class CustomObjectScript_2027 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0820 : public BaseScript { +class CustomObjectScript_0820 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0831 : public BaseScript { +class CustomObjectScript_0831 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0832 : public BaseScript { +class CustomObjectScript_0832 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0836 : public BaseScript { +class CustomObjectScript_0836 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0888 : public BaseScript { +class CustomObjectScript_0888 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0887 : public BaseScript { +class CustomObjectScript_0887 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0886 : public BaseScript { +class CustomObjectScript_0886 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_182A : public BaseScript { +class CustomObjectScript_182A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_088A : public BaseScript { +class CustomObjectScript_088A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0889 : public BaseScript { +class CustomObjectScript_0889 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_188C : public BaseScript { +class CustomObjectScript_188C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0885 : public BaseScript { +class CustomObjectScript_0885 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_096D : public BaseScript { +class CustomObjectScript_096D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0877 : public BaseScript { +class CustomObjectScript_0877 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0878 : public BaseScript { +class CustomObjectScript_0878 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0879 : public BaseScript { +class CustomObjectScript_0879 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1171 : public BaseScript { +class CustomObjectScript_1171 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_087A : public BaseScript { +class CustomObjectScript_087A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_087B : public BaseScript { +class CustomObjectScript_087B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_087C : public BaseScript { +class CustomObjectScript_087C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_087D : public BaseScript { +class CustomObjectScript_087D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1170 : public BaseScript { +class CustomObjectScript_1170 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0988 : public BaseScript { +class CustomObjectScript_0988 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0981 : public BaseScript { +class CustomObjectScript_0981 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0980 : public BaseScript { +class CustomObjectScript_0980 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_097F : public BaseScript { +class CustomObjectScript_097F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_097E : public BaseScript { +class CustomObjectScript_097E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_097D : public BaseScript { +class CustomObjectScript_097D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_097C : public BaseScript { +class CustomObjectScript_097C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_117B : public BaseScript { +class CustomObjectScript_117B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_097A : public BaseScript { +class CustomObjectScript_097A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1984 : public BaseScript { +class CustomObjectScript_1984 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0875 : public BaseScript { +class CustomObjectScript_0875 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0865 : public BaseScript { +class CustomObjectScript_0865 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0864 : public BaseScript { +class CustomObjectScript_0864 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0863 : public BaseScript { +class CustomObjectScript_0863 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0862 : public BaseScript { +class CustomObjectScript_0862 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08A1 : public BaseScript { +class CustomObjectScript_08A1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08A0 : public BaseScript { +class CustomObjectScript_08A0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_089F : public BaseScript { +class CustomObjectScript_089F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_109E : public BaseScript { +class CustomObjectScript_109E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_109C : public BaseScript { +class CustomObjectScript_109C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08AE : public BaseScript { +class CustomObjectScript_08AE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18A6 : public BaseScript { +class CustomObjectScript_18A6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18A5 : public BaseScript { +class CustomObjectScript_18A5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18A4 : public BaseScript { +class CustomObjectScript_18A4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18A7 : public BaseScript { +class CustomObjectScript_18A7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18A9 : public BaseScript { +class CustomObjectScript_18A9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_20A3 : public BaseScript { +class CustomObjectScript_20A3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_28A2 : public BaseScript { +class CustomObjectScript_28A2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18A8 : public BaseScript { +class CustomObjectScript_18A8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08DA : public BaseScript { +class CustomObjectScript_08DA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08D9 : public BaseScript { +class CustomObjectScript_08D9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08D8 : public BaseScript { +class CustomObjectScript_08D8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08D7 : public BaseScript { +class CustomObjectScript_08D7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08D6 : public BaseScript { +class CustomObjectScript_08D6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08D5 : public BaseScript { +class CustomObjectScript_08D5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08D4 : public BaseScript { +class CustomObjectScript_08D4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08D3 : public BaseScript { +class CustomObjectScript_08D3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08D2 : public BaseScript { +class CustomObjectScript_08D2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08D1 : public BaseScript { +class CustomObjectScript_08D1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08D0 : public BaseScript { +class CustomObjectScript_08D0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08CF : public BaseScript { +class CustomObjectScript_08CF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_105C : public BaseScript { +class CustomObjectScript_105C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2059 : public BaseScript { +class CustomObjectScript_2059 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0858 : public BaseScript { +class CustomObjectScript_0858 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0857 : public BaseScript { +class CustomObjectScript_0857 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1030 : public BaseScript { +class CustomObjectScript_1030 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_402F : public BaseScript { +class CustomObjectScript_402F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1871 : public BaseScript { +class CustomObjectScript_1871 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_091A : public BaseScript { +class CustomObjectScript_091A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0919 : public BaseScript { +class CustomObjectScript_0919 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0918 : public BaseScript { +class CustomObjectScript_0918 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0917 : public BaseScript { +class CustomObjectScript_0917 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0925 : public BaseScript { +class CustomObjectScript_0925 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0924 : public BaseScript { +class CustomObjectScript_0924 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0923 : public BaseScript { +class CustomObjectScript_0923 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0922 : public BaseScript { +class CustomObjectScript_0922 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0921 : public BaseScript { +class CustomObjectScript_0921 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1120 : public BaseScript { +class CustomObjectScript_1120 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_111F : public BaseScript { +class CustomObjectScript_111F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_111E : public BaseScript { +class CustomObjectScript_111E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_112E : public BaseScript { +class CustomObjectScript_112E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0932 : public BaseScript { +class CustomObjectScript_0932 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0931 : public BaseScript { +class CustomObjectScript_0931 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_080F : public BaseScript { +class CustomObjectScript_080F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0967 : public BaseScript { +class CustomObjectScript_0967 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0966 : public BaseScript { +class CustomObjectScript_0966 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0809 : public BaseScript { +class CustomObjectScript_0809 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0014 : public BaseScript { +class TriggerScript_0014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -3375,10 +3374,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -3405,8 +3400,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 197: WallHint (Rookie or Trainee only!) if ((ScriptActionCtr_197 < 1) && ((qRoomHasPlayer(Room_indexes[0]) == true) && (qGetDifficulty() < 2))) { aShowHUDMessage(Message_strings[15]); @@ -3417,8 +3410,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -4110,8 +4101,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVEL_GOAL_COMPLETE: { - tOSIRISEVTLEVELGOALCOMPLETE *event_data = &data->evt_level_goal_complete; - // Script 001: INIT SoftWind if (qGoalCompleted(Goal_indexes[0]) == true) { aSoundPlayObject(Sound_indexes[0], Object_handles[27], 1.000000f); @@ -4212,8 +4201,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_PLAYER_MOVIE_END: { - tOSIRISEVTPLAYERMOVIEEND *event_data = &data->evt_player_movie_end; - // Script 082: INIT Random Ambient Stuff if ((ScriptActionCtr_082 < 1) && (1)) { aObjPlayAnim(Object_handles[0], 1, 3, 2.000000f, 1); @@ -4254,8 +4241,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_2027::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 053: IntroCamera-1.5 if ((ScriptActionCtr_053 < 1) && (1 == true)) { aMusicSetRegionAll(1); @@ -4276,8 +4261,6 @@ int16_t CustomObjectScript_2027::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0820::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 017: IntroCamera-2 if ((ScriptActionCtr_017 < 1) && (1 == true)) { aObjGhostSet(1, Object_handles[33]); @@ -4299,8 +4282,6 @@ int16_t CustomObjectScript_0820::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0831::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 018: IntroCamera-3 if ((ScriptActionCtr_018 < 1) && (1 == true)) { aObjGhostSet(1, Object_handles[34]); @@ -4331,8 +4312,6 @@ int16_t CustomObjectScript_0831::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0832::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 019: IntroCamera-4 if ((ScriptActionCtr_019 < 1) && (1 == true)) { aRoomSetFog(Room_indexes[8], 0.500000f, 0.150000f, 0.050000f, 1500.000000f); @@ -4362,8 +4341,6 @@ int16_t CustomObjectScript_0832::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0836::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 027: IntroCamera-5 (DISABLED) if ((ScriptActionCtr_027 < 1) && (0 == true)) { aObjGhostSet(0, Object_handles[32]); @@ -4406,8 +4383,6 @@ int16_t CustomObjectScript_0836::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0888::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 049: INIT Node 6 if (1) { aObjPlayAnim(data->me_handle, 1, 3, 2.000000f, 1); @@ -4427,8 +4402,6 @@ int16_t CustomObjectScript_0888::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0887::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 048: INIT Node 5 if (1) { aObjPlayAnim(data->me_handle, 1, 3, 2.000000f, 1); @@ -4448,8 +4421,6 @@ int16_t CustomObjectScript_0887::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0886::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 047: INIT Node 4 if (1) { aObjPlayAnim(data->me_handle, 1, 3, 2.000000f, 1); @@ -4463,8 +4434,6 @@ int16_t CustomObjectScript_0886::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 055: EF1 Part1 if ((ScriptActionCtr_055 < 1) && (1)) { aTurnOnSpew(Object_handles[102], -1, 2, 0.000000f, 0.000000f, 65536, 0, 2.000000f, 0.150000f, 20.000000f, @@ -4486,8 +4455,6 @@ int16_t CustomObjectScript_0886::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_182A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 046: INIT Node 3 if (1) { aObjPlayAnim(data->me_handle, 1, 3, 2.000000f, 1); @@ -4501,8 +4468,6 @@ int16_t CustomObjectScript_182A::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 167: EF1 Part2 if ((ScriptActionCtr_167 < 1) && (1)) { aTurnOnSpew(Object_handles[100], -1, 2, 0.000000f, 0.000000f, 65536, 0, 2.000000f, 0.150000f, 20.000000f, @@ -4530,8 +4495,6 @@ int16_t CustomObjectScript_182A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_088A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 045: INIT Node 2 if (1) { aObjPlayAnim(data->me_handle, 1, 3, 2.000000f, 1); @@ -4545,8 +4508,6 @@ int16_t CustomObjectScript_088A::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 168: EF1 Part3 if ((ScriptActionCtr_168 < 1) && (1)) { aTurnOnSpew(Object_handles[98], -1, 2, 0.000000f, 0.000000f, 65536, 0, 2.000000f, 0.150000f, 20.000000f, @@ -4574,8 +4535,6 @@ int16_t CustomObjectScript_088A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0889::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 044: INIT Node 1 if (1) { aObjPlayAnim(data->me_handle, 1, 3, 2.000000f, 1); @@ -4589,8 +4548,6 @@ int16_t CustomObjectScript_0889::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 169: EF1 Part4 if ((ScriptActionCtr_169 < 1) && (1)) { aTurnOnSpew(Object_handles[97], -1, 2, 0.000000f, 0.000000f, 65536, 0, 2.000000f, 0.150000f, 20.000000f, @@ -4624,8 +4581,6 @@ int16_t CustomObjectScript_188C::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 050: INIT Bomb if (1) { aUserFlagSet(0, 0); @@ -4741,8 +4696,6 @@ int16_t CustomObjectScript_188C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0885::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 056: EF1 Part5 if ((ScriptActionCtr_056 < 1) && (1)) { aTurnOnSpew(Object_handles[95], -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.200000f, 20.000000f, @@ -4762,8 +4715,6 @@ int16_t CustomObjectScript_0885::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_096D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 170: EF2 Start if (1) { aSetObjectTimer(Object_handles[103], 2.000000f, -1); @@ -4794,8 +4745,6 @@ int16_t CustomObjectScript_096D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0877::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 179: EFPart8 if ((ScriptActionCtr_179 < 1) && (1)) { aTurnOnSpew(Object_handles[112], -1, 2, 0.000000f, 0.000000f, 65536, 0, 2.200000f, 0.200000f, 20.000000f, @@ -4813,8 +4762,6 @@ int16_t CustomObjectScript_0877::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0878::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 178: EFPart7 if ((ScriptActionCtr_178 < 1) && (1)) { aObjKill(Object_handles[113], 1, 2, 2294000, 0.000000f, 0.200000f); @@ -4833,8 +4780,6 @@ int16_t CustomObjectScript_0878::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0879::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 177: EFPart6 if ((ScriptActionCtr_177 < 1) && (1)) { aObjKill(Object_handles[115], 1, 2, 2294000, 0.000000f, 0.700000f); @@ -4856,8 +4801,6 @@ int16_t CustomObjectScript_0879::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1171::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 176: EFPart5 if ((ScriptActionCtr_176 < 1) && (1)) { aDoorSetPos(Door_handles[5], 1.000000f); @@ -4883,8 +4826,6 @@ int16_t CustomObjectScript_1171::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_087A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 175: EFPart4 if ((ScriptActionCtr_175 < 1) && (1)) { aTurnOnSpew(Object_handles[125], -1, 2, 0.000000f, 0.000000f, 65536, 0, 2.000000f, 0.150000f, 20.000000f, @@ -4904,8 +4845,6 @@ int16_t CustomObjectScript_087A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_087B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 174: EFPart3 if ((ScriptActionCtr_174 < 1) && (1)) { aTurnOnSpew(Object_handles[126], -1, 2, 0.000000f, 0.000000f, 65536, 0, 2.000000f, 0.150000f, 20.000000f, @@ -4925,8 +4864,6 @@ int16_t CustomObjectScript_087B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_087C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 173: EFPart2 if ((ScriptActionCtr_173 < 1) && (1)) { aTurnOnSpew(Object_handles[127], -1, 2, 0.000000f, 0.000000f, 65536, 0, 2.000000f, 0.150000f, 20.000000f, @@ -4946,8 +4883,6 @@ int16_t CustomObjectScript_087C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_087D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 172: EFPart1 if ((ScriptActionCtr_172 < 1) && (1)) { aTurnOnSpew(Object_handles[128], -1, 2, 0.000000f, 0.000000f, 65536, 0, 2.000000f, 0.150000f, 20.000000f, @@ -4967,8 +4902,6 @@ int16_t CustomObjectScript_087D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1170::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 180: EF3 Start if (1) { aSetObjectTimer(Object_handles[129], 7.400000f, -1); @@ -5006,8 +4939,6 @@ int16_t CustomObjectScript_1170::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0988::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 189: EF3Part9 if ((ScriptActionCtr_189 < 1) && (1)) { aTurnOnSpew(Object_handles[129], -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.150000f, 6.000000f, @@ -5025,8 +4956,6 @@ int16_t CustomObjectScript_0988::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0981::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 188: EF3Part8 if ((ScriptActionCtr_188 < 1) && (1)) { aTurnOnSpew(Object_handles[130], -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.300000f, 0.160000f, 6.000000f, @@ -5050,8 +4979,6 @@ int16_t CustomObjectScript_0981::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0980::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 187: EF3Part7 if ((ScriptActionCtr_187 < 1) && (1)) { aObjKill(Object_handles[88], 1, 1, 2162832, 0.650000f, 0.650000f); @@ -5074,8 +5001,6 @@ int16_t CustomObjectScript_0980::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_097F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 186: EF3Part6 if ((ScriptActionCtr_186 < 1) && (1)) { aTurnOnSpew(Object_handles[132], -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.200000f, 6.000000f, @@ -5095,8 +5020,6 @@ int16_t CustomObjectScript_097F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_097E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 185: EF3Part5 if ((ScriptActionCtr_185 < 1) && (1)) { aTurnOnSpew(Object_handles[133], -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.200000f, 6.000000f, @@ -5116,8 +5039,6 @@ int16_t CustomObjectScript_097E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_097D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 184: EF3Part4 if ((ScriptActionCtr_184 < 1) && (1)) { aTurnOnSpew(Object_handles[134], -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.200000f, 6.000000f, @@ -5137,8 +5058,6 @@ int16_t CustomObjectScript_097D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_097C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 183: EF3Part3 if ((ScriptActionCtr_183 < 1) && (1)) { aTurnOnSpew(Object_handles[135], -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.200000f, 6.000000f, @@ -5158,8 +5077,6 @@ int16_t CustomObjectScript_097C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_117B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 182: EF3Part2 if ((ScriptActionCtr_182 < 1) && (1)) { aTurnOnSpew(Object_handles[136], -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.200000f, 6.000000f, @@ -5179,8 +5096,6 @@ int16_t CustomObjectScript_117B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_097A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 181: EF3Part1 if ((ScriptActionCtr_181 < 1) && (1)) { aTurnOnSpew(Object_handles[137], -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.200000f, 6.000000f, @@ -5200,8 +5115,6 @@ int16_t CustomObjectScript_097A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1984::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 198: EF4 Start if ((ScriptActionCtr_198 < 1) && (1)) { aObjSetLightingDist(Object_handles[143], 140.000000f); @@ -5228,8 +5141,6 @@ int16_t CustomObjectScript_1984::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0875::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 072: INIT LNipple 5 if (1) { aObjGhostSet(1, Object_handles[149]); @@ -5242,8 +5153,6 @@ int16_t CustomObjectScript_0875::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 064: Lightning Nipple 5 if (1) { aMiscShakeArea(data->me_handle, 40.000000f, 250.000000f); @@ -5268,8 +5177,6 @@ int16_t CustomObjectScript_0875::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0865::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 071: INIT LNipple 4 if (1) { aObjGhostSet(1, Object_handles[151]); @@ -5282,8 +5189,6 @@ int16_t CustomObjectScript_0865::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 063: Lightning Nipple 4 if (1) { aMiscShakeArea(data->me_handle, 40.000000f, 250.000000f); @@ -5308,8 +5213,6 @@ int16_t CustomObjectScript_0865::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0864::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 070: INIT LNipple 3 if (1) { aObjGhostSet(1, Object_handles[153]); @@ -5322,8 +5225,6 @@ int16_t CustomObjectScript_0864::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 062: Lightning Nipple 3 if (1) { aMiscShakeArea(data->me_handle, 40.000000f, 250.000000f); @@ -5348,8 +5249,6 @@ int16_t CustomObjectScript_0864::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0863::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 069: INIT LNipple 2 if (1) { aObjGhostSet(1, Object_handles[155]); @@ -5362,8 +5261,6 @@ int16_t CustomObjectScript_0863::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 061: Lightning Nipple 2 if (1) { aMiscShakeArea(data->me_handle, 40.000000f, 250.000000f); @@ -5388,8 +5285,6 @@ int16_t CustomObjectScript_0863::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0862::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 058: INIT LNipple 1 if (1) { aObjGhostSet(1, Object_handles[157]); @@ -5402,8 +5297,6 @@ int16_t CustomObjectScript_0862::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 057: Lightning Nipple 1 if (1) { aMiscShakeArea(data->me_handle, 40.000000f, 250.000000f); @@ -5428,8 +5321,6 @@ int16_t CustomObjectScript_0862::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08A1::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 068: Lightning Ball 5 if (1) { if (qObjCanSeePlayerAdvancedWithStore(4, 360, data->me_handle, 160.000000f, 1024) == true) { @@ -5461,8 +5352,6 @@ int16_t CustomObjectScript_08A1::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08A0::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 067: Lightning Ball 4 if (1) { if (qObjCanSeePlayerAdvancedWithStore(4, 360, data->me_handle, 160.000000f, 1024) == true) { @@ -5494,8 +5383,6 @@ int16_t CustomObjectScript_08A0::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_089F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 066: Lightning Ball 3 if (1) { if (qObjCanSeePlayerAdvancedWithStore(4, 360, data->me_handle, 160.000000f, 1024) == true) { @@ -5527,8 +5414,6 @@ int16_t CustomObjectScript_089F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_109E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 065: Lightning Ball 2 if (1) { if (qObjCanSeePlayerAdvancedWithStore(4, 360, data->me_handle, 160.000000f, 1024) == true) { @@ -5560,8 +5445,6 @@ int16_t CustomObjectScript_109E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_109C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 059: Lightning Ball 1 if (1) { if (qObjCanSeePlayerAdvancedWithStore(4, 360, data->me_handle, 160.000000f, 1024) == true) { @@ -5628,8 +5511,6 @@ int16_t CustomObjectScript_08AE::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_18A6::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 081: HangExplodeMe 8 if ((ScriptActionCtr_081 < 1) && (1)) { aObjKill(Object_handles[176], 1, 1, 2097392, 3.000000f, 3.000000f); @@ -5647,8 +5528,6 @@ int16_t CustomObjectScript_18A6::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_18A5::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 080: HangExplodeMe 7 if ((ScriptActionCtr_080 < 1) && (1)) { aObjKill(data->me_handle, 1, 1, 2097392, 1.000000f, 1.000000f); @@ -5666,8 +5545,6 @@ int16_t CustomObjectScript_18A5::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_18A4::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 079: HangExplodeMe 6 if ((ScriptActionCtr_079 < 1) && (1)) { aObjKill(data->me_handle, 1, 1, 2097392, 1.000000f, 1.000000f); @@ -5685,8 +5562,6 @@ int16_t CustomObjectScript_18A4::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_18A7::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 078: HangExplodeMe 5 if ((ScriptActionCtr_078 < 1) && (1)) { aObjKill(data->me_handle, 1, 1, 2097392, 1.000000f, 1.000000f); @@ -5704,8 +5579,6 @@ int16_t CustomObjectScript_18A7::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_18A9::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 077: HangExplodeMe 4 if ((ScriptActionCtr_077 < 1) && (1)) { aObjKill(data->me_handle, 1, 1, 2097392, 1.000000f, 1.000000f); @@ -5723,8 +5596,6 @@ int16_t CustomObjectScript_18A9::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_20A3::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 076: HangExplodeMe 3 if ((ScriptActionCtr_076 < 1) && (1)) { aObjKill(data->me_handle, 1, 1, 2097392, 1.000000f, 1.000000f); @@ -5742,8 +5613,6 @@ int16_t CustomObjectScript_20A3::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_28A2::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 075: HangExplodeMe 2 if ((ScriptActionCtr_075 < 1) && (1)) { aObjKill(data->me_handle, 1, 1, 2097392, 1.000000f, 1.000000f); @@ -5761,8 +5630,6 @@ int16_t CustomObjectScript_28A2::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_18A8::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 074: HangExplodeMe 1 if ((ScriptActionCtr_074 < 1) && (1)) { aObjKill(data->me_handle, 1, 1, 2097392, 1.000000f, 1.000000f); @@ -5794,8 +5661,6 @@ int16_t CustomObjectScript_08DA::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 096: INIT CityHS Guard-12 if (1) { aAISetMaxSpeed(data->me_handle, 0.000000f); @@ -5827,8 +5692,6 @@ int16_t CustomObjectScript_08D9::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 095: INIT CityHS Guard-11 if (1) { aAISetMaxSpeed(data->me_handle, 0.000000f); @@ -5860,8 +5723,6 @@ int16_t CustomObjectScript_08D8::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 094: INIT CityHS Guard-10 if (1) { aAISetMaxSpeed(data->me_handle, 0.000000f); @@ -5893,8 +5754,6 @@ int16_t CustomObjectScript_08D7::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 093: INIT CityHS Guard-9 if (1) { aAISetMaxSpeed(data->me_handle, 0.000000f); @@ -5926,8 +5785,6 @@ int16_t CustomObjectScript_08D6::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 092: INIT CityHS Guard-8 if (1) { aAISetMaxSpeed(data->me_handle, 0.000000f); @@ -5959,8 +5816,6 @@ int16_t CustomObjectScript_08D5::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 091: INIT CityHS Guard-7 if (1) { aAISetMaxSpeed(data->me_handle, 0.000000f); @@ -5992,8 +5847,6 @@ int16_t CustomObjectScript_08D4::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 090: INIT CityHS Guard-6 if (1) { aAISetMaxSpeed(data->me_handle, 0.000000f); @@ -6025,8 +5878,6 @@ int16_t CustomObjectScript_08D3::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 089: INIT CityHS Guard-5 if (1) { aAISetMaxSpeed(data->me_handle, 0.000000f); @@ -6058,8 +5909,6 @@ int16_t CustomObjectScript_08D2::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 088: INIT CityHS Guard-4 if (1) { aAISetTeam(196608, data->me_handle); @@ -6091,8 +5940,6 @@ int16_t CustomObjectScript_08D1::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 087: INIT CityHS Guard-3 if (1) { aAISetMaxSpeed(data->me_handle, 0.000000f); @@ -6124,8 +5971,6 @@ int16_t CustomObjectScript_08D0::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 086: INIT CityHS Guard-2 if (1) { aAISetMaxSpeed(data->me_handle, 0.000000f); @@ -6157,8 +6002,6 @@ int16_t CustomObjectScript_08CF::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 085: INIT CityHS Guard-1 if (1) { aAISetTeam(196608, data->me_handle); @@ -6422,8 +6265,6 @@ int16_t CustomObjectScript_402F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1871::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 138: Pissed off CoolGuards if ((ScriptActionCtr_138 < 1) && (1)) { aSetObjectTimer(Object_handles[241], 2.000000f, -1); @@ -6454,8 +6295,6 @@ int16_t CustomObjectScript_091A::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 137: Pissed off Guard-3 if ((ScriptActionCtr_137 < 1) && (1)) { aAISetTeam(0, data->me_handle); @@ -6487,8 +6326,6 @@ int16_t CustomObjectScript_0919::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 136: Pissed off Guard-2 if ((ScriptActionCtr_136 < 1) && (1)) { aAISetTeam(0, data->me_handle); @@ -6520,8 +6357,6 @@ int16_t CustomObjectScript_0918::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 131: Pissed off Guard-1 if ((ScriptActionCtr_131 < 1) && (1)) { aAISetTeam(0, data->me_handle); @@ -6559,8 +6394,6 @@ int16_t CustomObjectScript_0917::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0925::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 156: INIT Goofy Threshers-8 if (1) { aObjMakeInvuln(data->me_handle, 99999); @@ -6574,8 +6407,6 @@ int16_t CustomObjectScript_0925::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 149: Goofy Thresher Attack-8 if ((ScriptActionCtr_149 < 1) && (1)) { aObjDelete(Object_handles[244]); @@ -6597,8 +6428,6 @@ int16_t CustomObjectScript_0925::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0924::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 155: INIT Goofy Threshers-7 if (1) { aObjMakeInvuln(data->me_handle, 99999); @@ -6612,8 +6441,6 @@ int16_t CustomObjectScript_0924::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 148: Goofy Thresher Attack-7 if ((ScriptActionCtr_148 < 1) && (1)) { aObjDelete(Object_handles[245]); @@ -6635,8 +6462,6 @@ int16_t CustomObjectScript_0924::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0923::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 154: INIT Goofy Threshers-6 if (1) { aObjMakeInvuln(data->me_handle, 99999); @@ -6650,8 +6475,6 @@ int16_t CustomObjectScript_0923::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 147: Goofy Thresher Attack-6 if ((ScriptActionCtr_147 < 1) && (1)) { aObjDelete(Object_handles[246]); @@ -6673,8 +6496,6 @@ int16_t CustomObjectScript_0923::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0922::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 153: INIT Goofy Threshers-5 if (1) { aObjMakeInvuln(data->me_handle, 99999); @@ -6688,8 +6509,6 @@ int16_t CustomObjectScript_0922::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 146: Goofy Thresher Attack-5 if ((ScriptActionCtr_146 < 1) && (1)) { aObjDelete(Object_handles[247]); @@ -6711,8 +6530,6 @@ int16_t CustomObjectScript_0922::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0921::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 152: INIT Goofy Threshers-4 if (1) { aObjMakeInvuln(data->me_handle, 99999); @@ -6726,8 +6543,6 @@ int16_t CustomObjectScript_0921::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 145: Goofy Thresher Attack-4 if ((ScriptActionCtr_145 < 1) && (1)) { aObjDelete(Object_handles[248]); @@ -6749,8 +6564,6 @@ int16_t CustomObjectScript_0921::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1120::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 151: INIT Goofy Threshers-3 if (1) { aObjMakeInvuln(data->me_handle, 99999); @@ -6764,8 +6577,6 @@ int16_t CustomObjectScript_1120::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 144: Goofy Thresher Attack-3 if ((ScriptActionCtr_144 < 1) && (1)) { aObjDelete(Object_handles[249]); @@ -6787,8 +6598,6 @@ int16_t CustomObjectScript_1120::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_111F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 150: INIT Goofy Threshers-2 if (1) { aObjMakeInvuln(data->me_handle, 99999); @@ -6802,8 +6611,6 @@ int16_t CustomObjectScript_111F::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 143: Goofy Thresher Attack-2 if ((ScriptActionCtr_143 < 1) && (1)) { aObjDelete(Object_handles[250]); @@ -6825,8 +6632,6 @@ int16_t CustomObjectScript_111F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_111E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 139: INIT Goofy Threshers-1 if (1) { aObjMakeInvuln(data->me_handle, 99999); @@ -6840,8 +6645,6 @@ int16_t CustomObjectScript_111E::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 140: Goofy Thresher Attack-1 if ((ScriptActionCtr_140 < 1) && (1)) { aObjDelete(Object_handles[251]); @@ -6863,8 +6666,6 @@ int16_t CustomObjectScript_111E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_112E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 142: Ambush! if ((ScriptActionCtr_142 < 1) && (qObjCanSeePlayer(360, Object_handles[252], 140.000000f) == true)) { aGoalEnableDisable(1, Goal_indexes[7]); @@ -6980,8 +6781,6 @@ int16_t CustomObjectScript_0931::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_080F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 159: INIT GarbageFires if ((ScriptActionCtr_159 < 1) && ((ScriptActionCtr_142 > 0) == true)) { aObjSetLightingDist(Object_handles[143], 140.000000f); @@ -7027,8 +6826,6 @@ int16_t CustomObjectScript_0967::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 166: LastAmbush Part2 if ((ScriptActionCtr_166 < 1) && (1)) { aGoalCompleted(Goal_indexes[8], 1); @@ -7072,8 +6869,6 @@ int16_t CustomObjectScript_0966::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 165: LastAmbush if ((ScriptActionCtr_165 < 1) && (1)) { aSoundPlayObject(Sound_indexes[14], Object_handles[269], 1.000000f); @@ -7430,8 +7225,6 @@ int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0013::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 199: Final Countdown 3 Alternate if ((ScriptActionCtr_199 < 1) && ((ScriptActionCtr_192 > 0) == false)) { aSoundPlaySteaming("VoxMerc1Terminated.osf", 1.000000f); @@ -7453,8 +7246,6 @@ int16_t TriggerScript_0013::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0012::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 196: ReachedWasteDisposal if ((ScriptActionCtr_196 < 1) && ((qUserFlag(0) == true) && (1))) { aGoalCompleted(Goal_indexes[4], 1); @@ -7474,8 +7265,6 @@ int16_t TriggerScript_0012::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 127: HiddenEntry Side12 if ((ScriptActionCtr_127 < 1) && ((ScriptActionCtr_126 > 0) == false)) { aAIGoalFollowPathSimple(Object_handles[231], Path_indexes[34], 4352, -1, 0); @@ -7494,8 +7283,6 @@ int16_t TriggerScript_000F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 126: HiddenEntry Side11 if ((ScriptActionCtr_126 < 1) && ((ScriptActionCtr_127 > 0) == false)) { aAIGoalFollowPathSimple(Object_handles[231], Path_indexes[34], 4352, -1, 0); @@ -7514,8 +7301,6 @@ int16_t TriggerScript_000E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0011::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 129: HiddenEntry Side22 if ((ScriptActionCtr_129 < 1) && ((ScriptActionCtr_128 > 0) == false)) { aAIGoalFollowPathSimple(Object_handles[230], Path_indexes[36], 4352, -1, 0); @@ -7535,8 +7320,6 @@ int16_t TriggerScript_0011::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0010::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 128: HiddenEntry Side21 if ((ScriptActionCtr_128 < 1) && ((ScriptActionCtr_129 > 0) == false)) { aAIGoalFollowPathSimple(Object_handles[230], Path_indexes[36], 4352, -1, 0); diff --git a/scripts/Merc3.cpp b/scripts/Merc3.cpp index 97b1806e8..3f14653f5 100644 --- a/scripts/Merc3.cpp +++ b/scripts/Merc3.cpp @@ -175,577 +175,576 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0B83 : public BaseScript { +class CustomObjectScript_0B83 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0B85 : public BaseScript { +class CustomObjectScript_0B85 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1140 : public BaseScript { +class CustomObjectScript_1140 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1941 : public BaseScript { +class CustomObjectScript_1941 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0943 : public BaseScript { +class CustomObjectScript_0943 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0942 : public BaseScript { +class CustomObjectScript_0942 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0950 : public BaseScript { +class CustomObjectScript_0950 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0951 : public BaseScript { +class CustomObjectScript_0951 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_093A : public BaseScript { +class CustomObjectScript_093A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_193D : public BaseScript { +class CustomObjectScript_193D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_093B : public BaseScript { +class CustomObjectScript_093B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_192E : public BaseScript { +class CustomObjectScript_192E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_093C : public BaseScript { +class CustomObjectScript_093C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1318 : public BaseScript { +class CustomObjectScript_1318 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1317 : public BaseScript { +class CustomObjectScript_1317 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_190B : public BaseScript { +class CustomObjectScript_190B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_6909 : public BaseScript { +class CustomObjectScript_6909 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_191C : public BaseScript { +class CustomObjectScript_191C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_111D : public BaseScript { +class CustomObjectScript_111D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_110F : public BaseScript { +class CustomObjectScript_110F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1194 : public BaseScript { +class CustomObjectScript_1194 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11FA : public BaseScript { +class CustomObjectScript_11FA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0CB4 : public BaseScript { +class CustomObjectScript_0CB4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_20B0 : public BaseScript { +class CustomObjectScript_20B0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_136F : public BaseScript { +class CustomObjectScript_136F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_3090 : public BaseScript { +class CustomObjectScript_3090 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_30AE : public BaseScript { +class CustomObjectScript_30AE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_50FF : public BaseScript { +class CustomObjectScript_50FF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0987 : public BaseScript { +class CustomObjectScript_0987 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0989 : public BaseScript { +class CustomObjectScript_0989 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10FA : public BaseScript { +class CustomObjectScript_10FA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18FB : public BaseScript { +class CustomObjectScript_18FB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10FC : public BaseScript { +class CustomObjectScript_10FC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10F9 : public BaseScript { +class CustomObjectScript_10F9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10F8 : public BaseScript { +class CustomObjectScript_10F8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_D08A : public BaseScript { +class CustomObjectScript_D08A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2888 : public BaseScript { +class CustomObjectScript_2888 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09FD : public BaseScript { +class CustomObjectScript_09FD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_48C5 : public BaseScript { +class CustomObjectScript_48C5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09FC : public BaseScript { +class CustomObjectScript_09FC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08D6 : public BaseScript { +class CustomObjectScript_08D6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09FB : public BaseScript { +class CustomObjectScript_09FB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08DF : public BaseScript { +class CustomObjectScript_08DF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_105C : public BaseScript { +class CustomObjectScript_105C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08E8 : public BaseScript { +class CustomObjectScript_08E8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_60EB : public BaseScript { +class CustomObjectScript_60EB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_28EC : public BaseScript { +class CustomObjectScript_28EC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_118B : public BaseScript { +class CustomObjectScript_118B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_118D : public BaseScript { +class CustomObjectScript_118D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_118C : public BaseScript { +class CustomObjectScript_118C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_098E : public BaseScript { +class CustomObjectScript_098E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11F7 : public BaseScript { +class CustomObjectScript_11F7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0983 : public BaseScript { +class CustomObjectScript_0983 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1BB9 : public BaseScript { +class CustomObjectScript_1BB9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_13AD : public BaseScript { +class CustomObjectScript_13AD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_13AC : public BaseScript { +class CustomObjectScript_13AC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_13AB : public BaseScript { +class CustomObjectScript_13AB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_13AA : public BaseScript { +class CustomObjectScript_13AA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A2E : public BaseScript { +class CustomObjectScript_0A2E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A30 : public BaseScript { +class CustomObjectScript_0A30 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A33 : public BaseScript { +class CustomObjectScript_0A33 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0982 : public BaseScript { +class CustomObjectScript_0982 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_12DF : public BaseScript { +class CustomObjectScript_12DF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_12E1 : public BaseScript { +class CustomObjectScript_12E1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_12DE : public BaseScript { +class CustomObjectScript_12DE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1289 : public BaseScript { +class CustomObjectScript_1289 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1290 : public BaseScript { +class CustomObjectScript_1290 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_128E : public BaseScript { +class CustomObjectScript_128E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_128C : public BaseScript { +class CustomObjectScript_128C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_128A : public BaseScript { +class CustomObjectScript_128A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18A0 : public BaseScript { +class CustomObjectScript_18A0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083D : public BaseScript { +class CustomObjectScript_083D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0B86 : public BaseScript { +class CustomObjectScript_0B86 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0B80 : public BaseScript { +class CustomObjectScript_0B80 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0B82 : public BaseScript { +class CustomObjectScript_0B82 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_109F : public BaseScript { +class CustomObjectScript_109F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1153 : public BaseScript { +class CustomObjectScript_1153 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_115E : public BaseScript { +class CustomObjectScript_115E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_095F : public BaseScript { +class CustomObjectScript_095F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0960 : public BaseScript { +class CustomObjectScript_0960 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0961 : public BaseScript { +class CustomObjectScript_0961 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0022 : public BaseScript { +class TriggerScript_0022 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0023 : public BaseScript { +class TriggerScript_0023 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0021 : public BaseScript { +class TriggerScript_0021 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001E : public BaseScript { +class TriggerScript_001E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001F : public BaseScript { +class TriggerScript_001F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0020 : public BaseScript { +class TriggerScript_0020 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0025 : public BaseScript { +class TriggerScript_0025 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0024 : public BaseScript { +class TriggerScript_0024 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001D : public BaseScript { +class TriggerScript_001D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0014 : public BaseScript { +class TriggerScript_0014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0017 : public BaseScript { +class TriggerScript_0017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0018 : public BaseScript { +class TriggerScript_0018 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001C : public BaseScript { +class TriggerScript_001C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0019 : public BaseScript { +class TriggerScript_0019 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001A : public BaseScript { +class TriggerScript_001A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001B : public BaseScript { +class TriggerScript_001B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1953,8 +1952,8 @@ bool qBeamHittingPlayer(int beam1_handle, int beam2_handle, float radius) { // see if anything is in the way ray_info ray; int flags, fate; - vector start_pos, end_pos, landing_pos; - int start_room, landing_room; + vector start_pos, end_pos; + int start_room; Obj_Value(beam1_handle, VF_GET, OBJV_V_POS, &start_pos); Obj_Value(beam1_handle, VF_GET, OBJV_I_ROOMNUM, &start_room); @@ -2008,8 +2007,8 @@ bool qBeamHittingPlayer2(int beam1_handle, int beam2_handle, float radius) { // see if anything is in the way ray_info ray; int flags, fate; - vector start_pos, end_pos, landing_pos; - int start_room, landing_room; + vector start_pos, end_pos; + int start_room; Obj_Value(beam1_handle, VF_GET, OBJV_V_POS, &start_pos); Obj_Value(beam1_handle, VF_GET, OBJV_I_ROOMNUM, &start_room); @@ -4133,10 +4132,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -4163,8 +4158,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 013: Level INIT (Inventory) if ((ScriptActionCtr_013 < 1) && (1)) { aAddObjectToInventoryNamed(Object_handles[23], qPlayerClosest(Object_handles[23], -1), Message_strings[0], 0); @@ -4196,8 +4189,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -5917,8 +5908,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVEL_GOAL_COMPLETE: { - tOSIRISEVTLEVELGOALCOMPLETE *event_data = &data->evt_level_goal_complete; - // Script 113: Level OBJECTIVE: Check if all Bombs Planted if ((ScriptActionCtr_113 < 1) && ((qGoalCompleted(Goal_indexes[7]) == true) && (qGoalCompleted(Goal_indexes[9]) == true) && @@ -5947,8 +5936,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0B83::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 133: Level START (Intro Cinematic Cut 2) if (1) { aObjPlayAnim(Object_handles[25], 0, 140, 24.000000f, 0); @@ -5973,8 +5960,6 @@ int16_t CustomObjectScript_0B83::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0B85::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 134: Level START (Intro Cinematic Cut 3) if (1) { aStoreObjectInPositionClipboard(Object_handles[28]); @@ -6815,8 +6800,6 @@ int16_t CustomObjectScript_50FF::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 032: Hazardous Waste: Guard Movie Cut 2 if (1) { aUserVarInc(1); @@ -6843,8 +6826,6 @@ int16_t CustomObjectScript_50FF::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0987::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 033: Hazardous Waste: Guard Movie Cut 3 if (qUserVarValueInt(1) < 5) { aUserVarInc(1); @@ -6874,8 +6855,6 @@ int16_t CustomObjectScript_0987::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0989::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 034: Hazardous Waste: Guard Movie Cut 4 if (qUserVarValueInt(1) < 6) { aUserVarInc(1); @@ -7506,8 +7485,6 @@ int16_t CustomObjectScript_0983::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 166: NewCaptain: PowerUp if ((ScriptActionCtr_166 < 1) && (1)) { aObjMakeVulnerable(Object_handles[19]); @@ -7527,8 +7504,6 @@ int16_t CustomObjectScript_0983::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1BB9::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 182: New Captain: Ghost if ((qObjShields(Object_handles[19]) > 0.000000f) && (qObjExists(Object_handles[19]) == true)) { aEmitSparks(30.000000f, Object_handles[19]); @@ -7550,8 +7525,6 @@ int16_t CustomObjectScript_1BB9::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_13AD::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 183: New Captain: Move to New Spot And Spark if ((qObjShields(Object_handles[19]) > 0.000000f) && (qObjExists(Object_handles[19]) == true)) { aUserVarSet(22, qRandomValue(0.000000f, 9.500000f)); @@ -7617,8 +7590,6 @@ int16_t CustomObjectScript_13AD::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_13AC::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 184: New Captain: UnCloak/UnGhost if ((qObjShields(Object_handles[19]) > 0.000000f) && (qObjExists(Object_handles[19]) == true)) { aMiscShakeArea(Object_handles[19], 40.000000f, 200.000000f); @@ -7639,8 +7610,6 @@ int16_t CustomObjectScript_13AC::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_13AB::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 185: New Captain: FireWeapon if ((qObjShields(Object_handles[19]) > 0.000000f) && (qObjExists(Object_handles[19]) == true)) { if (qRandomChance(0.300000f) == true) { @@ -7664,8 +7633,6 @@ int16_t CustomObjectScript_13AB::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_13AA::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 186: New Captain: Cloak if ((qObjShields(Object_handles[19]) > 0.000000f) && (qObjExists(Object_handles[19]) == true)) { aSoundPlayObject(Sound_indexes[10], Object_handles[19], 1.000000f); @@ -7684,8 +7651,6 @@ int16_t CustomObjectScript_13AA::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0A2E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 097: Captain Gadget: Intro Cinematic Cut 3 if (1) { aStoreObjectInPositionClipboard(Object_handles[165]); @@ -7712,8 +7677,6 @@ int16_t CustomObjectScript_0A2E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0A30::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 098: Captain Gadget: Intro Cinematic Cut 4 if (1) { aStoreObjectInPositionClipboard(Object_handles[167]); @@ -7838,8 +7801,6 @@ int16_t CustomObjectScript_0982::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 196: First Mate: All Destroyed if (1) { aDoorLockUnlock(0, Door_handles[8]); @@ -7861,8 +7822,6 @@ int16_t CustomObjectScript_0982::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_12DF::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 187: First Mate: Entered Room if ((ScriptActionCtr_187 < 1) && (1)) { aCloakObject(Object_handles[22], 99999.000000f); @@ -7891,8 +7850,6 @@ int16_t CustomObjectScript_12DF::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_12E1::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 202: First Mate: Ghost (one time) if ((ScriptActionCtr_202 < 1) && (1)) { aObjGhostSet(1, Object_handles[22]); @@ -7934,8 +7891,6 @@ int16_t CustomObjectScript_12E1::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_12DE::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 190: First Mate: ChooseUnWiggle if (1) { aUserVarSet(24, qRandomValue(0.000000f, 5.000000f)); @@ -8010,8 +7965,6 @@ int16_t CustomObjectScript_1289::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 191: First Mate: Timer 1 if (1) { if ((qUserVarValue(24) > 1.000000f) && (1)) { @@ -8053,8 +8006,6 @@ int16_t CustomObjectScript_1290::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 195: First Mate: Timer 5 if (1) { if ((qUserVarValue(24) <= 4.000000f) && (1)) { @@ -8096,8 +8047,6 @@ int16_t CustomObjectScript_128E::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 194: First Mate: Timer 4 if (1) { if ((qUserVarValue(24) > 4.000000f) || (qUserVarValue(24) <= 3.000000f)) { @@ -8139,8 +8088,6 @@ int16_t CustomObjectScript_128C::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 193: First Mate: Timer 3 if (1) { if ((qUserVarValue(24) > 3.000000f) || (qUserVarValue(24) <= 2.000000f)) { @@ -8182,8 +8129,6 @@ int16_t CustomObjectScript_128A::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 192: First Mate: Timer 2 if (1) { if ((qUserVarValue(24) > 2.000000f) || (qUserVarValue(24) <= 1.000000f)) { @@ -8259,8 +8204,6 @@ int16_t CustomObjectScript_083D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0B86::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 130: Captain and Trooper Cinematic if (1) { aStoreObjectInPositionClipboard(Object_handles[206]); @@ -8285,8 +8228,6 @@ int16_t CustomObjectScript_0B86::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0B80::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 131: Captain and Trooper Cinematic Cut 2 if (1) { aStoreObjectInPositionClipboard(Object_handles[208]); @@ -8310,8 +8251,6 @@ int16_t CustomObjectScript_0B80::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0B82::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 148: Captain and Trooper Cinematic Done if (1) { aObjGhostSet(1, Object_handles[7]); @@ -8353,8 +8292,6 @@ int16_t CustomObjectScript_109F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1153::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 155: Escape Chute: Junction End Cinematic if (1) { aSetLevelTimer(1.500000f, 43); @@ -8579,8 +8516,6 @@ int16_t TriggerScript_0010::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0002::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 030: Hazardous Waste: Guard Movie if ((ScriptActionCtr_030 < 1) && (1)) { aUserVarSet(1, 1.000000f); @@ -8702,8 +8637,6 @@ int16_t TriggerScript_0006::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0007::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 072: Shark Security 0: Activate Guard AI if ((ScriptActionCtr_072 < 1) && (1)) { aAISetState(1, Object_handles[15]); @@ -8727,8 +8660,6 @@ int16_t TriggerScript_0007::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0008::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 051: Level Sequencing: Lower Station Lockdown if ((ScriptActionCtr_051 < 1) && (1)) { aObjPlayAnim(Object_handles[101], 0, 1, qUserVarValue(6), 0); @@ -8826,8 +8757,6 @@ int16_t TriggerScript_0024::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 094: Captain Gadget: Intro Cinematic Cut 1 - Old if ((ScriptActionCtr_094 < 1) && (1 == false)) { aComplexCinematicStart(); @@ -8906,8 +8835,6 @@ int16_t TriggerScript_001D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 180: First Mate: INTRO if ((ScriptActionCtr_180 < 1) && (1)) { aCinematicSimple(Path_indexes[21], Message_strings[52], Object_handles[22], 6.000000f, 1); @@ -8927,8 +8854,6 @@ int16_t TriggerScript_000D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 129: Captain and Trooper Init Cinematic if ((ScriptActionCtr_129 < 1) && (1)) { aSetLevelTimer(3.000000f, 34); @@ -9008,8 +8933,6 @@ int16_t TriggerScript_000F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0014::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 152: Exit if ((ScriptActionCtr_152 < 1) && (1)) { aStartEndlevelSequence(Object_handles[213], Path_indexes[26], 8.000000f, Message_strings[2]); diff --git a/scripts/Merc4.cpp b/scripts/Merc4.cpp index e5bab276d..f6c2928f7 100644 --- a/scripts/Merc4.cpp +++ b/scripts/Merc4.cpp @@ -98,197 +98,196 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0811 : public BaseScript { +class CustomObjectScript_0811 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0804 : public BaseScript { +class CustomObjectScript_0804 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0803 : public BaseScript { +class CustomObjectScript_0803 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_3198 : public BaseScript { +class CustomObjectScript_3198 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_099A : public BaseScript { +class CustomObjectScript_099A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_099E : public BaseScript { +class CustomObjectScript_099E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09A0 : public BaseScript { +class CustomObjectScript_09A0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_080A : public BaseScript { +class CustomObjectScript_080A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09AC : public BaseScript { +class CustomObjectScript_09AC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1138 : public BaseScript { +class CustomObjectScript_1138 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11B2 : public BaseScript { +class CustomObjectScript_11B2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_31B7 : public BaseScript { +class CustomObjectScript_31B7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11D1 : public BaseScript { +class CustomObjectScript_11D1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09D2 : public BaseScript { +class CustomObjectScript_09D2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0014 : public BaseScript { +class TriggerScript_0014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -860,7 +859,7 @@ void aKillBotsNearObj(int objhandle) { int type; int scan_objs[MAX_SCAN_OBJECTS]; int n_scan; - int n, i; + int i; uint16_t id; if (!qObjExists(objhandle)) @@ -927,7 +926,6 @@ void aClearTeleporterArea(int desthandle, int objhandle) { vector pos; matrix orient; int type; - int n, i; if (!qObjExists(objhandle)) return; @@ -1847,10 +1845,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -1877,8 +1871,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 018: Check if any Maws have been broken if (qUserFlag(18) == false) { if ((qUserFlag(3) == false) && (qPortalIsOn(1, Room_indexes[13]) == false)) { @@ -1938,8 +1930,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); diff --git a/scripts/Merc6.cpp b/scripts/Merc6.cpp index b36f186a2..fca85abcb 100644 --- a/scripts/Merc6.cpp +++ b/scripts/Merc6.cpp @@ -109,252 +109,251 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1006 : public BaseScript { +class CustomObjectScript_1006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0841 : public BaseScript { +class CustomObjectScript_0841 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0840 : public BaseScript { +class CustomObjectScript_0840 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0864 : public BaseScript { +class CustomObjectScript_0864 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_186D : public BaseScript { +class CustomObjectScript_186D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_20A3 : public BaseScript { +class CustomObjectScript_20A3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08A5 : public BaseScript { +class CustomObjectScript_08A5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08A6 : public BaseScript { +class CustomObjectScript_08A6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08A7 : public BaseScript { +class CustomObjectScript_08A7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_403E : public BaseScript { +class CustomObjectScript_403E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_783F : public BaseScript { +class CustomObjectScript_783F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1084 : public BaseScript { +class CustomObjectScript_1084 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0885 : public BaseScript { +class CustomObjectScript_0885 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1086 : public BaseScript { +class CustomObjectScript_1086 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2046 : public BaseScript { +class CustomObjectScript_2046 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08A8 : public BaseScript { +class CustomObjectScript_08A8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08A9 : public BaseScript { +class CustomObjectScript_08A9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08B9 : public BaseScript { +class CustomObjectScript_08B9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_5847 : public BaseScript { +class CustomObjectScript_5847 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1048 : public BaseScript { +class CustomObjectScript_1048 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_104A : public BaseScript { +class CustomObjectScript_104A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_108E : public BaseScript { +class CustomObjectScript_108E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1827 : public BaseScript { +class CustomObjectScript_1827 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001A : public BaseScript { +class TriggerScript_001A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0018 : public BaseScript { +class TriggerScript_0018 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0019 : public BaseScript { +class TriggerScript_0019 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0014 : public BaseScript { +class TriggerScript_0014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0017 : public BaseScript { +class TriggerScript_0017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1922,10 +1921,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -1952,8 +1947,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 066: Check Number of Welders Killed if ((ScriptActionCtr_066 < 1) && (qUserVarValueInt(4) == 4)) { aGoalCompleted(Goal_indexes[0], 1); @@ -2007,8 +2000,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -3003,8 +2994,6 @@ int16_t CustomObjectScript_783F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1084::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_DAMAGED: { - tOSIRISEVTDAMAGED *event_data = &data->evt_damaged; - // Script 077: Crate #1 Damaged if (qUserFlag(15) == true) { if (qRandomValue(1.000000f, 100.000000f) < 50.000000f) { @@ -3044,8 +3033,6 @@ int16_t CustomObjectScript_1084::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0885::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_DAMAGED: { - tOSIRISEVTDAMAGED *event_data = &data->evt_damaged; - // Script 079: Crate #2 Damaged if (qUserFlag(15) == true) { if (qRandomValue(1.000000f, 100.000000f) < 50.000000f) { @@ -3085,8 +3072,6 @@ int16_t CustomObjectScript_0885::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1086::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_DAMAGED: { - tOSIRISEVTDAMAGED *event_data = &data->evt_damaged; - // Script 080: Crate #3 Damaged if (qUserFlag(15) == true) { if (qRandomValue(1.000000f, 100.000000f) < 50.000000f) { @@ -3381,8 +3366,6 @@ int16_t CustomObjectScript_108E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1827::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 039: Reactor dies if ((ScriptActionCtr_039 < 1) && (qObjShields(data->me_handle) <= 0.000000f)) { aObjPlayAnim(data->me_handle, 0, 0, 1.000000f, 0); diff --git a/scripts/Merc7.cpp b/scripts/Merc7.cpp index 2005562a5..011fa9580 100644 --- a/scripts/Merc7.cpp +++ b/scripts/Merc7.cpp @@ -144,427 +144,426 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0885 : public BaseScript { +class CustomObjectScript_0885 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0884 : public BaseScript { +class CustomObjectScript_0884 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0903 : public BaseScript { +class CustomObjectScript_0903 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0902 : public BaseScript { +class CustomObjectScript_0902 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0901 : public BaseScript { +class CustomObjectScript_0901 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1025 : public BaseScript { +class CustomObjectScript_1025 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_103B : public BaseScript { +class CustomObjectScript_103B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1038 : public BaseScript { +class CustomObjectScript_1038 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2022 : public BaseScript { +class CustomObjectScript_2022 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10AF : public BaseScript { +class CustomObjectScript_10AF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_20AA : public BaseScript { +class CustomObjectScript_20AA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1031 : public BaseScript { +class CustomObjectScript_1031 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0833 : public BaseScript { +class CustomObjectScript_0833 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0951 : public BaseScript { +class CustomObjectScript_0951 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0952 : public BaseScript { +class CustomObjectScript_0952 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0953 : public BaseScript { +class CustomObjectScript_0953 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0954 : public BaseScript { +class CustomObjectScript_0954 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_095F : public BaseScript { +class CustomObjectScript_095F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0960 : public BaseScript { +class CustomObjectScript_0960 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0961 : public BaseScript { +class CustomObjectScript_0961 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0962 : public BaseScript { +class CustomObjectScript_0962 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0869 : public BaseScript { +class CustomObjectScript_0869 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0963 : public BaseScript { +class CustomObjectScript_0963 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0964 : public BaseScript { +class CustomObjectScript_0964 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0965 : public BaseScript { +class CustomObjectScript_0965 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0966 : public BaseScript { +class CustomObjectScript_0966 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0995 : public BaseScript { +class CustomObjectScript_0995 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0994 : public BaseScript { +class CustomObjectScript_0994 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0993 : public BaseScript { +class CustomObjectScript_0993 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0992 : public BaseScript { +class CustomObjectScript_0992 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1191 : public BaseScript { +class CustomObjectScript_1191 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083D : public BaseScript { +class CustomObjectScript_083D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_103C : public BaseScript { +class CustomObjectScript_103C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_103E : public BaseScript { +class CustomObjectScript_103E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0841 : public BaseScript { +class CustomObjectScript_0841 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_097A : public BaseScript { +class CustomObjectScript_097A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0997 : public BaseScript { +class CustomObjectScript_0997 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0996 : public BaseScript { +class CustomObjectScript_0996 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0805 : public BaseScript { +class CustomObjectScript_0805 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0804 : public BaseScript { +class CustomObjectScript_0804 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0998 : public BaseScript { +class CustomObjectScript_0998 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_087E : public BaseScript { +class CustomObjectScript_087E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1834 : public BaseScript { +class CustomObjectScript_1834 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1877 : public BaseScript { +class CustomObjectScript_1877 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1078 : public BaseScript { +class CustomObjectScript_1078 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1070 : public BaseScript { +class CustomObjectScript_1070 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2075 : public BaseScript { +class CustomObjectScript_2075 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2076 : public BaseScript { +class CustomObjectScript_2076 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2863 : public BaseScript { +class CustomObjectScript_2863 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_207A : public BaseScript { +class CustomObjectScript_207A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_206D : public BaseScript { +class CustomObjectScript_206D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1079 : public BaseScript { +class CustomObjectScript_1079 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09BF : public BaseScript { +class CustomObjectScript_09BF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09BE : public BaseScript { +class CustomObjectScript_09BE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09BD : public BaseScript { +class CustomObjectScript_09BD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09BC : public BaseScript { +class CustomObjectScript_09BC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1071 : public BaseScript { +class CustomObjectScript_1071 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09CA : public BaseScript { +class CustomObjectScript_09CA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C9 : public BaseScript { +class CustomObjectScript_09C9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C8 : public BaseScript { +class CustomObjectScript_09C8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C7 : public BaseScript { +class CustomObjectScript_09C7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C6 : public BaseScript { +class CustomObjectScript_09C6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C5 : public BaseScript { +class CustomObjectScript_09C5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C4 : public BaseScript { +class CustomObjectScript_09C4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C3 : public BaseScript { +class CustomObjectScript_09C3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C2 : public BaseScript { +class CustomObjectScript_09C2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_286E : public BaseScript { +class CustomObjectScript_286E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -3303,10 +3302,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -3333,8 +3328,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 037: Start Bomb Sequence if ((ScriptActionCtr_037 < 1) && ((qUserFlag(7) == true) && (qRoomHasPlayer(Room_indexes[11]) == true))) { aGoalCompleted(Goal_indexes[4], 1); @@ -3348,8 +3341,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -3883,8 +3874,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0885::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 088: IntroCam-2 if ((ScriptActionCtr_088 < 1) && (1)) { aCinematicSimple(Path_indexes[1], Message_strings[1], Object_handles[5], 9.000000f, 1); @@ -3901,8 +3890,6 @@ int16_t CustomObjectScript_0885::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0884::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 089: IntroCam-3 if ((ScriptActionCtr_089 < 1) && (1)) { aTurnOnSpew(Object_handles[6], -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.100000f, 0.100000f, -1.000000f, 3.000000f, @@ -4173,8 +4160,6 @@ int16_t CustomObjectScript_1031::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0833::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 018: ElevDroids MakeNew if (1) { if (qRandomChance(0.500000f) == true) { @@ -4196,8 +4181,6 @@ int16_t CustomObjectScript_0833::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0951::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 010: ElevLoPart2 if (1) { aMiscShakeArea(data->me_handle, 30.000000f, 300.000000f); @@ -4220,8 +4203,6 @@ int16_t CustomObjectScript_0951::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0952::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 011: ElevLoPart3 if (1) { aPortalRenderSet(0, 1, Room_indexes[3], 1); @@ -4245,8 +4226,6 @@ int16_t CustomObjectScript_0952::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0953::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 014: ElevLoPart4 if (1) { aTurnOnSpew(Object_handles[56], -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.100000f, 8.000000f, 3.000000f, @@ -4276,8 +4255,6 @@ int16_t CustomObjectScript_0953::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0954::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 015: ElevLoPart5 if (1) { aPortalRenderSet(0, 1, Room_indexes[5], 1); @@ -4295,8 +4272,6 @@ int16_t CustomObjectScript_0954::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_095F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 060: ElevHiUpPart2 if (1) { aMiscShakeArea(data->me_handle, 30.000000f, 300.000000f); @@ -4319,8 +4294,6 @@ int16_t CustomObjectScript_095F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0960::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 061: ElevHiUpPart3 if (1) { aPortalRenderSet(0, 1, Room_indexes[2], 1); @@ -4344,8 +4317,6 @@ int16_t CustomObjectScript_0960::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0961::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 062: ElevHiUpPart4 if (1) { aTurnOnSpew(Object_handles[59], -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.100000f, 8.000000f, 3.000000f, @@ -4375,8 +4346,6 @@ int16_t CustomObjectScript_0961::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0962::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 063: ElevHiUpPart5 if (1) { aPortalRenderSet(0, 0, Room_indexes[7], 1); @@ -4394,8 +4363,6 @@ int16_t CustomObjectScript_0962::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0869::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 067: ElevDroids Make AnotherTower if (1) { aSetObjectTimer(Object_handles[61], 40.000000f, -1); @@ -4413,8 +4380,6 @@ int16_t CustomObjectScript_0869::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0963::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 101: ElevHiDnPart2 if (1) { aMiscShakeArea(data->me_handle, 30.000000f, 300.000000f); @@ -4437,8 +4402,6 @@ int16_t CustomObjectScript_0963::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0964::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 102: ElevHiDnPart3 if (1) { aPortalRenderSet(0, 1, Room_indexes[1], 1); @@ -4462,8 +4425,6 @@ int16_t CustomObjectScript_0964::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0965::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 103: ElevHiDnPart4 if (1) { aTurnOnSpew(Object_handles[64], -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.100000f, 8.000000f, 3.000000f, @@ -4493,8 +4454,6 @@ int16_t CustomObjectScript_0965::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0966::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 104: ElevHiDnPart5 if (1) { aPortalRenderSet(0, 0, Room_indexes[9], 1); @@ -4512,8 +4471,6 @@ int16_t CustomObjectScript_0966::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0995::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 031: FIRE! if (((ScriptActionCtr_027 > 0) == true) && ((ScriptActionCtr_026 > 0) == true) && ((ScriptActionCtr_025 > 0) == true) && ((ScriptActionCtr_023 > 0) == true)) { @@ -4540,8 +4497,6 @@ int16_t CustomObjectScript_0995::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0994::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 030: Napalm Box Fire 2B if (1) { aSetObjectOnFire(data->me_handle, 99999.000000f, 0.000000f); @@ -4562,8 +4517,6 @@ int16_t CustomObjectScript_0994::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0993::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 029: Napalm Box Fire 2A if (1) { aSetObjectOnFire(data->me_handle, 99999.000000f, 0.000000f); @@ -4584,8 +4537,6 @@ int16_t CustomObjectScript_0993::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0992::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 028: Napalm Box Fire 1B if (1) { aSetObjectOnFire(data->me_handle, 99999.000000f, 0.000000f); @@ -4606,8 +4557,6 @@ int16_t CustomObjectScript_0992::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1191::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 024: Napalm Box Fire 1A if (1) { aSetObjectOnFire(data->me_handle, 99999.000000f, 0.000000f); @@ -4728,8 +4677,6 @@ int16_t CustomObjectScript_0841::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_097A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 112: FireOut! if (1) { aSoundStopObj(Object_handles[68]); @@ -4748,8 +4695,6 @@ int16_t CustomObjectScript_097A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0997::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 109: DroidsFoughtFireGoHome 2 if ((ScriptActionCtr_109 < 1) && (1)) { aSetObjectTimer(Object_handles[81], 3.000000f, -1); @@ -4811,8 +4756,6 @@ int16_t CustomObjectScript_0997::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0996::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 035: DroidsFoughtFireGoHome 1 if ((ScriptActionCtr_035 < 1) && (1)) { aSetObjectTimer(Object_handles[81], 3.000000f, -1); @@ -5064,8 +5007,6 @@ int16_t CustomObjectScript_1834::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 022: End Boss - Cinematic End if ((ScriptActionCtr_022 < 1) && (1)) { aShowHUDMessage(Message_strings[11]); @@ -5083,8 +5024,6 @@ int16_t CustomObjectScript_1834::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1877::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 046: Suzuki Cam 3 if ((ScriptActionCtr_046 < 1) && (1)) { aObjPlayAnim(Object_handles[116], 0, 54, 6.000000f, 0); @@ -5102,8 +5041,6 @@ int16_t CustomObjectScript_1877::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1078::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 049: Suzuki Cam 2 if ((ScriptActionCtr_049 < 1) && (1)) { aStoreObjectInPositionClipboard(Object_handles[120]); @@ -5123,8 +5060,6 @@ int16_t CustomObjectScript_1078::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1070::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 048: Suzuki Cam 4 if ((ScriptActionCtr_048 < 1) && (1)) { aObjGhostSet(0, Object_handles[108]); @@ -5153,8 +5088,6 @@ int16_t CustomObjectScript_1070::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_2075::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 077: Suzuki Cam 4 Part0 if (1) { aEmitSparks(50.000000f, data->me_handle); @@ -5179,8 +5112,6 @@ int16_t CustomObjectScript_2075::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_2076::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 057: Suzuki Cam 4 Part4 if (1) { aTurnOnSpew(Object_handles[124], -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.300000f, 0.100000f, 10.000000f, @@ -5206,8 +5137,6 @@ int16_t CustomObjectScript_2076::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_2863::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 056: Suzuki Cam 4 Part3 if (1) { aObjKill(data->me_handle, 1, 2, 2293876, 1.900000f, 1.900000f); @@ -5234,8 +5163,6 @@ int16_t CustomObjectScript_2863::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_207A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 055: Suzuki Cam 4 Part2 if (1) { aObjKill(data->me_handle, 1, 2, 2293876, 1.900000f, 1.900000f); @@ -5258,8 +5185,6 @@ int16_t CustomObjectScript_207A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_206D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 054: Suzuki Cam 4 Part1 if (1) { aObjSetLightingDist(Object_handles[111], 80.000000f); @@ -5280,8 +5205,6 @@ int16_t CustomObjectScript_206D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1079::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 047: Suzuki Cam 5 if ((ScriptActionCtr_047 < 1) && (1)) { aSetObjectTimer(Object_handles[131], 2.500000f, -1); @@ -5307,8 +5230,6 @@ int16_t CustomObjectScript_1079::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09BF::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 076: Suzuki Cam 5 Part4 if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.300000f, 0.100000f, 5.000000f, 8.000000f, @@ -5326,8 +5247,6 @@ int16_t CustomObjectScript_09BF::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09BE::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 071: Suzuki Cam 5 Part3 if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.300000f, 0.100000f, 5.000000f, 10.000000f, @@ -5345,8 +5264,6 @@ int16_t CustomObjectScript_09BE::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09BD::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 070: Suzuki Cam 5 Part2 if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.300000f, 0.100000f, 5.000000f, 30.000000f, @@ -5366,8 +5283,6 @@ int16_t CustomObjectScript_09BD::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09BC::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 069: Suzuki Cam 5 Part1 if (1) { aObjSetMovementType(Object_handles[116], 1); @@ -5390,8 +5305,6 @@ int16_t CustomObjectScript_09BC::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1071::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 051: Suzuki Cam 6 if ((ScriptActionCtr_051 < 1) && (1)) { aMiscViewerShake(100.000000f); @@ -5430,8 +5343,6 @@ int16_t CustomObjectScript_1071::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09CA::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 086: Suzuki Cam 6 Part10 if (1) { aTurnOnSpew(Object_handles[148], -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.100000f, 5.000000f, @@ -5455,8 +5366,6 @@ int16_t CustomObjectScript_09CA::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09C9::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 085: Suzuki Cam 6 Part9 if (1) { aTurnOnSpew(Object_handles[149], -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.120000f, 5.000000f, @@ -5480,8 +5389,6 @@ int16_t CustomObjectScript_09C9::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09C8::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 084: Suzuki Cam 6 Part8 if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.090000f, 3.000000f, 18.000000f, @@ -5501,8 +5408,6 @@ int16_t CustomObjectScript_09C8::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09C7::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 083: Suzuki Cam 6 Part7 if (1) { aTurnOnSpew(Object_handles[139], -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.140000f, 4.000000f, @@ -5528,8 +5433,6 @@ int16_t CustomObjectScript_09C7::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09C6::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 082: Suzuki Cam 6 Part6 if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.090000f, 3.000000f, 18.000000f, @@ -5549,8 +5452,6 @@ int16_t CustomObjectScript_09C6::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09C5::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 081: Suzuki Cam 6 Part5 if (1) { if ((qObjExists(qObjSavedHandle(4)) == true) && (1)) { @@ -5575,8 +5476,6 @@ int16_t CustomObjectScript_09C5::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09C4::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 080: Suzuki Cam 6 Part3 if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.100000f, 3.000000f, 20.000000f, @@ -5596,8 +5495,6 @@ int16_t CustomObjectScript_09C4::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09C3::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 079: Suzuki Cam 6 Part2 if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.120000f, 3.000000f, 12.000000f, @@ -5617,8 +5514,6 @@ int16_t CustomObjectScript_09C3::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09C2::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 078: Suzuki Cam 6 Part1 if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 1.300000f, 0.120000f, 4.000000f, 25.000000f, @@ -5638,8 +5533,6 @@ int16_t CustomObjectScript_09C2::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_286E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 073: Suzuki Post Production if (1) { aGoalCompleted(Goal_indexes[5], 1); @@ -5661,8 +5554,6 @@ int16_t CustomObjectScript_286E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0005::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 001: BST Patrols (Mnt) if ((ScriptActionCtr_001 < 1) && (1)) { aAIGoalFollowPathSimple(Object_handles[12], Path_indexes[7], 6295809, -1, 0); @@ -5706,8 +5597,6 @@ int16_t TriggerScript_0005::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 005: ElevDroids PlayerIsHere if ((ScriptActionCtr_005 < 1) && (1)) { aSetObjectTimer(Object_handles[52], 40.000000f, 0); @@ -5725,8 +5614,6 @@ int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0006::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 064: ElevDroids PlayerInTower if ((ScriptActionCtr_064 < 1) && (1)) { aObjDelete(qObjSavedHandle(6)); diff --git a/scripts/Mysterious_Isle.cpp b/scripts/Mysterious_Isle.cpp index e9e021aff..555f47fa3 100644 --- a/scripts/Mysterious_Isle.cpp +++ b/scripts/Mysterious_Isle.cpp @@ -71,67 +71,66 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_481D : public BaseScript { +class CustomObjectScript_481D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_101E : public BaseScript { +class CustomObjectScript_101E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1021 : public BaseScript { +class CustomObjectScript_1021 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1022 : public BaseScript { +class CustomObjectScript_1022 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1035 : public BaseScript { +class CustomObjectScript_1035 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1020 : public BaseScript { +class CustomObjectScript_1020 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1823 : public BaseScript { +class CustomObjectScript_1823 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_182A : public BaseScript { +class CustomObjectScript_182A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_101F : public BaseScript { +class CustomObjectScript_101F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2828 : public BaseScript { +class CustomObjectScript_2828 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0829 : public BaseScript { +class CustomObjectScript_0829 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -827,10 +826,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -857,8 +852,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -1019,8 +1012,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_481D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 011: Torchlites if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 0.500000f, 0.050000f, -1.000000f, 4.000000f, @@ -1038,8 +1029,6 @@ int16_t CustomObjectScript_481D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_101E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 010: Torchlites if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 0.500000f, 0.050000f, -1.000000f, 4.000000f, @@ -1057,8 +1046,6 @@ int16_t CustomObjectScript_101E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1021::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 009: Torchlites if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 0.500000f, 0.050000f, -1.000000f, 4.000000f, @@ -1076,8 +1063,6 @@ int16_t CustomObjectScript_1021::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1022::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 012: Torchlites if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 0.500000f, 0.050000f, -1.000000f, 4.000000f, @@ -1095,8 +1080,6 @@ int16_t CustomObjectScript_1022::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1035::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 008: Torchlites if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 0.500000f, 0.050000f, -1.000000f, 4.000000f, @@ -1114,8 +1097,6 @@ int16_t CustomObjectScript_1035::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1020::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 007: Torchlites if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 0.400000f, 0.060000f, -1.000000f, 4.000000f, @@ -1133,8 +1114,6 @@ int16_t CustomObjectScript_1020::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1823::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 006: Torchlites if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 0.400000f, 0.060000f, -1.000000f, 4.000000f, @@ -1152,8 +1131,6 @@ int16_t CustomObjectScript_1823::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_182A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 005: Torchlites if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 0.400000f, 0.060000f, -1.000000f, 4.000000f, @@ -1171,8 +1148,6 @@ int16_t CustomObjectScript_182A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_101F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 004: Torchlites if (1) { aTurnOnSpew(data->me_handle, -1, 2, 0.000000f, 0.000000f, 65536, 0, 0.500000f, 0.050000f, -1.000000f, 4.000000f, @@ -1190,8 +1165,6 @@ int16_t CustomObjectScript_101F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_2828::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 021: Nemo Switch 2 Shot if (qUserVarValue(1) == 0.000000f) { aUserVarSet(1, 1.000000f); @@ -1218,8 +1191,6 @@ int16_t CustomObjectScript_2828::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0829::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 018: Nemo Switch 1 Shot if (qUserVarValue(0) == 0.000000f) { aUserVarSet(0, 1.000000f); diff --git a/scripts/Paranoia.cpp b/scripts/Paranoia.cpp index 99744bf1d..723531e0a 100644 --- a/scripts/Paranoia.cpp +++ b/scripts/Paranoia.cpp @@ -59,12 +59,11 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -449,10 +448,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -473,8 +468,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); diff --git a/scripts/PiccuStation.cpp b/scripts/PiccuStation.cpp index 882771773..d4b1337f3 100644 --- a/scripts/PiccuStation.cpp +++ b/scripts/PiccuStation.cpp @@ -135,382 +135,381 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2109 : public BaseScript { +class CustomObjectScript_2109 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_206D : public BaseScript { +class CustomObjectScript_206D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_306C : public BaseScript { +class CustomObjectScript_306C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1869 : public BaseScript { +class CustomObjectScript_1869 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_186A : public BaseScript { +class CustomObjectScript_186A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_184A : public BaseScript { +class CustomObjectScript_184A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_4049 : public BaseScript { +class CustomObjectScript_4049 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0961 : public BaseScript { +class CustomObjectScript_0961 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0960 : public BaseScript { +class CustomObjectScript_0960 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_095F : public BaseScript { +class CustomObjectScript_095F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_095E : public BaseScript { +class CustomObjectScript_095E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_3072 : public BaseScript { +class CustomObjectScript_3072 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_406F : public BaseScript { +class CustomObjectScript_406F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0B3C : public BaseScript { +class CustomObjectScript_0B3C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1338 : public BaseScript { +class CustomObjectScript_1338 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1337 : public BaseScript { +class CustomObjectScript_1337 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1339 : public BaseScript { +class CustomObjectScript_1339 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_133A : public BaseScript { +class CustomObjectScript_133A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1B35 : public BaseScript { +class CustomObjectScript_1B35 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1B34 : public BaseScript { +class CustomObjectScript_1B34 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1B41 : public BaseScript { +class CustomObjectScript_1B41 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1336 : public BaseScript { +class CustomObjectScript_1336 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_6856 : public BaseScript { +class CustomObjectScript_6856 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0B40 : public BaseScript { +class CustomObjectScript_0B40 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0B30 : public BaseScript { +class CustomObjectScript_0B30 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0B31 : public BaseScript { +class CustomObjectScript_0B31 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1B2E : public BaseScript { +class CustomObjectScript_1B2E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0B2F : public BaseScript { +class CustomObjectScript_0B2F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0B32 : public BaseScript { +class CustomObjectScript_0B32 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_232D : public BaseScript { +class CustomObjectScript_232D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0B3F : public BaseScript { +class CustomObjectScript_0B3F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0B3B : public BaseScript { +class CustomObjectScript_0B3B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0B3D : public BaseScript { +class CustomObjectScript_0B3D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0B3E : public BaseScript { +class CustomObjectScript_0B3E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1195 : public BaseScript { +class CustomObjectScript_1195 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0014 : public BaseScript { +class TriggerScript_0014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0017 : public BaseScript { +class TriggerScript_0017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001B : public BaseScript { +class TriggerScript_001B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001A : public BaseScript { +class TriggerScript_001A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0019 : public BaseScript { +class TriggerScript_0019 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0018 : public BaseScript { +class TriggerScript_0018 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001F : public BaseScript { +class TriggerScript_001F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001E : public BaseScript { +class TriggerScript_001E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001D : public BaseScript { +class TriggerScript_001D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001C : public BaseScript { +class TriggerScript_001C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_002B : public BaseScript { +class TriggerScript_002B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_002A : public BaseScript { +class TriggerScript_002A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0029 : public BaseScript { +class TriggerScript_0029 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0028 : public BaseScript { +class TriggerScript_0028 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0027 : public BaseScript { +class TriggerScript_0027 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0025 : public BaseScript { +class TriggerScript_0025 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0026 : public BaseScript { +class TriggerScript_0026 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0024 : public BaseScript { +class TriggerScript_0024 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0021 : public BaseScript { +class TriggerScript_0021 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0023 : public BaseScript { +class TriggerScript_0023 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0020 : public BaseScript { +class TriggerScript_0020 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0022 : public BaseScript { +class TriggerScript_0022 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_002C : public BaseScript { +class TriggerScript_002C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -2133,10 +2132,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -2157,8 +2152,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -2497,8 +2490,6 @@ int16_t CustomObjectScript_186A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_184A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 009: RadioDoorLock2 if ((ScriptActionCtr_009 < 1) && (1)) { aObjPlayAnim(data->me_handle, 0, 4, 2.000000f, 0); @@ -2525,8 +2516,6 @@ int16_t CustomObjectScript_184A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_4049::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 017: RadioDoorLock1 if ((ScriptActionCtr_017 < 1) && (1)) { aObjPlayAnim(data->me_handle, 0, 4, 2.000000f, 0); @@ -2583,8 +2572,6 @@ int16_t CustomObjectScript_0961::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 026: Toggle4Timer if (1) { if (qUserVarValue(3) == 2.000000f) { @@ -2635,8 +2622,6 @@ int16_t CustomObjectScript_0960::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 025: Toggle3Timer if (1) { if (qUserVarValue(2) == 2.000000f) { @@ -2687,8 +2672,6 @@ int16_t CustomObjectScript_095F::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 024: Toggle2Timer if (1) { if (qUserVarValue(1) == 2.000000f) { @@ -2739,8 +2722,6 @@ int16_t CustomObjectScript_095E::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 019: Toggle1Timer if (1) { if (qUserVarValue(0) == 2.000000f) { @@ -2761,8 +2742,6 @@ int16_t CustomObjectScript_095E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_3072::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 028: MatcenDoorSwitch2 if ((ScriptActionCtr_028 < 1) && (1)) { aObjPlayAnim(data->me_handle, 0, 4, 2.000000f, 0); @@ -2789,8 +2768,6 @@ int16_t CustomObjectScript_3072::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_406F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 029: MatcenDoorSwitch1 if ((ScriptActionCtr_029 < 1) && (1)) { aObjPlayAnim(data->me_handle, 0, 4, 2.000000f, 0); @@ -2817,8 +2794,6 @@ int16_t CustomObjectScript_406F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0B3C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 040: TempDestroy if ((ScriptActionCtr_040 < 1) && (qUserVarValue(5) == 12.000000f)) { aSetLevelTimer(0.000000f, 2); @@ -2829,8 +2804,6 @@ int16_t CustomObjectScript_0B3C::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CHILD_DIED: { - tOSIRISEVTCHILDDIED *event_data = &data->evt_child_died; - // Script 003: BunkChildDestroyed1 if (1) { aUserVarInc(5); @@ -2849,8 +2822,6 @@ int16_t CustomObjectScript_0B3C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1338::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 038: Exp8 if (1) { aTurnOnSpew(Object_handles[40], -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.100000f, -1.000000f, @@ -2870,8 +2841,6 @@ int16_t CustomObjectScript_1338::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1337::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 037: Exp7 if (1) { aTurnOnSpew(Object_handles[41], -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.100000f, -1.000000f, @@ -2892,8 +2861,6 @@ int16_t CustomObjectScript_1337::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1339::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 036: Exp6 if (1) { aTurnOnSpew(Object_handles[42], -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.100000f, -1.000000f, @@ -2914,8 +2881,6 @@ int16_t CustomObjectScript_1339::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_133A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 035: Exp5 if (1) { aTurnOnSpew(Object_handles[43], -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.100000f, -1.000000f, @@ -2936,8 +2901,6 @@ int16_t CustomObjectScript_133A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1B35::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 034: Exp4 if (1) { aTurnOnSpew(Object_handles[44], -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.100000f, -1.000000f, @@ -2958,8 +2921,6 @@ int16_t CustomObjectScript_1B35::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1B34::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 033: Exp3 if (1) { aTurnOnSpew(Object_handles[45], -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.100000f, -1.000000f, @@ -2980,8 +2941,6 @@ int16_t CustomObjectScript_1B34::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1B41::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 032: Exp2 if (1) { aTurnOnSpew(Object_handles[46], -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.100000f, -1.000000f, @@ -3002,8 +2961,6 @@ int16_t CustomObjectScript_1B41::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1336::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 030: Exp1 if (1) { aTurnOnSpew(Object_handles[47], -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.100000f, -1.000000f, @@ -3049,8 +3006,6 @@ int16_t CustomObjectScript_6856::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0B40::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 043: NowAttack if (1) { aAISetTeam(0, Object_handles[50]); @@ -3061,8 +3016,6 @@ int16_t CustomObjectScript_0B40::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CHILD_DIED: { - tOSIRISEVTCHILDDIED *event_data = &data->evt_child_died; - // Script 062: BunkChildDestroyed5 if (1) { aUserVarInc(5); @@ -3081,8 +3034,6 @@ int16_t CustomObjectScript_0B40::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0B30::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CHILD_DIED: { - tOSIRISEVTCHILDDIED *event_data = &data->evt_child_died; - // Script 069: BunkChildDestroyed12 if (1) { aShowHUDMessage(Message_strings[15]); @@ -3101,8 +3052,6 @@ int16_t CustomObjectScript_0B30::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0B31::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CHILD_DIED: { - tOSIRISEVTCHILDDIED *event_data = &data->evt_child_died; - // Script 068: BunkChildDestroyed11 if (1) { aUserVarInc(5); @@ -3121,8 +3070,6 @@ int16_t CustomObjectScript_0B31::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1B2E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CHILD_DIED: { - tOSIRISEVTCHILDDIED *event_data = &data->evt_child_died; - // Script 067: BunkChildDestroyed10 if (1) { aUserVarInc(5); @@ -3141,8 +3088,6 @@ int16_t CustomObjectScript_1B2E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0B2F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CHILD_DIED: { - tOSIRISEVTCHILDDIED *event_data = &data->evt_child_died; - // Script 066: BunkChildDestroyed9 if (1) { aUserVarInc(5); @@ -3161,8 +3106,6 @@ int16_t CustomObjectScript_0B2F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0B32::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CHILD_DIED: { - tOSIRISEVTCHILDDIED *event_data = &data->evt_child_died; - // Script 065: BunkChildDestroyed8 if (1) { aUserVarInc(5); @@ -3181,8 +3124,6 @@ int16_t CustomObjectScript_0B32::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_232D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CHILD_DIED: { - tOSIRISEVTCHILDDIED *event_data = &data->evt_child_died; - // Script 064: BunkChildDestroyed7 if (1) { aUserVarInc(5); @@ -3201,8 +3142,6 @@ int16_t CustomObjectScript_232D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0B3F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CHILD_DIED: { - tOSIRISEVTCHILDDIED *event_data = &data->evt_child_died; - // Script 063: BunkChildDestroyed6 if (1) { aUserVarInc(5); @@ -3221,8 +3160,6 @@ int16_t CustomObjectScript_0B3F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0B3B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CHILD_DIED: { - tOSIRISEVTCHILDDIED *event_data = &data->evt_child_died; - // Script 061: BunkChildDestroyed4 if (1) { aUserVarInc(5); @@ -3241,8 +3178,6 @@ int16_t CustomObjectScript_0B3B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0B3D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CHILD_DIED: { - tOSIRISEVTCHILDDIED *event_data = &data->evt_child_died; - // Script 060: BunkChildDestroyed3 if (1) { aUserVarInc(5); @@ -3261,8 +3196,6 @@ int16_t CustomObjectScript_0B3D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0B3E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CHILD_DIED: { - tOSIRISEVTCHILDDIED *event_data = &data->evt_child_died; - // Script 006: BunkChildDestroyed2 if (1) { aUserVarInc(5); @@ -3304,8 +3237,6 @@ int16_t CustomObjectScript_1195::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0005::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 014: Waypoint8 if (1) { aSetWaypoint(8); @@ -3322,8 +3253,6 @@ int16_t TriggerScript_0005::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0004::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 013: Waypoint7 if (1) { aSetWaypoint(7); @@ -3349,8 +3278,6 @@ int16_t TriggerScript_0004::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0003::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 012: Waypoint6 if (1) { aSetWaypoint(6); @@ -3376,8 +3303,6 @@ int16_t TriggerScript_0003::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0012::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 011: Waypoint5 if (1) { aSetWaypoint(5); @@ -3394,8 +3319,6 @@ int16_t TriggerScript_0012::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0002::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 010: Waypoint4 if (1) { aSetWaypoint(4); @@ -3412,8 +3335,6 @@ int16_t TriggerScript_0002::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 008: Waypoint2 if (1) { aSetWaypoint(2); @@ -3430,8 +3351,6 @@ int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0013::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 007: Waypoint1 if (1) { aSetWaypoint(1); @@ -3448,8 +3367,6 @@ int16_t TriggerScript_0013::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0014::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 042: VirusRoomEnter Trigger if ((ScriptActionCtr_042 < 1) && ((ScriptActionCtr_031 > 0) == true)) { aObjMakeInvuln(Object_handles[11], 10); @@ -3471,8 +3388,6 @@ int16_t TriggerScript_0014::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0016::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 101: CuplinkCam2 if ((ScriptActionCtr_101 < 1) && (1)) { aSetLevelTimer(0.000000f, 6); @@ -3498,8 +3413,6 @@ int16_t TriggerScript_0016::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0017::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 100: CuplinkCam3 if ((ScriptActionCtr_100 < 1) && (1)) { aSetLevelTimer(0.000000f, 6); @@ -3525,8 +3438,6 @@ int16_t TriggerScript_0017::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0015::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 099: CuplinkCam1 if ((ScriptActionCtr_099 < 1) && (1)) { aSetLevelTimer(0.000000f, 6); @@ -3552,8 +3463,6 @@ int16_t TriggerScript_0015::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_001B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 049: EndExit4 if ((ScriptActionCtr_041 > 0) == true) { aSetLevelTimer(0.000000f, 4); @@ -3579,8 +3488,6 @@ int16_t TriggerScript_001B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_001A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 048: EndExit3 if ((ScriptActionCtr_041 > 0) == true) { aSetLevelTimer(0.000000f, 4); @@ -3606,8 +3513,6 @@ int16_t TriggerScript_001A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0019::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 047: EndExit2 if ((ScriptActionCtr_041 > 0) == true) { aSetLevelTimer(0.000000f, 4); @@ -3633,8 +3538,6 @@ int16_t TriggerScript_0019::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0018::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 045: EndExit1 if ((ScriptActionCtr_041 > 0) == true) { aSetLevelTimer(0.000000f, 4); @@ -3660,8 +3563,6 @@ int16_t TriggerScript_0018::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_001F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 059: Voice Trigger 10 if ((ScriptActionCtr_059 < 1) && (1)) { aSoundPlaySteaming("VoxCompIntruderB.osf", 1.000000f); @@ -3678,8 +3579,6 @@ int16_t TriggerScript_001F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0009::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 058: Voice Trigger 9 if ((ScriptActionCtr_058 < 1) && (1)) { aSoundPlaySteaming("VoxCompIntruderA.osf", 1.000000f); @@ -3696,8 +3595,6 @@ int16_t TriggerScript_0009::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_001E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 057: Voice Trigger 8 if ((ScriptActionCtr_057 < 1) && (1)) { aSoundPlaySteaming("VoxMaleAnnouncementB.osf", 1.000000f); @@ -3714,8 +3611,6 @@ int16_t TriggerScript_001E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_001D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 056: Voice Trigger 7 if ((ScriptActionCtr_056 < 1) && (1)) { aSoundPlaySteaming("VoxCompPowerDamage.osf", 1.000000f); @@ -3732,8 +3627,6 @@ int16_t TriggerScript_001D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 055: Voice Computer if ((ScriptActionCtr_055 < 1) && (1)) { aSoundPlaySteaming("VoxCompComDatalink.osf", 1.000000f); @@ -3750,8 +3643,6 @@ int16_t TriggerScript_000F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 054: Voice Trigger 5 if ((ScriptActionCtr_054 < 1) && (1)) { aSoundPlaySteaming("VoxCompIrreguler.osf", 1.000000f); @@ -3777,8 +3668,6 @@ int16_t TriggerScript_000B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_001C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 053: Voice Trigger 6 if ((ScriptActionCtr_053 < 1) && (1)) { aSoundPlaySteaming("VoxCompEmergencyB.osf", 1.000000f); @@ -3795,8 +3684,6 @@ int16_t TriggerScript_001C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 052: Voice Trigger 3 if ((ScriptActionCtr_052 < 1) && (1)) { aSoundPlaySteaming("VoxCompEmergencyA.osf", 1.000000f); @@ -3813,8 +3700,6 @@ int16_t TriggerScript_000D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0007::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 051: Voice Trigger 2 if ((ScriptActionCtr_051 < 1) && (1)) { aSoundPlaySteaming("VoxCompSecurityLockdown.osf", 1.000000f); @@ -3831,8 +3716,6 @@ int16_t TriggerScript_0007::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 050: Voice Trigger 1 if ((ScriptActionCtr_050 < 1) && (1)) { aSoundPlaySteaming("VoxMaleAnnouncementA.osf", 1.000000f); @@ -3849,8 +3732,6 @@ int16_t TriggerScript_000E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_002B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 091: Music-Alien if (1) { aMusicSetRegion(9, Object_handles[9]); @@ -3867,8 +3748,6 @@ int16_t TriggerScript_002B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_002A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 085: Music-Ancient2 if (1) { aMusicSetRegion(7, Object_handles[9]); @@ -3885,8 +3764,6 @@ int16_t TriggerScript_002A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0029::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 083: Music-2Out2 if (1) { aMusicSetRegion(6, Object_handles[9]); @@ -3903,8 +3780,6 @@ int16_t TriggerScript_0029::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0028::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 082: Music-2Out if (1) { aMusicSetRegion(6, Object_handles[9]); @@ -3921,8 +3796,6 @@ int16_t TriggerScript_0028::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0027::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 081: Music-Cave2 if (1) { aMusicSetRegion(5, Object_handles[9]); @@ -3939,8 +3812,6 @@ int16_t TriggerScript_0027::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0025::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 080: Music-Cave if (1) { aMusicSetRegion(5, Object_handles[9]); @@ -3957,8 +3828,6 @@ int16_t TriggerScript_0025::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0026::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 079: Music-2InPt22 if (1) { aMusicSetRegion(10, Object_handles[9]); @@ -3975,8 +3844,6 @@ int16_t TriggerScript_0026::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 078: Music-2InPt2 if (1) { aMusicSetRegion(10, Object_handles[9]); @@ -3993,8 +3860,6 @@ int16_t TriggerScript_000A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0024::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 077: Music-2In2 if (1) { aMusicSetRegion(3, Object_handles[9]); @@ -4011,8 +3876,6 @@ int16_t TriggerScript_0024::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0021::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 076: Music-2In1 if (1) { aMusicSetRegion(3, Object_handles[9]); @@ -4029,8 +3892,6 @@ int16_t TriggerScript_0021::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0023::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 075: Music-1Out2 if (1) { aMusicSetRegion(2, Object_handles[9]); @@ -4047,8 +3908,6 @@ int16_t TriggerScript_0023::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0020::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 074: Music-1Out if (1) { aMusicSetRegion(2, Object_handles[9]); @@ -4065,8 +3924,6 @@ int16_t TriggerScript_0020::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0022::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 073: Music-1In if (1) { aMusicSetRegion(1, Object_handles[9]); @@ -4083,8 +3940,6 @@ int16_t TriggerScript_0022::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_002C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 097: Music-2InDat if (1) { aMusicSetRegion(3, Object_handles[9]); diff --git a/scripts/Polaris.cpp b/scripts/Polaris.cpp index f93387553..c6b06b225 100644 --- a/scripts/Polaris.cpp +++ b/scripts/Polaris.cpp @@ -66,37 +66,36 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_303F : public BaseScript { +class CustomObjectScript_303F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -606,10 +605,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -630,8 +625,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); diff --git a/scripts/Quadsomniac.cpp b/scripts/Quadsomniac.cpp index d9269a9f0..8d47dd745 100644 --- a/scripts/Quadsomniac.cpp +++ b/scripts/Quadsomniac.cpp @@ -68,52 +68,51 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -666,10 +665,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -690,8 +685,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); diff --git a/scripts/RudeAwakening.cpp b/scripts/RudeAwakening.cpp index b82c20db8..2629f10db 100644 --- a/scripts/RudeAwakening.cpp +++ b/scripts/RudeAwakening.cpp @@ -68,52 +68,51 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1017 : public BaseScript { +class CustomObjectScript_1017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_101A : public BaseScript { +class CustomObjectScript_101A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1019 : public BaseScript { +class CustomObjectScript_1019 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1016 : public BaseScript { +class CustomObjectScript_1016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1015 : public BaseScript { +class CustomObjectScript_1015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1018 : public BaseScript { +class CustomObjectScript_1018 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1813 : public BaseScript { +class CustomObjectScript_1813 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1014 : public BaseScript { +class CustomObjectScript_1014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -653,10 +652,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -683,8 +678,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); diff --git a/scripts/SewerRat.cpp b/scripts/SewerRat.cpp index 9bcea2729..946adfc72 100644 --- a/scripts/SewerRat.cpp +++ b/scripts/SewerRat.cpp @@ -59,12 +59,11 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -508,10 +507,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -538,8 +533,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); diff --git a/scripts/TrainingMission.cpp b/scripts/TrainingMission.cpp index 0fe1309f2..b55266fb8 100644 --- a/scripts/TrainingMission.cpp +++ b/scripts/TrainingMission.cpp @@ -90,157 +90,156 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_300D : public BaseScript { +class CustomObjectScript_300D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_300C : public BaseScript { +class CustomObjectScript_300C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_300B : public BaseScript { +class CustomObjectScript_300B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_4809 : public BaseScript { +class CustomObjectScript_4809 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1803 : public BaseScript { +class CustomObjectScript_1803 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1806 : public BaseScript { +class CustomObjectScript_1806 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_100A : public BaseScript { +class CustomObjectScript_100A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_300E : public BaseScript { +class CustomObjectScript_300E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2007 : public BaseScript { +class CustomObjectScript_2007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_080F : public BaseScript { +class CustomObjectScript_080F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2008 : public BaseScript { +class CustomObjectScript_2008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1011 : public BaseScript { +class CustomObjectScript_1011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1010 : public BaseScript { +class CustomObjectScript_1010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1817 : public BaseScript { +class CustomObjectScript_1817 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_081A : public BaseScript { +class CustomObjectScript_081A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_081B : public BaseScript { +class CustomObjectScript_081B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_081D : public BaseScript { +class CustomObjectScript_081D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_081E : public BaseScript { +class CustomObjectScript_081E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_081C : public BaseScript { +class CustomObjectScript_081C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0819 : public BaseScript { +class CustomObjectScript_0819 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_101F : public BaseScript { +class CustomObjectScript_101F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0820 : public BaseScript { +class CustomObjectScript_0820 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0821 : public BaseScript { +class CustomObjectScript_0821 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0822 : public BaseScript { +class CustomObjectScript_0822 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0823 : public BaseScript { +class CustomObjectScript_0823 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1824 : public BaseScript { +class CustomObjectScript_1824 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1326,10 +1325,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -1350,8 +1345,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 018: Player Hit, cancel timer & restart if ((qObjShields(qGetPlayerObj(0)) < 100.000000f) && ((ScriptActionCtr_016 > 0) == true) && ((ScriptActionCtr_017 > 0) == false)) { @@ -1462,8 +1455,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -1637,8 +1628,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_300D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 001: FirstGoal if ((ScriptActionCtr_001 < 1) && (1)) { aShowHUDMessage(Message_strings[0]); @@ -1671,8 +1660,6 @@ int16_t CustomObjectScript_300D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_300C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 003: Return to Start from Forward Goal if ((ScriptActionCtr_003 < 1) && ((ScriptActionCtr_001 > 0) == true)) { aShowHUDMessage(Message_strings[4]); @@ -1755,8 +1742,6 @@ int16_t CustomObjectScript_300C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_300B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 004: Left Goal if ((ScriptActionCtr_004 < 1) && (1)) { aTogglePlayerControl(0, 0, 4); @@ -1789,8 +1774,6 @@ int16_t CustomObjectScript_300B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_4809::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 006: Up Goal if ((ScriptActionCtr_006 < 1) && (1)) { aShowHUDMessage(Message_strings[0]); @@ -1823,8 +1806,6 @@ int16_t CustomObjectScript_4809::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1803::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 014: Start Course if ((ScriptActionCtr_014 < 1) && (1)) { aPortalRenderSet(1, 1, Room_indexes[0], 1); @@ -1844,8 +1825,6 @@ int16_t CustomObjectScript_1803::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1806::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 015: Finish Course if ((ScriptActionCtr_015 < 1) && (1)) { aToggleAllPlayerControls(0, 0); @@ -1868,8 +1847,6 @@ int16_t CustomObjectScript_1806::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_100A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 033: Start Dodge Timer Delay if ((ScriptActionCtr_033 < 1) && (1)) { aTogglePlayerControl(0, 0, 3); @@ -1908,8 +1885,6 @@ int16_t CustomObjectScript_100A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_300E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 019: Leaving Dodging Room if ((ScriptActionCtr_019 < 1) && (1)) { aObjSetLightingDist(Object_handles[0], 50.000000f); @@ -1969,8 +1944,6 @@ int16_t CustomObjectScript_2007::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_080F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 021: Enter Manuver room if ((ScriptActionCtr_021 < 1) && ((ScriptActionCtr_020 > 0) == true)) { aToggleShowPlayerControl(1, 0); @@ -2099,8 +2072,6 @@ int16_t CustomObjectScript_1817::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_USE: { - tOSIRISEVTUSE *event_data = &data->evt_use; - // Script 059: Player used camera monitor if (1) { aSoundPlaySteamingText("GuideBotD.osf", 1.000000f); @@ -2203,8 +2174,6 @@ int16_t CustomObjectScript_081E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_081C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 047: InvulnPowerup2 Picked up if ((ScriptActionCtr_047 < 1) && (1)) { @@ -2220,8 +2189,6 @@ int16_t CustomObjectScript_081C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0819::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 048: CloakPowerup2 Picked up if ((ScriptActionCtr_048 < 1) && (1)) { @@ -2342,8 +2309,6 @@ int16_t CustomObjectScript_0823::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1824::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 057: Finished! if (1) { aEndLevel(); @@ -2360,8 +2325,6 @@ int16_t CustomObjectScript_1824::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 032: Entered Gallery if ((ScriptActionCtr_032 < 1) && (1)) { aSoundPlaySteamingText("GuideBotA.osf", 1.000000f); @@ -2384,8 +2347,6 @@ int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0001::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 042: Entered KillBot Room if ((ScriptActionCtr_042 < 1) && (1)) { aSetLevelTimer(13.000000f, 14); @@ -2407,8 +2368,6 @@ int16_t TriggerScript_0001::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0002::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 050: Entered Last Room if ((ScriptActionCtr_050 < 1) && (1)) { aObjSetLightingDist(Object_handles[3], 0.000000f); diff --git a/scripts/Y2K.cpp b/scripts/Y2K.cpp index 38c1fee4f..474392e07 100644 --- a/scripts/Y2K.cpp +++ b/scripts/Y2K.cpp @@ -59,12 +59,11 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -513,10 +512,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -543,8 +538,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); diff --git a/scripts/aigame2.cpp b/scripts/aigame2.cpp index e5008b73b..34704f3ef 100644 --- a/scripts/aigame2.cpp +++ b/scripts/aigame2.cpp @@ -82,6 +82,7 @@ static const char *const Script_names[NUM_IDS] = {"Samir's Pest", "StormTrooperB // ai base class class aiObjScript { public: + virtual ~aiObjScript() = default; int16_t CallEvent(int event, tOSIRISEventInfo *data); protected: @@ -99,11 +100,7 @@ class aiObjScript { #define PEST_STATE_ROAM 0 #define PEST_STATE_HIVE 1 -class aiSamirPest : public aiObjScript { -public: - aiSamirPest(); - ~aiSamirPest(); - +class aiSamirPest final : public aiObjScript { private: struct t_pest_memory { int tail_handle; @@ -112,7 +109,7 @@ class aiSamirPest : public aiObjScript { int state; }; - t_pest_memory *memory; + t_pest_memory *memory = nullptr; protected: // Handles all possible OSIRIS events. @@ -132,11 +129,7 @@ class aiSamirPest : public aiObjScript { #define STATE_ATTACK 5 // regular attack #define STATE_STALK 6 // stalks player -class aiBlackStormTrooper : public aiObjScript { -public: - aiBlackStormTrooper(); - ~aiBlackStormTrooper(); - +class aiBlackStormTrooper final : public aiObjScript { private: struct t_bst_memory { float timer; @@ -165,7 +158,7 @@ class aiBlackStormTrooper : public aiObjScript { int snipe_target_handles[N_SNIPE_POINTS]; }; - t_bst_memory *memory; + t_bst_memory *memory = nullptr; void set_state(int me_handle, int state); @@ -182,11 +175,7 @@ class aiBlackStormTrooper : public aiObjScript { void find_targets(int me_handle, bool new_snipe_point); }; -class aiCreeper : public aiObjScript { -public: - aiCreeper(); - ~aiCreeper(); - +class aiCreeper final : public aiObjScript { private: struct t_creep_memory { float timer; @@ -198,7 +187,7 @@ class aiCreeper : public aiObjScript { int eye_obj; }; - t_creep_memory *memory; + t_creep_memory *memory = nullptr; void set_state(int me_handle, int state); @@ -212,16 +201,12 @@ class aiCreeper : public aiObjScript { virtual void OnMemRestore(void *ptr) { memory = (t_creep_memory *)ptr; }; }; -class aiLukeTurret : public aiObjScript { +class aiLukeTurret final : public aiObjScript { struct t_lturret_memory { float timer; }; - t_lturret_memory *memory; - -public: - aiLukeTurret(){}; - ~aiLukeTurret(){}; + t_lturret_memory *memory = nullptr; protected: virtual void OnInit(int me_handle); @@ -230,16 +215,12 @@ class aiLukeTurret : public aiObjScript { virtual void OnMemRestore(void *ptr) { memory = (t_lturret_memory *)ptr; }; }; -class aiSTBlackBarrel : public aiObjScript { +class aiSTBlackBarrel final : public aiObjScript { struct t_stblackbarrel_memory { matrix orient; }; - t_stblackbarrel_memory *memory; - -public: - aiSTBlackBarrel(){}; - ~aiSTBlackBarrel(){}; + t_stblackbarrel_memory *memory = nullptr; protected: virtual void OnInit(int me_handle); @@ -605,11 +586,6 @@ int16_t aiObjScript::CallEvent(int event, tOSIRISEventInfo *data) { // aiSamirPest // The Samir Pest -// ai base class -aiSamirPest::aiSamirPest() { memory = NULL; } - -aiSamirPest::~aiSamirPest() {} - void aiSamirPest::OnInit(int me_handle) { tOSIRISMEMCHUNK ch; @@ -690,11 +666,6 @@ bool aiSamirPest::OnNotify(int me_handle, tOSIRISEVTAINOTIFY *data) { return tru // aiBlackStormTrooper // CED Black Stormtrooper -// ai base class -aiBlackStormTrooper::aiBlackStormTrooper() { memory = NULL; } - -aiBlackStormTrooper::~aiBlackStormTrooper() {} - void aiBlackStormTrooper::OnInit(int me_handle) { tOSIRISMEMCHUNK ch; int n_pts, j, i; @@ -864,7 +835,7 @@ void aiBlackStormTrooper::OnInterval(tOSIRISEventInfo *data) { int fvi_flags = FQ_CHECK_OBJS | FQ_IGNORE_POWERUPS | FQ_IGNORE_WEAPONS | FQ_IGNORE_MOVING_OBJECTS | FQ_IGNORE_NON_LIGHTMAP_OBJECTS; - int fate = FVI_RayCast(me_handle, &pos, &end_pos, room, 0.0f, fvi_flags, &ray); + FVI_RayCast(me_handle, &pos, &end_pos, room, 0.0f, fvi_flags, &ray); Obj_Value(memory->camera_obj, VF_SET, OBJV_I_ROOMNUM, &ray.hit_room); Obj_Value(memory->camera_obj, VF_SET, OBJV_V_POS, &ray.hit_point); @@ -905,8 +876,6 @@ void aiBlackStormTrooper::OnInterval(tOSIRISEventInfo *data) { case STATE_SNIPE: // snipe for a certain amount of time, then return to base. if (memory->laser_targeted == false) { - int type; - memory->camera_obj = Obj_Create(OBJ_POWERUP, Obj_FindID("Invisiblepowerup"), room, &pos, NULL, me_handle); mstruct.objhandle = memory->camera_obj; MSafe_CallFunction(MSAFE_OBJECT_NO_RENDER, &mstruct); @@ -1033,8 +1002,6 @@ bool aiBlackStormTrooper::OnNotify(int me_handle, tOSIRISEVTAINOTIFY *data) { void aiBlackStormTrooper::set_state(int me_handle, int state) { int room_number, id, i; vector pos; - char buf[64]; - char name[48]; float dist; // SafeGoalClearAll(me_handle); @@ -1199,11 +1166,6 @@ void aiBlackStormTrooper::set_state(int me_handle, int state) { ////////////////////////////////////////////////////////////////////////////// // aiCreeper -// ai base class -aiCreeper::aiCreeper() { memory = NULL; } - -aiCreeper::~aiCreeper() {} - void aiCreeper::OnInit(int me_handle) { tOSIRISMEMCHUNK ch; int flags; @@ -1364,10 +1326,8 @@ bool aiCreeper::OnNotify(int me_handle, tOSIRISEVTAINOTIFY *data) { } void aiCreeper::set_state(int me_handle, int state) { - int room_number = 0, id, i, flags; + int room_number = 0, flags; vector pos; - char buf[64]; - char name[48]; msafe_struct m; float circle_dist; char cenable; diff --git a/scripts/aigame4.cpp b/scripts/aigame4.cpp index 977d9dffd..97687d0cd 100644 --- a/scripts/aigame4.cpp +++ b/scripts/aigame4.cpp @@ -125,8 +125,7 @@ static int aigame_mod_id; class BaseObjScript { public: - BaseObjScript(); - ~BaseObjScript(); + virtual ~BaseObjScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -142,12 +141,11 @@ struct combwallhit_data { float time_left; }; -class CombWallHit : public BaseObjScript { +class CombWallHit final : public BaseObjScript { private: - combwallhit_data *memory; + combwallhit_data *memory = nullptr; public: - CombWallHit() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -160,12 +158,11 @@ struct droptarget_data { float last_set_time; }; -class DropTarget : public BaseObjScript { +class DropTarget final : public BaseObjScript { private: - droptarget_data *memory; + droptarget_data *memory = nullptr; public: - DropTarget() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -178,11 +175,10 @@ struct gun_data { bool f_fire; }; -class Gun : public BaseObjScript { - gun_data *memory; +class Gun final : public BaseObjScript { + gun_data *memory = nullptr; public: - Gun() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -194,12 +190,11 @@ struct casing_data { float time_left; }; -class Casing : public BaseObjScript { +class Casing final : public BaseObjScript { private: - casing_data *memory; + casing_data *memory = nullptr; public: - Casing() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -248,9 +243,9 @@ struct mercendboss_data { int combine_object; }; -class MercEndBoss : public BaseObjScript { +class MercEndBoss final : public BaseObjScript { private: - mercendboss_data *memory; + mercendboss_data *memory = nullptr; void DoInit(int me); void DoFrame(int me); bool DoNotify(int me_handle, tOSIRISEventInfo *data); @@ -260,7 +255,6 @@ class MercEndBoss : public BaseObjScript { void PlayRandomSound(int me); public: - MercEndBoss() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -268,12 +262,11 @@ class MercEndBoss : public BaseObjScript { // HangLight class //------------------ -class HangLight : public BaseObjScript { +class HangLight final : public BaseObjScript { private: void DoInit(int me); public: - HangLight() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -417,10 +410,6 @@ static inline bool IsGoalFinishedNotify(int index) { //============================================ // Script Implementation //============================================ -BaseObjScript::BaseObjScript() {} - -BaseObjScript::~BaseObjScript() {} - int16_t BaseObjScript::CallEvent(int event, tOSIRISEventInfo *data) { return CONTINUE_CHAIN | CONTINUE_DEFAULT; } //------------------ @@ -923,8 +912,6 @@ void MercEndBoss::DoFrame(int me) { matrix orient; vector start_pos; vector end_pos; - vector collision_pos; - vector collision_normal; int num_iterations = 0; int num_ignore = 0; int ignore_list[100]; diff --git a/scripts/barney.cpp b/scripts/barney.cpp index f55a39703..87e0eadb3 100644 --- a/scripts/barney.cpp +++ b/scripts/barney.cpp @@ -59,12 +59,11 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -471,10 +470,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -495,8 +490,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); } break; diff --git a/scripts/clutter.cpp b/scripts/clutter.cpp index bdf516b3a..d74c5a6ad 100644 --- a/scripts/clutter.cpp +++ b/scripts/clutter.cpp @@ -79,20 +79,21 @@ static int NumScriptIDs = sizeof(ScriptIDs) / sizeof(tScriptInfo); class ClutterScript { public: + virtual ~ClutterScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data) { return CONTINUE_CHAIN | CONTINUE_DEFAULT; } }; -class FragCrate : public ClutterScript { +class FragCrate final : public ClutterScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class NapalmBarrel : public ClutterScript { +class NapalmBarrel final : public ClutterScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class AliencuplinkScript : public ClutterScript { +class AliencuplinkScript final : public ClutterScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -101,34 +102,30 @@ struct tTNTHighYield { vector last_vel; float lifetime; }; -class TNTHighYield : public ClutterScript { +class TNTHighYield final : public ClutterScript { public: - TNTHighYield() { memory = NULL; } int16_t CallEvent(int event, tOSIRISEventInfo *data); - tTNTHighYield *memory; + tTNTHighYield *memory = nullptr; }; -class TNTMedYield : public ClutterScript { +class TNTMedYield final : public ClutterScript { public: - TNTMedYield() { memory = NULL; } int16_t CallEvent(int event, tOSIRISEventInfo *data); - float *memory; + float *memory = nullptr; }; struct tFallingRock { float lifeleft; }; -class FallingRock : public ClutterScript { +class FallingRock final : public ClutterScript { public: - FallingRock() { memory = NULL; } int16_t CallEvent(int event, tOSIRISEventInfo *data); - tFallingRock *memory; + tFallingRock *memory = nullptr; }; -class LavaRock : public ClutterScript { +class LavaRock final : public ClutterScript { public: - LavaRock() { memory = NULL; } int16_t CallEvent(int event, tOSIRISEventInfo *data); - tFallingRock *memory; + tFallingRock *memory = nullptr; }; // InitializeDLL @@ -294,10 +291,8 @@ int16_t FragCrate::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_DESTROY: vector pos; - float mag; int weapon_id; int handle; - int i; int room; Obj_Value(data->me_handle, VF_GET, OBJV_I_ROOMNUM, &room); @@ -315,10 +310,8 @@ int16_t NapalmBarrel::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_DESTROY: vector pos; - float mag; int weapon_id; int handle; - int i; int room; matrix o, orient; @@ -395,7 +388,6 @@ float GetObjectShields(int object) { int16_t TNTMedYield::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - int i; tOSIRISMEMCHUNK ch; ch.id = 4; ch.size = sizeof(float); @@ -446,7 +438,6 @@ int16_t TNTMedYield::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TNTHighYield::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - int i; tOSIRISMEMCHUNK ch; ch.id = 4; ch.size = sizeof(tTNTHighYield); @@ -511,7 +502,6 @@ int16_t TNTHighYield::CallEvent(int event, tOSIRISEventInfo *data) { int close_obj_list[32]; int roomnum; int rockpile_id; - float amount; vector pos; Obj_Value(data->me_handle, VF_GET, OBJV_I_ROOMNUM, &roomnum); @@ -543,7 +533,6 @@ int16_t TNTHighYield::CallEvent(int event, tOSIRISEventInfo *data) { int16_t FallingRock::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - int i; tOSIRISMEMCHUNK ch; ch.id = 4; ch.size = sizeof(tFallingRock); @@ -577,7 +566,6 @@ int16_t FallingRock::CallEvent(int event, tOSIRISEventInfo *data) { int16_t LavaRock::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - int i; tOSIRISMEMCHUNK ch; ch.id = 4; ch.size = sizeof(tFallingRock); diff --git a/scripts/generic.cpp b/scripts/generic.cpp index 291621a0c..31626cff2 100644 --- a/scripts/generic.cpp +++ b/scripts/generic.cpp @@ -87,15 +87,14 @@ tScriptIDInfo ScriptIDInfo[NUM_IDS] = { class GenericScript { public: - GenericScript() {} + virtual ~GenericScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); protected: }; -class GenericDoor : public GenericScript { +class GenericDoor final : public GenericScript { public: - GenericDoor() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -103,16 +102,14 @@ struct forcewallmemory { int object_handle; }; -class ForceWallScript : public GenericScript { +class ForceWallScript final : public GenericScript { public: - ForceWallScript(); int16_t CallEvent(int event, tOSIRISEventInfo *data); - forcewallmemory *memory; + forcewallmemory *memory = nullptr; }; -class WingNutScript : public GenericScript { +class WingNutScript final : public GenericScript { public: - WingNutScript() {} int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -126,12 +123,10 @@ struct rapidfirememory { uint8_t collided_pnum; }; -class RapidFireScript : public GenericScript { +class RapidFireScript final : public GenericScript { public: - RapidFireScript(); - int16_t CallEvent(int event, tOSIRISEventInfo *data); - rapidfirememory *memory; + rapidfirememory *memory = nullptr; }; // InitializeDLL @@ -382,8 +377,6 @@ int16_t GenericDoor::CallEvent(int event, tOSIRISEventInfo *data) { return CONTINUE_CHAIN | CONTINUE_DEFAULT; } -RapidFireScript::RapidFireScript() { memory = NULL; } - #define RAPIDFIRE_RECHARGE 0.7f int16_t RapidFireScript::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { @@ -527,8 +520,6 @@ int16_t RapidFireScript::CallEvent(int event, tOSIRISEventInfo *data) { return CONTINUE_CHAIN | CONTINUE_DEFAULT; } -ForceWallScript::ForceWallScript() { memory = NULL; } - int16_t ForceWallScript::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { diff --git a/scripts/level1.cpp b/scripts/level1.cpp index 6e03591a5..9a000ad67 100644 --- a/scripts/level1.cpp +++ b/scripts/level1.cpp @@ -85,132 +85,131 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_3855 : public BaseScript { +class CustomObjectScript_3855 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10DC : public BaseScript { +class CustomObjectScript_10DC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10E0 : public BaseScript { +class CustomObjectScript_10E0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10DF : public BaseScript { +class CustomObjectScript_10DF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08E8 : public BaseScript { +class CustomObjectScript_08E8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_584D : public BaseScript { +class CustomObjectScript_584D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0816 : public BaseScript { +class CustomObjectScript_0816 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_100D : public BaseScript { +class CustomObjectScript_100D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_301B : public BaseScript { +class CustomObjectScript_301B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18DB : public BaseScript { +class CustomObjectScript_18DB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1077,10 +1076,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -1101,8 +1096,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -1685,8 +1678,6 @@ int16_t TriggerScript_000C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0011::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 008: Fire Sphere Room if (1) { aRoomChangeFog(Room_indexes[7], 1.000000f, 0.700000f, 0.400000f, 500.000000f, 10.000000f); @@ -1723,8 +1714,6 @@ int16_t TriggerScript_0011::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 016: Goal Zero Completed & Waypoint 3 if (1) { aGoalCompleted(Goal_indexes[5], 1); @@ -1742,8 +1731,6 @@ int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0001::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 017: Waypoint 1 if (1) { aSetWaypoint(1); @@ -1787,8 +1774,6 @@ int16_t TriggerScript_0002::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0003::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 019: Waypoint 4 if (1) { aSetWaypoint(4); @@ -1805,8 +1790,6 @@ int16_t TriggerScript_0003::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0004::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 020: Waypoint 5 if (1) { aSetWaypoint(5); @@ -1823,8 +1806,6 @@ int16_t TriggerScript_0004::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0006::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 021: Waypoint 6 Left if (1) { aSetWaypoint(6); @@ -1841,8 +1822,6 @@ int16_t TriggerScript_0006::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0005::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 022: Waypoint 6 Right if (1) { aSetWaypoint(6); diff --git a/scripts/level10.cpp b/scripts/level10.cpp index cbd2d875f..ee1975e6f 100644 --- a/scripts/level10.cpp +++ b/scripts/level10.cpp @@ -144,427 +144,426 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2042 : public BaseScript { +class CustomObjectScript_2042 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10A3 : public BaseScript { +class CustomObjectScript_10A3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_094B : public BaseScript { +class CustomObjectScript_094B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0945 : public BaseScript { +class CustomObjectScript_0945 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_113E : public BaseScript { +class CustomObjectScript_113E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_193F : public BaseScript { +class CustomObjectScript_193F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2140 : public BaseScript { +class CustomObjectScript_2140 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0875 : public BaseScript { +class CustomObjectScript_0875 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0877 : public BaseScript { +class CustomObjectScript_0877 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_105C : public BaseScript { +class CustomObjectScript_105C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0878 : public BaseScript { +class CustomObjectScript_0878 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_28BA : public BaseScript { +class CustomObjectScript_28BA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2133 : public BaseScript { +class CustomObjectScript_2133 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1139 : public BaseScript { +class CustomObjectScript_1139 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_098A : public BaseScript { +class CustomObjectScript_098A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08AA : public BaseScript { +class CustomObjectScript_08AA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18BF : public BaseScript { +class CustomObjectScript_18BF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10C0 : public BaseScript { +class CustomObjectScript_10C0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2904 : public BaseScript { +class CustomObjectScript_2904 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_3088 : public BaseScript { +class CustomObjectScript_3088 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2105 : public BaseScript { +class CustomObjectScript_2105 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_3092 : public BaseScript { +class CustomObjectScript_3092 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_187C : public BaseScript { +class CustomObjectScript_187C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10FA : public BaseScript { +class CustomObjectScript_10FA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0903 : public BaseScript { +class CustomObjectScript_0903 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1902 : public BaseScript { +class CustomObjectScript_1902 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_4047 : public BaseScript { +class CustomObjectScript_4047 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_289B : public BaseScript { +class CustomObjectScript_289B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_3849 : public BaseScript { +class CustomObjectScript_3849 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_184B : public BaseScript { +class CustomObjectScript_184B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_204A : public BaseScript { +class CustomObjectScript_204A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2064 : public BaseScript { +class CustomObjectScript_2064 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1065 : public BaseScript { +class CustomObjectScript_1065 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2063 : public BaseScript { +class CustomObjectScript_2063 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_5843 : public BaseScript { +class CustomObjectScript_5843 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1095 : public BaseScript { +class CustomObjectScript_1095 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1094 : public BaseScript { +class CustomObjectScript_1094 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1080 : public BaseScript { +class CustomObjectScript_1080 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_187F : public BaseScript { +class CustomObjectScript_187F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_501A : public BaseScript { +class CustomObjectScript_501A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_D80D : public BaseScript { +class CustomObjectScript_D80D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18A1 : public BaseScript { +class CustomObjectScript_18A1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_208B : public BaseScript { +class CustomObjectScript_208B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2074 : public BaseScript { +class CustomObjectScript_2074 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_203D : public BaseScript { +class CustomObjectScript_203D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11B1 : public BaseScript { +class CustomObjectScript_11B1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_3898 : public BaseScript { +class CustomObjectScript_3898 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_303C : public BaseScript { +class CustomObjectScript_303C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2090 : public BaseScript { +class CustomObjectScript_2090 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09D4 : public BaseScript { +class CustomObjectScript_09D4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1050 : public BaseScript { +class CustomObjectScript_1050 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2044 : public BaseScript { +class CustomObjectScript_2044 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1845 : public BaseScript { +class CustomObjectScript_1845 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1058 : public BaseScript { +class CustomObjectScript_1058 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09A3 : public BaseScript { +class CustomObjectScript_09A3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11AF : public BaseScript { +class CustomObjectScript_11AF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_49B0 : public BaseScript { +class CustomObjectScript_49B0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11D2 : public BaseScript { +class CustomObjectScript_11D2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09D5 : public BaseScript { +class CustomObjectScript_09D5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18A5 : public BaseScript { +class CustomObjectScript_18A5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10FB : public BaseScript { +class CustomObjectScript_10FB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_19A2 : public BaseScript { +class CustomObjectScript_19A2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09A4 : public BaseScript { +class CustomObjectScript_09A4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09A5 : public BaseScript { +class CustomObjectScript_09A5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09A6 : public BaseScript { +class CustomObjectScript_09A6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09A1 : public BaseScript { +class CustomObjectScript_09A1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_20FD : public BaseScript { +class CustomObjectScript_20FD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_187E : public BaseScript { +class CustomObjectScript_187E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_987D : public BaseScript { +class CustomObjectScript_987D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09AA : public BaseScript { +class CustomObjectScript_09AA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0816 : public BaseScript { +class CustomObjectScript_0816 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -2545,10 +2544,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -2569,8 +2564,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -3292,8 +3285,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_2042::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 021: Intro Landing Path if (1) { aPortalRenderSet(1, 0, Room_indexes[0], 1); @@ -3336,8 +3327,6 @@ int16_t CustomObjectScript_2042::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 040: Intro Cinematic - Parts II and III if (1) { if (ScriptActionCtr_040 == 0) { @@ -3364,8 +3353,6 @@ int16_t CustomObjectScript_2042::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_10A3::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 002: Space Patrol if (1) { aAIFlags(1, 32, data->me_handle); @@ -3383,8 +3370,6 @@ int16_t CustomObjectScript_10A3::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_094B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 095: Sky Patrol 2 if (1) { aAIFlags(1, 32, data->me_handle); @@ -3430,8 +3415,6 @@ int16_t CustomObjectScript_0945::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_113E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 090: Data Vault Patrol A if (1) { aAISetFOV(data->me_handle, 70.000000f); @@ -3449,8 +3432,6 @@ int16_t CustomObjectScript_113E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_193F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 091: Data Vault Patrol B if (1) { aAISetFOV(data->me_handle, 70.000000f); @@ -3468,8 +3449,6 @@ int16_t CustomObjectScript_193F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_2140::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 092: Data Vault Guard Patrol if (1) { aAIGoalFollowPath(data->me_handle, Path_indexes[10], 1, 4, 1, 0, 8392960, -1); @@ -3657,8 +3636,6 @@ int16_t CustomObjectScript_28BA::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_2133::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 125: Canyon Guard Patrol if (1) { aAIGoalFollowPath(data->me_handle, Path_indexes[12], 1, 9, 1, 0, 8392960, -1); @@ -3718,8 +3695,6 @@ int16_t CustomObjectScript_2133::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1139::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 098: Setup Command Base Guard if (1) { aAIFlags(0, 33554432, data->me_handle); @@ -3771,8 +3746,6 @@ int16_t CustomObjectScript_1139::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_098A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 097: Tank Patrol if (1) { aAIGoalFollowPath(data->me_handle, Path_indexes[16], 1, 11, 1, 0, 8392704, -1); @@ -3789,8 +3762,6 @@ int16_t CustomObjectScript_098A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08AA::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 003: D1 Patrol if (1) { aAIGoalFollowPath(Object_handles[61], Path_indexes[17], 1, 7, 1, 3, 8392704, -1); @@ -3807,8 +3778,6 @@ int16_t CustomObjectScript_08AA::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_18BF::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 099: Setup D1 Ground Guard if (1) { @@ -4745,8 +4714,6 @@ int16_t CustomObjectScript_208B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_2074::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 102: Setup Hangar Cam if (1) { aObjPlayAnim(data->me_handle, 0, 20, 14.000000f, 1); @@ -4783,8 +4750,6 @@ int16_t CustomObjectScript_2074::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_203D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 103: Setup Prep Room Cam if (1) { aObjPlayAnim(data->me_handle, 0, 20, 14.000000f, 1); @@ -4816,8 +4781,6 @@ int16_t CustomObjectScript_203D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_11B1::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 104: Setup Mem Plasma Cam if (1) { aObjPlayAnim(data->me_handle, 0, 20, 14.000000f, 1); @@ -4854,8 +4817,6 @@ int16_t CustomObjectScript_11B1::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_3898::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 106: Setup Corridor Cam if (1) { aObjPlayAnim(data->me_handle, 0, 20, 14.000000f, 1); @@ -4889,8 +4850,6 @@ int16_t CustomObjectScript_3898::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_303C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 107: Setup Substation 1 Cam if (1) { aObjPlayAnim(data->me_handle, 0, 20, 14.000000f, 1); @@ -4922,8 +4881,6 @@ int16_t CustomObjectScript_303C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_2090::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 108: Setup Auxillary Cam if (1) { aObjPlayAnim(data->me_handle, 0, 20, 14.000000f, 1); @@ -4959,8 +4916,6 @@ int16_t CustomObjectScript_2090::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09D4::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 109: Setup Control Cam if (1) { aObjPlayAnim(data->me_handle, 0, 20, 14.000000f, 1); @@ -5449,8 +5404,6 @@ int16_t CustomObjectScript_987D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09AA::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_GOALCOMPLETE: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_goalcomplete; - // Script 119: Meteor1 - GoalID Explosion if (1) { aTurnOnSpew(Object_handles[109], -1, 0, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.040000f, 1.000000f, @@ -5463,8 +5416,6 @@ int16_t CustomObjectScript_09AA::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CHILD_DIED: { - tOSIRISEVTCHILDDIED *event_data = &data->evt_child_died; - // Script 117: Meteor1 - Path if (qObjIsType(Object_handles[61], 2) == false) { aAISetMaxSpeed(data->me_handle, 400.000000f); diff --git a/scripts/level11.cpp b/scripts/level11.cpp index 1db0f5955..e71b5d86b 100644 --- a/scripts/level11.cpp +++ b/scripts/level11.cpp @@ -209,752 +209,751 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0985 : public BaseScript { +class CustomObjectScript_0985 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0942 : public BaseScript { +class CustomObjectScript_0942 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0941 : public BaseScript { +class CustomObjectScript_0941 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_092B : public BaseScript { +class CustomObjectScript_092B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_093E : public BaseScript { +class CustomObjectScript_093E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0940 : public BaseScript { +class CustomObjectScript_0940 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_093F : public BaseScript { +class CustomObjectScript_093F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0954 : public BaseScript { +class CustomObjectScript_0954 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_3951 : public BaseScript { +class CustomObjectScript_3951 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08CF : public BaseScript { +class CustomObjectScript_08CF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08CC : public BaseScript { +class CustomObjectScript_08CC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10D2 : public BaseScript { +class CustomObjectScript_10D2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0943 : public BaseScript { +class CustomObjectScript_0943 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0944 : public BaseScript { +class CustomObjectScript_0944 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08CE : public BaseScript { +class CustomObjectScript_08CE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0952 : public BaseScript { +class CustomObjectScript_0952 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0953 : public BaseScript { +class CustomObjectScript_0953 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1826 : public BaseScript { +class CustomObjectScript_1826 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1180 : public BaseScript { +class CustomObjectScript_1180 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1919 : public BaseScript { +class CustomObjectScript_1919 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0911 : public BaseScript { +class CustomObjectScript_0911 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_310B : public BaseScript { +class CustomObjectScript_310B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10D0 : public BaseScript { +class CustomObjectScript_10D0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08D1 : public BaseScript { +class CustomObjectScript_08D1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A12 : public BaseScript { +class CustomObjectScript_0A12 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_097C : public BaseScript { +class CustomObjectScript_097C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_097D : public BaseScript { +class CustomObjectScript_097D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_097E : public BaseScript { +class CustomObjectScript_097E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_097B : public BaseScript { +class CustomObjectScript_097B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_097A : public BaseScript { +class CustomObjectScript_097A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0976 : public BaseScript { +class CustomObjectScript_0976 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0977 : public BaseScript { +class CustomObjectScript_0977 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0978 : public BaseScript { +class CustomObjectScript_0978 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0979 : public BaseScript { +class CustomObjectScript_0979 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0975 : public BaseScript { +class CustomObjectScript_0975 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0974 : public BaseScript { +class CustomObjectScript_0974 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0973 : public BaseScript { +class CustomObjectScript_0973 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0972 : public BaseScript { +class CustomObjectScript_0972 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0971 : public BaseScript { +class CustomObjectScript_0971 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0970 : public BaseScript { +class CustomObjectScript_0970 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_096F : public BaseScript { +class CustomObjectScript_096F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_096E : public BaseScript { +class CustomObjectScript_096E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1182 : public BaseScript { +class CustomObjectScript_1182 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1181 : public BaseScript { +class CustomObjectScript_1181 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_110A : public BaseScript { +class CustomObjectScript_110A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1109 : public BaseScript { +class CustomObjectScript_1109 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1108 : public BaseScript { +class CustomObjectScript_1108 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10DF : public BaseScript { +class CustomObjectScript_10DF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10DE : public BaseScript { +class CustomObjectScript_10DE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10DD : public BaseScript { +class CustomObjectScript_10DD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10DC : public BaseScript { +class CustomObjectScript_10DC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10DB : public BaseScript { +class CustomObjectScript_10DB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10D6 : public BaseScript { +class CustomObjectScript_10D6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10D7 : public BaseScript { +class CustomObjectScript_10D7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10D8 : public BaseScript { +class CustomObjectScript_10D8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_116C : public BaseScript { +class CustomObjectScript_116C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10D5 : public BaseScript { +class CustomObjectScript_10D5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10DA : public BaseScript { +class CustomObjectScript_10DA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18D4 : public BaseScript { +class CustomObjectScript_18D4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18CD : public BaseScript { +class CustomObjectScript_18CD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18D3 : public BaseScript { +class CustomObjectScript_18D3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10EA : public BaseScript { +class CustomObjectScript_10EA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18EC : public BaseScript { +class CustomObjectScript_18EC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10EB : public BaseScript { +class CustomObjectScript_10EB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18E6 : public BaseScript { +class CustomObjectScript_18E6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10E8 : public BaseScript { +class CustomObjectScript_10E8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10E9 : public BaseScript { +class CustomObjectScript_10E9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10E7 : public BaseScript { +class CustomObjectScript_10E7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10E3 : public BaseScript { +class CustomObjectScript_10E3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10E5 : public BaseScript { +class CustomObjectScript_10E5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10E4 : public BaseScript { +class CustomObjectScript_10E4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18E2 : public BaseScript { +class CustomObjectScript_18E2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10EE : public BaseScript { +class CustomObjectScript_10EE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18ED : public BaseScript { +class CustomObjectScript_18ED final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10F6 : public BaseScript { +class CustomObjectScript_10F6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10F7 : public BaseScript { +class CustomObjectScript_10F7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10F5 : public BaseScript { +class CustomObjectScript_10F5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10F8 : public BaseScript { +class CustomObjectScript_10F8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18EF : public BaseScript { +class CustomObjectScript_18EF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18F0 : public BaseScript { +class CustomObjectScript_18F0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10F9 : public BaseScript { +class CustomObjectScript_10F9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10FA : public BaseScript { +class CustomObjectScript_10FA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10FB : public BaseScript { +class CustomObjectScript_10FB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10FD : public BaseScript { +class CustomObjectScript_10FD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10FC : public BaseScript { +class CustomObjectScript_10FC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10FE : public BaseScript { +class CustomObjectScript_10FE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10FF : public BaseScript { +class CustomObjectScript_10FF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_20F1 : public BaseScript { +class CustomObjectScript_20F1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10F4 : public BaseScript { +class CustomObjectScript_10F4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10F3 : public BaseScript { +class CustomObjectScript_10F3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10F2 : public BaseScript { +class CustomObjectScript_10F2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1101 : public BaseScript { +class CustomObjectScript_1101 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1100 : public BaseScript { +class CustomObjectScript_1100 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1102 : public BaseScript { +class CustomObjectScript_1102 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1103 : public BaseScript { +class CustomObjectScript_1103 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1106 : public BaseScript { +class CustomObjectScript_1106 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1107 : public BaseScript { +class CustomObjectScript_1107 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1104 : public BaseScript { +class CustomObjectScript_1104 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1105 : public BaseScript { +class CustomObjectScript_1105 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A53 : public BaseScript { +class CustomObjectScript_0A53 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_080F : public BaseScript { +class CustomObjectScript_080F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_096A : public BaseScript { +class CustomObjectScript_096A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A66 : public BaseScript { +class CustomObjectScript_0A66 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A65 : public BaseScript { +class CustomObjectScript_0A65 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A64 : public BaseScript { +class CustomObjectScript_0A64 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A63 : public BaseScript { +class CustomObjectScript_0A63 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A62 : public BaseScript { +class CustomObjectScript_0A62 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1221 : public BaseScript { +class CustomObjectScript_1221 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_096B : public BaseScript { +class CustomObjectScript_096B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0969 : public BaseScript { +class CustomObjectScript_0969 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1A7F : public BaseScript { +class CustomObjectScript_1A7F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_227E : public BaseScript { +class CustomObjectScript_227E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0024 : public BaseScript { +class TriggerScript_0024 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001B : public BaseScript { +class TriggerScript_001B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001C : public BaseScript { +class TriggerScript_001C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0020 : public BaseScript { +class TriggerScript_0020 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001F : public BaseScript { +class TriggerScript_001F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0014 : public BaseScript { +class TriggerScript_0014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001D : public BaseScript { +class TriggerScript_001D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0022 : public BaseScript { +class TriggerScript_0022 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0018 : public BaseScript { +class TriggerScript_0018 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0017 : public BaseScript { +class TriggerScript_0017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001A : public BaseScript { +class TriggerScript_001A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0019 : public BaseScript { +class TriggerScript_0019 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0021 : public BaseScript { +class TriggerScript_0021 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001E : public BaseScript { +class TriggerScript_001E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0025 : public BaseScript { +class TriggerScript_0025 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0023 : public BaseScript { +class TriggerScript_0023 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0026 : public BaseScript { +class TriggerScript_0026 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -3512,10 +3511,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -3536,8 +3531,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 027: All 3 Primary Controls if ((ScriptActionCtr_027 < 1) && (((ScriptActionCtr_056 > 0) == true) && ((ScriptActionCtr_055 > 0) == true) && ((ScriptActionCtr_054 > 0) == true))) { @@ -3550,8 +3543,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -3630,8 +3621,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_PLAYER_MOVIE_END: { - tOSIRISEVTPLAYERMOVIEEND *event_data = &data->evt_player_movie_end; - // Script 130: Mission Message if ((ScriptActionCtr_130 < 1) && (1)) { aSoundPlaySteaming("VoxLev11StartLevel.osf", 1.000000f); @@ -3651,8 +3640,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0985::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 120: IntroCam if ((ScriptActionCtr_120 < 1) && (1 == true)) { aCinematicIntro(Path_indexes[0], Message_strings[0], Object_handles[1], Path_indexes[1], 22.000000f); @@ -4179,8 +4166,6 @@ int16_t CustomObjectScript_1919::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0911::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 017: RockWallALL Invulnerable if (1) { aObjMakeInvuln(Object_handles[78], 999999); @@ -4205,8 +4190,6 @@ int16_t CustomObjectScript_0911::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_310B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 018: RockWallTopExplode(1) if ((ScriptActionCtr_018 < 1) && (1)) { aObjMakeVulnerable(Object_handles[83]); @@ -4278,8 +4261,6 @@ int16_t CustomObjectScript_08D1::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0A12::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 125: GenericSpewer-18 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4297,8 +4278,6 @@ int16_t CustomObjectScript_0A12::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_097C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 047: GenericSpewer-17 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4316,8 +4295,6 @@ int16_t CustomObjectScript_097C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_097D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 046: GenericSpewer-16 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4335,8 +4312,6 @@ int16_t CustomObjectScript_097D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_097E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 045: GenericSpewer-15 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4354,8 +4329,6 @@ int16_t CustomObjectScript_097E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_097B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 044: GenericSpewer-14 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4373,8 +4346,6 @@ int16_t CustomObjectScript_097B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_097A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 043: GenericSpewer-13 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4392,8 +4363,6 @@ int16_t CustomObjectScript_097A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0976::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 042: GenericSpewer-12 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4411,8 +4380,6 @@ int16_t CustomObjectScript_0976::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0977::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 041: GenericSpewer-11 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4430,8 +4397,6 @@ int16_t CustomObjectScript_0977::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0978::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 040: GenericSpewer-10 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4449,8 +4414,6 @@ int16_t CustomObjectScript_0978::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0979::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 039: GenericSpewer-9 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4468,8 +4431,6 @@ int16_t CustomObjectScript_0979::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0975::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 038: GenericSpewer-8 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4487,8 +4448,6 @@ int16_t CustomObjectScript_0975::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0974::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 037: GenericSpewer-7 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4506,8 +4465,6 @@ int16_t CustomObjectScript_0974::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0973::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 036: GenericSpewer-6 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4525,8 +4482,6 @@ int16_t CustomObjectScript_0973::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0972::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 035: GenericSpewer-5 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4544,8 +4499,6 @@ int16_t CustomObjectScript_0972::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0971::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 034: GenericSpewer-4 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4563,8 +4516,6 @@ int16_t CustomObjectScript_0971::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0970::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 015: GenericSpewer-3 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4582,8 +4533,6 @@ int16_t CustomObjectScript_0970::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_096F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 014: GenericSpewer-2 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4601,8 +4550,6 @@ int16_t CustomObjectScript_096F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_096E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 013: GenericSpewer-1 if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.700000f, 0.150000f, -1.000000f, 4.000000f, @@ -4662,8 +4609,6 @@ int16_t CustomObjectScript_1181::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_110A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 019: Security Alert-1 if ((ScriptActionCtr_019 < 1) && ((qObjCanSeePlayer(65, data->me_handle, 240.000000f) == true) && ((ScriptActionCtr_131 > 0) == true))) { @@ -4678,8 +4623,6 @@ int16_t CustomObjectScript_110A::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 131: Security-1 Timer if ((ScriptActionCtr_131 < 1) && (1)) { @@ -4733,8 +4676,6 @@ int16_t CustomObjectScript_1108::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_10DF::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 078: Security Alert-F if ((ScriptActionCtr_078 < 1) && (qObjCanSeePlayer(50, data->me_handle, 150.000000f) == true)) { aAISetState(1, Object_handles[50]); @@ -4754,8 +4695,6 @@ int16_t CustomObjectScript_10DF::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_10DE::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 077: Security Alert-E if ((ScriptActionCtr_077 < 1) && (qObjCanSeePlayer(50, data->me_handle, 150.000000f) == true)) { aAISetState(1, Object_handles[51]); @@ -4775,8 +4714,6 @@ int16_t CustomObjectScript_10DE::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_10DD::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 076: Security Alert-D if ((ScriptActionCtr_076 < 1) && (qObjCanSeePlayer(50, data->me_handle, 150.000000f) == true)) { aAISetState(1, Object_handles[48]); @@ -4796,8 +4733,6 @@ int16_t CustomObjectScript_10DD::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_10DC::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 075: Security Alert-C if ((ScriptActionCtr_075 < 1) && (qObjCanSeePlayer(65, data->me_handle, 150.000000f) == true)) { aAISetState(1, Object_handles[45]); @@ -4817,8 +4752,6 @@ int16_t CustomObjectScript_10DC::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_10DB::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 074: Security Alert-B if ((ScriptActionCtr_074 < 1) && (qObjCanSeePlayer(90, data->me_handle, 200.000000f) == true)) { aAISetState(1, Object_handles[31]); @@ -4840,8 +4773,6 @@ int16_t CustomObjectScript_10DB::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_10D6::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 073: Security Alert-A if ((ScriptActionCtr_073 < 1) && (qObjCanSeePlayer(30, data->me_handle, 60.000000f) == true)) { aAISetState(1, Object_handles[44]); @@ -4860,8 +4791,6 @@ int16_t CustomObjectScript_10D6::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_10D7::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 072: Security Alert-9 if ((ScriptActionCtr_072 < 1) && (qObjCanSeePlayer(50, data->me_handle, 300.000000f) == true)) { aAISetState(1, Object_handles[43]); @@ -4882,8 +4811,6 @@ int16_t CustomObjectScript_10D7::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_10D8::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 071: Security Alert-8 if ((ScriptActionCtr_071 < 1) && (qObjCanSeePlayer(50, data->me_handle, 300.000000f) == true)) { aAISetState(1, Object_handles[38]); @@ -4904,8 +4831,6 @@ int16_t CustomObjectScript_10D8::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_116C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 070: Security Alert-7 if ((ScriptActionCtr_070 < 1) && (qObjCanSeePlayer(90, data->me_handle, 70.000000f) == true)) { aAISetState(1, Object_handles[29]); @@ -4925,8 +4850,6 @@ int16_t CustomObjectScript_116C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_10D5::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 069: Security Alert-6 if ((ScriptActionCtr_069 < 1) && (qObjCanSeePlayer(55, data->me_handle, 200.000000f) == true)) { aAISetState(1, Object_handles[37]); @@ -4948,8 +4871,6 @@ int16_t CustomObjectScript_10D5::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_10DA::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 068: Security Alert-5 if ((ScriptActionCtr_068 < 1) && (qObjCanSeePlayer(90, data->me_handle, 80.000000f) == true)) { aAISetState(1, Object_handles[26]); @@ -4969,8 +4890,6 @@ int16_t CustomObjectScript_10DA::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_18D4::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 067: Security Alert-4 if ((ScriptActionCtr_067 < 1) && (qObjCanSeePlayer(70, data->me_handle, 250.000000f) == true)) { aAISetState(1, Object_handles[15]); @@ -4992,8 +4911,6 @@ int16_t CustomObjectScript_18D4::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_18CD::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 066: Security Alert-3 if ((ScriptActionCtr_066 < 1) && (qObjCanSeePlayer(70, data->me_handle, 250.000000f) == true)) { aAISetState(1, Object_handles[21]); @@ -5015,8 +4932,6 @@ int16_t CustomObjectScript_18CD::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_18D3::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 065: Security Alert-2 if ((ScriptActionCtr_065 < 1) && (qObjCanSeePlayer(50, data->me_handle, 220.000000f) == true)) { aAISetState(1, Object_handles[23]); @@ -5820,8 +5735,6 @@ int16_t CustomObjectScript_0A53::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 126: PrisonSwitch Create if (1) { aTurnOnSpew(Object_handles[125], -1, 16, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.070000f, -1.000000f, @@ -5844,8 +5757,6 @@ int16_t CustomObjectScript_0A53::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_080F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 136: Exit Abort Timer if (1) { aEndLevel(); @@ -6169,8 +6080,6 @@ int16_t CustomObjectScript_096B::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 166: You got all 6! if (qUserVarValue(7) == 6.000000f) { aSoundPlayObject(Sound_indexes[0], Object_handles[12], 1.000000f); @@ -6264,8 +6173,6 @@ int16_t CustomObjectScript_227E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0007::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 124: WayPoint-Last2 if (1) { aSetWaypoint(5); @@ -6282,8 +6189,6 @@ int16_t TriggerScript_0007::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0006::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 123: WayPoint-Last1 if (1) { aSetWaypoint(5); @@ -6300,8 +6205,6 @@ int16_t TriggerScript_0006::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0008::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 122: WayPoint-1 if ((ScriptActionCtr_122 < 1) && (1)) { aCinematicSimple(Path_indexes[2], Message_strings[1], Object_handles[55], 10.000000f, 1); @@ -6404,8 +6307,6 @@ int16_t TriggerScript_0002::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0005::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 008: Cross (RL) Doors-1 if (0.000000f == 0.000000f) { aDoorLockUnlock(0, Door_handles[11]); @@ -6425,8 +6326,6 @@ int16_t TriggerScript_0005::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0004::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 009: Cross (RL) Doors-2 if (1) { aDoorLockUnlock(0, Door_handles[13]); @@ -6446,8 +6345,6 @@ int16_t TriggerScript_0004::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0003::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 010: Cross (RL) Doors-3 if (1) { aDoorLockUnlock(0, Door_handles[15]); @@ -6488,8 +6385,6 @@ int16_t TriggerScript_0009::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0024::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 156: PipeDemo 2 if ((ScriptActionCtr_156 < 1) && ((qObjExists(Object_handles[3]) == true) && ((ScriptActionCtr_132 > 0) == false))) { @@ -6507,8 +6402,6 @@ int16_t TriggerScript_0024::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 132: PipeDemo 1 if ((ScriptActionCtr_132 < 1) && ((qObjExists(Object_handles[3]) == true) && ((ScriptActionCtr_156 > 0) == false))) { @@ -6526,8 +6419,6 @@ int16_t TriggerScript_000B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0010::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 129: EscapeDoor-Bar if ((ScriptActionCtr_129 < 1) && ((ScriptActionCtr_127 > 0) == true)) { aDoorSetPos(Door_handles[0], 1.000000f); @@ -6544,8 +6435,6 @@ int16_t TriggerScript_0010::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 153: EscapeDoor-2 if ((ScriptActionCtr_153 < 1) && ((ScriptActionCtr_127 > 0) == true)) { aDoorSetPos(Door_handles[14], 1.000000f); @@ -6562,8 +6451,6 @@ int16_t TriggerScript_000D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 118: EscapeDoor-1 if ((ScriptActionCtr_118 < 1) && ((ScriptActionCtr_127 > 0) == true)) { aDoorSetPos(Door_handles[18], 1.000000f); @@ -6904,8 +6791,6 @@ int16_t TriggerScript_001E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0025::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 155: PlayerCheat-2 if (1) { aDoorSetPos(Door_handles[14], 0.000000f); @@ -6922,8 +6807,6 @@ int16_t TriggerScript_0025::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0023::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 154: PlayerCheat-1 if (1) { aDoorSetPos(Door_handles[14], 1.000000f); @@ -6940,8 +6823,6 @@ int16_t TriggerScript_0023::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0026::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 170: Prison Cinema if ((ScriptActionCtr_170 < 1) && (1)) { aCinematicSimple(Path_indexes[9], Message_strings[15], Object_handles[13], 10.000000f, 1); diff --git a/scripts/level13.cpp b/scripts/level13.cpp index 478db75ef..787882384 100644 --- a/scripts/level13.cpp +++ b/scripts/level13.cpp @@ -167,542 +167,541 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1074 : public BaseScript { +class CustomObjectScript_1074 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0878 : public BaseScript { +class CustomObjectScript_0878 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0877 : public BaseScript { +class CustomObjectScript_0877 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0879 : public BaseScript { +class CustomObjectScript_0879 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_6813 : public BaseScript { +class CustomObjectScript_6813 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083A : public BaseScript { +class CustomObjectScript_083A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0853 : public BaseScript { +class CustomObjectScript_0853 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0837 : public BaseScript { +class CustomObjectScript_0837 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0852 : public BaseScript { +class CustomObjectScript_0852 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2027 : public BaseScript { +class CustomObjectScript_2027 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_087E : public BaseScript { +class CustomObjectScript_087E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_9021 : public BaseScript { +class CustomObjectScript_9021 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_282A : public BaseScript { +class CustomObjectScript_282A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0838 : public BaseScript { +class CustomObjectScript_0838 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083D : public BaseScript { +class CustomObjectScript_083D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084E : public BaseScript { +class CustomObjectScript_084E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_085F : public BaseScript { +class CustomObjectScript_085F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_085D : public BaseScript { +class CustomObjectScript_085D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_085A : public BaseScript { +class CustomObjectScript_085A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0844 : public BaseScript { +class CustomObjectScript_0844 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0835 : public BaseScript { +class CustomObjectScript_0835 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1816 : public BaseScript { +class CustomObjectScript_1816 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0825 : public BaseScript { +class CustomObjectScript_0825 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084B : public BaseScript { +class CustomObjectScript_084B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0839 : public BaseScript { +class CustomObjectScript_0839 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1847 : public BaseScript { +class CustomObjectScript_1847 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10C6 : public BaseScript { +class CustomObjectScript_10C6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11F6 : public BaseScript { +class CustomObjectScript_11F6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A24 : public BaseScript { +class CustomObjectScript_0A24 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A23 : public BaseScript { +class CustomObjectScript_0A23 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18A0 : public BaseScript { +class CustomObjectScript_18A0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1090 : public BaseScript { +class CustomObjectScript_1090 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18B0 : public BaseScript { +class CustomObjectScript_18B0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08B6 : public BaseScript { +class CustomObjectScript_08B6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08B5 : public BaseScript { +class CustomObjectScript_08B5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08A9 : public BaseScript { +class CustomObjectScript_08A9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10BD : public BaseScript { +class CustomObjectScript_10BD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08BE : public BaseScript { +class CustomObjectScript_08BE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_105C : public BaseScript { +class CustomObjectScript_105C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084D : public BaseScript { +class CustomObjectScript_084D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_295F : public BaseScript { +class CustomObjectScript_295F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_182C : public BaseScript { +class CustomObjectScript_182C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2023 : public BaseScript { +class CustomObjectScript_2023 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0840 : public BaseScript { +class CustomObjectScript_0840 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_30C7 : public BaseScript { +class CustomObjectScript_30C7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A5C : public BaseScript { +class CustomObjectScript_0A5C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1134 : public BaseScript { +class CustomObjectScript_1134 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0887 : public BaseScript { +class CustomObjectScript_0887 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_095B : public BaseScript { +class CustomObjectScript_095B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_295E : public BaseScript { +class CustomObjectScript_295E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09F0 : public BaseScript { +class CustomObjectScript_09F0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09D3 : public BaseScript { +class CustomObjectScript_09D3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_087D : public BaseScript { +class CustomObjectScript_087D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0869 : public BaseScript { +class CustomObjectScript_0869 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09F9 : public BaseScript { +class CustomObjectScript_09F9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_193B : public BaseScript { +class CustomObjectScript_193B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A08 : public BaseScript { +class CustomObjectScript_0A08 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A14 : public BaseScript { +class CustomObjectScript_0A14 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08CB : public BaseScript { +class CustomObjectScript_08CB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A35 : public BaseScript { +class CustomObjectScript_0A35 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_9233 : public BaseScript { +class CustomObjectScript_9233 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_092B : public BaseScript { +class CustomObjectScript_092B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0929 : public BaseScript { +class CustomObjectScript_0929 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_112A : public BaseScript { +class CustomObjectScript_112A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0928 : public BaseScript { +class CustomObjectScript_0928 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_29E9 : public BaseScript { +class CustomObjectScript_29E9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0028 : public BaseScript { +class TriggerScript_0028 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0026 : public BaseScript { +class TriggerScript_0026 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0023 : public BaseScript { +class TriggerScript_0023 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0021 : public BaseScript { +class TriggerScript_0021 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0020 : public BaseScript { +class TriggerScript_0020 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001D : public BaseScript { +class TriggerScript_001D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001C : public BaseScript { +class TriggerScript_001C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0019 : public BaseScript { +class TriggerScript_0019 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0018 : public BaseScript { +class TriggerScript_0018 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0027 : public BaseScript { +class TriggerScript_0027 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0025 : public BaseScript { +class TriggerScript_0025 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0024 : public BaseScript { +class TriggerScript_0024 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0022 : public BaseScript { +class TriggerScript_0022 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001F : public BaseScript { +class TriggerScript_001F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001E : public BaseScript { +class TriggerScript_001E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001B : public BaseScript { +class TriggerScript_001B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001A : public BaseScript { +class TriggerScript_001A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0017 : public BaseScript { +class TriggerScript_0017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0014 : public BaseScript { +class TriggerScript_0014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0029 : public BaseScript { +class TriggerScript_0029 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_002A : public BaseScript { +class TriggerScript_002A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_002B : public BaseScript { +class TriggerScript_002B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -2770,10 +2769,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -2800,8 +2795,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -3015,8 +3008,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_PLAYER_MOVIE_END: { - tOSIRISEVTPLAYERMOVIEEND *event_data = &data->evt_player_movie_end; - // Script 049: Start Level Objectives Messege if ((ScriptActionCtr_049 < 1) && (1)) { aCinematicSimple(Path_indexes[7], Message_strings[28], Object_handles[30], 10.000000f, 1); @@ -3201,8 +3192,6 @@ int16_t CustomObjectScript_0837::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0852::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 019: Acc Floor Spewer if (1) { aTurnOnSpew(Object_handles[26], -1, 7, 0.000000f, 0.000000f, 65536, 0, 2.500000f, 0.150000f, -1.000000f, @@ -3220,8 +3209,6 @@ int16_t CustomObjectScript_0852::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_2027::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 023: Turret Controller if (qObjExists(Object_handles[28]) == false) { aAISetState(0, data->me_handle); @@ -3238,8 +3225,6 @@ int16_t CustomObjectScript_2027::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_087E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 022: Turret Controller if (qObjExists(Object_handles[28]) == false) { aAISetState(0, data->me_handle); @@ -3273,8 +3258,6 @@ int16_t CustomObjectScript_9021::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 056: Start Level Objectives Messege 2 if ((ScriptActionCtr_056 < 1) && (1)) { aCinematicSimple(Path_indexes[8], Message_strings[29], Object_handles[16], 10.000000f, 1); @@ -3686,8 +3669,6 @@ int16_t CustomObjectScript_1090::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_18B0::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 028: Bad White Cage Exists if (qObjExists(Object_handles[53]) == true) { aAISetState(0, Object_handles[52]); @@ -3706,8 +3687,6 @@ int16_t CustomObjectScript_18B0::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08B6::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 029: Bad TailbotCage Exists if (qObjExists(Object_handles[53]) == true) { aAISetState(0, Object_handles[54]); @@ -3774,8 +3753,6 @@ int16_t CustomObjectScript_08A9::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_10BD::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 032: Air Spewers if (1) { aTurnOnSpew(data->me_handle, 0, 7, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.150000f, -1.000000f, 5.000000f, @@ -3793,8 +3770,6 @@ int16_t CustomObjectScript_10BD::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08BE::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 041: Air Spewers if (1) { aTurnOnSpew(data->me_handle, 0, 7, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.150000f, -1.000000f, 5.000000f, @@ -3812,8 +3787,6 @@ int16_t CustomObjectScript_08BE::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_105C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 050: Air Spewers if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.150000f, -1.000000f, 5.000000f, @@ -3831,8 +3804,6 @@ int16_t CustomObjectScript_105C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_084D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 072: Air Spewers if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.150000f, -1.000000f, 10.000000f, @@ -3850,8 +3821,6 @@ int16_t CustomObjectScript_084D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_295F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 123: Air Spewers if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 0.900000f, 0.150000f, -1.000000f, 14.000000f, @@ -3882,8 +3851,6 @@ int16_t CustomObjectScript_295F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_182C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 064: Air Spewers if (1) { aTurnOnSpew(data->me_handle, -1, 7, 0.000000f, 0.000000f, 65536, 0, 0.900000f, 0.150000f, -1.000000f, 14.000000f, @@ -3922,8 +3889,6 @@ int16_t CustomObjectScript_2023::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0840::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 035: Jugg AI if (1) { aAISetState(0, data->me_handle); @@ -3960,8 +3925,6 @@ int16_t CustomObjectScript_30C7::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 073: Start Level Objectives Messege 3 if ((ScriptActionCtr_073 < 1) && (1)) { aSoundPlaySteaming("VoxL13StartLevel.osf", 1.000000f); @@ -4217,8 +4180,6 @@ int16_t CustomObjectScript_0A08::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 082: Spy Hunter Off if (1) { aAISetState(0, data->me_handle); @@ -4260,8 +4221,6 @@ int16_t CustomObjectScript_0A14::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 081: Sub Squid Off if (1) { aAISetState(0, data->me_handle); @@ -4295,8 +4254,6 @@ int16_t CustomObjectScript_08CB::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0A35::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 133: FlameRas Created if (1) { aObjSetMovementType(data->me_handle, 0); @@ -4313,8 +4270,6 @@ int16_t CustomObjectScript_0A35::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_9233::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 118: FlameRas Created if (1) { aObjSetMovementType(data->me_handle, 0); @@ -4331,8 +4286,6 @@ int16_t CustomObjectScript_9233::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_092B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 127: ST Monitor - Sleep if (1) { aObjSetMovementType(data->me_handle, 0); @@ -4361,8 +4314,6 @@ int16_t CustomObjectScript_092B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0929::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 126: ST Monitor2 - Sleep if (1) { aObjSetMovementType(data->me_handle, 0); @@ -4391,8 +4342,6 @@ int16_t CustomObjectScript_0929::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_112A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 125: ST Monitor3 - Sleep if (1) { aObjSetMovementType(data->me_handle, 0); @@ -4421,8 +4370,6 @@ int16_t CustomObjectScript_112A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0928::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 002: ST Monitor4 - Sleep if (1) { aObjSetMovementType(data->me_handle, 0); @@ -4451,8 +4398,6 @@ int16_t CustomObjectScript_0928::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_29E9::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 122: DatShip1 -- Path On Creation if (1) { aAIGoalFollowPath(Object_handles[86], Path_indexes[12], 1, 19, 1, 3, 8392960, -1); diff --git a/scripts/level14.cpp b/scripts/level14.cpp index c82bd9c4f..ae71a33fe 100644 --- a/scripts/level14.cpp +++ b/scripts/level14.cpp @@ -107,242 +107,241 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10B8 : public BaseScript { +class CustomObjectScript_10B8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0892 : public BaseScript { +class CustomObjectScript_0892 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0891 : public BaseScript { +class CustomObjectScript_0891 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0890 : public BaseScript { +class CustomObjectScript_0890 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08A8 : public BaseScript { +class CustomObjectScript_08A8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08A7 : public BaseScript { +class CustomObjectScript_08A7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_180F : public BaseScript { +class CustomObjectScript_180F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1081 : public BaseScript { +class CustomObjectScript_1081 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_186D : public BaseScript { +class CustomObjectScript_186D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08D3 : public BaseScript { +class CustomObjectScript_08D3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_188F : public BaseScript { +class CustomObjectScript_188F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0888 : public BaseScript { +class CustomObjectScript_0888 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_204F : public BaseScript { +class CustomObjectScript_204F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2870 : public BaseScript { +class CustomObjectScript_2870 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1025 : public BaseScript { +class CustomObjectScript_1025 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08A0 : public BaseScript { +class CustomObjectScript_08A0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_189E : public BaseScript { +class CustomObjectScript_189E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_109B : public BaseScript { +class CustomObjectScript_109B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_109D : public BaseScript { +class CustomObjectScript_109D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_409A : public BaseScript { +class CustomObjectScript_409A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_309C : public BaseScript { +class CustomObjectScript_309C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1083 : public BaseScript { +class CustomObjectScript_1083 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_088A : public BaseScript { +class CustomObjectScript_088A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_188B : public BaseScript { +class CustomObjectScript_188B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_088C : public BaseScript { +class CustomObjectScript_088C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_088D : public BaseScript { +class CustomObjectScript_088D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_088E : public BaseScript { +class CustomObjectScript_088E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2880 : public BaseScript { +class CustomObjectScript_2880 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10C3 : public BaseScript { +class CustomObjectScript_10C3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_4089 : public BaseScript { +class CustomObjectScript_4089 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_406F : public BaseScript { +class CustomObjectScript_406F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1082 : public BaseScript { +class CustomObjectScript_1082 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10D5 : public BaseScript { +class CustomObjectScript_10D5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10D4 : public BaseScript { +class CustomObjectScript_10D4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10D6 : public BaseScript { +class CustomObjectScript_10D6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0917 : public BaseScript { +class CustomObjectScript_0917 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10D7 : public BaseScript { +class CustomObjectScript_10D7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1770,10 +1769,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -1794,8 +1789,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 067: Update Bypass Connector Display if (qUserVarValue(0) != qUserVarValue(12)) { aUserVarSet(12, qUserVarValue(0)); @@ -1811,8 +1804,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -2231,8 +2222,6 @@ int16_t CustomObjectScript_10B8::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 064: Give Closest Player the Anti-Virus Program if ((ScriptActionCtr_064 < 1) && (qObjType(qPlayerClosest(data->me_handle, 10)) == 4)) { aAddObjectToInventory(data->me_handle, qPlayerClosest(data->me_handle, 10), 0); @@ -2296,8 +2285,6 @@ int16_t CustomObjectScript_10B8::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0892::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 029: Power Conduit1 Created if (1) { aObjSaveHandle(qGetAtachedChild(Object_handles[0], 0), 0); @@ -2315,8 +2302,6 @@ int16_t CustomObjectScript_0892::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0891::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 030: Power Conduit2 Created if (1) { aObjSaveHandle(qGetAtachedChild(Object_handles[1], 0), 1); @@ -2334,8 +2319,6 @@ int16_t CustomObjectScript_0891::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0890::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 031: Power Conduit3 Created if (1) { aObjSaveHandle(qGetAtachedChild(Object_handles[2], 0), 2); @@ -2904,8 +2887,6 @@ int16_t CustomObjectScript_309C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1083::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 019: Mirror Node #1 Hit if (qUserFlag(17) == false) { if (((qObjAnimFrame(data->me_handle) == 0.000000f) || (qObjAnimFrame(data->me_handle) == 12.000000f)) && @@ -2954,8 +2935,6 @@ int16_t CustomObjectScript_1083::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_088A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 024: Mirror Node #2 Hit if (qUserFlag(17) == false) { if (((qObjAnimFrame(data->me_handle) == 0.000000f) || (qObjAnimFrame(data->me_handle) == 12.000000f)) && @@ -3004,8 +2983,6 @@ int16_t CustomObjectScript_088A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_188B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 025: Mirror Node #3 Hit if (qUserFlag(17) == false) { if (((qObjAnimFrame(data->me_handle) == 0.000000f) || (qObjAnimFrame(data->me_handle) == 12.000000f)) && @@ -3054,8 +3031,6 @@ int16_t CustomObjectScript_188B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_088C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 026: Mirror Node #4 Hit if (qUserFlag(17) == false) { if (((qObjAnimFrame(data->me_handle) == 0.000000f) || (qObjAnimFrame(data->me_handle) == 12.000000f)) && @@ -3104,8 +3079,6 @@ int16_t CustomObjectScript_088C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_088D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 027: Mirror Node #5 Hit if (qUserFlag(17) == false) { if (((qObjAnimFrame(data->me_handle) == 0.000000f) || (qObjAnimFrame(data->me_handle) == 12.000000f)) && @@ -3154,8 +3127,6 @@ int16_t CustomObjectScript_088D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_088E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 028: Mirror Node #6 Hit if (qUserFlag(17) == false) { if (((qObjAnimFrame(data->me_handle) == 0.000000f) || (qObjAnimFrame(data->me_handle) == 12.000000f)) && diff --git a/scripts/level17.cpp b/scripts/level17.cpp index ba09b5dda..b35a104c7 100644 --- a/scripts/level17.cpp +++ b/scripts/level17.cpp @@ -193,672 +193,671 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0821 : public BaseScript { +class CustomObjectScript_0821 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0820 : public BaseScript { +class CustomObjectScript_0820 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_181E : public BaseScript { +class CustomObjectScript_181E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_081F : public BaseScript { +class CustomObjectScript_081F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0814 : public BaseScript { +class CustomObjectScript_0814 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0815 : public BaseScript { +class CustomObjectScript_0815 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0816 : public BaseScript { +class CustomObjectScript_0816 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0818 : public BaseScript { +class CustomObjectScript_0818 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0819 : public BaseScript { +class CustomObjectScript_0819 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0817 : public BaseScript { +class CustomObjectScript_0817 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1024 : public BaseScript { +class CustomObjectScript_1024 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0826 : public BaseScript { +class CustomObjectScript_0826 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0828 : public BaseScript { +class CustomObjectScript_0828 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0827 : public BaseScript { +class CustomObjectScript_0827 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_086A : public BaseScript { +class CustomObjectScript_086A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_086B : public BaseScript { +class CustomObjectScript_086B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1025 : public BaseScript { +class CustomObjectScript_1025 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0829 : public BaseScript { +class CustomObjectScript_0829 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0809 : public BaseScript { +class CustomObjectScript_0809 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0808 : public BaseScript { +class CustomObjectScript_0808 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1007 : public BaseScript { +class CustomObjectScript_1007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1006 : public BaseScript { +class CustomObjectScript_1006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0805 : public BaseScript { +class CustomObjectScript_0805 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1004 : public BaseScript { +class CustomObjectScript_1004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1003 : public BaseScript { +class CustomObjectScript_1003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_100E : public BaseScript { +class CustomObjectScript_100E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0845 : public BaseScript { +class CustomObjectScript_0845 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0844 : public BaseScript { +class CustomObjectScript_0844 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0843 : public BaseScript { +class CustomObjectScript_0843 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0842 : public BaseScript { +class CustomObjectScript_0842 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0841 : public BaseScript { +class CustomObjectScript_0841 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0840 : public BaseScript { +class CustomObjectScript_0840 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083F : public BaseScript { +class CustomObjectScript_083F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083E : public BaseScript { +class CustomObjectScript_083E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083D : public BaseScript { +class CustomObjectScript_083D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083C : public BaseScript { +class CustomObjectScript_083C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083B : public BaseScript { +class CustomObjectScript_083B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083A : public BaseScript { +class CustomObjectScript_083A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0851 : public BaseScript { +class CustomObjectScript_0851 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0850 : public BaseScript { +class CustomObjectScript_0850 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084F : public BaseScript { +class CustomObjectScript_084F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084E : public BaseScript { +class CustomObjectScript_084E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084D : public BaseScript { +class CustomObjectScript_084D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084C : public BaseScript { +class CustomObjectScript_084C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084B : public BaseScript { +class CustomObjectScript_084B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084A : public BaseScript { +class CustomObjectScript_084A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0849 : public BaseScript { +class CustomObjectScript_0849 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0848 : public BaseScript { +class CustomObjectScript_0848 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0847 : public BaseScript { +class CustomObjectScript_0847 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0846 : public BaseScript { +class CustomObjectScript_0846 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_085D : public BaseScript { +class CustomObjectScript_085D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_085C : public BaseScript { +class CustomObjectScript_085C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_085B : public BaseScript { +class CustomObjectScript_085B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_085A : public BaseScript { +class CustomObjectScript_085A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0859 : public BaseScript { +class CustomObjectScript_0859 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0858 : public BaseScript { +class CustomObjectScript_0858 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0857 : public BaseScript { +class CustomObjectScript_0857 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0856 : public BaseScript { +class CustomObjectScript_0856 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0855 : public BaseScript { +class CustomObjectScript_0855 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0854 : public BaseScript { +class CustomObjectScript_0854 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0853 : public BaseScript { +class CustomObjectScript_0853 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0852 : public BaseScript { +class CustomObjectScript_0852 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0869 : public BaseScript { +class CustomObjectScript_0869 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0868 : public BaseScript { +class CustomObjectScript_0868 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0867 : public BaseScript { +class CustomObjectScript_0867 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0866 : public BaseScript { +class CustomObjectScript_0866 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0865 : public BaseScript { +class CustomObjectScript_0865 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0864 : public BaseScript { +class CustomObjectScript_0864 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0863 : public BaseScript { +class CustomObjectScript_0863 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0862 : public BaseScript { +class CustomObjectScript_0862 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0861 : public BaseScript { +class CustomObjectScript_0861 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0860 : public BaseScript { +class CustomObjectScript_0860 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_085F : public BaseScript { +class CustomObjectScript_085F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_085E : public BaseScript { +class CustomObjectScript_085E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_003B : public BaseScript { +class TriggerScript_003B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_003A : public BaseScript { +class TriggerScript_003A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0035 : public BaseScript { +class TriggerScript_0035 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0034 : public BaseScript { +class TriggerScript_0034 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0031 : public BaseScript { +class TriggerScript_0031 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_002F : public BaseScript { +class TriggerScript_002F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_002E : public BaseScript { +class TriggerScript_002E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0023 : public BaseScript { +class TriggerScript_0023 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0022 : public BaseScript { +class TriggerScript_0022 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0021 : public BaseScript { +class TriggerScript_0021 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0020 : public BaseScript { +class TriggerScript_0020 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001B : public BaseScript { +class TriggerScript_001B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001A : public BaseScript { +class TriggerScript_001A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0017 : public BaseScript { +class TriggerScript_0017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0014 : public BaseScript { +class TriggerScript_0014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_003D : public BaseScript { +class TriggerScript_003D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_003C : public BaseScript { +class TriggerScript_003C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0039 : public BaseScript { +class TriggerScript_0039 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0038 : public BaseScript { +class TriggerScript_0038 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0037 : public BaseScript { +class TriggerScript_0037 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0036 : public BaseScript { +class TriggerScript_0036 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0033 : public BaseScript { +class TriggerScript_0033 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0032 : public BaseScript { +class TriggerScript_0032 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0030 : public BaseScript { +class TriggerScript_0030 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_002C : public BaseScript { +class TriggerScript_002C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0027 : public BaseScript { +class TriggerScript_0027 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0026 : public BaseScript { +class TriggerScript_0026 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0025 : public BaseScript { +class TriggerScript_0025 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0024 : public BaseScript { +class TriggerScript_0024 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001F : public BaseScript { +class TriggerScript_001F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001E : public BaseScript { +class TriggerScript_001E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001D : public BaseScript { +class TriggerScript_001D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001C : public BaseScript { +class TriggerScript_001C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0019 : public BaseScript { +class TriggerScript_0019 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0018 : public BaseScript { +class TriggerScript_0018 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0040 : public BaseScript { +class TriggerScript_0040 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -3184,10 +3183,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -3208,8 +3203,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -3496,8 +3489,6 @@ int16_t CustomObjectScript_0815::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0816::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 101: MiniReactorBlue TimerChain if ((ScriptActionCtr_101 < 1) && (1)) { aSetObjectTimer(Object_handles[11], 6.000000f, -1); @@ -3580,8 +3571,6 @@ int16_t CustomObjectScript_0819::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0817::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 100: MiniReactorWhite TimerChain if ((ScriptActionCtr_100 < 1) && (1)) { aSetObjectTimer(Object_handles[26], 6.000000f, -1); @@ -3712,8 +3701,6 @@ int16_t CustomObjectScript_0827::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_086A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 103: MiniReactorRed-2 Timer Chain if ((ScriptActionCtr_103 < 1) && (1)) { aSetObjectTimer(Object_handles[45], 6.000000f, -1); @@ -3741,8 +3728,6 @@ int16_t CustomObjectScript_086A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_086B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 102: MiniReactorRed-1 Timer Chain if ((ScriptActionCtr_102 < 1) && (1)) { aSetObjectTimer(Object_handles[57], 6.000000f, -1); @@ -3794,8 +3779,6 @@ int16_t CustomObjectScript_1025::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 073: MiniReactorRed Timer if ((ScriptActionCtr_073 < 1) && (1)) { aGoalCompleted(Goal_indexes[4], 1); @@ -3814,8 +3797,6 @@ int16_t CustomObjectScript_1025::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0829::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 075: ReactorShake if (1) { aSetObjectTimer(data->me_handle, qRandomValue(0.500000f, 1.600000f), -1); @@ -3833,8 +3814,6 @@ int16_t CustomObjectScript_0829::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0809::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 083: CycleFlames-5 if (1) { aSoundPlayObject(Sound_indexes[5], Object_handles[72], 1.000000f); @@ -3871,8 +3850,6 @@ int16_t CustomObjectScript_0809::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0808::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 082: CycleFlames-4 if (1) { aSoundPlayObject(Sound_indexes[5], Object_handles[76], 1.000000f); @@ -3909,8 +3886,6 @@ int16_t CustomObjectScript_0808::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1007::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 081: CycleFlames-3 if (1) { aSoundPlayObject(Sound_indexes[5], Object_handles[79], 1.000000f); @@ -3947,8 +3922,6 @@ int16_t CustomObjectScript_1007::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1006::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 080: CycleFlames-2 if (1) { aSoundPlayObject(Sound_indexes[5], Object_handles[84], 1.000000f); @@ -3985,8 +3958,6 @@ int16_t CustomObjectScript_1006::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0805::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 079: CycleFlames-1 if (1) { aSoundPlayObject(Sound_indexes[5], Object_handles[87], 1.000000f); @@ -4095,8 +4066,6 @@ int16_t CustomObjectScript_100E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0845::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 099: Blow Up Child ACW-12 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4113,8 +4082,6 @@ int16_t CustomObjectScript_0845::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0844::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 098: Blow Up Child ACW-11 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4131,8 +4098,6 @@ int16_t CustomObjectScript_0844::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0843::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 097: Blow Up Child ACW-10 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4149,8 +4114,6 @@ int16_t CustomObjectScript_0843::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0842::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 096: Blow Up Child ACW-9 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4167,8 +4130,6 @@ int16_t CustomObjectScript_0842::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0841::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 095: Blow Up Child ACW-8 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4185,8 +4146,6 @@ int16_t CustomObjectScript_0841::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0840::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 094: Blow Up Child ACW-7 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4203,8 +4162,6 @@ int16_t CustomObjectScript_0840::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_083F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 093: Blow Up Child ACW-6 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4221,8 +4178,6 @@ int16_t CustomObjectScript_083F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_083E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 092: Blow Up Child ACW-5 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4239,8 +4194,6 @@ int16_t CustomObjectScript_083E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_083D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 091: Blow Up Child ACW-4 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4257,8 +4210,6 @@ int16_t CustomObjectScript_083D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_083C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 090: Blow Up Child ACW-3 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4275,8 +4226,6 @@ int16_t CustomObjectScript_083C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_083B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 089: Blow Up Child ACW-2 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4293,8 +4242,6 @@ int16_t CustomObjectScript_083B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_083A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 088: Blow Up Child ACW-1 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4311,8 +4258,6 @@ int16_t CustomObjectScript_083A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0851::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 115: Blow Up Child ACB-12 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4329,8 +4274,6 @@ int16_t CustomObjectScript_0851::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0850::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 114: Blow Up Child ACB-11 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4347,8 +4290,6 @@ int16_t CustomObjectScript_0850::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_084F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 113: Blow Up Child ACB-10 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4365,8 +4306,6 @@ int16_t CustomObjectScript_084F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_084E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 112: Blow Up Child ACB-9 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4383,8 +4322,6 @@ int16_t CustomObjectScript_084E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_084D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 111: Blow Up Child ACB-8 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4401,8 +4338,6 @@ int16_t CustomObjectScript_084D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_084C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 110: Blow Up Child ACB-7 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4419,8 +4354,6 @@ int16_t CustomObjectScript_084C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_084B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 109: Blow Up Child ACB-6 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4437,8 +4370,6 @@ int16_t CustomObjectScript_084B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_084A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 108: Blow Up Child ACB-5 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4455,8 +4386,6 @@ int16_t CustomObjectScript_084A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0849::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 107: Blow Up Child ACB-4 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4473,8 +4402,6 @@ int16_t CustomObjectScript_0849::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0848::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 106: Blow Up Child ACB-3 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4491,8 +4418,6 @@ int16_t CustomObjectScript_0848::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0847::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 105: Blow Up Child ACB-2 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4509,8 +4434,6 @@ int16_t CustomObjectScript_0847::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0846::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 104: Blow Up Child ACB-1 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4527,8 +4450,6 @@ int16_t CustomObjectScript_0846::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_085D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 127: Blow Up Child ACR-12 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4545,8 +4466,6 @@ int16_t CustomObjectScript_085D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_085C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 126: Blow Up Child ACR-11 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4563,8 +4482,6 @@ int16_t CustomObjectScript_085C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_085B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 125: Blow Up Child ACR-10 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4581,8 +4498,6 @@ int16_t CustomObjectScript_085B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_085A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 124: Blow Up Child ACR-9 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4599,8 +4514,6 @@ int16_t CustomObjectScript_085A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0859::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 123: Blow Up Child ACR-8 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4617,8 +4530,6 @@ int16_t CustomObjectScript_0859::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0858::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 122: Blow Up Child ACR-7 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4635,8 +4546,6 @@ int16_t CustomObjectScript_0858::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0857::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 121: Blow Up Child ACR-6 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4653,8 +4562,6 @@ int16_t CustomObjectScript_0857::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0856::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 120: Blow Up Child ACR-5 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4671,8 +4578,6 @@ int16_t CustomObjectScript_0856::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0855::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 119: Blow Up Child ACR-4 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4689,8 +4594,6 @@ int16_t CustomObjectScript_0855::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0854::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 118: Blow Up Child ACR-3 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4707,8 +4610,6 @@ int16_t CustomObjectScript_0854::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0853::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 117: Blow Up Child ACR-2 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4725,8 +4626,6 @@ int16_t CustomObjectScript_0853::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0852::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 116: Blow Up Child ACR-1 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4743,8 +4642,6 @@ int16_t CustomObjectScript_0852::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0869::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 139: Blow Up Child ACS-12 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4761,8 +4658,6 @@ int16_t CustomObjectScript_0869::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0868::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 138: Blow Up Child ACS-11 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4779,8 +4674,6 @@ int16_t CustomObjectScript_0868::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0867::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 137: Blow Up Child ACS-10 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4797,8 +4690,6 @@ int16_t CustomObjectScript_0867::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0866::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 136: Blow Up Child ACS-9 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4815,8 +4706,6 @@ int16_t CustomObjectScript_0866::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0865::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 135: Blow Up Child ACS-8 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4833,8 +4722,6 @@ int16_t CustomObjectScript_0865::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0864::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 134: Blow Up Child ACS-7 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4851,8 +4738,6 @@ int16_t CustomObjectScript_0864::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0863::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 133: Blow Up Child ACS-6 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4869,8 +4754,6 @@ int16_t CustomObjectScript_0863::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0862::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 132: Blow Up Child ACS-5 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4887,8 +4770,6 @@ int16_t CustomObjectScript_0862::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0861::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 131: Blow Up Child ACS-4 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4905,8 +4786,6 @@ int16_t CustomObjectScript_0861::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0860::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 130: Blow Up Child ACS-3 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4923,8 +4802,6 @@ int16_t CustomObjectScript_0860::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_085F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 129: Blow Up Child ACS-2 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4941,8 +4818,6 @@ int16_t CustomObjectScript_085F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_085E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 128: Blow Up Child ACS-1 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -6043,8 +5918,6 @@ int16_t TriggerScript_0002::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0040::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 077: End Level Camera if ((ScriptActionCtr_077 < 1) && (1)) { aGoalCompleted(Goal_indexes[6], 1); diff --git a/scripts/level2.cpp b/scripts/level2.cpp index 0f5bd5ff5..28d3f4b51 100644 --- a/scripts/level2.cpp +++ b/scripts/level2.cpp @@ -127,342 +127,341 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_082D : public BaseScript { +class CustomObjectScript_082D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_082E : public BaseScript { +class CustomObjectScript_082E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_082F : public BaseScript { +class CustomObjectScript_082F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0830 : public BaseScript { +class CustomObjectScript_0830 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0831 : public BaseScript { +class CustomObjectScript_0831 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2112 : public BaseScript { +class CustomObjectScript_2112 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11F2 : public BaseScript { +class CustomObjectScript_11F2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11F4 : public BaseScript { +class CustomObjectScript_11F4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11F6 : public BaseScript { +class CustomObjectScript_11F6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_19F7 : public BaseScript { +class CustomObjectScript_19F7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11FB : public BaseScript { +class CustomObjectScript_11FB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1211 : public BaseScript { +class CustomObjectScript_1211 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0885 : public BaseScript { +class CustomObjectScript_0885 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_080D : public BaseScript { +class CustomObjectScript_080D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09EC : public BaseScript { +class CustomObjectScript_09EC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11EB : public BaseScript { +class CustomObjectScript_11EB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_19E9 : public BaseScript { +class CustomObjectScript_19E9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_19E8 : public BaseScript { +class CustomObjectScript_19E8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_19EA : public BaseScript { +class CustomObjectScript_19EA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09E7 : public BaseScript { +class CustomObjectScript_09E7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09E6 : public BaseScript { +class CustomObjectScript_09E6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11BB : public BaseScript { +class CustomObjectScript_11BB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09BC : public BaseScript { +class CustomObjectScript_09BC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09BD : public BaseScript { +class CustomObjectScript_09BD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09BE : public BaseScript { +class CustomObjectScript_09BE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11BF : public BaseScript { +class CustomObjectScript_11BF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C0 : public BaseScript { +class CustomObjectScript_09C0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11C1 : public BaseScript { +class CustomObjectScript_11C1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11BA : public BaseScript { +class CustomObjectScript_11BA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C9 : public BaseScript { +class CustomObjectScript_09C9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C8 : public BaseScript { +class CustomObjectScript_09C8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C7 : public BaseScript { +class CustomObjectScript_09C7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C6 : public BaseScript { +class CustomObjectScript_09C6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C5 : public BaseScript { +class CustomObjectScript_09C5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C4 : public BaseScript { +class CustomObjectScript_09C4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C3 : public BaseScript { +class CustomObjectScript_09C3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C2 : public BaseScript { +class CustomObjectScript_09C2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_094E : public BaseScript { +class CustomObjectScript_094E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0014 : public BaseScript { +class TriggerScript_0014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0017 : public BaseScript { +class TriggerScript_0017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0018 : public BaseScript { +class TriggerScript_0018 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0020 : public BaseScript { +class TriggerScript_0020 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001F : public BaseScript { +class TriggerScript_001F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001E : public BaseScript { +class TriggerScript_001E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -2170,10 +2169,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -2194,8 +2189,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 038: Found Sweitzer in Minimum Security if ((ScriptActionCtr_038 < 1) && ((qObjCanSeePlayerAdvancedWithStore(3, 360, Object_handles[61], 80.000000f, 1048585) == true) && @@ -2284,8 +2277,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -3052,8 +3043,6 @@ int16_t CustomObjectScript_2112::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_11F2::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 115: Start Shuttle Tunnel Shot if (1) { aObjGhostSet(1, Object_handles[0]); @@ -3076,8 +3065,6 @@ int16_t CustomObjectScript_11F2::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_11F4::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 117: Start Shuttle Arriving at Cell Shot if (1) { aObjGhostSet(1, Object_handles[0]); @@ -3099,8 +3086,6 @@ int16_t CustomObjectScript_11F4::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_11F6::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 116: Start Shuttle In Cell Shot if (1) { aObjGhostSet(1, Object_handles[11]); @@ -3122,8 +3107,6 @@ int16_t CustomObjectScript_11F6::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_19F7::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 122: Start Shuttle Cell Shot Part 2 if (1) { aObjSetMovementType(Object_handles[8], 2); @@ -3161,8 +3144,6 @@ int16_t CustomObjectScript_11FB::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1211::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 118: Start Shuttle Leaving Cell Shot if (1) { aObjGhostSet(1, Object_handles[8]); @@ -3204,8 +3185,6 @@ int16_t CustomObjectScript_0885::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 041: Shuttle Going To Sweitzer if ((ScriptActionCtr_041 < 1) && ((qUserFlag(9) == true) && (qUserFlag(8) == true) && (1 == false))) { aAIGoalFollowPathSimple(Object_handles[0], Path_indexes[2], 4096, 3, 3); @@ -3232,8 +3211,6 @@ int16_t CustomObjectScript_0885::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 119: Start Player and Shuttle Exit Shot if (1) { aObjGhostSet(1, Object_handles[0]); @@ -4158,8 +4135,6 @@ int16_t CustomObjectScript_094E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 013: Supply Hangar Alarm if (1) { aAIGoalFollowPathSimple(Object_handles[25], Path_indexes[12], 2101504, 6, 3); @@ -4707,8 +4682,6 @@ int16_t TriggerScript_0012::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0020::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 104: Maximum VOX Trigger if (qUserFlag(5) == false) { aSoundPlaySteaming("VoxL02SpecificA.osf", 1.000000f); @@ -4725,8 +4698,6 @@ int16_t TriggerScript_0020::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_001F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 103: Medium VOX Trigger if (qUserFlag(4) == false) { aSoundPlaySteaming("VoxL02SpecificA.osf", 1.000000f); @@ -4743,8 +4714,6 @@ int16_t TriggerScript_001F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_001E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 098: Minimum VOX Trigger if (qUserFlag(3) == false) { aSoundPlaySteaming("VoxL02SpecificA.osf", 1.000000f); diff --git a/scripts/level3.cpp b/scripts/level3.cpp index b5b536982..00f651ec1 100644 --- a/scripts/level3.cpp +++ b/scripts/level3.cpp @@ -124,327 +124,326 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2109 : public BaseScript { +class CustomObjectScript_2109 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1AE9 : public BaseScript { +class CustomObjectScript_1AE9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_206D : public BaseScript { +class CustomObjectScript_206D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_117F : public BaseScript { +class CustomObjectScript_117F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_184A : public BaseScript { +class CustomObjectScript_184A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_4049 : public BaseScript { +class CustomObjectScript_4049 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0961 : public BaseScript { +class CustomObjectScript_0961 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0960 : public BaseScript { +class CustomObjectScript_0960 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_095F : public BaseScript { +class CustomObjectScript_095F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_095E : public BaseScript { +class CustomObjectScript_095E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_28D9 : public BaseScript { +class CustomObjectScript_28D9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_38E0 : public BaseScript { +class CustomObjectScript_38E0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1995 : public BaseScript { +class CustomObjectScript_1995 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11CB : public BaseScript { +class CustomObjectScript_11CB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_20D7 : public BaseScript { +class CustomObjectScript_20D7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_30D8 : public BaseScript { +class CustomObjectScript_30D8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_20DC : public BaseScript { +class CustomObjectScript_20DC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_28DA : public BaseScript { +class CustomObjectScript_28DA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11B7 : public BaseScript { +class CustomObjectScript_11B7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_21A7 : public BaseScript { +class CustomObjectScript_21A7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11C9 : public BaseScript { +class CustomObjectScript_11C9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_21CA : public BaseScript { +class CustomObjectScript_21CA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_202B : public BaseScript { +class CustomObjectScript_202B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18D6 : public BaseScript { +class CustomObjectScript_18D6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_202D : public BaseScript { +class CustomObjectScript_202D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_21CD : public BaseScript { +class CustomObjectScript_21CD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_182E : public BaseScript { +class CustomObjectScript_182E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_31CC : public BaseScript { +class CustomObjectScript_31CC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_431E : public BaseScript { +class CustomObjectScript_431E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1320 : public BaseScript { +class CustomObjectScript_1320 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_131F : public BaseScript { +class CustomObjectScript_131F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_131D : public BaseScript { +class CustomObjectScript_131D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_100C : public BaseScript { +class CustomObjectScript_100C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18AD : public BaseScript { +class CustomObjectScript_18AD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0019 : public BaseScript { +class TriggerScript_0019 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0018 : public BaseScript { +class TriggerScript_0018 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0017 : public BaseScript { +class TriggerScript_0017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0014 : public BaseScript { +class TriggerScript_0014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0022 : public BaseScript { +class TriggerScript_0022 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001A : public BaseScript { +class TriggerScript_001A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001D : public BaseScript { +class TriggerScript_001D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001C : public BaseScript { +class TriggerScript_001C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001E : public BaseScript { +class TriggerScript_001E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -2000,10 +1999,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -2030,8 +2025,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 095: Returned to Outside if ((ScriptActionCtr_095 < 1) && (((ScriptActionCtr_049 > 0) == true) && (qObjOnTerrain(qObjSavedHandle(17)) == true))) { @@ -2043,8 +2036,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -2323,8 +2314,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_PLAYER_MOVIE_END: { - tOSIRISEVTPLAYERMOVIEEND *event_data = &data->evt_player_movie_end; - // Script 003: LabDoors Init if ((ScriptActionCtr_003 < 1) && (1)) { aObjPlayAnim(Object_handles[27], 0, 2, 1.000000f, 0); @@ -2381,8 +2370,6 @@ int16_t CustomObjectScript_2109::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1AE9::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 069: Get LT's children if (1) { aObjSaveHandle(qGetAtachedChild(Object_handles[10], 0), 9); @@ -2556,8 +2543,6 @@ int16_t CustomObjectScript_0961::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 026: Toggle4Timer if (1) { if (qUserVarValue(3) == 2.000000f) { @@ -2608,8 +2593,6 @@ int16_t CustomObjectScript_0960::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 025: Toggle3Timer if (1) { if (qUserVarValue(2) == 2.000000f) { @@ -2660,8 +2643,6 @@ int16_t CustomObjectScript_095F::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 024: Toggle2Timer if (1) { if (qUserVarValue(1) == 2.000000f) { @@ -2712,8 +2693,6 @@ int16_t CustomObjectScript_095E::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 019: Toggle1Timer if (1) { if (qUserVarValue(0) == 2.000000f) { @@ -2765,8 +2744,6 @@ int16_t CustomObjectScript_28D9::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 088: OctaWest Timer if (1) { aUserFlagSet(4, 1); @@ -2814,8 +2791,6 @@ int16_t CustomObjectScript_38E0::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 046: OctaNorth Timer if (1) { aUserFlagSet(5, 1); @@ -2863,8 +2838,6 @@ int16_t CustomObjectScript_1995::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 045: OctaControl Timer if (1) { aUserFlagSet(3, 1); @@ -2912,8 +2885,6 @@ int16_t CustomObjectScript_11CB::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 044: OctaTrans Timer if (1) { aUserFlagSet(2, 1); @@ -3006,8 +2977,6 @@ int16_t CustomObjectScript_30D8::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 043: OctaSouth Timer if (1) { aUserFlagSet(7, 1); @@ -3100,8 +3069,6 @@ int16_t CustomObjectScript_28DA::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 042: OctaEast Timer if (1) { aUserFlagSet(6, 1); @@ -3194,8 +3161,6 @@ int16_t CustomObjectScript_21A7::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 014: OctaStore Timer if (1) { aUserFlagSet(0, 1); @@ -3288,8 +3253,6 @@ int16_t CustomObjectScript_21CA::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 033: OctaLab Timer if (1) { aUserFlagSet(1, 1); @@ -3386,8 +3349,6 @@ int16_t CustomObjectScript_202D::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 089: ThiefIntro Done if ((ScriptActionCtr_089 < 1) && (1)) { aSoundPlaySteaming("VoxL03SpecificD.osf", 1.000000f); @@ -3522,8 +3483,6 @@ int16_t CustomObjectScript_31CC::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_431E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 065: Get LTCbase1's children if (1) { aObjSaveHandle(qGetAtachedChild(Object_handles[44], 0), 5); @@ -3542,8 +3501,6 @@ int16_t CustomObjectScript_431E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1320::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 066: Get LTCbase2's children if (1) { aObjSaveHandle(qGetAtachedChild(Object_handles[45], 0), 6); @@ -3562,8 +3519,6 @@ int16_t CustomObjectScript_1320::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_131F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 067: Get LTCbase3's children if (1) { aObjSaveHandle(qGetAtachedChild(Object_handles[46], 0), 7); @@ -3582,8 +3537,6 @@ int16_t CustomObjectScript_131F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_131D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 068: Get LTCbase4's children if (1) { aObjSaveHandle(qGetAtachedChild(Object_handles[47], 0), 8); @@ -3700,8 +3653,6 @@ int16_t TriggerScript_0002::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 011: Waypoint5 if (1) { aSetWaypoint(5); @@ -3718,8 +3669,6 @@ int16_t TriggerScript_000A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0001::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 010: Waypoint4 if (1) { aSetWaypoint(4); @@ -3736,8 +3685,6 @@ int16_t TriggerScript_0001::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 008: Waypoint2 if (1) { aSetWaypoint(2); @@ -3754,8 +3701,6 @@ int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 007: Waypoint1 if (1) { aSetWaypoint(1); @@ -3772,8 +3717,6 @@ int16_t TriggerScript_000B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 059: Voice Trigger 10 if ((ScriptActionCtr_059 < 1) && (1)) { aSoundPlaySteaming("VoxCompIntruderB.osf", 0.500000f); @@ -3790,8 +3733,6 @@ int16_t TriggerScript_000E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 057: Voice Trigger 8 if ((ScriptActionCtr_057 < 1) && (1)) { @@ -3807,8 +3748,6 @@ int16_t TriggerScript_000D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_000C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 056: Voice Trigger 7 if ((ScriptActionCtr_056 < 1) && (1)) { aSoundPlaySteaming("VoxCompPowerDamage.osf", 0.500000f); @@ -3825,8 +3764,6 @@ int16_t TriggerScript_000C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0009::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 055: Voice Computer if ((ScriptActionCtr_055 < 1) && (1)) { aSoundPlaySteaming("VoxCompComDatalink.osf", 0.500000f); @@ -3870,8 +3807,6 @@ int16_t TriggerScript_0006::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0007::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 052: Voice Trigger 3 if ((ScriptActionCtr_052 < 1) && (1)) { aSoundPlaySteaming("VoxCompEmergencyA.osf", 0.500000f); @@ -3888,8 +3823,6 @@ int16_t TriggerScript_0007::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0004::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 051: Voice Trigger 2 if ((ScriptActionCtr_051 < 1) && (1)) { aSoundPlaySteaming("VoxCompSecurityLockdown.osf", 0.500000f); @@ -3906,8 +3839,6 @@ int16_t TriggerScript_0004::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0008::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 050: Voice Trigger 1 if ((ScriptActionCtr_050 < 1) && (1)) { @@ -4187,8 +4118,6 @@ int16_t TriggerScript_001C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_001E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 105: Upload Node Description if ((ScriptActionCtr_105 < 1) && (1)) { aShowHUDMessage(Message_strings[21]); diff --git a/scripts/level4.cpp b/scripts/level4.cpp index f0d614914..bc6c56d28 100644 --- a/scripts/level4.cpp +++ b/scripts/level4.cpp @@ -75,82 +75,81 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08B3 : public BaseScript { +class CustomObjectScript_08B3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08AE : public BaseScript { +class CustomObjectScript_08AE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1213 : public BaseScript { +class CustomObjectScript_1213 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_117D : public BaseScript { +class CustomObjectScript_117D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -972,10 +971,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -1002,8 +997,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -1760,8 +1753,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_PLAYER_MOVIE_END: { - tOSIRISEVTPLAYERMOVIEEND *event_data = &data->evt_player_movie_end; - // Script 054: After Intro Movie if ((ScriptActionCtr_054 < 1) && (1)) { aSoundPlaySteaming("VoxL04StartLevel.osf", 1.000000f); @@ -1791,8 +1782,6 @@ int16_t CustomObjectScript_08B3::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 030: Data Cartridge INIT if (1) { aObjGhostSet(1, Object_handles[5]); @@ -1816,8 +1805,6 @@ int16_t CustomObjectScript_08B3::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 055: Data Cartridge ADD if ((ScriptActionCtr_055 < 1) && (qObjType(qPlayerClosest(data->me_handle, -1)) == 4)) { aAddObjectToInventory(data->me_handle, qPlayerClosest(data->me_handle, -1), 0); @@ -1876,8 +1863,6 @@ int16_t CustomObjectScript_08B3::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08AE::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 032: After Upload Movie if (1) { aShowHUDMessage(Message_strings[4]); @@ -1942,8 +1927,6 @@ int16_t CustomObjectScript_117D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 029: Entered Suzuki if ((ScriptActionCtr_029 < 1) && (1)) { aShowHUDMessage(Message_strings[1]); @@ -1960,8 +1943,6 @@ int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0001::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 035: Mercenary Intro if ((ScriptActionCtr_035 < 1) && ((ScriptActionCtr_032 > 0) == true)) { aMusicSetRegionAll(6); diff --git a/scripts/level5.cpp b/scripts/level5.cpp index 3f941c54b..777c99a12 100644 --- a/scripts/level5.cpp +++ b/scripts/level5.cpp @@ -94,172 +94,171 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_200D : public BaseScript { +class CustomObjectScript_200D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_281B : public BaseScript { +class CustomObjectScript_281B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_3816 : public BaseScript { +class CustomObjectScript_3816 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1012 : public BaseScript { +class CustomObjectScript_1012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_181C : public BaseScript { +class CustomObjectScript_181C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0820 : public BaseScript { +class CustomObjectScript_0820 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1044 : public BaseScript { +class CustomObjectScript_1044 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0014 : public BaseScript { +class TriggerScript_0014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0017 : public BaseScript { +class TriggerScript_0017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0018 : public BaseScript { +class TriggerScript_0018 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1465,10 +1464,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -1495,8 +1490,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 028: Update Reactor Display if (1) { aCustomReactorDisplayUpdate(); @@ -1518,8 +1511,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -1835,8 +1826,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_PLAYER_MOVIE_END: { - tOSIRISEVTPLAYERMOVIEEND *event_data = &data->evt_player_movie_end; - // Script 009: GiveStartMessage if ((ScriptActionCtr_009 < 1) && (1)) { aSoundPlayObject(Sound_indexes[0], Object_handles[4], 1.000000f); @@ -1873,8 +1862,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_200D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 027: Reactor5Status75percent if ((ScriptActionCtr_027 < 1) && ((qObjShields(data->me_handle) < 22500.000000f) && (1))) { aShowHUDMessage(Message_strings[4]); @@ -1942,8 +1929,6 @@ int16_t CustomObjectScript_200D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_281B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 026: Reactor4Status75percent if ((ScriptActionCtr_026 < 1) && ((qObjShields(data->me_handle) < 22500.000000f) && (1))) { aShowHUDMessage(Message_strings[6]); @@ -2002,8 +1987,6 @@ int16_t CustomObjectScript_281B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_3816::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 025: Reactor3Status75percent if ((ScriptActionCtr_025 < 1) && ((qObjShields(data->me_handle) < 22500.000000f) && (1))) { aShowHUDMessage(Message_strings[7]); @@ -2062,8 +2045,6 @@ int16_t CustomObjectScript_3816::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1012::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 024: Reactor2Status75percent if ((ScriptActionCtr_024 < 1) && ((qObjShields(data->me_handle) < 22500.000000f) && (1))) { aShowHUDMessage(Message_strings[8]); @@ -2122,8 +2103,6 @@ int16_t CustomObjectScript_1012::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_181C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 005: Reactor1Status75percent if ((ScriptActionCtr_005 < 1) && ((qObjShields(data->me_handle) < 22500.000000f) && (1))) { aShowHUDMessage(Message_strings[9]); diff --git a/scripts/level7.cpp b/scripts/level7.cpp index d96bddb86..875af29b4 100644 --- a/scripts/level7.cpp +++ b/scripts/level7.cpp @@ -126,337 +126,336 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1097 : public BaseScript { +class CustomObjectScript_1097 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08B5 : public BaseScript { +class CustomObjectScript_08B5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0895 : public BaseScript { +class CustomObjectScript_0895 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08A1 : public BaseScript { +class CustomObjectScript_08A1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08A2 : public BaseScript { +class CustomObjectScript_08A2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08AF : public BaseScript { +class CustomObjectScript_08AF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1901 : public BaseScript { +class CustomObjectScript_1901 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_090A : public BaseScript { +class CustomObjectScript_090A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1109 : public BaseScript { +class CustomObjectScript_1109 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0908 : public BaseScript { +class CustomObjectScript_0908 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0907 : public BaseScript { +class CustomObjectScript_0907 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_090C : public BaseScript { +class CustomObjectScript_090C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_110D : public BaseScript { +class CustomObjectScript_110D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_090B : public BaseScript { +class CustomObjectScript_090B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_30A8 : public BaseScript { +class CustomObjectScript_30A8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0940 : public BaseScript { +class CustomObjectScript_0940 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0941 : public BaseScript { +class CustomObjectScript_0941 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0944 : public BaseScript { +class CustomObjectScript_0944 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08B4 : public BaseScript { +class CustomObjectScript_08B4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08B3 : public BaseScript { +class CustomObjectScript_08B3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0943 : public BaseScript { +class CustomObjectScript_0943 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0942 : public BaseScript { +class CustomObjectScript_0942 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_18B8 : public BaseScript { +class CustomObjectScript_18B8 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_20B1 : public BaseScript { +class CustomObjectScript_20B1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_089A : public BaseScript { +class CustomObjectScript_089A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0945 : public BaseScript { +class CustomObjectScript_0945 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_192A : public BaseScript { +class CustomObjectScript_192A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_092B : public BaseScript { +class CustomObjectScript_092B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1021 : public BaseScript { +class CustomObjectScript_1021 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_092C : public BaseScript { +class CustomObjectScript_092C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_112D : public BaseScript { +class CustomObjectScript_112D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0861 : public BaseScript { +class CustomObjectScript_0861 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0862 : public BaseScript { +class CustomObjectScript_0862 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_186B : public BaseScript { +class CustomObjectScript_186B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2071 : public BaseScript { +class CustomObjectScript_2071 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2148 : public BaseScript { +class CustomObjectScript_2148 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2059 : public BaseScript { +class CustomObjectScript_2059 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_205B : public BaseScript { +class CustomObjectScript_205B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1947 : public BaseScript { +class CustomObjectScript_1947 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2146 : public BaseScript { +class CustomObjectScript_2146 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_205A : public BaseScript { +class CustomObjectScript_205A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0923 : public BaseScript { +class CustomObjectScript_0923 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001E : public BaseScript { +class TriggerScript_001E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0019 : public BaseScript { +class TriggerScript_0019 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001C : public BaseScript { +class TriggerScript_001C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001A : public BaseScript { +class TriggerScript_001A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001B : public BaseScript { +class TriggerScript_001B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001D : public BaseScript { +class TriggerScript_001D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001F : public BaseScript { +class TriggerScript_001F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0020 : public BaseScript { +class TriggerScript_0020 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1881,10 +1880,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -1905,8 +1900,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -1973,8 +1966,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_PLAYER_MOVIE_END: { - tOSIRISEVTPLAYERMOVIEEND *event_data = &data->evt_player_movie_end; - // Script 035: Movie Done--Play Sounds if ((ScriptActionCtr_035 < 1) && (1)) { aSetLevelTimer(30.000000f, 2); @@ -2029,8 +2020,6 @@ int16_t CustomObjectScript_1097::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 054: Primary Control if ((ScriptActionCtr_054 < 1) && (1)) { aShowHUDMessage(Message_strings[0]); @@ -2051,8 +2040,6 @@ int16_t CustomObjectScript_1097::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08B5::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 027: SmokeSpewer (2) if (1) { aTurnOnSpew(data->me_handle, 0, 7, 1.000000f, 0.100000f, 65664, 0, 1.500000f, 0.150000f, -1.000000f, 4.000000f, @@ -2070,8 +2057,6 @@ int16_t CustomObjectScript_08B5::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0895::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 026: SmokeSpewer (1) if (1) { aTurnOnSpew(data->me_handle, 0, 7, 1.000000f, 0.100000f, 65664, 0, 1.500000f, 0.150000f, -1.000000f, 4.000000f, @@ -2089,8 +2074,6 @@ int16_t CustomObjectScript_0895::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08A1::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 023: FireSpewer (1) if (1) { aTurnOnSpew(data->me_handle, 0, 2, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.150000f, -1.000000f, 5.000000f, @@ -2108,8 +2091,6 @@ int16_t CustomObjectScript_08A1::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08A2::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 025: FireSpewer (2) if (1) { aTurnOnSpew(data->me_handle, 0, 2, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.150000f, -1.000000f, 5.000000f, @@ -2127,8 +2108,6 @@ int16_t CustomObjectScript_08A2::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08AF::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 024: FireSpewer (3) if (1) { aTurnOnSpew(data->me_handle, 0, 2, 0.000000f, 0.000000f, 65536, 0, 1.500000f, 0.150000f, -1.000000f, 5.000000f, @@ -2146,8 +2125,6 @@ int16_t CustomObjectScript_08AF::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1901::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 047: Do Cooler Actions if ((ScriptActionCtr_047 < 1) && (1)) { aCreatePopupView(0, Object_handles[17], 10.000000f, 1.000000f); @@ -2493,8 +2470,6 @@ int16_t CustomObjectScript_0944::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08B4::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 033: Superheater begin (1) if ((ScriptActionCtr_033 < 1) && (1)) { aTurnOnSpew(data->me_handle, 0, 2, 0.000000f, 0.000000f, 65536, 0, 2.000000f, 0.100000f, -1.000000f, 6.000000f, @@ -2513,8 +2488,6 @@ int16_t CustomObjectScript_08B4::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_08B3::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 005: Superheater begin (2) if ((ScriptActionCtr_005 < 1) && (1)) { aTurnOnSpew(data->me_handle, 0, 2, 0.000000f, 0.000000f, 65536, 0, 2.000000f, 0.100000f, -1.000000f, 6.000000f, @@ -2645,8 +2618,6 @@ int16_t CustomObjectScript_20B1::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_089A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 037: Generic Smoke Spewer 4 if (1) { aTurnOnSpew(Object_handles[40], 0, 7, 1.000000f, 0.100000f, 65664, 0, 1.500000f, 0.120000f, -1.000000f, 6.500000f, @@ -2696,8 +2667,6 @@ int16_t CustomObjectScript_0945::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_192A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 021: Broken Pipe Part III (1) if (qUserVarValue(0) == 1.000000f) { aObjDestroy(data->me_handle); @@ -2708,8 +2677,6 @@ int16_t CustomObjectScript_192A::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 019: Broken Pipe Part I (1) if (1) { aUserVarSet(0, 0.000000f); @@ -2721,8 +2688,6 @@ int16_t CustomObjectScript_192A::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 020: Broken Pipe Part II (1) if (1) { if (qUserVarValue(0) == 0.000000f) { @@ -2747,8 +2712,6 @@ int16_t CustomObjectScript_192A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_092B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 038: Broken Pipe Part III (2) if (qUserVarValue(1) == 1.000000f) { aObjDestroy(data->me_handle); @@ -2759,8 +2722,6 @@ int16_t CustomObjectScript_092B::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 039: Broken Pipe Part I (2) if (1) { aUserVarSet(1, 0.000000f); @@ -2772,8 +2733,6 @@ int16_t CustomObjectScript_092B::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 040: Broken Pipe Part II (2) if (1) { if (qUserVarValue(1) == 0.000000f) { @@ -2967,8 +2926,6 @@ int16_t CustomObjectScript_2148::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 081: TurretMessage if ((ScriptActionCtr_081 < 3) && (1)) { aShowHUDMessage(Message_strings[21]); @@ -3121,8 +3078,6 @@ int16_t TriggerScript_0003::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0005::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 044: Waypoint 3 if (1) { aSetWaypoint(3); diff --git a/scripts/level8.cpp b/scripts/level8.cpp index 52fbaf66c..3745e7ec8 100644 --- a/scripts/level8.cpp +++ b/scripts/level8.cpp @@ -122,317 +122,316 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10FD : public BaseScript { +class CustomObjectScript_10FD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0839 : public BaseScript { +class CustomObjectScript_0839 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0838 : public BaseScript { +class CustomObjectScript_0838 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_3026 : public BaseScript { +class CustomObjectScript_3026 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0901 : public BaseScript { +class CustomObjectScript_0901 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0900 : public BaseScript { +class CustomObjectScript_0900 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08FF : public BaseScript { +class CustomObjectScript_08FF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_20FE : public BaseScript { +class CustomObjectScript_20FE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083D : public BaseScript { +class CustomObjectScript_083D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09E3 : public BaseScript { +class CustomObjectScript_09E3 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09FF : public BaseScript { +class CustomObjectScript_09FF final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1904 : public BaseScript { +class CustomObjectScript_1904 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08C1 : public BaseScript { +class CustomObjectScript_08C1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_090F : public BaseScript { +class CustomObjectScript_090F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_090E : public BaseScript { +class CustomObjectScript_090E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0910 : public BaseScript { +class CustomObjectScript_0910 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_090C : public BaseScript { +class CustomObjectScript_090C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_090B : public BaseScript { +class CustomObjectScript_090B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_090A : public BaseScript { +class CustomObjectScript_090A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2853 : public BaseScript { +class CustomObjectScript_2853 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_090D : public BaseScript { +class CustomObjectScript_090D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_19E2 : public BaseScript { +class CustomObjectScript_19E2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09FB : public BaseScript { +class CustomObjectScript_09FB final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09FC : public BaseScript { +class CustomObjectScript_09FC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09FD : public BaseScript { +class CustomObjectScript_09FD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0845 : public BaseScript { +class CustomObjectScript_0845 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0846 : public BaseScript { +class CustomObjectScript_0846 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0844 : public BaseScript { +class CustomObjectScript_0844 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0849 : public BaseScript { +class CustomObjectScript_0849 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0848 : public BaseScript { +class CustomObjectScript_0848 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0847 : public BaseScript { +class CustomObjectScript_0847 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084A : public BaseScript { +class CustomObjectScript_084A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084D : public BaseScript { +class CustomObjectScript_084D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084C : public BaseScript { +class CustomObjectScript_084C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084B : public BaseScript { +class CustomObjectScript_084B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1088 : public BaseScript { +class CustomObjectScript_1088 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0018 : public BaseScript { +class TriggerScript_0018 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0014 : public BaseScript { +class TriggerScript_0014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0017 : public BaseScript { +class TriggerScript_0017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1926,10 +1925,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -1950,8 +1945,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 029: Medical Frigate Mayday! if ((qRoomHasPlayer(Room_indexes[21]) == true) && (qUserFlag(10) == false)) { aAddGameMessage(Message_strings[10], Message_strings[11]); @@ -1974,8 +1967,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -2520,8 +2511,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_PLAYER_MOVIE_END: { - tOSIRISEVTPLAYERMOVIEEND *event_data = &data->evt_player_movie_end; - // Script 050: Music OutsideInit if ((ScriptActionCtr_050 < 1) && (1)) { aMusicSetRegionAll(1); @@ -3407,8 +3396,6 @@ int16_t TriggerScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0018::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 087: Security Tower Goal Trigger if (1) { aGoalCompleted(Goal_indexes[2], 1); diff --git a/scripts/levelS2.cpp b/scripts/levelS2.cpp index b6e567dcd..17f9df648 100644 --- a/scripts/levelS2.cpp +++ b/scripts/levelS2.cpp @@ -194,677 +194,676 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0821 : public BaseScript { +class CustomObjectScript_0821 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0820 : public BaseScript { +class CustomObjectScript_0820 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_181E : public BaseScript { +class CustomObjectScript_181E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_081F : public BaseScript { +class CustomObjectScript_081F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0814 : public BaseScript { +class CustomObjectScript_0814 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0815 : public BaseScript { +class CustomObjectScript_0815 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0816 : public BaseScript { +class CustomObjectScript_0816 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0818 : public BaseScript { +class CustomObjectScript_0818 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0819 : public BaseScript { +class CustomObjectScript_0819 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0817 : public BaseScript { +class CustomObjectScript_0817 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1024 : public BaseScript { +class CustomObjectScript_1024 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0826 : public BaseScript { +class CustomObjectScript_0826 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0828 : public BaseScript { +class CustomObjectScript_0828 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0827 : public BaseScript { +class CustomObjectScript_0827 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_086A : public BaseScript { +class CustomObjectScript_086A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_086B : public BaseScript { +class CustomObjectScript_086B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0829 : public BaseScript { +class CustomObjectScript_0829 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_08C4 : public BaseScript { +class CustomObjectScript_08C4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10CE : public BaseScript { +class CustomObjectScript_10CE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0809 : public BaseScript { +class CustomObjectScript_0809 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0808 : public BaseScript { +class CustomObjectScript_0808 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1007 : public BaseScript { +class CustomObjectScript_1007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1006 : public BaseScript { +class CustomObjectScript_1006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0805 : public BaseScript { +class CustomObjectScript_0805 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1004 : public BaseScript { +class CustomObjectScript_1004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1003 : public BaseScript { +class CustomObjectScript_1003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_100E : public BaseScript { +class CustomObjectScript_100E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0845 : public BaseScript { +class CustomObjectScript_0845 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0844 : public BaseScript { +class CustomObjectScript_0844 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0843 : public BaseScript { +class CustomObjectScript_0843 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0842 : public BaseScript { +class CustomObjectScript_0842 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0841 : public BaseScript { +class CustomObjectScript_0841 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0840 : public BaseScript { +class CustomObjectScript_0840 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083F : public BaseScript { +class CustomObjectScript_083F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083E : public BaseScript { +class CustomObjectScript_083E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083D : public BaseScript { +class CustomObjectScript_083D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083C : public BaseScript { +class CustomObjectScript_083C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083B : public BaseScript { +class CustomObjectScript_083B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_083A : public BaseScript { +class CustomObjectScript_083A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0851 : public BaseScript { +class CustomObjectScript_0851 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0850 : public BaseScript { +class CustomObjectScript_0850 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084F : public BaseScript { +class CustomObjectScript_084F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084E : public BaseScript { +class CustomObjectScript_084E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084D : public BaseScript { +class CustomObjectScript_084D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084C : public BaseScript { +class CustomObjectScript_084C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084B : public BaseScript { +class CustomObjectScript_084B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_084A : public BaseScript { +class CustomObjectScript_084A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0849 : public BaseScript { +class CustomObjectScript_0849 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0848 : public BaseScript { +class CustomObjectScript_0848 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0847 : public BaseScript { +class CustomObjectScript_0847 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0846 : public BaseScript { +class CustomObjectScript_0846 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_085D : public BaseScript { +class CustomObjectScript_085D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_085C : public BaseScript { +class CustomObjectScript_085C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_085B : public BaseScript { +class CustomObjectScript_085B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_085A : public BaseScript { +class CustomObjectScript_085A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0859 : public BaseScript { +class CustomObjectScript_0859 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0858 : public BaseScript { +class CustomObjectScript_0858 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0857 : public BaseScript { +class CustomObjectScript_0857 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0856 : public BaseScript { +class CustomObjectScript_0856 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0855 : public BaseScript { +class CustomObjectScript_0855 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0854 : public BaseScript { +class CustomObjectScript_0854 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0853 : public BaseScript { +class CustomObjectScript_0853 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0852 : public BaseScript { +class CustomObjectScript_0852 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0869 : public BaseScript { +class CustomObjectScript_0869 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0868 : public BaseScript { +class CustomObjectScript_0868 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0867 : public BaseScript { +class CustomObjectScript_0867 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0866 : public BaseScript { +class CustomObjectScript_0866 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0865 : public BaseScript { +class CustomObjectScript_0865 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0864 : public BaseScript { +class CustomObjectScript_0864 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0863 : public BaseScript { +class CustomObjectScript_0863 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0862 : public BaseScript { +class CustomObjectScript_0862 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0861 : public BaseScript { +class CustomObjectScript_0861 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0860 : public BaseScript { +class CustomObjectScript_0860 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_085F : public BaseScript { +class CustomObjectScript_085F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_085E : public BaseScript { +class CustomObjectScript_085E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_003B : public BaseScript { +class TriggerScript_003B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_003A : public BaseScript { +class TriggerScript_003A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0035 : public BaseScript { +class TriggerScript_0035 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0034 : public BaseScript { +class TriggerScript_0034 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0031 : public BaseScript { +class TriggerScript_0031 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_002F : public BaseScript { +class TriggerScript_002F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_002E : public BaseScript { +class TriggerScript_002E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0023 : public BaseScript { +class TriggerScript_0023 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0022 : public BaseScript { +class TriggerScript_0022 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0021 : public BaseScript { +class TriggerScript_0021 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0020 : public BaseScript { +class TriggerScript_0020 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001B : public BaseScript { +class TriggerScript_001B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001A : public BaseScript { +class TriggerScript_001A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0017 : public BaseScript { +class TriggerScript_0017 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0016 : public BaseScript { +class TriggerScript_0016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0015 : public BaseScript { +class TriggerScript_0015 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0014 : public BaseScript { +class TriggerScript_0014 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0013 : public BaseScript { +class TriggerScript_0013 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0012 : public BaseScript { +class TriggerScript_0012 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0011 : public BaseScript { +class TriggerScript_0011 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0005 : public BaseScript { +class TriggerScript_0005 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0004 : public BaseScript { +class TriggerScript_0004 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0001 : public BaseScript { +class TriggerScript_0001 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_003D : public BaseScript { +class TriggerScript_003D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_003C : public BaseScript { +class TriggerScript_003C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0039 : public BaseScript { +class TriggerScript_0039 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0038 : public BaseScript { +class TriggerScript_0038 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0037 : public BaseScript { +class TriggerScript_0037 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0036 : public BaseScript { +class TriggerScript_0036 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0033 : public BaseScript { +class TriggerScript_0033 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0032 : public BaseScript { +class TriggerScript_0032 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0030 : public BaseScript { +class TriggerScript_0030 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_002C : public BaseScript { +class TriggerScript_002C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0027 : public BaseScript { +class TriggerScript_0027 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0026 : public BaseScript { +class TriggerScript_0026 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0025 : public BaseScript { +class TriggerScript_0025 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0024 : public BaseScript { +class TriggerScript_0024 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001F : public BaseScript { +class TriggerScript_001F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001E : public BaseScript { +class TriggerScript_001E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001D : public BaseScript { +class TriggerScript_001D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_001C : public BaseScript { +class TriggerScript_001C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0019 : public BaseScript { +class TriggerScript_0019 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0018 : public BaseScript { +class TriggerScript_0018 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0006 : public BaseScript { +class TriggerScript_0006 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0003 : public BaseScript { +class TriggerScript_0003 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0002 : public BaseScript { +class TriggerScript_0002 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0040 : public BaseScript { +class TriggerScript_0040 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -3231,10 +3230,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -3255,8 +3250,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -3552,8 +3545,6 @@ int16_t CustomObjectScript_0815::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0816::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 101: MiniReactorBlue TimerChain if ((ScriptActionCtr_101 < 1) && (1)) { aSetObjectTimer(Object_handles[11], 6.000000f, -1); @@ -3636,8 +3627,6 @@ int16_t CustomObjectScript_0819::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0817::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 100: MiniReactorWhite TimerChain if ((ScriptActionCtr_100 < 1) && (1)) { aSetObjectTimer(Object_handles[26], 6.000000f, -1); @@ -3768,8 +3757,6 @@ int16_t CustomObjectScript_0827::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_086A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 103: MiniReactorRed-2 Timer Chain if ((ScriptActionCtr_103 < 1) && (1)) { aSetObjectTimer(Object_handles[45], 6.000000f, -1); @@ -3797,8 +3784,6 @@ int16_t CustomObjectScript_086A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_086B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 102: MiniReactorRed-1 Timer Chain if ((ScriptActionCtr_102 < 1) && (1)) { aSetObjectTimer(Object_handles[57], 6.000000f, -1); @@ -3826,8 +3811,6 @@ int16_t CustomObjectScript_086B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0829::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 073: MiniReactorRed Timer if ((ScriptActionCtr_073 < 1) && (1)) { aLightningCreate(Object_handles[69], Object_handles[70], 9999.000000f, 3.000000f, 1, Texture_indexes[0], @@ -3899,8 +3882,6 @@ int16_t CustomObjectScript_08C4::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 142: ReactorInit if (1) { aObjMakeInvuln(data->me_handle, 99999); @@ -3938,8 +3919,6 @@ int16_t CustomObjectScript_08C4::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 143: ReactorStartCharge if (1) { if (qUserVarValue(4) > 6.000000f) { @@ -3965,8 +3944,6 @@ int16_t CustomObjectScript_08C4::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_10CE::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 075: ReactorShake if (1) { aSetObjectTimer(data->me_handle, qRandomValue(0.500000f, 1.600000f), -1); @@ -3984,8 +3961,6 @@ int16_t CustomObjectScript_10CE::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0809::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 083: CycleFlames-5 if (1) { aSoundPlayObject(Sound_indexes[5], Object_handles[77], 1.000000f); @@ -4022,8 +3997,6 @@ int16_t CustomObjectScript_0809::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0808::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 082: CycleFlames-4 if (1) { aSoundPlayObject(Sound_indexes[5], Object_handles[81], 1.000000f); @@ -4060,8 +4033,6 @@ int16_t CustomObjectScript_0808::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1007::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 081: CycleFlames-3 if (1) { aSoundPlayObject(Sound_indexes[5], Object_handles[84], 1.000000f); @@ -4098,8 +4069,6 @@ int16_t CustomObjectScript_1007::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1006::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 080: CycleFlames-2 if (1) { aSoundPlayObject(Sound_indexes[5], Object_handles[89], 1.000000f); @@ -4136,8 +4105,6 @@ int16_t CustomObjectScript_1006::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0805::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 079: CycleFlames-1 if (1) { aSoundPlayObject(Sound_indexes[5], Object_handles[92], 1.000000f); @@ -4246,8 +4213,6 @@ int16_t CustomObjectScript_100E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0845::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 099: Blow Up Child ACW-12 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4264,8 +4229,6 @@ int16_t CustomObjectScript_0845::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0844::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 098: Blow Up Child ACW-11 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4282,8 +4245,6 @@ int16_t CustomObjectScript_0844::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0843::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 097: Blow Up Child ACW-10 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4300,8 +4261,6 @@ int16_t CustomObjectScript_0843::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0842::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 096: Blow Up Child ACW-9 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4318,8 +4277,6 @@ int16_t CustomObjectScript_0842::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0841::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 095: Blow Up Child ACW-8 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4336,8 +4293,6 @@ int16_t CustomObjectScript_0841::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0840::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 094: Blow Up Child ACW-7 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4354,8 +4309,6 @@ int16_t CustomObjectScript_0840::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_083F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 093: Blow Up Child ACW-6 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4372,8 +4325,6 @@ int16_t CustomObjectScript_083F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_083E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 092: Blow Up Child ACW-5 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4390,8 +4341,6 @@ int16_t CustomObjectScript_083E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_083D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 091: Blow Up Child ACW-4 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4408,8 +4357,6 @@ int16_t CustomObjectScript_083D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_083C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 090: Blow Up Child ACW-3 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4426,8 +4373,6 @@ int16_t CustomObjectScript_083C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_083B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 089: Blow Up Child ACW-2 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4444,8 +4389,6 @@ int16_t CustomObjectScript_083B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_083A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 088: Blow Up Child ACW-1 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4462,8 +4405,6 @@ int16_t CustomObjectScript_083A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0851::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 115: Blow Up Child ACB-12 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4480,8 +4421,6 @@ int16_t CustomObjectScript_0851::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0850::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 114: Blow Up Child ACB-11 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4498,8 +4437,6 @@ int16_t CustomObjectScript_0850::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_084F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 113: Blow Up Child ACB-10 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4516,8 +4453,6 @@ int16_t CustomObjectScript_084F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_084E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 112: Blow Up Child ACB-9 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4534,8 +4469,6 @@ int16_t CustomObjectScript_084E::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_084D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 111: Blow Up Child ACB-8 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4552,8 +4485,6 @@ int16_t CustomObjectScript_084D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_084C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 110: Blow Up Child ACB-7 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4570,8 +4501,6 @@ int16_t CustomObjectScript_084C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_084B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 109: Blow Up Child ACB-6 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4588,8 +4517,6 @@ int16_t CustomObjectScript_084B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_084A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 108: Blow Up Child ACB-5 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4606,8 +4533,6 @@ int16_t CustomObjectScript_084A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0849::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 107: Blow Up Child ACB-4 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4624,8 +4549,6 @@ int16_t CustomObjectScript_0849::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0848::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 106: Blow Up Child ACB-3 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4642,8 +4565,6 @@ int16_t CustomObjectScript_0848::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0847::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 105: Blow Up Child ACB-2 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4660,8 +4581,6 @@ int16_t CustomObjectScript_0847::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0846::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 104: Blow Up Child ACB-1 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4678,8 +4597,6 @@ int16_t CustomObjectScript_0846::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_085D::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 127: Blow Up Child ACR-12 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4696,8 +4613,6 @@ int16_t CustomObjectScript_085D::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_085C::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 126: Blow Up Child ACR-11 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4714,8 +4629,6 @@ int16_t CustomObjectScript_085C::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_085B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 125: Blow Up Child ACR-10 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4732,8 +4645,6 @@ int16_t CustomObjectScript_085B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_085A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 124: Blow Up Child ACR-9 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4750,8 +4661,6 @@ int16_t CustomObjectScript_085A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0859::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 123: Blow Up Child ACR-8 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4768,8 +4677,6 @@ int16_t CustomObjectScript_0859::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0858::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 122: Blow Up Child ACR-7 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4786,8 +4693,6 @@ int16_t CustomObjectScript_0858::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0857::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 121: Blow Up Child ACR-6 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4804,8 +4709,6 @@ int16_t CustomObjectScript_0857::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0856::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 120: Blow Up Child ACR-5 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4822,8 +4725,6 @@ int16_t CustomObjectScript_0856::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0855::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 119: Blow Up Child ACR-4 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4840,8 +4741,6 @@ int16_t CustomObjectScript_0855::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0854::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 118: Blow Up Child ACR-3 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4858,8 +4757,6 @@ int16_t CustomObjectScript_0854::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0853::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 117: Blow Up Child ACR-2 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4876,8 +4773,6 @@ int16_t CustomObjectScript_0853::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0852::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 116: Blow Up Child ACR-1 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4894,8 +4789,6 @@ int16_t CustomObjectScript_0852::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0869::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 139: Blow Up Child ACS-12 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4912,8 +4805,6 @@ int16_t CustomObjectScript_0869::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0868::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 138: Blow Up Child ACS-11 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4930,8 +4821,6 @@ int16_t CustomObjectScript_0868::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0867::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 137: Blow Up Child ACS-10 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4948,8 +4837,6 @@ int16_t CustomObjectScript_0867::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0866::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 136: Blow Up Child ACS-9 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4966,8 +4853,6 @@ int16_t CustomObjectScript_0866::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0865::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 135: Blow Up Child ACS-8 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -4984,8 +4869,6 @@ int16_t CustomObjectScript_0865::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0864::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 134: Blow Up Child ACS-7 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -5002,8 +4885,6 @@ int16_t CustomObjectScript_0864::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0863::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 133: Blow Up Child ACS-6 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -5020,8 +4901,6 @@ int16_t CustomObjectScript_0863::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0862::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 132: Blow Up Child ACS-5 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -5038,8 +4917,6 @@ int16_t CustomObjectScript_0862::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0861::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 131: Blow Up Child ACS-4 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -5056,8 +4933,6 @@ int16_t CustomObjectScript_0861::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0860::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 130: Blow Up Child ACS-3 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -5074,8 +4949,6 @@ int16_t CustomObjectScript_0860::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_085F::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 129: Blow Up Child ACS-2 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -5092,8 +4965,6 @@ int16_t CustomObjectScript_085F::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_085E::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 128: Blow Up Child ACS-1 if (1) { aObjDestroy(qGetAtachedChild(data->me_handle, 0)); @@ -6194,8 +6065,6 @@ int16_t TriggerScript_0002::CallEvent(int event, tOSIRISEventInfo *data) { int16_t TriggerScript_0040::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 077: End Level Camera if ((ScriptActionCtr_077 < 1) && (1)) { aGoalCompleted(Goal_indexes[6], 1); diff --git a/scripts/merc5.cpp b/scripts/merc5.cpp index 329fafdf6..1b5e29d3c 100644 --- a/scripts/merc5.cpp +++ b/scripts/merc5.cpp @@ -107,242 +107,241 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11C4 : public BaseScript { +class CustomObjectScript_11C4 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1088 : public BaseScript { +class CustomObjectScript_1088 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C6 : public BaseScript { +class CustomObjectScript_09C6 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_11C5 : public BaseScript { +class CustomObjectScript_11C5 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C7 : public BaseScript { +class CustomObjectScript_09C7 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_182E : public BaseScript { +class CustomObjectScript_182E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A05 : public BaseScript { +class CustomObjectScript_0A05 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A04 : public BaseScript { +class CustomObjectScript_0A04 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A03 : public BaseScript { +class CustomObjectScript_0A03 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1A02 : public BaseScript { +class CustomObjectScript_1A02 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1033 : public BaseScript { +class CustomObjectScript_1033 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1200 : public BaseScript { +class CustomObjectScript_1200 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1036 : public BaseScript { +class CustomObjectScript_1036 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1035 : public BaseScript { +class CustomObjectScript_1035 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_3032 : public BaseScript { +class CustomObjectScript_3032 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1830 : public BaseScript { +class CustomObjectScript_1830 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_28A2 : public BaseScript { +class CustomObjectScript_28A2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0A06 : public BaseScript { +class CustomObjectScript_0A06 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_2885 : public BaseScript { +class CustomObjectScript_2885 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_107E : public BaseScript { +class CustomObjectScript_107E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1185 : public BaseScript { +class CustomObjectScript_1185 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_21B2 : public BaseScript { +class CustomObjectScript_21B2 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09DE : public BaseScript { +class CustomObjectScript_09DE final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09DD : public BaseScript { +class CustomObjectScript_09DD final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09DC : public BaseScript { +class CustomObjectScript_09DC final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_21DA : public BaseScript { +class CustomObjectScript_21DA final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0899 : public BaseScript { +class CustomObjectScript_0899 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_089A : public BaseScript { +class CustomObjectScript_089A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_089B : public BaseScript { +class CustomObjectScript_089B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1098 : public BaseScript { +class CustomObjectScript_1098 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09A1 : public BaseScript { +class CustomObjectScript_09A1 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_19A0 : public BaseScript { +class CustomObjectScript_19A0 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_09C9 : public BaseScript { +class CustomObjectScript_09C9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1007 : public BaseScript { +class CustomObjectScript_1007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_1016 : public BaseScript { +class CustomObjectScript_1016 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000F : public BaseScript { +class TriggerScript_000F final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0000 : public BaseScript { +class TriggerScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0010 : public BaseScript { +class TriggerScript_0010 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000E : public BaseScript { +class TriggerScript_000E final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000D : public BaseScript { +class TriggerScript_000D final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000B : public BaseScript { +class TriggerScript_000B final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0009 : public BaseScript { +class TriggerScript_0009 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000C : public BaseScript { +class TriggerScript_000C final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_000A : public BaseScript { +class TriggerScript_000A final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0007 : public BaseScript { +class TriggerScript_0007 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class TriggerScript_0008 : public BaseScript { +class TriggerScript_0008 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -1989,10 +1988,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -2019,8 +2014,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_INTERVAL: { - tOSIRISEVTINTERVAL *event_data = &data->evt_interval; - // Script 042: Level FRAME (Left Creepers) if (qUserFlag(0) == true) { if ((qRoomHasPlayer(Room_indexes[0]) == 1) && (qUserFlag(8) == 0)) { @@ -2080,8 +2073,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -2420,8 +2411,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_LEVEL_GOAL_COMPLETE: { - tOSIRISEVTLEVELGOALCOMPLETE *event_data = &data->evt_level_goal_complete; - // Script 041: Both Hubs Infected if ((ScriptActionCtr_041 < 1) && ((qUserFlag(1) == 1) && (qUserFlag(0) == 1))) { aShowHUDMessage(Message_strings[10]); @@ -2433,8 +2422,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_PLAYER_MOVIE_END: { - tOSIRISEVTPLAYERMOVIEEND *event_data = &data->evt_player_movie_end; - // Script 026: EndMovie-2 if ((ScriptActionCtr_026 < 1) && (1)) { aObjGhostSet(0, Object_handles[15]); @@ -2460,8 +2447,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_11C4::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 073: IntroCam-2 if (1) { aMusicSetRegionAll(1); @@ -2486,8 +2471,6 @@ int16_t CustomObjectScript_11C4::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1088::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 077: Intro2 Spark if (1) { aTurnOnSpew(Object_handles[22], -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.100000f, 20.000000f, @@ -2508,8 +2491,6 @@ int16_t CustomObjectScript_1088::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09C6::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 074: IntroCam-3 if (1) { aCinematicSimple(Path_indexes[5], Message_strings[2], Object_handles[24], 9.000000f, 1); @@ -2526,8 +2507,6 @@ int16_t CustomObjectScript_09C6::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_11C5::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 075: IntroCam-4 if (1) { aLightningTurnOn(0.150000f, 0.080000f); @@ -2548,8 +2527,6 @@ int16_t CustomObjectScript_11C5::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09C7::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_AIN_MOVIE_END: { - tOSIRISEVTAINOTIFY *event_data = &data->evt_ain_movie_end; - // Script 076: IntroCam-POST if (1) { aLightningTurnOn(0.200000f, 0.080000f); @@ -2715,8 +2692,6 @@ int16_t CustomObjectScript_1A02::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1033::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 058: Crystal Complete8 if (1) { aSoundPlayObject(Sound_indexes[3], Object_handles[42], 1.000000f); @@ -2753,8 +2728,6 @@ int16_t CustomObjectScript_1033::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1200::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 057: Crystal Complete7 if (1) { aSoundStopObj(Object_handles[37]); @@ -2789,8 +2762,6 @@ int16_t CustomObjectScript_1200::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1036::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 048: Crystal Complete6 if (1) { aRoomSetWind(Room_indexes[31], 0.000000f, 1.000000f, 0.000000f, 0.500000f); @@ -2812,8 +2783,6 @@ int16_t CustomObjectScript_1036::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1035::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 046: Crystal Complete5 if (1) { aSetObjectTimer(Object_handles[56], 1.500000f, -1); @@ -2834,8 +2803,6 @@ int16_t CustomObjectScript_1035::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_3032::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 045: Crystal Complete4 if (1) { aSetObjectTimer(Object_handles[57], 1.500000f, -1); @@ -2856,8 +2823,6 @@ int16_t CustomObjectScript_3032::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1830::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 044: Crystal Complete3 if (1) { aSetObjectTimer(Object_handles[58], 1.500000f, -1); @@ -2878,8 +2843,6 @@ int16_t CustomObjectScript_1830::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_28A2::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 007: Crystal Complete2 if (1) { aSoundPlayObject(Sound_indexes[6], Object_handles[37], 1.000000f); @@ -2911,8 +2874,6 @@ int16_t CustomObjectScript_28A2::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0A06::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 047: Crystal Complete1 if (((ScriptActionCtr_006 > 0) == true) && ((ScriptActionCtr_024 > 0) == true) && ((ScriptActionCtr_032 > 0) == true) && ((ScriptActionCtr_033 > 0) == true)) { @@ -3346,8 +3307,6 @@ int16_t CustomObjectScript_21DA::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_0899::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 081: Receptor NodeShutdown4 if ((ScriptActionCtr_081 < 1) && (1)) { aObjPlayAnim(Object_handles[7], 1, 2, 1.000000f, 0); @@ -3367,8 +3326,6 @@ int16_t CustomObjectScript_0899::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_089A::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 080: Receptor NodeShutdown3 if ((ScriptActionCtr_080 < 1) && (1)) { aObjPlayAnim(Object_handles[6], 1, 2, 1.000000f, 0); @@ -3388,8 +3345,6 @@ int16_t CustomObjectScript_089A::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_089B::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 079: Receptor NodeShutdown2 if ((ScriptActionCtr_079 < 1) && (1)) { aObjPlayAnim(Object_handles[5], 1, 2, 1.000000f, 0); @@ -3409,8 +3364,6 @@ int16_t CustomObjectScript_089B::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1098::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 020: Receptor NodeShutdown1 if ((ScriptActionCtr_020 < 1) && (1)) { aObjPlayAnim(Object_handles[4], 1, 2, 1.000000f, 0); @@ -3462,8 +3415,6 @@ int16_t CustomObjectScript_09A1::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 088: RestorePower3 if (1) { aSetLevelTimer(4.000000f, 19); @@ -3551,8 +3502,6 @@ int16_t CustomObjectScript_19A0::CallEvent(int event, tOSIRISEventInfo *data) { } } break; case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 087: RestorePower2 if (1) { aObjPlayAnim(Object_handles[139], 0, 3, 3.000000f, 0); @@ -3576,8 +3525,6 @@ int16_t CustomObjectScript_19A0::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_09C9::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 025: EndMovie-1 if ((ScriptActionCtr_025 < 1) && (1)) { aSetObjectTimer(Object_handles[164], 1.200000f, -1); @@ -3603,8 +3550,6 @@ int16_t CustomObjectScript_09C9::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1007::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_TIMER: { - tOSIRISEVTTIMER *event_data = &data->evt_timer; - // Script 027: EndMovie-1 Door Open if (1) { aTurnOnSpew(Object_handles[166], -1, 7, 0.000000f, 0.000000f, 65536, 0, 1.200000f, 0.100000f, 10.000000f, @@ -3625,8 +3570,6 @@ int16_t CustomObjectScript_1007::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_1016::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_COLLIDE: { - tOSIRISEVTCOLLIDE *event_data = &data->evt_collide; - // Script 015: BrokenDoor if (1) { aEmitSparks(qRandomValue(10.000000f, 50.000000f), data->me_handle); diff --git a/scripts/myPowerHouse.cpp b/scripts/myPowerHouse.cpp index a4eabcf0d..64a3b5101 100644 --- a/scripts/myPowerHouse.cpp +++ b/scripts/myPowerHouse.cpp @@ -61,17 +61,16 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0827 : public BaseScript { +class CustomObjectScript_0827 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -513,10 +512,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -537,8 +532,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { dfRestore(event_data->fileptr); } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); } break; diff --git a/scripts/orbital.cpp b/scripts/orbital.cpp index 4761cc8c9..443d83404 100644 --- a/scripts/orbital.cpp +++ b/scripts/orbital.cpp @@ -62,22 +62,21 @@ DLLEXPORT int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state); class BaseScript { public: - BaseScript(); - ~BaseScript(); + virtual ~BaseScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class LevelScript_0000 : public BaseScript { +class LevelScript_0000 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_0903 : public BaseScript { +class CustomObjectScript_0903 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; -class CustomObjectScript_10F9 : public BaseScript { +class CustomObjectScript_10F9 final : public BaseScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -725,10 +724,6 @@ int STDCALL GetCOScriptList(int **list, int **id_list) { // Script Implementation //======================= -BaseScript::BaseScript() {} - -BaseScript::~BaseScript() {} - int16_t BaseScript::CallEvent(int event, tOSIRISEventInfo *data) { mprintf(0, "BaseScript::CallEvent()\n"); return CONTINUE_CHAIN | CONTINUE_DEFAULT; @@ -755,8 +750,6 @@ int16_t LevelScript_0000::CallEvent(int event, tOSIRISEventInfo *data) { #endif } break; case EVT_LEVELSTART: { - tOSIRISEVTLEVELSTART *event_data = &data->evt_levelstart; - ClearGlobalActionCtrs(); dfInit(); @@ -875,8 +868,6 @@ int16_t CustomObjectScript_0903::CallEvent(int event, tOSIRISEventInfo *data) { int16_t CustomObjectScript_10F9::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_CREATED: { - tOSIRISEVTCREATED *event_data = &data->evt_created; - // Script 006: SoundSource 1 if (1) { aSoundPlayObject(Sound_indexes[2], data->me_handle, 1.000000f); diff --git a/scripts/testscript.cpp b/scripts/testscript.cpp index a0ed458df..0781c840c 100644 --- a/scripts/testscript.cpp +++ b/scripts/testscript.cpp @@ -55,12 +55,11 @@ tScriptInfo ScriptInfo[MAX_IDS] = {{ID_SHIELD_ORB, "Shield"}, {ID_ENERGY_ORB, "E class BaseObjScript { public: - BaseObjScript(); - ~BaseObjScript(); + virtual ~BaseObjScript() = default; virtual int16_t CallEvent(int event, tOSIRISEventInfo *data); protected: - bool called; + bool called = false; }; struct tShieldOrbInfo { @@ -69,7 +68,7 @@ struct tShieldOrbInfo { //------------------ // Shield orb script //------------------ -class ShieldOrb : public BaseObjScript { +class ShieldOrb final : public BaseObjScript { public: ShieldOrb() { info = NULL; } int16_t CallEvent(int event, tOSIRISEventInfo *data); @@ -81,7 +80,7 @@ class ShieldOrb : public BaseObjScript { //------------------ // Energy orb script //------------------ -class EnergyOrb : public BaseObjScript { +class EnergyOrb final : public BaseObjScript { public: int16_t CallEvent(int event, tOSIRISEventInfo *data); }; @@ -161,10 +160,6 @@ int STDCALL SaveRestoreState(void *file_ptr, uint8_t saving_state) { return 0; } //============================================ // Script Implementation //============================================ -BaseObjScript::BaseObjScript() { called = false; } - -BaseObjScript::~BaseObjScript() {} - int16_t BaseObjScript::CallEvent(int event, tOSIRISEventInfo *data) { switch (event) { case EVT_INTERVAL: diff --git a/sndlib/sdlsound.h b/sndlib/sdlsound.h index 2ec026682..3cb727af4 100644 --- a/sndlib/sdlsound.h +++ b/sndlib/sdlsound.h @@ -36,7 +36,7 @@ class emulated_listener { vector velocity; }; -class lnxsound : public llsSystem { +class lnxsound final : public llsSystem { // Public functions public: lnxsound(); diff --git a/ui/UIButton.cpp b/ui/UIButton.cpp index 81c9d2a02..a309343d5 100644 --- a/ui/UIButton.cpp +++ b/ui/UIButton.cpp @@ -135,15 +135,6 @@ int UIButton::m_ButtonFont; // This is a simple 2 state button (push down or push up) // Buttons have properties of gadgets, plus bitmap information per state. -UIButton::UIButton() { - m_Items[UI_BTS_DISABLED] = NULL; - m_Items[UI_BTS_INACTIVE] = NULL; - m_Items[UI_BTS_HILITE] = NULL; - m_Items[UI_BTS_ACTIVATED] = NULL; -} - -UIButton::~UIButton() {} - // if text = NULL, no text printed out. void UIButton::Create(UIWindow *parent, int id, UIItem *item, int x, int y, int w, int h, int flags) { if (item) { diff --git a/ui/UICombo.cpp b/ui/UICombo.cpp index a3c59bd21..a62c7ecc9 100644 --- a/ui/UICombo.cpp +++ b/ui/UICombo.cpp @@ -45,17 +45,6 @@ // A listbox may contain text items, BUT only one will be visible // Allows the user to scroll through them too. -UIComboBox::UIComboBox() { - m_ItemList = NULL; - m_nItems = 0; - m_Index = 0; - m_ShowUp = false; - m_ShowDown = false; - selectchange_fn = NULL; -} - -UIComboBox::~UIComboBox() {} - // creates a combo box void UIComboBox::Create(UIWindow *parent, int id, int x, int y, int w, int h, int flags) { m_ItemList = NULL; diff --git a/ui/UIConsole.cpp b/ui/UIConsole.cpp index b3d4eb34b..bd0fe29bc 100644 --- a/ui/UIConsole.cpp +++ b/ui/UIConsole.cpp @@ -70,15 +70,6 @@ // int m_ConsoleFont; // standard font for text in console // char *m_ConsoleBuffer; // text buffer of console. -UIConsoleGadget::UIConsoleGadget() { - m_ConsoleFont = -1; - m_ConsoleBuffer = NULL; - m_ColorRows = NULL; - m_PutsBuffer = NULL; -} - -UIConsoleGadget::~UIConsoleGadget() {} - // font = console font, NOT GADGET FONT. This font is used to proportion window void UIConsoleGadget::Create(UIWindow *parent, int id, int x, int y, int font, int cols, int rows, int flags) { int cw, ch, w, h; @@ -271,10 +262,6 @@ void UIConsoleGadget::Scroll() { // int m_ConsoleFont; // standard font for text in console // char *m_ConsoleBuffer; // text buffer of console. -UIConsole::UIConsole() {} - -UIConsole::~UIConsole() {} - // font = console font, NOT GADGET FONT. This font is used to proportion window void UIConsole::Create(int x, int y, int font, int cols, int rows) { UIWindow::Create(x, y, 10, 10); diff --git a/ui/UIEdit.cpp b/ui/UIEdit.cpp index e0d91e7ee..85321b893 100644 --- a/ui/UIEdit.cpp +++ b/ui/UIEdit.cpp @@ -149,14 +149,6 @@ static UIEdit *UI_current_editbox = NULL; // UIEdit // A single line edit control. -UIEdit::UIEdit() { - m_TextBuf = NULL; - m_BufSize = 0; - m_FontHandle = -1; -} - -UIEdit::~UIEdit() {} - void UIEdit::Create(UIWindow *parent, int id, int x, int y, int w, int h, int flags) { m_BufSize = 32; m_TextBuf = (char *)mem_malloc(m_BufSize + 1); diff --git a/ui/UIGadget.cpp b/ui/UIGadget.cpp index 2e8d42afe..82a54d14c 100644 --- a/ui/UIGadget.cpp +++ b/ui/UIGadget.cpp @@ -127,19 +127,6 @@ int UIGadget::m_LastKey = 0; int UIGadget::m_LastKeyCount = 0; float UIGadget::m_LastKeyTime = 0.0f; -UIGadget::UIGadget() : UIObject() { - m_ID = 0; - m_Wnd = NULL; - m_Prev = m_PrevSlave = NULL; - m_Next = m_NextSlave = NULL; - m_MasterGadget = NULL; - m_SlaveGadgets = NULL; - m_CurrentSlave = NULL; - m_infocus = false; -} - -UIGadget::~UIGadget() {} - // ALL Gadgets must have a parent. void UIGadget::Create(UIWindow *wnd, int id, int x, int y, int w, int h, int flags) { ASSERT(!IsCreated()); diff --git a/ui/UIGroup.cpp b/ui/UIGroup.cpp index ae4d6357a..1ca21c529 100644 --- a/ui/UIGroup.cpp +++ b/ui/UIGroup.cpp @@ -55,13 +55,6 @@ // UIGroup // Draws a group box on to the window -UIGroup::UIGroup() { - m_Label = NULL; - m_bTextCreated = false; -} - -UIGroup::~UIGroup() {} - void UIGroup::Create(UIWindow *parent, char *label, int x, int y, int w, int h, ddgr_color label_color, ddgr_color box_color, int flags) { ASSERT(parent); diff --git a/ui/UIHotspot.cpp b/ui/UIHotspot.cpp index 453335f8a..80e7d1da3 100644 --- a/ui/UIHotspot.cpp +++ b/ui/UIHotspot.cpp @@ -85,13 +85,6 @@ // This is simply a region within the parent window that when clicked on // or key pressed, does something. -UIHotspot::UIHotspot() { - m_ItemOff = NULL; - m_ItemOn = NULL; -} - -UIHotspot::~UIHotspot() {} - // optional key, when pressed, triggers hotspot. void UIHotspot::Create(UIWindow *wnd, int id, int key, UIItem *itemoff, UIItem *itemon, int x, int y, int w, int h, int flags) { diff --git a/ui/UIListBox.cpp b/ui/UIListBox.cpp index 4da92787b..5882ec6f2 100644 --- a/ui/UIListBox.cpp +++ b/ui/UIListBox.cpp @@ -168,23 +168,6 @@ // Construction and destruction -UIListBox::UIListBox() { - m_NumItems = 0; - m_SelectedIndex = 0; - m_Index = 0; - m_ItemList = NULL; - m_Virt2Real = NULL; - m_Real2Virt = NULL; - m_MouseState = 0; - selectchange_fn = NULL; - selectchange_id_fn = NULL; - m_callbackptr = NULL; - m_TextOffX = 4; - m_TextOffY = 4; -} - -UIListBox::~UIListBox() {} - void UIListBox::Create(UIWindow *parent, int id, int x, int y, int w, int h, int flags) { m_NumItems = 0; m_ItemList = NULL; @@ -713,8 +696,6 @@ void UIListBox::OnDraw() { // behavior when key is pressed. void UIListBox::OnKeyDown(int key) { - UIGadget *gadget = this; - if (key == KEY_UP) { if (m_SelectedIndex > 0) { if (m_SelectedIndex == m_Index) @@ -854,7 +835,6 @@ void UIListBox::OnUserProcess() { // check if x and y selection hits a selected item. bool UIListBox::MseCheckSelect(int x, int y) { int i, ty; - bool use_scroll = !(m_Flags & UILB_NOSCROLL); if (!m_NumItems) return false; diff --git a/ui/UIObject.cpp b/ui/UIObject.cpp index 7111e2ff6..524a932c8 100644 --- a/ui/UIObject.cpp +++ b/ui/UIObject.cpp @@ -42,14 +42,6 @@ #include "log.h" #include "pserror.h" -UIObject::UIObject() { - m_X = m_Y = 0; - m_W = m_H = 0; - m_Created = false; -} - -UIObject::~UIObject() {} - // obj = NULL, then this object has no parent: it is an independent entity. void UIObject::Create(int x, int y, int w, int h) { ASSERT(!m_Created); diff --git a/ui/UISlider.cpp b/ui/UISlider.cpp index 5a0f6ca5f..0fb527a51 100644 --- a/ui/UISlider.cpp +++ b/ui/UISlider.cpp @@ -66,15 +66,6 @@ // Construction and destruction -UISlider::UISlider() { - switch_item = slider_item = NULL; - selectchange_fn = NULL; - selectchange_id_fn = NULL; - m_callbackptr = NULL; -} - -UISlider::~UISlider() {} - #define SLIDER_BUTTON_WIDTH (switch_item->width() ? switch_item->width() : 16) #define SLIDER_BUTTON_HEIGHT (switch_item->height() ? switch_item->height() : 16) diff --git a/ui/UIStatic.cpp b/ui/UIStatic.cpp index 75a95ffa5..65a224258 100644 --- a/ui/UIStatic.cpp +++ b/ui/UIStatic.cpp @@ -87,13 +87,6 @@ void UIText::OnFormat() { UIGadget::OnFormat(); } -UIStatic::UIStatic() { - m_Title = NULL; - m_Background = NULL; -} - -UIStatic::~UIStatic() {} - void UIStatic::Create(UIWindow *parent, UIItem *item, int x, int y, int w, int h, int flags) { m_Background = NULL; if (item) diff --git a/ui/UISystem.cpp b/ui/UISystem.cpp index 6fe0b0057..00ed5cd36 100644 --- a/ui/UISystem.cpp +++ b/ui/UISystem.cpp @@ -539,8 +539,6 @@ bool ui_HideCursor() { } // set user interface screen resolution void ui_SetScreenMode(int w, int h) { - int old_w = UI_screen_width; - int old_h = UI_screen_height; UI_screen_width = w; UI_screen_height = h; UI_aspect_x = (float)w / (float)FIXED_SCREEN_WIDTH; diff --git a/ui/UIWindow.cpp b/ui/UIWindow.cpp index f67611ae0..e147916e3 100644 --- a/ui/UIWindow.cpp +++ b/ui/UIWindow.cpp @@ -686,10 +686,6 @@ void UIWindow::ResetAcceleratorKey() { m_naccels = 0; } // ---------------------------------------------------------------------------- // UITitledWindow class -UITitledWindow::UITitledWindow() {} - -UITitledWindow::~UITitledWindow() {} - void UITitledWindow::Create(UITextItem &title, int x, int y, int w, int h) { m_Title = title; m_BorderThickness = 2; diff --git a/ui/ui.h b/ui/ui.h index a6d891703..b4a5158f9 100644 --- a/ui/ui.h +++ b/ui/ui.h @@ -295,16 +295,15 @@ class UIWindow; // tUIObject. class UIObject { - bool m_Created; // is this object created? + bool m_Created = false; // is this object created? // variables shared by the entire UI hierarchy protected: - int m_X, m_Y; // Location of UIObject relative to some other object. - int m_W, m_H; // Dimensions of the UIObject + int m_X = 0, m_Y = 0; // Location of UIObject relative to some other object. + int m_W = 0, m_H = 0; // Dimensions of the UIObject public: - UIObject(); - virtual ~UIObject(); + virtual ~UIObject() = default; void Create(int x, int y, int w, int h); // define the ui object. void Destroy() { m_Created = false; }; @@ -365,21 +364,21 @@ class UIObject { class UIGadget : public UIObject { friend class UIWindow; - UIGadget *m_Prev; - UIGadget *m_Next; // for maintaining list of linked gadgets. + UIGadget *m_Prev = nullptr; + UIGadget *m_Next = nullptr; // for maintaining list of linked gadgets. // master gadgets - UIGadget *m_MasterGadget; // select target - UIGadget *m_CurrentSlave; // current slave gadget in master. + UIGadget *m_MasterGadget = nullptr; // select target + UIGadget *m_CurrentSlave = nullptr; // current slave gadget in master. // slave gadgets - UIGadget *m_SlaveGadgets; // contains a list of slave gadgets. - UIGadget *m_NextSlave; - UIGadget *m_PrevSlave; + UIGadget *m_SlaveGadgets = nullptr; // contains a list of slave gadgets. + UIGadget *m_NextSlave = nullptr; + UIGadget *m_PrevSlave = nullptr; // information for gadgets private: - int m_ID; // id value of gadget. + int m_ID = 0; // id value of gadget. int16_t m_Datum; // used to pass info around. uint16_t m_Hotkey; int m_SavedW, m_SavedH; // saved values of width and height. @@ -399,11 +398,11 @@ class UIGadget : public UIObject { #else protected: #endif - UIWindow *m_Wnd; // the gadget's parent window + UIWindow *m_Wnd = nullptr; // the gadget's parent window protected: int m_Flags; // flags - bool m_infocus; // gadget has focus. + bool m_infocus = false; // gadget has focus. int GetSavedW() const { return m_SavedW; }; int GetSavedH() const { return m_SavedH; }; @@ -449,9 +448,6 @@ class UIGadget : public UIObject { virtual void OnNotify(UIGadget *){}; // usually called by a child gadget of a gadget. public: - UIGadget(); - virtual ~UIGadget(); - UIWindow *GetWindow() { // returns the parent window for a gadget. return m_Wnd; }; @@ -496,9 +492,9 @@ class UIGadget : public UIObject { // This is simply a region within the parent window that when clicked on // or key pressed, does something. -class UIHotspot : public UIGadget { - UIItem *m_ItemOff, *m_ItemOn; // off and on states items. - UIItem *m_ItemCur; // current item. +class UIHotspot final : public UIGadget { + UIItem *m_ItemOff = nullptr, *m_ItemOn = nullptr; // off and on states items. + UIItem *m_ItemCur = nullptr; // current item. protected: virtual void OnKeyDown(int key); // override: behavior when key is pressed. @@ -512,9 +508,6 @@ class UIHotspot : public UIGadget { virtual void OnDestroy(); // override: behavior when gadget is destroyed. public: - UIHotspot(); - virtual ~UIHotspot(); - // optional key, when pressed, triggers hotspot. void Create(UIWindow *wnd, int id, int key, UIItem *itemoff, UIItem *itemon, int x, int y, int w, int h, int flags = 0); @@ -545,7 +538,7 @@ class UIHotspot : public UIGadget { class UIButton : public UIGadget { private: - UIItem *m_Items[UI_BTS_NUM]; // UI Items for each state + UIItem *m_Items[UI_BTS_NUM]{}; // UI Items for each state ddgr_color m_Colors[UI_BTS_NUM]; // Backgrounds for states static int m_ButtonFont; // button fonts. @@ -563,9 +556,6 @@ class UIButton : public UIGadget { }; public: - UIButton(); - virtual ~UIButton(); - void Create(UIWindow *parent, int id, UIItem *title, int x, int y, int w, int h, int flags = 0); virtual tUIClass Class() const { // Overide this function to name the class @@ -664,13 +654,10 @@ class UIRadioButton : virtual public UIButton { class UIStatic : public UIGadget { protected: - UIPrimativeItem *m_Background; - UIItem *m_Title; + UIPrimativeItem *m_Background = nullptr; + UIItem *m_Title = nullptr; public: - UIStatic(); - virtual ~UIStatic(); - void Create(UIWindow *parent, UIItem *item, int x, int y, int w, int h, int flags = 0); void SetBackground(UIPrimativeItem *prim); void SetTitle(UIItem *item); @@ -686,7 +673,7 @@ class UIStatic : public UIGadget { // UIText // This is a simple text. -class UIText : public UIStatic { +class UIText final : public UIStatic { public: void Create(UIWindow *parent, UITextItem *text, int x, int y, int flags = 0); @@ -699,7 +686,7 @@ class UIText : public UIStatic { // UIProgress // Progress Bar -class UIProgress : public UIStatic { +class UIProgress final : public UIStatic { public: void Create(UIWindow *parent, int x, int y, int w, int h, int flags = 0); void Update(float progress); // Call with a value from 0-1.0 to specify progress @@ -716,18 +703,16 @@ class UIProgress : public UIStatic { // UIGroup // Draws a group box on to the window -class UIGroup : public UIStatic { +class UIGroup final : public UIStatic { public: - UIGroup(); - ~UIGroup(); void Create(UIWindow *parent, char *label, int x, int y, int w, int h, ddgr_color label_color = GR_WHITE, ddgr_color box_color = GR_WHITE, int flags = 0); // inheritable operations protected: - bool m_bTextCreated; + bool m_bTextCreated = false; UIText m_tLabel; - char *m_Label; + char *m_Label = nullptr; ddgr_color m_LabelColor; ddgr_color m_BoxColor; virtual void OnDraw(); @@ -742,9 +727,9 @@ class UIGroup : public UIStatic { #define KEYDOWN_REPEAT_DELAY 0.10f class UIEdit : public UIGadget { - char *m_TextBuf; // Text buffer for edit control. - int m_FontHandle; // font for edit control. (default -1 = window's font) - int m_BufSize; // buffersize + char *m_TextBuf = nullptr; // Text buffer for edit control. + int m_FontHandle = -1; // font for edit control. (default -1 = window's font) + int m_BufSize = 0; // buffersize int m_Color; // color of text. int m_CursorPosX; // text cursor position within box. bool m_Active; // active? @@ -776,9 +761,6 @@ class UIEdit : public UIGadget { virtual void OnDestroy(); // override: behavior when gadget is destroyed. public: - UIEdit(); - virtual ~UIEdit(); - void Create(UIWindow *parent, int id, int x, int y, int w, int h, int flags = 0); // settings @@ -799,9 +781,9 @@ class UIEdit : public UIGadget { // A simple slider class UISlider : public UIGadget { - void (*selectchange_fn)(int); // callback when selection changes in slider - void (*selectchange_id_fn)(int, void *); // callback when selection changes in slider, also returns the ID - void *m_callbackptr; // user defined callback pointer + void (*selectchange_fn)(int) = nullptr; // callback when selection changes in slider + void (*selectchange_id_fn)(int, void *) = nullptr; // callback when selection changes in slider, also returns the ID + void *m_callbackptr = nullptr; // user defined callback pointer int m_Pos; // this is the returned value as shown in the range. int m_Range; // returned value of slider is 0 to m_Range-1. int m_PixelWidth; // used to get the current position of slider. @@ -809,13 +791,10 @@ class UISlider : public UIGadget { int switch_x, switch_y; // little box width and height. int switch_w, switch_h; - UIItem *switch_item; // slider switch item - UIItem *slider_item; // slider item + UIItem *switch_item = nullptr; // slider switch item + UIItem *slider_item = nullptr; // slider item public: - UISlider(); - virtual ~UISlider(); - void Create(UIWindow *parent, int id, int x, int y, int w, int h, int flags = 0); // sets visual characteristics of slider. @@ -867,9 +846,9 @@ class UISlider : public UIGadget { #define LISTBOX_BUFFER_SIZE 20 class UIListBox : public UIGadget { - void (*selectchange_fn)(int); // callback when selection changes in listbox. - void (*selectchange_id_fn)(int, void *); // callback when selection changes in listbox..also return the ID - void *m_callbackptr; // user defined callback pointer + void (*selectchange_fn)(int) = nullptr; // callback when selection changes in listbox. + void (*selectchange_id_fn)(int, void *) = nullptr; // callback when selection changes in listbox..also return the ID + void *m_callbackptr = nullptr; // user defined callback pointer ddgr_color m_SelectColor; // selected text color ddgr_color m_HiliteColor; // color of hilite bar int m_LastMseX, m_LastMseY; // used for double clicking. @@ -879,14 +858,11 @@ class UIListBox : public UIGadget { void SetInternalSelectedIndex(int index); // call by listbox system. protected: - int m_TextOffX, m_TextOffY; // offset of text to border. + int m_TextOffX = 4, m_TextOffY = 4; // offset of text to border. int m_ArrowWidth; // with of arrow. int m_CX, m_CY, m_CX2, m_CY2; // clipping text. public: - UIListBox(); - virtual ~UIListBox(); - void Create(UIWindow *parent, int id, int x, int y, int w, int h, int flags = 0); virtual tUIClass Class() const { // Overide this function to name the class @@ -925,16 +901,16 @@ class UIListBox : public UIGadget { virtual void OnUserProcess(); // override: behavior when gadget is processed private: - UIItem **m_ItemList; // list of items in listbox - int *m_Virt2Real; // translates virtual(user) id to real index - int *m_Real2Virt; // translates real index into virtual(user) id + UIItem **m_ItemList = nullptr; // list of items in listbox + int *m_Virt2Real = nullptr; // translates virtual(user) id to real index + int *m_Real2Virt = nullptr; // translates real index into virtual(user) id float m_ClickTime; // done to check for double clicks? - int m_MouseState; // done for mouse selection. + int m_MouseState = 0; // done for mouse selection. int m_MouseX, m_MouseY; - int m_NumItems; // number of items in list. - int m_SelectedIndex; // current selected index into listbox - int m_Index; // current index of visible items. + int m_NumItems = 0; // number of items in list. + int m_SelectedIndex = 0; // current selected index into listbox + int m_Index = 0; // current index of visible items. bool m_ShowDown, m_ShowUp; // whether the down and up arrows are displayed int m_UpArrowY0, m_DownArrowY0; // up and down arrow y locations. int m_UpArrowY1, m_DownArrowY1; // up and down arrow y max locations. @@ -951,19 +927,16 @@ class UIListBox : public UIGadget { class UIComboBox : public UIGadget { public: - UIComboBox(); - virtual ~UIComboBox(); - void Create(UIWindow *parent, int id, int x, int y, int w, int h, int flags = 0); private: - UIItem **m_ItemList; // list of items in listbox - int m_nItems; // number of items. + UIItem **m_ItemList = nullptr; // list of items in listbox + int m_nItems = 0; // number of items. int m_ArrY, m_ArrH; // up and down arrow dimensions int m_UpArrX, m_UpArrW, m_DownArrX, m_DownArrW; - int m_Index; // current index. - void (*selectchange_fn)(int); // callback when selection changes in listbox. - bool m_ShowUp, m_ShowDown; + int m_Index = 0; // current index. + void (*selectchange_fn)(int) = nullptr; // callback when selection changes in listbox. + bool m_ShowUp = false, m_ShowDown = false; float m_scrolltimer; // scroll timer for delay in mouse. int m_scrollstage; // determines how scrolling will work. @@ -997,10 +970,10 @@ class UIComboBox : public UIGadget { // UIConsoleGadget // a console that's a gadget within a window -class UIConsoleGadget : public UIGadget { - int m_ConsoleFont; // standard font for text in console - ddgr_color *m_ColorRows; // color per row. - char *m_ConsoleBuffer; // text buffer of console. +class UIConsoleGadget final : public UIGadget { + int m_ConsoleFont = -1; // standard font for text in console + ddgr_color *m_ColorRows = nullptr; // color per row. + char *m_ConsoleBuffer = nullptr; // text buffer of console. int m_Rows, m_Cols; // dimensions in text. int m_VisRows; // visible rows and columns int m_VisRowStart; // scroll start of visible region of buffer. @@ -1010,7 +983,7 @@ class UIConsoleGadget : public UIGadget { ddgr_color m_LineColor; // color of current line. int m_LineIndex; // index within current row memory-wise(not column wise). int m_PutsBufLen; // current length of puts buffer - char *m_PutsBuffer; // puts buffer. + char *m_PutsBuffer = nullptr; // puts buffer. private: void PutChar(int ch); // outputs a character onto the console. @@ -1022,9 +995,6 @@ class UIConsoleGadget : public UIGadget { virtual void OnDestroy(); // behavior when gadget is destroyed. public: - UIConsoleGadget(); - virtual ~UIConsoleGadget(); - // font = console font, NOT GADGET FONT. This font is used to proportion window void Create(UIWindow *parent, int id, int x, int y, int font, int cols, int rows, int flags = UIF_BORDER); @@ -1143,15 +1113,12 @@ class UIWindow : public UIObject { // Special windows // titled window (functions as a standard dialog box.), without modality though. -class UITitledWindow : public UIWindow { +class UITitledWindow final : public UIWindow { UITextItem m_Title; // title of window int m_CaptionColor; // caption's color. int m_BorderThickness; // border thickness. public: - UITitledWindow(); - virtual ~UITitledWindow(); - void Create(UITextItem &title, int x, int y, int w, int h); // class id @@ -1180,16 +1147,13 @@ class UITitledWindow : public UIWindow { // UIConsole // should display a simple console window where anyone can dump text into -class UIConsole : public UIWindow { +class UIConsole final : public UIWindow { UIConsoleGadget m_Console; protected: virtual void OnDraw(); public: - UIConsole(); - virtual ~UIConsole(); - // font = console font, NOT GADGET FONT. This font is used to proportion window void Create(int x, int y, int font, int cols, int rows); void Destroy(); diff --git a/ui/uires.h b/ui/uires.h index 9d266fb4c..bd5372ea8 100644 --- a/ui/uires.h +++ b/ui/uires.h @@ -99,8 +99,7 @@ enum tUIDrawClass { uiDrawNormal, uiDrawAlphaSaturate, uiDrawFaded }; class UIItem { public: - UIItem(){}; - virtual ~UIItem(){}; + virtual ~UIItem() = default; // if returns false, then it didn't draw. virtual bool draw(int x, int y, tUIDrawClass draw_class = uiDrawNormal) { return false; }; @@ -122,15 +121,15 @@ class UIItem { class UITextItem : public UIItem { friend void SetUITextItemText(UITextItem *uit, char *newtext, uint32_t color); - uint8_t m_Alpha; // alpha value of text. - ddgr_color m_Color; // color of text. + uint8_t m_Alpha = 255; // alpha value of text. + ddgr_color m_Color = GR_WHITE; // color of text. int m_Font; static int m_DefaultFont; static int m_Sat; protected: - char *m_Text; + char *m_Text = nullptr; public: static void SetDefaultFont(int font) { UITextItem::m_DefaultFont = font; } @@ -139,9 +138,6 @@ class UITextItem : public UIItem { public: UITextItem() { - m_Text = NULL; - m_Alpha = 255; - m_Color = GR_WHITE; m_Font = m_DefaultFont; }; UITextItem(const char *text, ddgr_color color = GR_WHITE, uint8_t alpha = 255); @@ -180,7 +176,7 @@ class UITextItem : public UIItem { #define UISNAZZYTEXTF_BLINKING 0x1 #define UISNAZZYTEXTF_RESERVED 0xffff0000 -class UISnazzyTextItem : public UITextItem { +class UISnazzyTextItem final : public UITextItem { unsigned m_flags; union { @@ -213,8 +209,8 @@ class UISnazzyTextItem : public UITextItem { // used by user interface system, contains information about how to render // text. allows for alpha, color and different fonts. -class UIBitmapItem : public UIItem { - bool m_IsValid; +class UIBitmapItem final : public UIItem { + bool m_IsValid = false; bool m_IsChunked; // is this a chunked bitmap? union { @@ -222,13 +218,10 @@ class UIBitmapItem : public UIItem { int handle; // a simple bitmap } m_Bitmap; // a bitmap. - uint8_t m_Alpha; // alpha value of text. + uint8_t m_Alpha = 255; // alpha value of text. public: - UIBitmapItem() { - m_IsValid = false; - m_Alpha = 255; - }; + UIBitmapItem() {}; UIBitmapItem(chunked_bitmap *chunk, uint8_t alpha = 255) { m_IsValid = true; m_Bitmap.chunk = chunk; @@ -241,7 +234,7 @@ class UIBitmapItem : public UIItem { m_IsChunked = false; m_Bitmap.handle = bm_handle; }; - virtual ~UIBitmapItem(){}; + virtual ~UIBitmapItem() = default; // if returns false, then it didn't draw. virtual bool draw(int x, int y, tUIDrawClass draw_class = uiDrawNormal); @@ -284,7 +277,7 @@ class UIBitmapItem : public UIItem { // UIPrimativeItem // used to render simple 2d backgrounds. -class UIPrimativeItem : public UIItem { +class UIPrimativeItem final : public UIItem { ddgr_color color; uint8_t alpha;