Fix typedefs
authorTimePath <andrew.hardaker1995@gmail.com>
Wed, 6 May 2015 06:31:46 +0000 (16:31 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Wed, 6 May 2015 06:31:46 +0000 (16:31 +1000)
25 files changed:
qcsrc/client/bgmscript.qc
qcsrc/client/bgmscript.qh
qcsrc/client/casings.qc
qcsrc/client/hook.qc
qcsrc/client/hud.qh
qcsrc/client/laser.qc
qcsrc/client/modeleffects.qh
qcsrc/client/noise.qc
qcsrc/client/particles.qc
qcsrc/client/particles.qh
qcsrc/client/player_skeleton.qh
qcsrc/client/rubble.qh
qcsrc/client/shownames.qh
qcsrc/client/sortlist.qh
qcsrc/client/target_music.qh
qcsrc/client/teamradar.qh
qcsrc/client/tturrets.qh
qcsrc/client/tuba.qh
qcsrc/client/vehicles/vehicles.qc
qcsrc/client/wall.qc
qcsrc/client/wall.qh
qcsrc/client/waypointsprites.qh
qcsrc/client/weapons/projectile.qh
qcsrc/common/util-pre.qh
qcsrc/server/vehicles/vehicle.qc

index eeba139..d76c82e 100644 (file)
@@ -171,7 +171,7 @@ float GetTimeForAmplitude(entity e, float amp)
        }
 }
 
-float BGMScript(entity e)
+float doBGMScript(entity e)
 {
        float amp, vel;
 
index f88105b..cd70955 100644 (file)
@@ -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
index 28a8390..692db3a 100644 (file)
@@ -11,7 +11,7 @@
 .float alpha;
 .int state;
 
-entityclass(Casing)
+entityclass(Casing);
 class(Casing) .bool silent;
 
 void Casing_Delete()
index 27351d4..195754e 100644 (file)
@@ -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;
index bebf60c..f880a81 100644 (file)
@@ -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;
index 1d53629..770bd45 100644 (file)
@@ -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
index a82d264..22998f0 100644 (file)
@@ -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;
index 450d88b..a6d8ba6 100644 (file)
@@ -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;
index aad8550..019792f 100644 (file)
@@ -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)
index 9016f8b..586f3f0 100644 (file)
@@ -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
index de177a5..4a37df5 100644 (file)
@@ -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];
index f963d5f..b19406c 100644 (file)
@@ -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);
index 0d7df02..63fd92e 100644 (file)
@@ -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;
index 4847878..2983148 100644 (file)
@@ -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;
 
index 77aa627..182e1f4 100644 (file)
@@ -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;
 
index 242d7ae..f7c186a 100644 (file)
@@ -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];
index bf73dc8..4cf9854 100644 (file)
@@ -3,6 +3,6 @@
 
 void ent_turret();
 void turrets_precache();
-entityclass(Turret)
+entityclass(Turret);
 class(Turret) .entity tur_head;
 #endif
index a04e667..6fe103f 100644 (file)
@@ -3,6 +3,6 @@
 void Ent_TubaNote(bool isNew);
 void Tuba_Precache();
 
-entityclass(Tuba)
+entityclass(Tuba);
 
 #endif
index 9d0845d..4325115 100644 (file)
@@ -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);
index 090dda5..7d605d5 100644 (file)
@@ -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)
index 3a439e6..57aef7e 100644 (file)
@@ -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;
index 575cd48..adea76c 100644 (file)
@@ -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
index a530df9..67e08c2 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef PROJECTILE_H
 #define PROJECTILE_H
 
-entityclass(Projectile)
+entityclass(Projectile);
 class(Projectile) .int traileffect;
 
 class(Projectile) .vector iorigin1, iorigin2;
index f10b5c5..b3aacfa 100644 (file)
 #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
index b7ec768..76130fe 100644 (file)
@@ -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;
 }
 
 /*