(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.

This commit is contained in:
rubidium
2007-01-10 18:56:51 +00:00
parent ce75f6549d
commit a7d0cdf95f
190 changed files with 2825 additions and 2208 deletions

View File

@@ -11,6 +11,7 @@
#include "variables.h"
#include "functions.h"
#include "heightmap.h"
#include "helpers.hpp"
#include "table/strings.h"
#include "fios.h"
#include <sys/types.h>
@@ -47,7 +48,7 @@ FiosItem *FiosAlloc(void)
{
if (_fios_count == _fios_alloc) {
_fios_alloc += 256;
_fios_items = realloc(_fios_items, _fios_alloc * sizeof(FiosItem));
ReallocT(&_fios_items, _fios_alloc);
}
return &_fios_items[_fios_count++];
}
@@ -323,7 +324,7 @@ FiosItem *FiosGetSavegameList(int mode)
static char *_fios_save_path = NULL;
if (_fios_save_path == NULL) {
_fios_save_path = malloc(MAX_PATH);
MallocT(&_fios_save_path, MAX_PATH);
ttd_strlcpy(_fios_save_path, _paths.save_dir, MAX_PATH);
}
@@ -371,7 +372,7 @@ FiosItem *FiosGetScenarioList(int mode)
static char *_fios_scn_path = NULL;
if (_fios_scn_path == NULL) {
_fios_scn_path = malloc(MAX_PATH);
MallocT(&_fios_scn_path, MAX_PATH);
ttd_strlcpy(_fios_scn_path, _paths.scenario_dir, MAX_PATH);
}
@@ -402,7 +403,7 @@ FiosItem *FiosGetHeightmapList(int mode)
static char *_fios_hmap_path = NULL;
if (_fios_hmap_path == NULL) {
_fios_hmap_path = malloc(MAX_PATH);
MallocT(&_fios_hmap_path, MAX_PATH);
strcpy(_fios_hmap_path, _paths.heightmap_dir);
}