From bc0614dd22a1c5718b2b4ee94258369ec3f44984 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sun, 6 Jul 2014 22:36:34 +0000 Subject: [PATCH] Miscellaneous get/set(this)projectile cleanup. git-svn-id: https://svn.eduke32.com/eduke32@4537 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/gamedef.c | 7 +++++-- polymer/eduke32/source/gamestructures.c | 9 +++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index ac17dee79..f3cc93c69 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -2334,6 +2334,8 @@ LUNATIC_EXTERN void C_DefineProjectile(int32_t j, int32_t what, int32_t val) g_tile[j].defproj.bsound = ProjectileData[j].bsound = val; break; case PROJ_RANGE: g_tile[j].defproj.range = ProjectileData[j].range = val; break; + case PROJ_FLASH_COLOR: + g_tile[j].defproj.flashcolor = ProjectileData[j].flashcolor = val; break; case PROJ_USERDATA: g_tile[j].defproj.userdata = ProjectileData[j].userdata = val; break; default: break; @@ -6215,14 +6217,15 @@ void C_InitProjectiles(void) int8_t shade, xrepeat, yrepeat, pal; // 4b int8_t movecnt; // 1b uint8_t clipdist; // 1b - int8_t filler[6]; // 6b + int8_t filler[2]; // 2b + int32_t userdata; // 4b } defaultprojectile_t; defaultprojectile_t DefaultProjectile = { 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,0,0,0}, + 0, 1, 32, {0,0}, 0, }; EDUKE32_STATIC_ASSERT(sizeof(projectile_t) == sizeof(DefaultProjectile)); diff --git a/polymer/eduke32/source/gamestructures.c b/polymer/eduke32/source/gamestructures.c index 0478c192c..0a8337c77 100644 --- a/polymer/eduke32/source/gamestructures.c +++ b/polymer/eduke32/source/gamestructures.c @@ -3468,6 +3468,15 @@ static void __fastcall VM_AccessProjectile(int32_t iSet, int32_t lVar1, int32_t Gv_SetVarX(lVar2, ProjectileData[lVar1].range); return; + case PROJ_FLASH_COLOR: + if (iSet) + { + ProjectileData[lVar1].flashcolor=lValue; + return; + } + Gv_SetVarX(lVar2, ProjectileData[lVar1].flashcolor); + return; + case PROJ_USERDATA: if (iSet) {