mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
effects: raise TR2 effects limit
This raises the TR2 effects limits from 100 to 1000, like TR1. The constant has been renamed for TR1 as well for consistency. Resolves #1581.
This commit is contained in:
parent
28fc94a89f
commit
d57b2b9234
7 changed files with 11 additions and 10 deletions
|
@ -13,6 +13,7 @@
|
|||
- changed the number of static mesh slots from 50 to 256 (#2734)
|
||||
- changed the maximum number of items (moveables) per level from 256 to 10240 (1024 remains the limit for triggered items) (#1794)
|
||||
- changed the maximum number of visible enemies from 5 to 32 (#1624)
|
||||
- changed the maximum number of effects (flames, embers, exploding parts etc) from 100 to 1000 (#1581)
|
||||
- fixed the inability to completely mute the sounds, even at sound volume 0 (#2722)
|
||||
- fixed the final two levels not allowing for secrets to be counted in the statistics (#1582)
|
||||
- fixed Lara's holsters being empty if a game flow level removes all weapons but also re-adds the pistols (#2677)
|
||||
|
|
|
@ -327,6 +327,7 @@ as Notepad.
|
|||
- expanded the number of static mesh slots from 50 to 256
|
||||
- expanded maximum number of items (moveables) from 256 to 10240 (1024 remains the limit for triggered items)
|
||||
- expanded maximum number of visible enemies from 5 to 32
|
||||
- expanded the maximum number of effects (flames, embers, exploding parts etc) from 100 to 1000
|
||||
- ported audio decoding library to ffmpeg
|
||||
- ported video decoding library to ffmpeg
|
||||
- ported input backend to SDL
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#pragma once
|
||||
|
||||
#define NO_EFFECT (-1)
|
||||
#define MAX_EFFECTS 1000
|
||||
|
|
|
@ -15,15 +15,15 @@ static int16_t m_NextEffectFree = NO_EFFECT;
|
|||
|
||||
void Effect_InitialiseArray(void)
|
||||
{
|
||||
m_Effects = GameBuf_Alloc(NUM_EFFECTS * sizeof(EFFECT), GBUF_EFFECTS);
|
||||
m_Effects = GameBuf_Alloc(MAX_EFFECTS * sizeof(EFFECT), GBUF_EFFECTS);
|
||||
m_NextEffectActive = NO_EFFECT;
|
||||
m_NextEffectFree = 0;
|
||||
for (int i = 0; i < NUM_EFFECTS - 1; i++) {
|
||||
for (int32_t i = 0; i < MAX_EFFECTS - 1; i++) {
|
||||
m_Effects[i].next_draw = i + 1;
|
||||
m_Effects[i].next_free = i + 1;
|
||||
}
|
||||
m_Effects[NUM_EFFECTS - 1].next_draw = NO_EFFECT;
|
||||
m_Effects[NUM_EFFECTS - 1].next_free = NO_EFFECT;
|
||||
m_Effects[MAX_EFFECTS - 1].next_draw = NO_EFFECT;
|
||||
m_Effects[MAX_EFFECTS - 1].next_free = NO_EFFECT;
|
||||
}
|
||||
|
||||
void Effect_Control(void)
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
typedef struct {
|
||||
int16_t count;
|
||||
int16_t id_map[NUM_EFFECTS];
|
||||
int16_t id_map[MAX_EFFECTS];
|
||||
} SAVEGAME_BSON_FX_ORDER;
|
||||
|
||||
static void M_SaveRaw(MYFILE *fp, JSON_VALUE *root, int32_t version);
|
||||
|
@ -137,7 +137,7 @@ static void M_SaveRaw(MYFILE *fp, JSON_VALUE *root, int32_t version)
|
|||
static void M_GetFXOrder(SAVEGAME_BSON_FX_ORDER *order)
|
||||
{
|
||||
order->count = 0;
|
||||
for (int i = 0; i < NUM_EFFECTS; i++) {
|
||||
for (int32_t i = 0; i < MAX_EFFECTS; i++) {
|
||||
order->id_map[i] = -1;
|
||||
}
|
||||
|
||||
|
@ -677,12 +677,12 @@ static bool M_LoadEffects(JSON_ARRAY *fx_arr)
|
|||
return false;
|
||||
}
|
||||
|
||||
if ((signed)fx_arr->length >= NUM_EFFECTS) {
|
||||
if ((signed)fx_arr->length >= MAX_EFFECTS) {
|
||||
LOG_WARNING(
|
||||
"Malformed save: expected a max of %d effect, got %d. effect over "
|
||||
"the "
|
||||
"maximum will not be created.",
|
||||
NUM_EFFECTS - 1, fx_arr->length);
|
||||
MAX_EFFECTS - 1, fx_arr->length);
|
||||
}
|
||||
|
||||
for (int i = 0; i < (signed)fx_arr->length; i++) {
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#define DAMAGE_START 140
|
||||
#define DAMAGE_LENGTH 14
|
||||
#define NO_CAMERA (-1)
|
||||
#define NUM_EFFECTS 1000
|
||||
#define DEATH_WAIT (10 * LOGIC_FPS)
|
||||
#define DEATH_WAIT_MIN (2 * LOGIC_FPS)
|
||||
#define MAX_HEAD_ROTATION (50 * DEG_1) // = 9100
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#define MAX_PALETTES 16
|
||||
#define MAX_VERTICES 0x2000
|
||||
#define MAX_BOUND_ROOMS 128
|
||||
#define MAX_EFFECTS 100
|
||||
#define MAX_LEVELS 24
|
||||
#define MAX_LEVEL_NAME_SIZE 50 // TODO: get rid of this limit
|
||||
#define MAX_DEMO_FILES MAX_LEVELS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue