Actions

SCHG

Sonic Adventure DX: PC/Level Data Locations

From Sonic Retro

Revision as of 02:06, 13 October 2009 by GerbilSoft (talk | contribs) (moved Page Name to SCHG:SADX Level Headers: Dude is a noob and didn't realize that when I said "Page_Name", I meant to replace it with the actual page name, not to use "Page_Name" literally. D:)

Disclaimer

Each level in Sonic Adventure DX is a compiled C++ file with embedded model data. They are usually similar in structure, but there is technically the possibility that some things may be in different locations for different levels.

COL Format

The name COL is an antiquated misnomer, but for lack of a better name, it stuck. This data struct is a reference for loading a level model. It's 0x24 bytes long and works as follows:

struct COL
float center[3]; // Center of the visibility/collision sphere.
float radius; // Could be diameter.
dword null[2]; // for alignment purposes
dword SEG; // points to SEG struct
dword null; 
Short col; // determines solidity
Short surf_flag; // determines visibility

Surface Flags

First byte:

  • 1x = can land on
  • 2x = push
  • 3x = push
  • 4x = Kill sonic?
  • 5x = no alpha, no col
  • 6x = water
  • 7x = lighting
  • 8x = Stage Specific on/off (EC footprints)
  • 9x = normal surf

Second Byte:

  • x0 = normal
  • x1 = hurt
  • x2 = low traction
  • x3 = hurt

Listing of Header locations

This listing isn't for the actual start of the header, that location hasn't been determined. Since the major interest in editing levels is editing their geometry, this list will (for now) refer to the geometry loading index. These use the COL format as described above. Also, when this list was being created, the location selection was a little inconsistent, sometimes the address given is for the end of the list, other times it is the address that points to the beginning of the list. Either way, they're within a tolerance of 0x0c of eachother, so don't use these addresses in a program, if you're coding a utility, please open a hex editor and make sure your address is accurate first.

Emerald Coast Geometry Loaders

Segment 0

  • Geometry loader starts at: 11098424
  • Geometry loader ends at: 11115704
  • Geometry loader is 0x4380 long

Segment 1

  • Geometry loader starts at: 12814040
  • Geometry loader ends at: 12820124
  • Geometry loader is 0x17C4 long

Segment 2

  • Geometry loader starts at: 12806840
  • Geometry loader ends at: 12814004
  • Geometry loader is 0x1BFC long

Windy Valley Geometry Loaders

Segment 0

  • Geometry loader starts at: 8406760
  • Geometry loader ends at: 8409572
  • Geometry loader is 0xAF8 long

Segment 1

  • Geometry loader starts at: 8405856
  • Geometry loader ends at: 8406724
  • Geometry loader is 0x360 long

Segment 2

  • Geometry loader starts at: 8399808
  • Geometry loader ends at: 8405824
  • Geometry loader is 0x177C long

Casinopolis Geometry Loaders

Segment 0

  • Geometry loader starts at: 26773520
  • Geometry loader ends at: 26782160
  • Geometry loader is 0x21c0 long

Segment 1

  • Geometry loader starts at: 62765888
  • Geometry loader ends at: 26773484
  • Geometry loader is 0x1DAC long

Segment 2

  • Geometry loader starts at: 26762288
  • Geometry loader ends at: 26765856
  • Geometry loader is 0xDEC long

Segment 3

  • Geometry loader starts at: ??
  • Geometry loader ends at: ??
  • Geometry loader is 0x?? long

Ice Cap Geometry Loaders

Segment 0

  • Geometry loader starts at: 10753248
  • Geometry loader ends at: 10755376
  • Geometry loader is 0x84C long

Segment 1

  • Geometry loader starts at: 10750440
  • Geometry loader ends at: 10753216
  • Geometry loader is 0xAD4 long

Segment 2

  • Geometry loader starts at: 10739784
  • Geometry loader ends at: 10750408
  • Geometry loader is 0x297C long

Twinkle Park Geometry Loaders

Segment 0

  • Geometry loader starts at: 36406944
  • Geometry loader ends at: 36411232
  • Geometry loader is 0x10BC long

Segment 1

  • Geometry loader starts at: 36399960
  • Geometry loader ends at: 36406912
  • Geometry loader is 0x1B24 long

Segment 2

  • Geomtery loader starts at: 36396792
  • Geometry loader ends at: 36399928
  • Geometry loader is 0xC3C long

Speed Highway Geometry Loaders

Segment 0

  • Geometry loader starts at: 3636248
  • Geometry loader ends at: 36380316
  • Geometry loader is 0x42a8 long

Segment 1

  • Geometry loader starts at: 36360040
  • Geometry loader ends at: 36363212
  • Geometry loader is 0xc60 long

Segment 2

  • Geomtery loader starts at: 36352728
  • Geometry loader ends at: 36360004
  • Geometry loader is 0x1C68 long

Lost World Geometry Loaders

Segment 0

  • Geometry loader starts at: 29588672
  • Geometry loader ends at: 29592420
  • Geometry loader is 0xEA0 long

Segment 1=

  • Geometry loader starts at: 29576504
  • Geometry loader ends at: 29588640
  • Geometry loader is 0x2F64 long

Segment 2

  • Geometry loader starts at: 29575856
  • Geometry loader ends at: 29576472
  • Geometry loader is 0x264 long

Sand Hill Geometry Loader

  • Geomtery loader starts at: 20168472
  • Geometry loader ends at: 20179816
  • Geometry loader is 0x2C4C long