mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
Replaced hardcoded maxareaid with dbc data in maps extractor.
Reduced number of cells (doubled visibility distance).
This commit is contained in:
parent
4c4f80df5a
commit
99db25c9eb
7 changed files with 15 additions and 10 deletions
|
|
@ -31,6 +31,7 @@ map_id * map_ids;
|
||||||
uint16 * areas;
|
uint16 * areas;
|
||||||
char output_path[128]=".";
|
char output_path[128]=".";
|
||||||
char input_path[128]=".";
|
char input_path[128]=".";
|
||||||
|
uint32 maxAreaId = 0;
|
||||||
|
|
||||||
enum Extract
|
enum Extract
|
||||||
{
|
{
|
||||||
|
|
@ -146,6 +147,8 @@ void ReadAreaTableDBC()
|
||||||
for(unsigned int x=0; x<area_count;++x)
|
for(unsigned int x=0; x<area_count;++x)
|
||||||
areas[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3);
|
areas[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3);
|
||||||
|
|
||||||
|
maxAreaId = dbc.getMaxId();
|
||||||
|
|
||||||
printf("Done! (%u areas loaded)\n", area_count);
|
printf("Done! (%u areas loaded)\n", area_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="zlib.lib"
|
AdditionalDependencies="zlib.lib"
|
||||||
OutputFile="ad debug.exe"
|
OutputFile="ad debug.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="0"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
AdditionalLibraryDirectories="./debug/"
|
AdditionalLibraryDirectories="./debug/"
|
||||||
IgnoreDefaultLibraryNames="LIBCD.lib"
|
IgnoreDefaultLibraryNames="LIBCD.lib"
|
||||||
|
|
@ -171,7 +171,7 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="zlib.lib"
|
AdditionalDependencies="zlib.lib"
|
||||||
OutputFile="./ad.exe"
|
OutputFile="./ad.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="0"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
AdditionalLibraryDirectories="./release/"
|
AdditionalLibraryDirectories="./release/"
|
||||||
IgnoreDefaultLibraryNames="LIBC.lib"
|
IgnoreDefaultLibraryNames="LIBC.lib"
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="zlib.lib"
|
AdditionalDependencies="zlib.lib"
|
||||||
OutputFile="ad debug.exe"
|
OutputFile="ad debug.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="0"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
AdditionalLibraryDirectories="./debug"
|
AdditionalLibraryDirectories="./debug"
|
||||||
IgnoreDefaultLibraryNames="LIBCD.lib"
|
IgnoreDefaultLibraryNames="LIBCD.lib"
|
||||||
|
|
@ -176,7 +176,7 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="zlib.lib"
|
AdditionalDependencies="zlib.lib"
|
||||||
OutputFile="./ad.exe"
|
OutputFile="./ad.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="0"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
AdditionalLibraryDirectories="./release"
|
AdditionalLibraryDirectories="./release"
|
||||||
IgnoreDefaultLibraryNames="LIBC.lib"
|
IgnoreDefaultLibraryNames="LIBC.lib"
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="zlib.lib"
|
AdditionalDependencies="zlib.lib"
|
||||||
OutputFile="ad debug.exe"
|
OutputFile="ad debug.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="0"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
AdditionalLibraryDirectories="./debug/"
|
AdditionalLibraryDirectories="./debug/"
|
||||||
IgnoreDefaultLibraryNames="LIBCD.lib"
|
IgnoreDefaultLibraryNames="LIBCD.lib"
|
||||||
|
|
@ -175,7 +175,7 @@
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="zlib.lib"
|
AdditionalDependencies="zlib.lib"
|
||||||
OutputFile="./ad.exe"
|
OutputFile="./ad.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="0"
|
||||||
SuppressStartupBanner="true"
|
SuppressStartupBanner="true"
|
||||||
AdditionalLibraryDirectories="./release/"
|
AdditionalLibraryDirectories="./release/"
|
||||||
IgnoreDefaultLibraryNames="LIBC.lib"
|
IgnoreDefaultLibraryNames="LIBC.lib"
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -17,7 +17,9 @@
|
||||||
|
|
||||||
//#include <windows.h>
|
//#include <windows.h>
|
||||||
unsigned int iRes=256;
|
unsigned int iRes=256;
|
||||||
extern uint16*areas;
|
extern uint16 *areas;
|
||||||
|
|
||||||
|
extern uint32 maxAreaId;
|
||||||
|
|
||||||
vec wmoc;
|
vec wmoc;
|
||||||
|
|
||||||
|
|
@ -409,7 +411,7 @@ bool ConvertADT(char * filename,char * filename2)
|
||||||
{
|
{
|
||||||
for(unsigned int y=0;y<16;y++)
|
for(unsigned int y=0;y<16;y++)
|
||||||
{
|
{
|
||||||
if(mcells->ch[y][x].area_id && mcells->ch[y][x].area_id < 0x102D)
|
if(mcells->ch[y][x].area_id && mcells->ch[y][x].area_id <= maxAreaId)
|
||||||
{
|
{
|
||||||
if(areas[mcells->ch[y][x].area_id]==0xffff)
|
if(areas[mcells->ch[y][x].area_id]==0xffff)
|
||||||
printf("\nCan't find area flag for areaid %u.\n",mcells->ch[y][x].area_id);
|
printf("\nCan't find area flag for areaid %u.\n",mcells->ch[y][x].area_id);
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,10 @@ class Player;
|
||||||
#define MIN_GRID_DELAY MINUTE*1000
|
#define MIN_GRID_DELAY MINUTE*1000
|
||||||
#define MIN_MAP_UPDATE_DELAY 50
|
#define MIN_MAP_UPDATE_DELAY 50
|
||||||
|
|
||||||
#define MAX_NUMBER_OF_CELLS 8
|
#define MAX_NUMBER_OF_CELLS 4
|
||||||
#define SIZE_OF_GRID_CELL (SIZE_OF_GRIDS/MAX_NUMBER_OF_CELLS)
|
#define SIZE_OF_GRID_CELL (SIZE_OF_GRIDS/MAX_NUMBER_OF_CELLS)
|
||||||
|
|
||||||
#define CENTER_GRID_CELL_ID 256
|
#define CENTER_GRID_CELL_ID 128
|
||||||
#define CENTER_GRID_CELL_OFFSET (SIZE_OF_GRID_CELL/2)
|
#define CENTER_GRID_CELL_OFFSET (SIZE_OF_GRID_CELL/2)
|
||||||
|
|
||||||
#define TOTAL_NUMBER_OF_CELLS_PER_MAP (MAX_NUMBER_OF_GRIDS*MAX_NUMBER_OF_CELLS)
|
#define TOTAL_NUMBER_OF_CELLS_PER_MAP (MAX_NUMBER_OF_GRIDS*MAX_NUMBER_OF_CELLS)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue