Zippy-Egoboo Home EgoWiki > Documentation > MapDataNotes (r1.1 vs. r1.2) EgoWiki webs:
Main | TWiki | Know | Sandbox
Documentation . { Changes | Index | Search | Go }
 <<O>>  Difference Topic MapDataNotes (r1.2 - 24 May 2004 - ElminI)
Changed:
<
<

Wherever possible, the accessor methods in map.h should be used. For example, instead of computing the tile index with meshfanstart[y>>7]+x>>7, use get_tile(x, y). Instead of meshfx[fan]&MESHFXWATER, use tile_has_water(fan). This will make it easier to tranition to better storage methods.

>
>

Wherever possible, the accessor methods in map.h should be used. For example, instead of computing the tile index with meshfanstart[y>>7]+x>>7, use get_tile(x, y). Instead of meshfx[fan]&MESHFXWATER, use tile_has_water(fan). This will make it easier to transition to better storage methods.


 <<O>>  Difference Topic MapDataNotes (r1.1 - 23 May 2004 - ElminI)
Added:
>
>

%META:TOPICINFO{author="ElminI" date="1085344800" format="1.0" version="1.1"}% %META:TOPICPARENT{name="WebHome"}% Map data in Zippy is still stored in parallel arrays for the moment. Here are some tips on this confusing structure:

Organization

Fans and tiles are the same; the terms may be used interchangeably to describe individual squares on the map; however, the array meshtile[] refers to the portion of the texture graphic used to render a particular tile. Don't get the term "fan" confused with OpenGL's triangle fan construction -- in Egoboo source it just means "tile".

"basicdat/fans.txt" defines 26 tile types. These types tell the engine the following things about tiles of each type:

  • How many vertices the tile has
  • What the texture coordinates of each vertex are
  • The "ref" of each vertex (what does this mean?)
  • How many commands are needed to draw the tile, and
  • Which vertices are in each command.

The first four vertices of every tile correspond to the four corners of the tile, as follows:

Index Location
0 (0, 0) (Top Left)
1 (1, 0) (Top Right)
2 (1, 1) (Bottom Right)
3 (0, 1) (Bottom Left)

Each tile command makes an OpenGL triangle strip.

New Accessor Methods

Wherever possible, the accessor methods in map.h should be used. For example, instead of computing the tile index with meshfanstart[y>>7]+x>>7, use get_tile(x, y). Instead of meshfx[fan]&MESHFXWATER, use tile_has_water(fan). This will make it easier to tranition to better storage methods.

-- ElminI - 23 May 2004


Topic MapDataNotes . { View | Diffs | r1.2 | > | r1.1 | More }
Revision r1.1 - 23 May 2004 - 20:40 GMT - ElminI
Revision r1.2 - 24 May 2004 - 01:53 GMT - ElminI
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding EgoWiki? Send feedback.