Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 08-16-2004, 05:50 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

OK,

well I am going to make the assumption that the LOS crap in the zone server works for now... so the issue is getting map files from the zones...

I have used DZoneConverter to get a .wld file (which is strangely in the old file format, not the luclin file format)... I have a wld file reader reading that guy in... now to produce a map. (I decided to go for wld->map, and skip an intermediate format, unless somebody tells me a reason otherwise.)

I have taken a look at the map format, and it appears to be a simple quad tree.

It startes with two unsigned long counters of vertexes and faces.
Then, theres an array of vertexes, followed by an array of faces (which use the vertexes), followed by a recursive quad tree structure, dividing x and y.
structures for vertex and face (from map.h)
Code:
struct VERTEX {
	unsigned long order;
	float	x, y, z;
};

struct FACE {
	unsigned long a, b, c;	//vertexs
	float nx, ny, nz, nd;
};
the quad tree starts with:
Code:
struct nodeHeader {
	float minx;
	float miny;
	float maxx;
	float maxy;
	unsigned long nfaces;
};
if nfaces is not 0, then it is immediately followed by an array of unsigned longs representing offsets into the faces array which are faces in that node of the quad tree.
if nfaces is 0, then it is a branch node. The next byte contains basically a bit-based counter of which nodes that quadtree node is split into. And it is then followed by recursive instances of nodes, starting with a node header.


So, the file format isnt going to be that bad... I will code up a quad tree tomorrow. It isnt going to be an 'optimal' quad tree... but it shouldent be too difficult to get done. I just hope DZoneConverter is actually spitting up the correct .wld file...
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:28 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3