mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Do "typedef projectile_t defaultprojectile_t;" instead of having an indetical-member type.
Move projectile_t to player.h. git-svn-id: https://svn.eduke32.com/eduke32@5159 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
d9c171d499
commit
5683beec3d
6 changed files with 37 additions and 38 deletions
|
@ -111,22 +111,6 @@ typedef struct { int32_t id; struct action ac; } con_action_t;
|
|||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
int32_t workslike, cstat; // 8b
|
||||
int32_t hitradius, range, flashcolor; // 12b
|
||||
int16_t spawns, sound, isound, vel; // 8b
|
||||
int16_t decal, trail, tnum, drop; // 8b
|
||||
int16_t offset, bounces, bsound; // 6b
|
||||
int16_t toffset; // 2b
|
||||
int16_t extra, extra_rand; // 4b
|
||||
int8_t sxrepeat, syrepeat, txrepeat, tyrepeat; // 4b
|
||||
int8_t shade, xrepeat, yrepeat, pal; // 4b
|
||||
int8_t movecnt; // 1b
|
||||
uint8_t clipdist; // 1b
|
||||
int8_t filler[2]; // 2b
|
||||
int32_t userdata; // 4b
|
||||
} projectile_t;
|
||||
|
||||
// Select an actor's actiontics and movflags locations depending on
|
||||
// whether we compile the Lunatic build.
|
||||
// <spr>: sprite pointer
|
||||
|
|
|
@ -6454,9 +6454,21 @@ void C_InitProjectiles(void)
|
|||
{
|
||||
defaultprojectile_t const Projectile =
|
||||
{
|
||||
1, -1, 2048, 0, 0, (int16_t) SMALLSMOKE, -1, -1, 600, (int16_t) BULLETHOLE, -1, 0, 0, 448,
|
||||
(int16_t) g_numFreezeBounces, (int16_t) PIPEBOMB_BOUNCE, 1, 100, -1, -1, -1, -1, -1, -96, 18, 18,
|
||||
0, 1, 32, { 0, 0 }, 0,
|
||||
// workslike, cstat, hitradius, range, flashcolor;
|
||||
// spawns, sound, isound, vel, decal, trail, tnum, drop;
|
||||
// offset, bounces, bsound, toffset, extra, extra_rand;
|
||||
// sxrepeat, syrepeat, txrepeat, tyrepeat;
|
||||
// shade, xrepeat, yrepeat, pal;
|
||||
// movecnt, clipdist, filler[2], userdata;
|
||||
|
||||
// XXX: The default projectie seems to mimic a union of hard-coded ones.
|
||||
|
||||
1, -1, 2048, 0, 0,
|
||||
(int16_t)SMALLSMOKE, -1, -1, 600, (int16_t)BULLETHOLE, -1, 0, 0,
|
||||
448, (int16_t)g_numFreezeBounces, (int16_t)PIPEBOMB_BOUNCE, 1, 100, -1,
|
||||
-1, -1, -1, -1,
|
||||
-96, 18, 18, 0,
|
||||
1, 32, { 0, 0 }, 0,
|
||||
};
|
||||
|
||||
DefaultProjectile = Projectile;
|
||||
|
@ -6464,10 +6476,10 @@ void C_InitProjectiles(void)
|
|||
for (int i=MAXTILES-1; i>=0; i--)
|
||||
{
|
||||
if (g_tile[i].proj)
|
||||
*g_tile[i].proj = *(projectile_t *)&DefaultProjectile;
|
||||
*g_tile[i].proj = DefaultProjectile;
|
||||
|
||||
if (g_tile[i].defproj)
|
||||
*g_tile[i].defproj = *(projectile_t *)&DefaultProjectile;
|
||||
*g_tile[i].defproj = DefaultProjectile;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
#include "build.h" // hashtable_t
|
||||
#include "common.h" // tokenlist
|
||||
#include "player.h" // projectile_t
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -114,22 +115,7 @@ extern const memberlabel_t TileDataLabels[];
|
|||
extern const memberlabel_t PalDataLabels[];
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int32_t workslike, cstat; // 8b
|
||||
int32_t hitradius, range, flashcolor; // 12b
|
||||
int16_t spawns, sound, isound, vel; // 8b
|
||||
int16_t decal, trail, tnum, drop; // 8b
|
||||
int16_t offset, bounces, bsound; // 6b
|
||||
int16_t toffset; // 2b
|
||||
int16_t extra, extra_rand; // 4b
|
||||
int8_t sxrepeat, syrepeat, txrepeat, tyrepeat; // 4b
|
||||
int8_t shade, xrepeat, yrepeat, pal; // 4b
|
||||
int8_t movecnt; // 1b
|
||||
uint8_t clipdist; // 1b
|
||||
int8_t filler[2]; // 2b
|
||||
int32_t userdata; // 4b
|
||||
} defaultprojectile_t;
|
||||
typedef projectile_t defaultprojectile_t;
|
||||
|
||||
extern defaultprojectile_t DefaultProjectile;
|
||||
int32_t C_AllocQuote(int32_t qnum);
|
||||
|
|
|
@ -35,6 +35,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
// duke3d global soup :(
|
||||
|
||||
// XXX: we don't #include everything we need.
|
||||
#include "compat.h"
|
||||
#include "build.h"
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ static void A_DoWaterTracers(int32_t x1,int32_t y1,int32_t z1,int32_t x2,int32_t
|
|||
|
||||
static inline projectile_t * Proj_GetProjectile(int tile)
|
||||
{
|
||||
return ((unsigned)tile < MAXTILES && g_tile[tile].proj) ? g_tile[tile].proj : (projectile_t *) &DefaultProjectile;
|
||||
return ((unsigned)tile < MAXTILES && g_tile[tile].proj) ? g_tile[tile].proj : &DefaultProjectile;
|
||||
}
|
||||
|
||||
static void A_HitscanProjTrail(const vec3_t *sv, const vec3_t *dv, int32_t ang, int32_t atwith)
|
||||
|
|
|
@ -318,6 +318,22 @@ extern intptr_t *aplWeaponSelectSound[MAX_WEAPONS]; // Sound for wea
|
|||
extern intptr_t *aplWeaponFlashColor[MAX_WEAPONS]; // Color for polymer muzzle flash
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
int32_t workslike, cstat; // 8b
|
||||
int32_t hitradius, range, flashcolor; // 12b
|
||||
int16_t spawns, sound, isound, vel; // 8b
|
||||
int16_t decal, trail, tnum, drop; // 8b
|
||||
int16_t offset, bounces, bsound; // 6b
|
||||
int16_t toffset; // 2b
|
||||
int16_t extra, extra_rand; // 4b
|
||||
int8_t sxrepeat, syrepeat, txrepeat, tyrepeat; // 4b
|
||||
int8_t shade, xrepeat, yrepeat, pal; // 4b
|
||||
int8_t movecnt; // 1b
|
||||
uint8_t clipdist; // 1b
|
||||
int8_t filler[2]; // 2b
|
||||
int32_t userdata; // 4b
|
||||
} projectile_t;
|
||||
|
||||
// KEEPINSYNC lunatic/defs.ilua
|
||||
typedef struct {
|
||||
int32_t cur, count; // "cur" is the only member that is *used*
|
||||
|
|
Loading…
Reference in a new issue