diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-01-31 15:48:04 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-01-31 15:48:04 +0000 |
commit | 64b6e20b84aa3dca07228df923e73c0703b3d5af (patch) | |
tree | 013b60c9e17b9bf6819a0da06feda229adc78b3d /src/map/map.h | |
parent | 4dbc7922cdb25fcedc9ca39fc72ddca926e61efe (diff) | |
download | hercules-64b6e20b84aa3dca07228df923e73c0703b3d5af.tar.gz hercules-64b6e20b84aa3dca07228df923e73c0703b3d5af.tar.bz2 hercules-64b6e20b84aa3dca07228df923e73c0703b3d5af.tar.xz hercules-64b6e20b84aa3dca07228df923e73c0703b3d5af.zip |
objects[] array removal (bugreport:2559)
- Removed the 2 MB wide static array in favor of a general-purpose DBMap (id_db for now).
- Inlined functions map_addobject, map_delobject and map_delobjectnofree into their callers' code.
- Replaced the free id lookup algorithm from ancient jathena with something more efficient.
- Moved the algorithm to map_get_new_object_id() (similar idea as r13481).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13503 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.h')
-rw-r--r-- | src/map/map.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/map/map.h b/src/map/map.h index a401214c8..02314318e 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -38,7 +38,8 @@ struct item_data; #define MAX_EVENTQUEUE 2 #define MAX_EVENTTIMER 32 #define NATURAL_HEAL_INTERVAL 500 -#define MAX_FLOORITEM 500000 +#define MIN_FLOORITEM 2 +#define MAX_FLOORITEM START_ACCOUNT_NUM #define MAX_LEVEL 99 #define MAX_DROP_PER_MAP 48 #define MAX_IGNORE_LIST 20 // official is 14 @@ -535,10 +536,7 @@ int map_foreachinmap(int (*func)(struct block_list*,va_list), int m, int type, . int map_count_oncell(int m,int x,int y,int type); struct skill_unit *map_find_skill_unit_oncell(struct block_list *,int x,int y,int skill_id,struct skill_unit *); // 一時的object関連 -int map_addobject(struct block_list *); -int map_delobject(int); -int map_delobjectnofree(int id); -void map_foreachobject(int (*)(struct block_list*,va_list),int,...); +int map_get_new_object_id(void); int map_search_freecell(struct block_list *src, int m, short *x, short *y, int rx, int ry, int flag); // int map_quit(struct map_session_data *); |