From 923e5ae945f2ef5eada538c6f7b6cdf52d1695d9 Mon Sep 17 00:00:00 2001 From: TimePath Date: Sat, 31 Oct 2015 20:53:05 +1100 Subject: [PATCH] Registry: use BITS everywhere --- qcsrc/client/hud.qh | 2 +- qcsrc/common/buffs/all.qh | 2 +- qcsrc/common/command/all.qh | 2 +- qcsrc/common/deathtypes/all.qh | 2 +- qcsrc/common/effects/all.qh | 2 +- qcsrc/common/effects/effectinfo.qc | 2 +- qcsrc/common/items/all.qh | 2 +- qcsrc/common/mapinfo.qh | 2 +- qcsrc/common/minigames/cl_minigames.qh | 2 +- qcsrc/common/minigames/sv_minigames.qh | 2 +- qcsrc/common/models/all.qh | 2 +- qcsrc/common/monsters/all.qh | 2 +- qcsrc/common/mutators/mutator/waypoints/all.qh | 2 +- qcsrc/common/nades/all.qh | 2 +- qcsrc/common/turrets/all.qh | 2 +- qcsrc/common/vehicles/all.qh | 2 +- qcsrc/lib/net.qh | 4 ++-- qcsrc/menu/gamesettings.qh | 2 +- 18 files changed, 19 insertions(+), 19 deletions(-) diff --git a/qcsrc/client/hud.qh b/qcsrc/client/hud.qh index ba9cb171e9..95a80a9eed 100644 --- a/qcsrc/client/hud.qh +++ b/qcsrc/client/hud.qh @@ -6,7 +6,7 @@ bool HUD_Radar_Clickable(); void HUD_Radar_Mouse(); -REGISTRY(hud_panels, 24) +REGISTRY(hud_panels, BITS(6)) REGISTER_REGISTRY(Registerhud_panels) #define REGISTER_HUD_PANEL(id, draw_func, name, configflags, showflags) \ diff --git a/qcsrc/common/buffs/all.qh b/qcsrc/common/buffs/all.qh index 7099034705..450917390a 100644 --- a/qcsrc/common/buffs/all.qh +++ b/qcsrc/common/buffs/all.qh @@ -8,7 +8,7 @@ #include "../teams.qh" #include "../util.qh" -REGISTRY(Buffs, BIT(4)) +REGISTRY(Buffs, BITS(4)) REGISTER_REGISTRY(RegisterBuffs) #define REGISTER_BUFF(id) \ diff --git a/qcsrc/common/command/all.qh b/qcsrc/common/command/all.qh index 756b36d598..d1164f11ad 100644 --- a/qcsrc/common/command/all.qh +++ b/qcsrc/common/command/all.qh @@ -2,7 +2,7 @@ #define COMMON_COMMANDS_ALL_H #include "command.qh" -REGISTRY(GENERIC_COMMANDS, 50) +REGISTRY(GENERIC_COMMANDS, BITS(7)) REGISTER_REGISTRY(RegisterGENERIC_COMMANDS) REGISTRY_SORT(GENERIC_COMMANDS, m_name, 0) diff --git a/qcsrc/common/deathtypes/all.qh b/qcsrc/common/deathtypes/all.qh index 4558255fc7..9562ab7868 100644 --- a/qcsrc/common/deathtypes/all.qh +++ b/qcsrc/common/deathtypes/all.qh @@ -3,7 +3,7 @@ #include "../notifications.qh" -REGISTRY(Deathtypes, 100) +REGISTRY(Deathtypes, BITS(8)) REGISTER_REGISTRY(RegisterDeathtypes) .entity death_msgself; diff --git a/qcsrc/common/effects/all.qh b/qcsrc/common/effects/all.qh index 9d95733cdf..39c67dc962 100644 --- a/qcsrc/common/effects/all.qh +++ b/qcsrc/common/effects/all.qh @@ -10,7 +10,7 @@ void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt); void Send_Effect_(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt); #endif -REGISTRY(Effects, BIT(8)) +REGISTRY(Effects, BITS(8)) REGISTER_REGISTRY(RegisterEffects) #define EFFECT(istrail, name, realname) \ REGISTER(RegisterEffects, EFFECT, Effects, name, m_id, Create_Effect_Entity(realname, istrail)); diff --git a/qcsrc/common/effects/effectinfo.qc b/qcsrc/common/effects/effectinfo.qc index deff4dc156..f85ad06b12 100644 --- a/qcsrc/common/effects/effectinfo.qc +++ b/qcsrc/common/effects/effectinfo.qc @@ -319,7 +319,7 @@ GENERIC_COMMAND(dumpeffectinfo, "Dump all effectinfo to effectinfo_dump.txt") } -REGISTRY(EffectInfos, BIT(9)) +REGISTRY(EffectInfos, BITS(9)) REGISTER_REGISTRY(RegisterEffectInfos) #define EFFECTINFO(name) \ [[accumulate]] void effectinfo_##name(EffectInfoGroup parent, EffectInfo this) { } \ diff --git a/qcsrc/common/items/all.qh b/qcsrc/common/items/all.qh index 37e417a63f..4d76aa3386 100644 --- a/qcsrc/common/items/all.qh +++ b/qcsrc/common/items/all.qh @@ -5,7 +5,7 @@ #include "item.qh" -REGISTRY(Items, BIT(5)) +REGISTRY(Items, BITS(5)) REGISTER_REGISTRY(RegisterItems) /** If you register a new item, make sure to add it to all.inc */ #define REGISTER_ITEM(id, class) REGISTER(RegisterItems, ITEM, Items, id, m_id, NEW(class)) diff --git a/qcsrc/common/mapinfo.qh b/qcsrc/common/mapinfo.qh index 4107290fc0..3466d7ee32 100644 --- a/qcsrc/common/mapinfo.qh +++ b/qcsrc/common/mapinfo.qh @@ -42,7 +42,7 @@ CLASS(Gametype, Object) } ENDCLASS(Gametype) -REGISTRY(Gametypes, BIT(4)) +REGISTRY(Gametypes, BITS(4)) REGISTER_REGISTRY(RegisterGametypes) int MAPINFO_TYPE_ALL; #define REGISTER_GAMETYPE(hname, sname, g_name, NAME, gteamplay, mutators, defaults, gdescription) \ diff --git a/qcsrc/common/minigames/cl_minigames.qh b/qcsrc/common/minigames/cl_minigames.qh index 016e8a3edf..50eb5b42d3 100644 --- a/qcsrc/common/minigames/cl_minigames.qh +++ b/qcsrc/common/minigames/cl_minigames.qh @@ -114,7 +114,7 @@ void HUD_MinigameMenu_CustomEntry(entity parent, string message, string event_ar while( (entityvar = findentity(entityvar,owner,active_minigame)) ) -REGISTRY(Minigames, BIT(3)) +REGISTRY(Minigames, BITS(3)) REGISTER_REGISTRY(RegisterMinigames) #define REGISTER_MINIGAME(name,nicename) \ REGISTER(RegisterMinigames, MINIGAME, Minigames, name, m_id, spawn()); \ diff --git a/qcsrc/common/minigames/sv_minigames.qh b/qcsrc/common/minigames/sv_minigames.qh index e36d690d9b..af23fd1932 100644 --- a/qcsrc/common/minigames/sv_minigames.qh +++ b/qcsrc/common/minigames/sv_minigames.qh @@ -46,7 +46,7 @@ entity minigame_sessions; bool minigame_SendEntity(entity this, entity to, int sf); -REGISTRY(Minigames, BIT(3)) +REGISTRY(Minigames, BITS(3)) REGISTER_REGISTRY(RegisterMinigames) #define REGISTER_MINIGAME(name,nicename) \ REGISTER(RegisterMinigames, MINIGAME, Minigames, name, m_id, spawn()); \ diff --git a/qcsrc/common/models/all.qh b/qcsrc/common/models/all.qh index a7ab908807..ed8a31a0dd 100644 --- a/qcsrc/common/models/all.qh +++ b/qcsrc/common/models/all.qh @@ -3,7 +3,7 @@ #include "model.qh" -REGISTRY(Models, BIT(9)) +REGISTRY(Models, BITS(9)) REGISTER_REGISTRY(RegisterModels) #define MODEL(name, path) \ diff --git a/qcsrc/common/monsters/all.qh b/qcsrc/common/monsters/all.qh index 05eb4346db..72861f9d23 100644 --- a/qcsrc/common/monsters/all.qh +++ b/qcsrc/common/monsters/all.qh @@ -3,7 +3,7 @@ #include "monster.qh" -REGISTRY(Monsters, BIT(4)) +REGISTRY(Monsters, BITS(4)) REGISTER_REGISTRY(RegisterMonsters) const int MON_FIRST = 1; #define MON_LAST (Monsters_COUNT - 1) diff --git a/qcsrc/common/mutators/mutator/waypoints/all.qh b/qcsrc/common/mutators/mutator/waypoints/all.qh index f7fd03837d..27797b7f4c 100644 --- a/qcsrc/common/mutators/mutator/waypoints/all.qh +++ b/qcsrc/common/mutators/mutator/waypoints/all.qh @@ -3,7 +3,7 @@ #include "waypointsprites.qh" -REGISTRY(Waypoints, BIT(6)) +REGISTRY(Waypoints, BITS(6)) REGISTER_REGISTRY(RegisterWaypoints) /** If you register a new waypoint, make sure to add it to all.inc */ #define REGISTER_WAYPOINT_(id, init) REGISTER(RegisterWaypoints, WP, Waypoints, id, m_id, init) diff --git a/qcsrc/common/nades/all.qh b/qcsrc/common/nades/all.qh index ad51a1e55e..37c9bee5ff 100644 --- a/qcsrc/common/nades/all.qh +++ b/qcsrc/common/nades/all.qh @@ -21,7 +21,7 @@ const int PROJECTILE_NADE_HEAL_BURN = 81; const int PROJECTILE_NADE_MONSTER = 82; const int PROJECTILE_NADE_MONSTER_BURN = 83; -REGISTRY(Nades, BIT(3)) +REGISTRY(Nades, BITS(4)) REGISTER_REGISTRY(RegisterNades) #define REGISTER_NADE(id) REGISTER(RegisterNades, NADE_TYPE, Nades, id, m_id, NEW(Nade)) diff --git a/qcsrc/common/turrets/all.qh b/qcsrc/common/turrets/all.qh index 3f9eba4f37..fa16be08b2 100644 --- a/qcsrc/common/turrets/all.qh +++ b/qcsrc/common/turrets/all.qh @@ -6,7 +6,7 @@ #include "turret.qh" -REGISTRY(Turrets, BIT(5)) +REGISTRY(Turrets, BITS(5)) REGISTER_REGISTRY(RegisterTurrets) diff --git a/qcsrc/common/vehicles/all.qh b/qcsrc/common/vehicles/all.qh index a44eb2209e..8a57182f81 100644 --- a/qcsrc/common/vehicles/all.qh +++ b/qcsrc/common/vehicles/all.qh @@ -3,7 +3,7 @@ #include "vehicle.qh" -REGISTRY(Vehicles, BIT(3)) +REGISTRY(Vehicles, BITS(3)) REGISTER_REGISTRY(RegisterVehicles) const int VEH_FIRST = 1; #define VEH_LAST (Vehicles_COUNT - 1) diff --git a/qcsrc/lib/net.qh b/qcsrc/lib/net.qh index c3043806a5..39c9c8db88 100644 --- a/qcsrc/lib/net.qh +++ b/qcsrc/lib/net.qh @@ -103,7 +103,7 @@ } #endif -REGISTRY(LinkedEntities, BIT(0)) +REGISTRY(LinkedEntities, BITS(4)) REGISTER_REGISTRY(RegisterLinkedEntities) REGISTRY_SORT(LinkedEntities, netname, 0) STATIC_INIT(RegisterLinkedEntities_renumber) @@ -130,7 +130,7 @@ STATIC_INIT(RegisterLinkedEntities_renumber) } #endif -REGISTRY(TempEntities, BIT(0)) +REGISTRY(TempEntities, BITS(4)) REGISTER_REGISTRY(RegisterTempEntities) REGISTRY_SORT(TempEntities, netname, 0) STATIC_INIT(RegisterTempEntities_renumber) diff --git a/qcsrc/menu/gamesettings.qh b/qcsrc/menu/gamesettings.qh index cf0916ce9c..49c5f21dcf 100644 --- a/qcsrc/menu/gamesettings.qh +++ b/qcsrc/menu/gamesettings.qh @@ -4,7 +4,7 @@ #include "xonotic/tab.qc" -REGISTRY(Settings, BIT(3)) +REGISTRY(Settings, BITS(3)) REGISTER_REGISTRY(RegisterSettings) #define REGISTER_SETTINGS(id, impl) \ LAZY_NEW(id, impl) \ -- 2.39.2