From: TimePath Date: Wed, 6 May 2015 06:31:46 +0000 (+1000) Subject: Fix typedefs X-Git-Tag: xonotic-v0.8.1~61^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=498c5dcb1c91e3e2e9aea27425e8c348f4a4996b;p=xonotic%2Fxonotic-data.pk3dir.git Fix typedefs --- diff --git a/qcsrc/client/bgmscript.qc b/qcsrc/client/bgmscript.qc index eeba139c5..d76c82e64 100644 --- a/qcsrc/client/bgmscript.qc +++ b/qcsrc/client/bgmscript.qc @@ -171,7 +171,7 @@ float GetTimeForAmplitude(entity e, float amp) } } -float BGMScript(entity e) +float doBGMScript(entity e) { float amp, vel; diff --git a/qcsrc/client/bgmscript.qh b/qcsrc/client/bgmscript.qh index f88105ba0..cd70955cb 100644 --- a/qcsrc/client/bgmscript.qh +++ b/qcsrc/client/bgmscript.qh @@ -1,7 +1,7 @@ #ifndef BGMSCRIPT_H #define BGMSCRIPT_H -entityclass(BGMScript) +entityclass(BGMScript); class(BGMScript) .string bgmscript; class(BGMScript) .float bgmscriptattack; class(BGMScript) .float bgmscriptdecay; @@ -11,5 +11,5 @@ class(BGMScript) .float bgmscriptrelease; class(BGMScript) .float just_toggled; void BGMScript_InitEntity(entity e); -float BGMScript(entity e); +float doBGMScript(entity e); #endif diff --git a/qcsrc/client/casings.qc b/qcsrc/client/casings.qc index 28a8390b0..692db3a5e 100644 --- a/qcsrc/client/casings.qc +++ b/qcsrc/client/casings.qc @@ -11,7 +11,7 @@ .float alpha; .int state; -entityclass(Casing) +entityclass(Casing); class(Casing) .bool silent; void Casing_Delete() diff --git a/qcsrc/client/hook.qc b/qcsrc/client/hook.qc index 27351d455..195754e8f 100644 --- a/qcsrc/client/hook.qc +++ b/qcsrc/client/hook.qc @@ -11,7 +11,7 @@ #include "../warpzonelib/common.qh" #include "../warpzonelib/mathlib.qh" -entityclass(Hook) +entityclass(Hook); class(Hook) .float HookType; // ENT_CLIENT_* class(Hook) .vector origin; class(Hook) .vector velocity; diff --git a/qcsrc/client/hud.qh b/qcsrc/client/hud.qh index bebf60c77..f880a810f 100644 --- a/qcsrc/client/hud.qh +++ b/qcsrc/client/hud.qh @@ -82,7 +82,7 @@ vector panel_size_backup; vector panel_size_copied; entity panel; -entityclass(HUDPanel) +entityclass(HUDPanel); class(HUDPanel) .string panel_name; class(HUDPanel) .int panel_id; class(HUDPanel) .vector current_panel_pos; diff --git a/qcsrc/client/laser.qc b/qcsrc/client/laser.qc index 1d5362903..770bd45c4 100644 --- a/qcsrc/client/laser.qc +++ b/qcsrc/client/laser.qc @@ -11,7 +11,7 @@ // a laser goes from origin in direction angles // it has color 'colormod' // and stops when something is in the way -entityclass(Laser) +entityclass(Laser); class(Laser) .int cnt; // end effect class(Laser) .vector colormod; class(Laser) .int state; // on-off diff --git a/qcsrc/client/modeleffects.qh b/qcsrc/client/modeleffects.qh index a82d26400..22998f09d 100644 --- a/qcsrc/client/modeleffects.qh +++ b/qcsrc/client/modeleffects.qh @@ -1,7 +1,7 @@ #ifndef MODELEFFECTS_H #define MODELEFFECTS_H -entityclass(ModelEffect) +entityclass(ModelEffect); class(ModelEffect) .float frame1time; class(ModelEffect) .float lifetime, fadetime; class(ModelEffect) .float teleport_time; diff --git a/qcsrc/client/noise.qc b/qcsrc/client/noise.qc index 450d88b36..a6d8ba636 100644 --- a/qcsrc/client/noise.qc +++ b/qcsrc/client/noise.qc @@ -1,7 +1,7 @@ #include "noise.qh" #include "_.qh" -entityclass(Noise) +entityclass(Noise); class(Noise) .float noise_baccum; class(Noise) .float noise_paccum; class(Noise) .float noise_paccum2; diff --git a/qcsrc/client/particles.qc b/qcsrc/client/particles.qc index aad855091..019792f55 100644 --- a/qcsrc/client/particles.qc +++ b/qcsrc/client/particles.qc @@ -16,7 +16,7 @@ void Draw_PointParticles() vector o; o = self.origin; sz = self.maxs - self.mins; - n = BGMScript(self); + n = doBGMScript(self); if(self.absolute == 2) { if(n >= 0) diff --git a/qcsrc/client/particles.qh b/qcsrc/client/particles.qh index 9016f8b1f..586f3f000 100644 --- a/qcsrc/client/particles.qh +++ b/qcsrc/client/particles.qh @@ -3,7 +3,7 @@ .int dphitcontentsmask; -entityclass(PointParticles) +entityclass(PointParticles); class(PointParticles) .int cnt; // effect number class(PointParticles) .vector velocity; // particle velocity class(PointParticles) .float waterlevel; // direction jitter diff --git a/qcsrc/client/player_skeleton.qh b/qcsrc/client/player_skeleton.qh index de177a533..4a37df5e4 100644 --- a/qcsrc/client/player_skeleton.qh +++ b/qcsrc/client/player_skeleton.qh @@ -7,7 +7,7 @@ void free_skeleton_from_frames(entity e); void skeleton_from_frames(entity e, float is_dead); void skeleton_loadinfo(entity e); -entityclass(Skeleton) +entityclass(Skeleton); class(Skeleton) .float bone_upperbody; class(Skeleton) .int bone_weapon; class(Skeleton) .float bone_aim[MAX_AIM_BONES]; diff --git a/qcsrc/client/rubble.qh b/qcsrc/client/rubble.qh index f963d5f37..b19406c77 100644 --- a/qcsrc/client/rubble.qh +++ b/qcsrc/client/rubble.qh @@ -1,6 +1,6 @@ #ifndef RUBBLE_H #define RUBBLE_H -entityclass(Rubble) +entityclass(Rubble); class(Rubble) .float creationtime; void RubbleLimit(string cname, float limit, void() deleteproc); entity RubbleNew(string cname); diff --git a/qcsrc/client/shownames.qh b/qcsrc/client/shownames.qh index 0d7df029a..63fd92e04 100644 --- a/qcsrc/client/shownames.qh +++ b/qcsrc/client/shownames.qh @@ -1,7 +1,7 @@ #ifndef SHOWNAMES_H #define SHOWNAMES_H -entityclass(ShowNames) +entityclass(ShowNames); class(ShowNames) .float healthvalue; class(ShowNames) .float armorvalue; class(ShowNames) .float sameteam; diff --git a/qcsrc/client/sortlist.qh b/qcsrc/client/sortlist.qh index 484787821..298314810 100644 --- a/qcsrc/client/sortlist.qh +++ b/qcsrc/client/sortlist.qh @@ -1,7 +1,7 @@ #ifndef SORTLIST_H #define SORTLIST_H -entityclass(Sort) +entityclass(Sort); //.float(entity,entity) sort_cmp; class(Sort) .entity sort_next, sort_prev; diff --git a/qcsrc/client/target_music.qh b/qcsrc/client/target_music.qh index 77aa627db..182e1f465 100644 --- a/qcsrc/client/target_music.qh +++ b/qcsrc/client/target_music.qh @@ -7,7 +7,7 @@ entity music_target; entity music_trigger; // FIXME also control bgmvolume here, to not require a target_music for the default track. -entityclass(TargetMusic) +entityclass(TargetMusic); class(TargetMusic) .int state; class(TargetMusic) .float lastvol; diff --git a/qcsrc/client/teamradar.qh b/qcsrc/client/teamradar.qh index 242d7ae7d..f7c186ac6 100644 --- a/qcsrc/client/teamradar.qh +++ b/qcsrc/client/teamradar.qh @@ -3,7 +3,7 @@ const int MAX_TEAMRADAR_TIMES = 32; -entityclass(TeamRadar) +entityclass(TeamRadar); // to make entities have dots on the team radar class(TeamRadar) .float teamradar_icon; class(TeamRadar) .float teamradar_times[MAX_TEAMRADAR_TIMES]; diff --git a/qcsrc/client/tturrets.qh b/qcsrc/client/tturrets.qh index bf73dc82b..4cf9854c4 100644 --- a/qcsrc/client/tturrets.qh +++ b/qcsrc/client/tturrets.qh @@ -3,6 +3,6 @@ void ent_turret(); void turrets_precache(); -entityclass(Turret) +entityclass(Turret); class(Turret) .entity tur_head; #endif diff --git a/qcsrc/client/tuba.qh b/qcsrc/client/tuba.qh index a04e66762..6fe103f70 100644 --- a/qcsrc/client/tuba.qh +++ b/qcsrc/client/tuba.qh @@ -3,6 +3,6 @@ void Ent_TubaNote(bool isNew); void Tuba_Precache(); -entityclass(Tuba) +entityclass(Tuba); #endif diff --git a/qcsrc/client/vehicles/vehicles.qc b/qcsrc/client/vehicles/vehicles.qc index 9d0845dd2..432511595 100644 --- a/qcsrc/client/vehicles/vehicles.qc +++ b/qcsrc/client/vehicles/vehicles.qc @@ -54,9 +54,9 @@ string raptor_xhair; const int MAX_AXH = 4; -entity AuxiliaryXhair[MAX_AXH]; +entity AuxiliaryXhairs[MAX_AXH]; -entityclass(AuxiliaryXhair) +entityclass(AuxiliaryXhair); class(AuxiliaryXhair) .string axh_image; class(AuxiliaryXhair) .float axh_fadetime; class(AuxiliaryXhair) .float axh_drawflag; @@ -104,7 +104,7 @@ void AuxiliaryXhair_Draw2D() void Net_AuXair2(bool bIsNew) { int axh_id = bound(0, ReadByte(), MAX_AXH); - entity axh = AuxiliaryXhair[axh_id]; + entity axh = AuxiliaryXhairs[axh_id]; if(axh == world || wasfreed(axh)) // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?) { @@ -116,7 +116,7 @@ void Net_AuXair2(bool bIsNew) axh.axh_image = "gfx/vehicles/axh-ring.tga"; axh.axh_scale = 1; axh.alpha = 1; - AuxiliaryXhair[axh_id] = axh; + AuxiliaryXhairs[axh_id] = axh; } axh.move_origin_x = ReadCoord(); @@ -154,7 +154,7 @@ void Net_VehicleSetup() int i; for(i = 0; i < MAX_AXH; ++i) { - entity axh = AuxiliaryXhair[i]; + entity axh = AuxiliaryXhairs[i]; if(axh != world && !wasfreed(axh)) // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?) remove(axh); @@ -166,59 +166,59 @@ void Net_VehicleSetup() axh.axh_image = "gfx/vehicles/axh-ring.tga"; axh.axh_scale = 1; axh.alpha = 1; - AuxiliaryXhair[i] = axh; + AuxiliaryXhairs[i] = axh; } switch(hud_id) { case HUD_SPIDERBOT: // Minigun1 - AuxiliaryXhair[0].axh_image = "gfx/vehicles/axh-ring.tga"; - AuxiliaryXhair[0].axh_scale = 0.25; + AuxiliaryXhairs[0].axh_image = "gfx/vehicles/axh-ring.tga"; + AuxiliaryXhairs[0].axh_scale = 0.25; // Minigun2 - AuxiliaryXhair[1].axh_image = "gfx/vehicles/axh-ring.tga"; - AuxiliaryXhair[1].axh_scale = 0.25; + AuxiliaryXhairs[1].axh_image = "gfx/vehicles/axh-ring.tga"; + AuxiliaryXhairs[1].axh_scale = 0.25; // Rocket - AuxiliaryXhair[2].axh_image = "gfx/vehicles/axh-special1.tga"; - AuxiliaryXhair[2].axh_scale = 0.5; + AuxiliaryXhairs[2].axh_image = "gfx/vehicles/axh-special1.tga"; + AuxiliaryXhairs[2].axh_scale = 0.5; break; case HUD_WAKIZASHI: - AuxiliaryXhair[0].axh_image = "gfx/vehicles/axh-bracket.tga"; - AuxiliaryXhair[0].axh_scale = 0.25; + AuxiliaryXhairs[0].axh_image = "gfx/vehicles/axh-bracket.tga"; + AuxiliaryXhairs[0].axh_scale = 0.25; break; case HUD_RAPTOR: - AuxiliaryXhair[0].axh_image = "gfx/vehicles/axh-special2.tga"; - AuxiliaryXhair[0].axh_scale = 0.5; + AuxiliaryXhairs[0].axh_image = "gfx/vehicles/axh-special2.tga"; + AuxiliaryXhairs[0].axh_scale = 0.5; //AuxiliaryXhair[0].alpha = 0.5; - AuxiliaryXhair[1].axh_image = "gfx/vehicles/axh-bracket.tga"; - AuxiliaryXhair[1].axh_scale = 0.25; + AuxiliaryXhairs[1].axh_image = "gfx/vehicles/axh-bracket.tga"; + AuxiliaryXhairs[1].axh_scale = 0.25; //AuxiliaryXhair[1].alpha = 0.75; //AuxiliaryXhair[1].axh_drawflag = DRAWFLAG_NORMAL; break; case HUD_BUMBLEBEE: // Raygun-locked - AuxiliaryXhair[0].axh_image = "gfx/vehicles/axh-bracket.tga"; - AuxiliaryXhair[0].axh_scale = 0.5; + AuxiliaryXhairs[0].axh_image = "gfx/vehicles/axh-bracket.tga"; + AuxiliaryXhairs[0].axh_scale = 0.5; // Gunner1 - AuxiliaryXhair[1].axh_image = "gfx/vehicles/axh-target.tga"; - AuxiliaryXhair[1].axh_scale = 0.75; + AuxiliaryXhairs[1].axh_image = "gfx/vehicles/axh-target.tga"; + AuxiliaryXhairs[1].axh_scale = 0.75; // Gunner2 - AuxiliaryXhair[2].axh_image = "gfx/vehicles/axh-target.tga"; - AuxiliaryXhair[2].axh_scale = 0.75; + AuxiliaryXhairs[2].axh_image = "gfx/vehicles/axh-target.tga"; + AuxiliaryXhairs[2].axh_scale = 0.75; break; case HUD_BUMBLEBEE_GUN: // Plasma cannons - AuxiliaryXhair[0].axh_image = "gfx/vehicles/axh-bracket.tga"; - AuxiliaryXhair[0].axh_scale = 0.25; + AuxiliaryXhairs[0].axh_image = "gfx/vehicles/axh-bracket.tga"; + AuxiliaryXhairs[0].axh_scale = 0.25; // Raygun - AuxiliaryXhair[1].axh_image = "gfx/vehicles/axh-bracket.tga"; - AuxiliaryXhair[1].axh_scale = 0.25; + AuxiliaryXhairs[1].axh_image = "gfx/vehicles/axh-bracket.tga"; + AuxiliaryXhairs[1].axh_scale = 0.25; break; } } @@ -338,7 +338,7 @@ void CSQC_BUMBLE_HUD() drawresetcliparea(); // Right gunner slot occupied? - if(!AuxiliaryXhair[1].draw2d) + if(!AuxiliaryXhairs[1].draw2d) { shield = (picsize.x * 0.5) - (0.5 * stringwidth(_("No right gunner!"), false, '1 0 0' * picsize.y + '0 1 0' * picsize.y)); drawfill(hudloc + picloc - '0.2 0.2 0', picsize + '0.4 0.4 0', '0.25 0.25 0.25', 0.75, DRAWFLAG_NORMAL); @@ -360,7 +360,7 @@ void CSQC_BUMBLE_HUD() drawpic(hudloc + picloc, hud_ammo2_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL); drawresetcliparea(); // Left gunner slot occupied? - if(!AuxiliaryXhair[2].draw2d) + if(!AuxiliaryXhairs[2].draw2d) { shield = (picsize.x * 0.5) - (0.5 * stringwidth(_("No left gunner!"), false, '1 0 0' * picsize.y + '0 1 0' * picsize.y)); drawfill(hudloc + picloc - '0.2 0.2 0', picsize + '0.4 0.4 0', '0.25 0.25 0.25', 0.75, DRAWFLAG_NORMAL); diff --git a/qcsrc/client/wall.qc b/qcsrc/client/wall.qc index 090dda58e..7d605d5ad 100644 --- a/qcsrc/client/wall.qc +++ b/qcsrc/client/wall.qc @@ -51,7 +51,7 @@ void Ent_Wall_Draw() self.saved = self.(fld); - f = BGMScript(self); + f = doBGMScript(self); if(f >= 0) { if(self.lip < 0) // < 0: alpha goes from 1 to 1-|lip| when toggled (toggling subtracts lip) diff --git a/qcsrc/client/wall.qh b/qcsrc/client/wall.qh index 3a439e6ff..57aef7e0c 100644 --- a/qcsrc/client/wall.qh +++ b/qcsrc/client/wall.qh @@ -1,7 +1,7 @@ #ifndef WALL_H #define WALL_H -entityclass(Wall) +entityclass(Wall); class(Wall) .float lip; class(Wall) .float bgmscriptangular; class(Wall) .int lodmodelindex0, lodmodelindex1, lodmodelindex2; diff --git a/qcsrc/client/waypointsprites.qh b/qcsrc/client/waypointsprites.qh index 575cd4809..adea76ca7 100644 --- a/qcsrc/client/waypointsprites.qh +++ b/qcsrc/client/waypointsprites.qh @@ -26,7 +26,7 @@ float waypointsprite_distancefadescale; float waypointsprite_distancefadedistance; float waypointsprite_alpha; -entityclass(WaypointSprite) +entityclass(WaypointSprite); class(WaypointSprite) .float helpme; class(WaypointSprite) .float rule; class(WaypointSprite) .string netname; // primary picture diff --git a/qcsrc/client/weapons/projectile.qh b/qcsrc/client/weapons/projectile.qh index a530df988..67e08c224 100644 --- a/qcsrc/client/weapons/projectile.qh +++ b/qcsrc/client/weapons/projectile.qh @@ -1,7 +1,7 @@ #ifndef PROJECTILE_H #define PROJECTILE_H -entityclass(Projectile) +entityclass(Projectile); class(Projectile) .int traileffect; class(Projectile) .vector iorigin1, iorigin2; diff --git a/qcsrc/common/util-pre.qh b/qcsrc/common/util-pre.qh index f10b5c5f8..b3aacfa97 100644 --- a/qcsrc/common/util-pre.qh +++ b/qcsrc/common/util-pre.qh @@ -38,11 +38,11 @@ #endif #ifndef QCC_SUPPORT_ENTITYCLASS - #define entityclass(name) /* typedef entity name; */ + #define entityclass(name) typedef entity name #define class(name) #define new(class) spawn() #else - #define entityclass(name) entityclass name {}; + #define entityclass(name) entityclass name {} #define class(name) [[class(name)]] #define new(class) ((class) spawn()) #endif diff --git a/qcsrc/server/vehicles/vehicle.qc b/qcsrc/server/vehicles/vehicle.qc index b7ec7685c..76130fe08 100644 --- a/qcsrc/server/vehicles/vehicle.qc +++ b/qcsrc/server/vehicles/vehicle.qc @@ -32,7 +32,7 @@ void vehicles_setreturn(); Send additional points of interest to be drawn, to vehicle owner **/ const float MAX_AXH = 4; -.entity AuxiliaryXhair[MAX_AXH]; +.entity AuxiliaryXhairs[MAX_AXH]; float SendAuxiliaryXhair(entity to, int sf) { @@ -60,7 +60,7 @@ void UpdateAuxiliaryXhair(entity own, vector loc, vector clr, int axh_id) entity axh; axh_id = bound(0, axh_id, MAX_AXH); - axh = own.(AuxiliaryXhair[axh_id]); + axh = own.(AuxiliaryXhairs[axh_id]); if(axh == world || wasfreed(axh)) // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?) { @@ -74,7 +74,7 @@ void UpdateAuxiliaryXhair(entity own, vector loc, vector clr, int axh_id) setorigin(axh, loc); axh.colormod = clr; axh.SendFlags = 0x01; - own.(AuxiliaryXhair[axh_id]) = axh; + own.(AuxiliaryXhairs[axh_id]) = axh; } /*