diff --git a/gfx/outfit/store/fuel_pod.png b/gfx/outfit/store/fuel_pod.png new file mode 100644 index 0000000..2bac941 Binary files /dev/null and b/gfx/outfit/store/fuel_pod.png differ diff --git a/gfx/outfit/store/weapon_rack.png b/gfx/outfit/store/weapon_rack.png new file mode 100644 index 0000000..8bd65ce Binary files /dev/null and b/gfx/outfit/store/weapon_rack.png differ diff --git a/src/pilot.c b/src/pilot.c index 0ca75ef..5904654 100644 --- a/src/pilot.c +++ b/src/pilot.c @@ -17,6 +17,8 @@ #define FLEET_DATA "../dat/fleet.xml" +#define PILOT_CHUNK 32 // Chunks to increment pilot_stack by. + // Stack of pilot id's to assure uniqueness. static unsigned int pilot_id = PLAYER_ID; @@ -864,7 +866,7 @@ unsigned int pilot_create(Ship* ship, char* name, int faction, if(pilots >= mpilots) { // Need to grow. About 20 at a time. - mpilots += 20; + mpilots += PILOT_CHUNK; tp = pilot_stack; pilot_stack = realloc(pilot_stack, mpilots*sizeof(Pilot*)); if((pilot_stack != tp) && player) diff --git a/src/weapon.c b/src/weapon.c index e4eceba..35c96ce 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -18,9 +18,7 @@ #define VOICE_PRIORITY_BOLT 10 // Default. #define VOICE_PRIORITY_AMMO 8 // Higher. -// PID values. -#define IMIN -50000 -#define IMAX 50000 +#define WEAPON_CHUNK 32 // Some stuff from pilot. extern Pilot** pilot_stack; @@ -441,10 +439,12 @@ void weapon_add(const Outfit* outfit, const double dir, const Vec2* pos, else { // Need to allocate more memory. switch(layer) { case WEAPON_LAYER_BG: - curLayer = wbackLayer = realloc(curLayer, (++(*mLayer))*sizeof(Weapon*)); + (*mLayer) += WEAPON_CHUNK; + curLayer = wbackLayer = realloc(curLayer, (*mLayer)*sizeof(Weapon*)); break; case WEAPON_LAYER_FG: - curLayer = wfrontLayer = realloc(curLayer, (++(*mLayer))*sizeof(Weapon*)); + (*mLayer) += WEAPON_CHUNK; + curLayer = wfrontLayer = realloc(curLayer, (*mLayer)*sizeof(Weapon*)); break; } curLayer[(*nLayer)++] = w;