diff --git a/YSI_Coding/y_inline/y_inline_impl.inc b/YSI_Coding/y_inline/y_inline_impl.inc index 81d796c5..895b7413 100644 --- a/YSI_Coding/y_inline/y_inline_impl.inc +++ b/YSI_Coding/y_inline/y_inline_impl.inc @@ -295,7 +295,7 @@ stock Inline_EBC__(owner, tag) return ++timerID, //// Set a timer to kill this inline eventually. - SetTimerEx(&Inline_TBC__, owner, false, __const(YSI_gcI), timerID), + SetTimerEx(&Inline_TBC__, owner, false, YSI_gcI, timerID), (timerID | (0x1FF << 22)) & cellmax; } else @@ -1227,7 +1227,7 @@ stock Function:GetRemoteFunction(const func[], const spec[], tag = 0) mset(closure, _:E_INDIRECTION_HANDER, _:addressof (Callback_RemoteHandler_)); mset(closure, _:E_INDIRECTION_CLAIM, _:addressof (Callback_Claim_)); mset(closure, _:E_INDIRECTION_RELEASE, _:addressof (Callback_Release_)); - mset(closure, _:E_PUBLIC_CALL_TIMER, SetTimerEx(&Inline_MaybeFree_, 0, false, __const(YSI_gcI), _:closure)); + mset(closure, _:E_PUBLIC_CALL_TIMER, SetTimerEx(&Inline_MaybeFree_, 0, false, YSI_gcI, _:closure)); mset(closure, _:E_PUBLIC_CALL_FLAGS, e_INLINE_FLAG_PUBLIC); mset(closure, _:E_INDIRECTION_METADATA, 0); if (tag) @@ -1285,7 +1285,7 @@ stock Function:GetLocalFunction(const func[], const spec[], tag = 0) mset(closure, _:E_INDIRECTION_HANDER, _:addressof (Callback_LocalHandler_)); mset(closure, _:E_INDIRECTION_CLAIM, _:addressof (Callback_Claim_)); mset(closure, _:E_INDIRECTION_RELEASE, _:addressof (Callback_Release_)); - mset(closure, _:E_PUBLIC_CALL_TIMER, SetTimerEx(&Inline_MaybeFree_, 0, false, __const(YSI_gcI), _:closure)); + mset(closure, _:E_PUBLIC_CALL_TIMER, SetTimerEx(&Inline_MaybeFree_, 0, false, YSI_gcI, _:closure)); mset(closure, _:E_PUBLIC_CALL_FLAGS, e_INLINE_FLAG_PUBLIC); mset(closure, _:E_INDIRECTION_METADATA, 0); if (tag) @@ -1404,7 +1404,7 @@ static stock Callback_InlineByName(const name[], tag) mset(closure, _:E_INDIRECTION_HANDER, _:addressof (Callback_CallHandler_)); mset(closure, _:E_INDIRECTION_CLAIM, _:addressof (Callback_Claim_)); mset(closure, _:E_INDIRECTION_RELEASE, _:addressof (Callback_Release_)); - mset(closure, _:E_INLINE_CALL_TIMER, SetTimerEx(&Inline_MaybeFree_, 0, false, __const(YSI_gcI), _:closure)); + mset(closure, _:E_INLINE_CALL_TIMER, SetTimerEx(&Inline_MaybeFree_, 0, false, YSI_gcI, _:closure)); mset(closure, _:E_INLINE_CALL_FLAGS, e_INLINE_FLAG_CONST); mset(closure, _:E_INDIRECTION_METADATA, 0); mset(closure, _:E_INDIRECTION_TAG, tag); @@ -1670,7 +1670,7 @@ stock Callback_Release(const input[E_CALLBACK_DATA]) static stock Callback_Claim_(func[E_INLINE_CALL]) { KillTimer(func[E_INLINE_CALL_TIMER]); - func[E_INLINE_CALL_TIMER] = SetTimerEx(&Inline_MaybeConst_, 0, false, __const(YSI_gcI), AMX_Ref(func[E_INLINE_CALL:E_INDIRECTION_ALWAYS_NULL])); + func[E_INLINE_CALL_TIMER] = SetTimerEx(&Inline_MaybeConst_, 0, false, YSI_gcI, AMX_Ref(func[E_INLINE_CALL:E_INDIRECTION_ALWAYS_NULL])); } /*-------------------------------------------------------------------------*//** @@ -2251,7 +2251,7 @@ stock Inline_UI_(const &header, tag) mset(closure, _:E_INDIRECTION_HANDER, _:addressof (Callback_CallHandler_)); mset(closure, _:E_INDIRECTION_CLAIM, _:addressof (Callback_Claim_)); mset(closure, _:E_INDIRECTION_RELEASE, _:addressof (Callback_Release_)); - mset(closure, _:E_INLINE_CALL_TIMER, SetTimerEx(&Inline_MaybeFree_, 0, false, __const(YSI_gcI), _:closure)); + mset(closure, _:E_INLINE_CALL_TIMER, SetTimerEx(&Inline_MaybeFree_, 0, false, YSI_gcI, _:closure)); mset(closure, _:E_INLINE_CALL_FLAGS, e_INLINE_FLAG_CONST); mset(closure, _:E_INDIRECTION_METADATA, 0); mset(closure, _:E_INDIRECTION_TAG, tag); diff --git a/YSI_Coding/y_inline/y_inline_tests.inc b/YSI_Coding/y_inline/y_inline_tests.inc index e8adf2fa..b91ea99e 100644 --- a/YSI_Coding/y_inline/y_inline_tests.inc +++ b/YSI_Coding/y_inline/y_inline_tests.inc @@ -2037,7 +2037,7 @@ public y_inline_CallLaterPublic() static stock y_inline_CallLater(Func:cb<>) { Indirect_Claim(cb); - SetTimerEx("Indirect_FromCallback", 100 + random(100), false, "ii", _:cb, true); + SetTimerEx(__const("Indirect_FromCallback"), 100 + random(100), false, "ii", _:cb, true); } @test(.group = "y_inline") y_inline_CallLater() diff --git a/YSI_Coding/y_malloc/y_malloc_tests.inc b/YSI_Coding/y_malloc/y_malloc_tests.inc index c9ce50f7..4d0f3ff8 100644 --- a/YSI_Coding/y_malloc/y_malloc_tests.inc +++ b/YSI_Coding/y_malloc/y_malloc_tests.inc @@ -319,6 +319,6 @@ public y_malloc_Deferred(Alloc:alloc) { mset(alloc, i, i * 2); } - SetTimerEx(__const("y_malloc_Deferred"), 10, false, __const(YSI_gcI), _:alloc); + SetTimerEx(__const("y_malloc_Deferred"), 10, false, YSI_gcI, _:alloc); } diff --git a/YSI_Coding/y_timers/y_timers_impl.inc b/YSI_Coding/y_timers/y_timers_impl.inc index d61b0fb5..588daea2 100644 --- a/YSI_Coding/y_timers/y_timers_impl.inc +++ b/YSI_Coding/y_timers/y_timers_impl.inc @@ -160,7 +160,7 @@ public OnCodeInit() Debug_Print7("Timer_OnYSIInit: %s", Unpack(buffer)); // Get the time offset for the current call. This should mean // that all the functions are nicely spread out. - SetTimerEx(__const(buffer), time * pre / total, false, __const(YSI_gcII), 1, -1); + SetTimerEx(buffer, time * pre / total, false, YSI_gcII, 1, -1); } } } @@ -344,13 +344,13 @@ stock _y@T:_Timer_D(const func[], interval, const {_, _yT@}:action, who, results { if (!results[who]) { - results[who] = SetTimerEx(__const(func), interval, true, __const(YSI_gcI), who); + results[who] = SetTimerEx(__const(func), interval, true, YSI_gcI, who); } } } else if (!results[who]) { - results[who] = SetTimerEx(__const(func), interval, true, __const(YSI_gcI), who); + results[who] = SetTimerEx(__const(func), interval, true, YSI_gcI, who); } } } diff --git a/YSI_Coding/y_va/y_va_entry.inc b/YSI_Coding/y_va/y_va_entry.inc index e73cfe28..557a2d88 100644 --- a/YSI_Coding/y_va/y_va_entry.inc +++ b/YSI_Coding/y_va/y_va_entry.inc @@ -221,7 +221,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:.. stock bool:va_SendClientMessage(playerid, colour, const fmat[], GLOBAL_TAG_TYPES:...) { if (YSI_CheckNumargs__(3)) - return bool:SendClientMessage(playerid, colour, __const(fmat)); + return bool:SendClientMessage(playerid, colour, fmat); return format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(3)), bool:SendClientMessage(playerid, colour, YSI_UNSAFE_HUGE_STRING); @@ -230,7 +230,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:.. stock bool:va_SendClientMessageToAll(colour, const fmat[], GLOBAL_TAG_TYPES:...) { if (YSI_CheckNumargs__(2)) - return bool:SendClientMessageToAll(colour, __const(fmat)); + return bool:SendClientMessageToAll(colour, fmat); return format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(2)), bool:SendClientMessageToAll(colour, YSI_UNSAFE_HUGE_STRING); @@ -239,7 +239,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:.. stock bool:va_SendPlayerMessageToPlayer(playerid, senderid, const fmat[], GLOBAL_TAG_TYPES:...) { if (YSI_CheckNumargs__(3)) - return bool:SendPlayerMessageToPlayer(playerid, senderid, __const(fmat)); + return bool:SendPlayerMessageToPlayer(playerid, senderid, fmat); return format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(3)), bool:SendPlayerMessageToPlayer(playerid, senderid, YSI_UNSAFE_HUGE_STRING); @@ -248,7 +248,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:.. stock bool:va_SendPlayerMessageToAll(senderid, const fmat[], GLOBAL_TAG_TYPES:...) { if (YSI_CheckNumargs__(2)) - return bool:SendPlayerMessageToAll(senderid, __const(fmat)); + return bool:SendPlayerMessageToAll(senderid, fmat); return format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(2)), bool:SendPlayerMessageToAll(senderid, YSI_UNSAFE_HUGE_STRING); @@ -257,7 +257,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:.. stock bool:va_GameTextForPlayer(playerid, const fmat[], time, style, GLOBAL_TAG_TYPES:...) { if (YSI_CheckNumargs__(4)) - return bool:GameTextForPlayer(playerid, __const(fmat), time, style); + return bool:GameTextForPlayer(playerid, fmat, time, style); return format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(4)), bool:GameTextForPlayer(playerid, YSI_UNSAFE_HUGE_STRING, time, style); @@ -266,7 +266,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:.. stock bool:va_GameTextForAll(const fmat[], time, style, GLOBAL_TAG_TYPES:...) { if (YSI_CheckNumargs__(3)) - return bool:GameTextForAll(__const(fmat), time, style); + return bool:GameTextForAll(fmat, time, style); return format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(3)), bool:GameTextForAll(YSI_UNSAFE_HUGE_STRING, time, style); @@ -284,7 +284,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:.. stock bool:va_SetGameModeText(const fmat[], GLOBAL_TAG_TYPES:...) { if (YSI_CheckNumargs__(1)) - return bool:SetGameModeText(__const(fmat)); + return bool:SetGameModeText(fmat); return format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(1)), bool:SetGameModeText(YSI_UNSAFE_HUGE_STRING); @@ -319,7 +319,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:.. stock Menu:va_CreateMenu(const fmat[], columns, Float:x, Float:y, Float:col1width, Float:col2width = 0.0, GLOBAL_TAG_TYPES:...) { if (YSI_CheckNumargs__(6)) - return CreateMenu(__const(fmat), columns, x, y, col1width, col2width); + return CreateMenu(fmat, columns, x, y, col1width, col2width); return format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(6)), CreateMenu(YSI_UNSAFE_HUGE_STRING, columns, x, y, col1width, col2width); @@ -328,7 +328,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:.. stock va_AddMenuItem(Menu:menuid, column, const fmat[], GLOBAL_TAG_TYPES:...) { if (YSI_CheckNumargs__(3)) - return AddMenuItem(menuid, column, __const(fmat)); + return AddMenuItem(menuid, column, fmat); return format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(3)), AddMenuItem(menuid, column, YSI_UNSAFE_HUGE_STRING); @@ -337,7 +337,7 @@ stock bool:va_SetVehicleNumberPlate(vehicleid, const fmat[], GLOBAL_TAG_TYPES:.. stock bool:va_SetMenuColumnHeader(Menu:menuid, column, const fmat[], GLOBAL_TAG_TYPES:...) { if (YSI_CheckNumargs__(3)) - return bool:SetMenuColumnHeader(menuid, column, __const(fmat)); + return bool:SetMenuColumnHeader(menuid, column, fmat); return format(YSI_UNSAFE_HUGE_STRING, YSI_UNSAFE_HUGE_LENGTH, fmat, ___(3)), bool:SetMenuColumnHeader(menuid, column, YSI_UNSAFE_HUGE_STRING); diff --git a/YSI_Core/y_core/y_const_correct.inc b/YSI_Core/y_core/y_const_correct.inc index 79c6ac0b..4163124d 100644 --- a/YSI_Core/y_core/y_const_correct.inc +++ b/YSI_Core/y_core/y_const_correct.inc @@ -47,13 +47,9 @@ #if !defined SAMP_CONST_CORRECT // The libraries are not const-corret. #define SAMP_CONST_INCORRECT - #if defined __PawnBuild - #if __PawnBuild >= 9 - // But they should be. - #undef __const - #define __const __const_impl - #endif - #endif + // But they should be. + #undef __const + #define __const __const_impl #endif #if !defined __const_decl diff --git a/YSI_Core/y_core/y_samp_natives.inc b/YSI_Core/y_core/y_samp_natives.inc index 02b18bea..7ef9876d 100644 --- a/YSI_Core/y_core/y_samp_natives.inc +++ b/YSI_Core/y_core/y_samp_natives.inc @@ -159,7 +159,7 @@ static stock const stock SetTimerAddr(addr, time, bool:repeat) { - return SetTimerEx(__const(YSI_gscTimerStub), time, repeat, __const(YSI_gcI), addr); + return SetTimerEx(__const(YSI_gscTimerStub), time, repeat, YSI_gcI, addr); } #if defined _ALS_SetTimer diff --git a/YSI_Extra/y_inline_timers.inc b/YSI_Extra/y_inline_timers.inc index 68f36535..2fcbaabe 100644 --- a/YSI_Extra/y_inline_timers.inc +++ b/YSI_Extra/y_inline_timers.inc @@ -132,7 +132,7 @@ static stock Timer_InlineCount(Func:func<>, time, count) { // Initial repeating timer, to set the time offset. //printf("delay = %d", timer); - Indirect_SetMeta(func, SetTimerEx(&Timer_InlineRepeat, time, true, __const(YSI_gcI), _:func)); + Indirect_SetMeta(func, SetTimerEx(&Timer_InlineRepeat, time, true, YSI_gcI, _:func)); // Call the function after setting the meta, incase it kills the timer. @.func(); } @@ -146,7 +146,7 @@ static stock Timer_InlineCount(Func:func<>, time, count) default: { // Call after meta. - Indirect_SetMeta(func, SetTimerEx(&Timer_InlineCount, time, false, __const(YSI_gcIII), _:func, time, count)); + Indirect_SetMeta(func, SetTimerEx(&Timer_InlineCount, time, false, YSI_gcIII, _:func, time, count)); @.func(); } } @@ -205,7 +205,7 @@ stock Timer_CreateCallback(Func:func<>, initialOrTime, timeOrCount = 0, count = // the initial offset time. // Repeat N times. Indirect_Claim(func); - Indirect_SetMeta(func, SetTimerEx(&Timer_InlineCount, initialOrTime, false, __const(YSI_gcIII), _:func, timeOrCount, count)); + Indirect_SetMeta(func, SetTimerEx(&Timer_InlineCount, initialOrTime, false, YSI_gcIII, _:func, timeOrCount, count)); return _:func; } diff --git a/YSI_Players/y_android/y_android_entry.inc b/YSI_Players/y_android/y_android_entry.inc index 5f8277b2..60a58520 100644 --- a/YSI_Players/y_android/y_android_entry.inc +++ b/YSI_Players/y_android/y_android_entry.inc @@ -159,7 +159,7 @@ public OnPlayerConnect(playerid) if (!Script_IsFilterscript()) { YSI_SendClientCheck__(playerid, 0x48, 0, 0, 2); - YSI_g_sTimers[playerid] = SetTimerEx(&OnAndroidTimer, 10000, false, __const(YSI_gcI), playerid); + YSI_g_sTimers[playerid] = SetTimerEx(&OnAndroidTimer, 10000, false, YSI_gcI, playerid); } #if defined Android_OnPlayerConnect Android_OnPlayerConnect(playerid); diff --git a/YSI_Players/y_users/y_users_impl.inc b/YSI_Players/y_users/y_users_impl.inc index 28667a11..980f2e48 100644 --- a/YSI_Players/y_users/y_users_impl.inc +++ b/YSI_Players/y_users/y_users_impl.inc @@ -379,7 +379,7 @@ stock bool:User_ConfirmEmail(playerid, string:email[]) } // Defer the call, so it looks like a callback in the same way as // confirming a password. Check the length first. - SetTimerEx(__const("OnConfirmEmail"), 0, false, __const(YSI_gcII), playerid, len == end - start && strcmp(YSI_g_sUserEmail[playerid], email[start], false, len) == 0); + SetTimerEx(__const("OnConfirmEmail"), 0, false, YSI_gcII, playerid, len == end - start && strcmp(YSI_g_sUserEmail[playerid], email[start], false, len) == 0); return true; } } diff --git a/YSI_Server/y_flooding/y_flooding_entry.inc b/YSI_Server/y_flooding/y_flooding_entry.inc index bb021301..3fbecd1a 100644 --- a/YSI_Server/y_flooding/y_flooding_entry.inc +++ b/YSI_Server/y_flooding/y_flooding_entry.inc @@ -233,7 +233,7 @@ static Flooding_CheckIP(playerid, ip[]) cmd[22] = "banip "; strcat(cmd, ip); SendRconCommand(cmd); - SetTimerEx(&Flooding_UnbanIP, 10000, false, __const(YSI_gcI), ip32); + SetTimerEx(&Flooding_UnbanIP, 10000, false, YSI_gcI, ip32); } case e_FLOOD_ACTION_OTHER: { diff --git a/YSI_Server/y_td/y_td_entry.inc b/YSI_Server/y_td/y_td_entry.inc index f1a083f8..7c56082f 100644 --- a/YSI_Server/y_td/y_td_entry.inc +++ b/YSI_Server/y_td/y_td_entry.inc @@ -6,19 +6,19 @@ /* Legal: Version: MPL 1.1 - - The contents of this file are subject to the Mozilla Public License Version - 1.1 the "License"; you may not use this file except in compliance with - the License. You may obtain a copy of the License at + + The contents of this file are subject to the Mozilla Public License Version + 1.1 the "License"; you may not use this file except in compliance with + the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + The Original Code is the YSI framework. - + The Initial Developer of the Original Code is Alex "Y_Less" Cole. Portions created by the Initial Developer are Copyright (c) 2022 the Initial Developer. All Rights Reserved. @@ -170,10 +170,10 @@ static stock //static stock TD_SetTimer(playerid, Text:td, time, revision) //{ -// SetTimerEx(__const("TD_HideForPlayer"), time, false, __const("iii"), playerid, _:td, revision); +// SetTimerEx(__const("TD_HideForPlayer"), time, false, "iii", playerid, _:td, revision); //} -#define TD_SetTimer(%0,%1,%2,%3) SetTimerEx(__const("TD_HideForPlayerPub"), (%2), false, __const("iii"), (%0), _:(%1), (%3)) +#define TD_SetTimer(%0,%1,%2,%3) SetTimerEx(__const("TD_HideForPlayerPub"), (%2), false, YSI_gcIII, (%0), _:(%1), (%3)) /*-------------------------------------------------------------------------*//** * Text draw style to check validity of, @@ -1162,7 +1162,7 @@ stock TD_Update(Style:id, bool:pos = false) // Update the apperance after a load of updates have been applied. if (YSI_g_sTDData[id][E_TD_DATA_UPDATE] == -1) { - YSI_g_sTDData[id][E_TD_DATA_UPDATE] = SetTimerEx(__const("TD_UpdateInternal"), 1, false, __const(YSI_gcI), _:id); + YSI_g_sTDData[id][E_TD_DATA_UPDATE] = SetTimerEx(__const("TD_UpdateInternal"), 1, false, YSI_gcI, _:id); } } @@ -1655,7 +1655,7 @@ stock TD_ShowForPlayer(playerid, Text:textDraw) }*/ if (time) { - //YSI_g_sTDTimers[textDraw][playerid] = SetTimerEx(__const("TD_HideForPlayer"), time, false, __const(YSI_gcII), playerid, _:textDraw); + //YSI_g_sTDTimers[textDraw][playerid] = SetTimerEx(__const("TD_HideForPlayer"), time, false, YSI_gcII, playerid, _:textDraw); TD_SetTimer(playerid, textDraw, time, YSI_g_sTDDisplay[textDraw][E_TD_DISPLAY_REVISION]); } return 1; @@ -1934,8 +1934,8 @@ stock TD_Morph(Text:textDraw, Style:style, time, delay = 0) //FOREACH__ (new playerid : PS(players)) //{ //TD_MorphInternal(playerid, textDraw, style); - SetTimerEx(__const("TD_MorphTDInternal"), delay + Y_TD_FRAME_TIME, false, __const("iiiiii"), _:textDraw, _:TD_GetDisplayStyle(textDraw), _:style, time, Y_TD_FRAME_TIME, YSI_g_sTDDisplay[textDraw][E_TD_DISPLAY_REVISION]); //, YSI_g_sTDDisplay[textDraw][E_TD_DISPLAY_REAL]); - //SetTimerEx(__const("TD_MorphTDInternal"), delay + Y_TD_FRAME_TIME, false, __const("iiiiii"), _:textDraw, TD_GetDisplayStyle()); + SetTimerEx(__const("TD_MorphTDInternal"), delay + Y_TD_FRAME_TIME, false, "iiiiii", _:textDraw, _:TD_GetDisplayStyle(textDraw), _:style, time, Y_TD_FRAME_TIME, YSI_g_sTDDisplay[textDraw][E_TD_DISPLAY_REVISION]); //, YSI_g_sTDDisplay[textDraw][E_TD_DISPLAY_REAL]); + //SetTimerEx(__const("TD_MorphTDInternal"), delay + Y_TD_FRAME_TIME, false, "iiiiii", _:textDraw, TD_GetDisplayStyle()); //} return 1; } @@ -2050,7 +2050,7 @@ public TD_MorphTDInternal(Text:td, Style:from, Style:to, speed, pos, revision) // Even though "td" changes in the loop, the end condition is that "td" // is the same as when the loop started, meaning that it's fine to reuse // it here. - SetTimerEx(__const("TD_MorphTDInternal"), Y_TD_FRAME_TIME, false, __const("iiiiii"), _:td, _:from, _:to, speed, pos + Y_TD_FRAME_TIME, revision); + SetTimerEx(__const("TD_MorphTDInternal"), Y_TD_FRAME_TIME, false, "iiiiii", _:td, _:from, _:to, speed, pos + Y_TD_FRAME_TIME, revision); } return 1; } diff --git a/YSI_Visual/y_classes/y_classes_classcontrol.inc b/YSI_Visual/y_classes/y_classes_classcontrol.inc index 5dd43cd5..3570ab32 100644 --- a/YSI_Visual/y_classes/y_classes_classcontrol.inc +++ b/YSI_Visual/y_classes/y_classes_classcontrol.inc @@ -270,7 +270,7 @@ MASTER_REHOOK__ OnPlayerSpawn(playerid) // YSI_g_sPlayerFlags[playerid] |= (e_SPAWN_FLAGS_IGNORE_ONCE); // TogglePlayerSpectating(playerid, false); // //SpawnPlayer(playerid); - // //YSI_g_sTimer[playerid] = SetTimerEx(__const("_Class_SpawnPlayer3"), 20, false, __const(YSI_gcI), playerid); + // //YSI_g_sTimer[playerid] = SetTimerEx(__const("_Class_SpawnPlayer3"), 20, false, YSI_gcI, playerid); // //Class_TK(playerid); // } @@ -306,11 +306,11 @@ MASTER_REHOOK__ OnPlayerSpawn(playerid) // Class_Spectate(playerid); // if (YSI_g_sPlayerFlags[playerid] & (e_SPAWN_FLAGS_ENABLED)) // { - // YSI_g_sTimer[playerid] = SetTimerEx(__const("_Class_SpawnPlayer1"), 10, false, __const(YSI_gcI), playerid); + // YSI_g_sTimer[playerid] = SetTimerEx(__const("_Class_SpawnPlayer1"), 10, false, YSI_gcI, playerid); // } // else // { - // YSI_g_sTimer[playerid] = SetTimerEx(__const("_Class_SpawnPlayer2"), 10, false, __const(YSI_gcI), playerid); + // YSI_g_sTimer[playerid] = SetTimerEx(__const("_Class_SpawnPlayer2"), 10, false, YSI_gcI, playerid); // } // //Class_TK(playerid); // //YSI_g_sPlayerFlags[playerid] |= (e_SPAWN_FLAGS_IGNORE_ONCE); @@ -325,7 +325,7 @@ MASTER_REHOOK__ OnPlayerSpawn(playerid) // Debug_Print1("_Class_Return called: %d", playerid); // Class_ReturnToSelection(playerid); // //Class_TK(playerid); - // //YSI_g_sTimer[playerid] = SetTimerEx(__const("_Class_NotSpawned"), 500, false, __const(YSI_gcI), playerid); + // //YSI_g_sTimer[playerid] = SetTimerEx(__const("_Class_NotSpawned"), 500, false, YSI_gcI, playerid); // } // forward _Class_NotSpawned(playerid); @@ -337,7 +337,7 @@ MASTER_REHOOK__ OnPlayerSpawn(playerid) // Class_DisableSelection(playerid); // //SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); // //SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); - // SetTimerEx(__const("_Class_Return"), 10, false, __const(YSI_gcI), playerid); + // SetTimerEx(__const("_Class_Return"), 10, false, YSI_gcI, playerid); // YSI_g_sPlayerFlags[playerid] |= (e_SPAWN_FLAGS_RETURNED | e_SPAWN_FLAGS_INSTANT); // } diff --git a/YSI_Visual/y_dialog/y_dialog_tests.inc b/YSI_Visual/y_dialog/y_dialog_tests.inc index d3e843f0..2ae95b84 100644 --- a/YSI_Visual/y_dialog/y_dialog_tests.inc +++ b/YSI_Visual/y_dialog/y_dialog_tests.inc @@ -180,7 +180,7 @@ public Dialog_TestHide(playerid) #pragma unused arg0, arg1, arg2 } Dialog_ShowCallback(playerid, using inline Response, DIALOG_STYLE_INPUT, "Dialog", "Input:", "OK", "CANCEL"); - SetTimerEx("Dialog_TestHide", 5000, false, "i", playerid); + SetTimerEx(__const("Dialog_TestHide"), 5000, false, "i", playerid); ASK("Does the dialog disappear after 5 seconds?"); } diff --git a/YSI_Visual/y_properties/y_properties_entry.inc b/YSI_Visual/y_properties/y_properties_entry.inc index 8b8de2af..3a25e8bb 100644 --- a/YSI_Visual/y_properties/y_properties_entry.inc +++ b/YSI_Visual/y_properties/y_properties_entry.inc @@ -1085,7 +1085,7 @@ HOOK__ OnPlayerLeaveCPEx(playerid, cpid) else Text_SendFormat(playerid, "YSI_PROP_HOUSE_OWNED", ReturnPlayerName(owner)); } } - YSI_g_sPickupTimer[playerid] = SetTimerEx(__const("Property_PickupTimeCheck"), 500, true, __const(YSI_gcII), playerid, pickupid); + YSI_g_sPickupTimer[playerid] = SetTimerEx(__const("Property_PickupTimeCheck"), 500, true, YSI_gcII, playerid, pickupid); } Debug_Print2("Property_OnPlayerPickUpPickup() end"); return 1; @@ -1935,7 +1935,7 @@ YCMD:buy(playerid, params[], help) } else if (YSI_g_sRebuyDelay) { - SetTimerEx(__const("Property_ResetRebuy"), YSI_g_sRebuyDelay, false, __const(YSI_gcI), prop); + SetTimerEx(__const("Property_ResetRebuy"), YSI_g_sRebuyDelay, false, YSI_gcI, prop); #if defined _YSI_VISUAL_PICKUPS if (Property_GetOption(5, flag)) Pickup_Show(cpid, 0); diff --git a/YSI_Visual/y_races/y_races_impl.inc b/YSI_Visual/y_races/y_races_impl.inc index 983f2f1f..d0964f89 100644 --- a/YSI_Visual/y_races/y_races_impl.inc +++ b/YSI_Visual/y_races/y_races_impl.inc @@ -587,7 +587,7 @@ GLOBAL__ void:Race_SetEntry(raceid, cost) _Y_RACES_STATIC Race_Dropout(playerid) { - SetTimerEx(&Race_Timeout, (YSI_g_sRaceData[(YSI_g_sPlayerRace[playerid][E_RACE_PLAYER_RACE])][E_RACE_FLAGS] & e_RACE_FLAGS_EXIT_TIME), false, __const(YSI_gcI), playerid); + SetTimerEx(&Race_Timeout, (YSI_g_sRaceData[(YSI_g_sPlayerRace[playerid][E_RACE_PLAYER_RACE])][E_RACE_FLAGS] & e_RACE_FLAGS_EXIT_TIME), false, YSI_gcI, playerid); YSI_g_sPlayerRace[playerid][E_RACE_PLAYER_RACE] |= RACE_PLAYER_OUT; YSI_g_sPlayerRace[playerid][E_RACE_PLAYER_TOUT] = GetTickCount(); } @@ -881,7 +881,7 @@ static stock Race_Countdown(race, time) if (time) { Text_Send(YSI_g_sRacers[race], $YSI_RACE_COUNTDOWN, time); - SetTimerEx(&Race_Countdown, 1000, false, __const(YSI_gcII), race, time - 1); + SetTimerEx(&Race_Countdown, 1000, false, YSI_gcII, race, time - 1); } else { diff --git a/YSI_Visual/y_zonenames/y_zonenames_entry.inc b/YSI_Visual/y_zonenames/y_zonenames_entry.inc index 30a13aa7..29f62bf7 100644 --- a/YSI_Visual/y_zonenames/y_zonenames_entry.inc +++ b/YSI_Visual/y_zonenames/y_zonenames_entry.inc @@ -180,7 +180,7 @@ stock ZoneNames_Show(playerid, id) td = Text_GetLastID(); if (td != -1) { - SetTimerEx(&ZoneNames_Hide, 3000, false, __const(YSI_gcI), playerid), + SetTimerEx(&ZoneNames_Hide, 3000, false, YSI_gcI, playerid), YSI_g_sZNTD[playerid] = td; } } diff --git a/YSI_Visual/y_zonepulse/y_zonepulse_impl.inc b/YSI_Visual/y_zonepulse/y_zonepulse_impl.inc index a81c579e..f7635715 100644 --- a/YSI_Visual/y_zonepulse/y_zonepulse_impl.inc +++ b/YSI_Visual/y_zonepulse/y_zonepulse_impl.inc @@ -89,13 +89,13 @@ static stock GangZoneDoPulse(playerid, zone, from, to, time, stage, delay, time2 if (stage == time) { GangZoneShowForPlayer(playerid, zone, to); - SetPVarInt(playerid, YSI_g_sTimer, SetTimerEx(&GangZoneDoPulse, delay, false, __const(YSI_gcIIIIIIIIIIIIIIIII), playerid, zone, from, to, time, stage, delay, time2, delay2, r0, g0, b0, a0, r1, g1, b1, a1)); + SetPVarInt(playerid, YSI_g_sTimer, SetTimerEx(&GangZoneDoPulse, delay, false, YSI_gcIIIIIIIIIIIIIIIII, playerid, zone, from, to, time, stage, delay, time2, delay2, r0, g0, b0, a0, r1, g1, b1, a1)); return; } else if (stage == 0) { GangZoneShowForPlayer(playerid, zone, from); - SetPVarInt(playerid, YSI_g_sTimer, SetTimerEx(&GangZoneDoPulse, delay2, false, __const(YSI_gcIIIIIIIIIIIIIIIII), playerid, zone, from, to, time, 0, delay, time2, delay2, r0, g0, b0, a0, r1, g1, b1, a1)); + SetPVarInt(playerid, YSI_g_sTimer, SetTimerEx(&GangZoneDoPulse, delay2, false, YSI_gcIIIIIIIIIIIIIIIII, playerid, zone, from, to, time, 0, delay, time2, delay2, r0, g0, b0, a0, r1, g1, b1, a1)); return; } if (stage > time) @@ -110,7 +110,7 @@ static stock GangZoneDoPulse(playerid, zone, from, to, time, stage, delay, time2 //Debug_Print7("GangZoneDoPulse: %d %d %x %x %x %x", playerid, zone, r & 0xFF, g & 0xFF, b & 0xFF, a & 0xFF); GangZoneShowForPlayer(playerid, zone, ((r1 * multiplier / time2 + r0) << 24) | (((g1 * multiplier / time2 + g0) & 0xFF) << 16) | (((b1 * multiplier / time2 + b0) & 0xFF) << 8) | ((a1 * multiplier / time2 + a0) & 0xFF)); //GangZoneShowForPlayer(playerid, zone, (r << 24) | ((g & 0xFF) << 16) | ((b & 0xFF) << 8) | (a & 0xFF)); - SetPVarInt(playerid, YSI_g_sTimer, SetTimerEx(&GangZoneDoPulse, ZONE_PULSE_STAGE_TIME, false, __const(YSI_gcIIIIIIIIIIIIIIIII), playerid, zone, from, to, time, stage, delay, time2, delay2, r0, g0, b0, a0, r1, g1, b1, a1)); + SetPVarInt(playerid, YSI_g_sTimer, SetTimerEx(&GangZoneDoPulse, ZONE_PULSE_STAGE_TIME, false, YSI_gcIIIIIIIIIIIIIIIII, playerid, zone, from, to, time, stage, delay, time2, delay2, r0, g0, b0, a0, r1, g1, b1, a1)); } else { @@ -122,7 +122,7 @@ static stock GangZoneDoPulse(playerid, zone, from, to, time, stage, delay, time2 // a = a1 * stage / time + a0; //Debug_Print7("GangZoneDoPulse: %d %d %x %x %x %x", playerid, zone, r & 0xFF, g & 0xFF, b & 0xFF, a & 0xFF); GangZoneShowForPlayer(playerid, zone, ((r1 * stage / time + r0) << 24) | (((g1 * stage / time + g0) & 0xFF) << 16) | (((b1 * stage / time + b0) & 0xFF) << 8) | ((a1 * stage / time + a0) & 0xFF)); - SetPVarInt(playerid, YSI_g_sTimer, SetTimerEx(&GangZoneDoPulse, ZONE_PULSE_STAGE_TIME, false, __const(YSI_gcIIIIIIIIIIIIIIIII), playerid, zone, from, to, time, stage, delay, time2, delay2, r0, g0, b0, a0, r1, g1, b1, a1)); + SetPVarInt(playerid, YSI_g_sTimer, SetTimerEx(&GangZoneDoPulse, ZONE_PULSE_STAGE_TIME, false, YSI_gcIIIIIIIIIIIIIIIII, playerid, zone, from, to, time, stage, delay, time2, delay2, r0, g0, b0, a0, r1, g1, b1, a1)); } return; } @@ -175,7 +175,7 @@ stock _GangZonePulse(@PlayerSet:ps, zone, from, to, time, delay = ZONE_PULSE_STA GangZoneShowForPlayer(p, zone, from); // Don't delay at the start (because that's just silly, it already is // that colour). - SetPVarInt(p, YSI_g_sTimer, SetTimerEx(&GangZoneDoPulse, ZONE_PULSE_STAGE_TIME, false, __const(YSI_gcIIIIIIIIIIIIIIIII), p, zone, from, to, time, 0, delay, time2, delay2, r0, g0, b0, a0, r1, g1, b1, a1)); + SetPVarInt(p, YSI_g_sTimer, SetTimerEx(&GangZoneDoPulse, ZONE_PULSE_STAGE_TIME, false, YSI_gcIIIIIIIIIIIIIIIII, p, zone, from, to, time, 0, delay, time2, delay2, r0, g0, b0, a0, r1, g1, b1, a1)); } } diff --git a/YSI_Visual/y_zonepulse/y_zonepulse_tests.inc b/YSI_Visual/y_zonepulse/y_zonepulse_tests.inc index 599e50c6..341635d7 100644 --- a/YSI_Visual/y_zonepulse/y_zonepulse_tests.inc +++ b/YSI_Visual/y_zonepulse/y_zonepulse_tests.inc @@ -256,7 +256,7 @@ static @test(.group = "y_zonepulse") GangZoneStopPulse2(playerid) { GangZonePulseForPlayer(playerid, gZone, 0xFF0000AA, 0x00FF00AA, 1000); - SetTimerEx(__const("GangZoneStopPulse2"), 4000, false, __const(YSI_gcI), playerid); + SetTimerEx(__const("GangZoneStopPulse2"), 4000, false, YSI_gcI, playerid); ASK("Does the pulsing stop after four seconds?"); }