Difference between revisions of "TreFile Template"

From SWGANH Wiki
Jump to: navigation, search
(Note)
(Note)
Line 67: Line 67:
 
*snow> We can fix the mistakes, but I dont want to be changing templates to a new colour scheme 6 months into the project.
 
*snow> We can fix the mistakes, but I dont want to be changing templates to a new colour scheme 6 months into the project.
 
*exca> also, i'd like to point out that if you edit the [[Packet_Template]] upper left table (the one with types), as stated in the PM I sent you, you'll see that the types are not templated at the moment, hence why i started mines in the first place. So if you're ok with that i'll modify the list keeping the current colors and adding the new types while modifying a bit some names that makes no direct sense: for example, the byte type does not exist in C++, uint64 does not either and long are probably 32bits (unless running a 64bits OS which i sprobably not the case for SWG). In an other way i defined my types templates using the C# types (not appropritate for C++ code as same types does not share the same values). Maybe we should statuate about the values in a more pragmatic way when describing files and protocols. Here's the info we need about each field to describe them correctly cross language:
 
*exca> also, i'd like to point out that if you edit the [[Packet_Template]] upper left table (the one with types), as stated in the PM I sent you, you'll see that the types are not templated at the moment, hence why i started mines in the first place. So if you're ok with that i'll modify the list keeping the current colors and adding the new types while modifying a bit some names that makes no direct sense: for example, the byte type does not exist in C++, uint64 does not either and long are probably 32bits (unless running a 64bits OS which i sprobably not the case for SWG). In an other way i defined my types templates using the C# types (not appropritate for C++ code as same types does not share the same values). Maybe we should statuate about the values in a more pragmatic way when describing files and protocols. Here's the info we need about each field to describe them correctly cross language:
*number of bytes:1, 2, 4, 8, n or 2n (1/2/4/8/n/N ?)
+
**number of bytes:1, 2, 4, 8, n or 2n (1/2/4/8/n/N ?)
*little or big endianess (L/B ?)
+
**little or big endianess (L/B ?)
*signed or unsigned (U ?)
+
**signed or unsigned (U ?)
*integer, real or string (I/R/S ?)
+
**integer, real or string (I/R/S ?)
 
I have yet no precise idea of a clear way to write it. Just ideas. What do you all think?
 
I have yet no precise idea of a clear way to write it. Just ideas. What do you all think?
 +
*exca> I updated this page [[Binary_%26_Hex#The_data_types]], only last column needs to be filled now.

Revision as of 10:02, 16 March 2007

Each file type can be described as follows:

TSF - Tre Sub File (Purpose)

Understood at
0%
25%
50%
75%
100%


File Type: TSF format

Description here.


Header:

INT


TSF file type header id (sequence: 0x04 0x03 0x02 0x01, value: 0x01020304 = 16909060)
SHORT


items count

Then items list, for each:

BOOL test flag
INT


identifier used for later reference

Here is a list of the different templates at your disposal (yes colors suck a bit atm, you can change them, look here for palette):

SBYTE sbyte BYTE byte BOOL bool
SHORT


short USHORT ushort
INT


int UINT uint FLOAT float
LONG


long ULONG ulong DOUBLE double
Template:Ansistring ansistring Template:Unicodestring unicodestring

Note

  • Snow> Exca, look at the existing templates for the colour scheme, it's already been defined for all the values you're looking at...
  • exca> if you're talking about this: Packet_Template my opinion is: it contains mistakes, not all the types are defined, and an uint is not an int.
  • snow> We can fix the mistakes, but I dont want to be changing templates to a new colour scheme 6 months into the project.
  • exca> also, i'd like to point out that if you edit the Packet_Template upper left table (the one with types), as stated in the PM I sent you, you'll see that the types are not templated at the moment, hence why i started mines in the first place. So if you're ok with that i'll modify the list keeping the current colors and adding the new types while modifying a bit some names that makes no direct sense: for example, the byte type does not exist in C++, uint64 does not either and long are probably 32bits (unless running a 64bits OS which i sprobably not the case for SWG). In an other way i defined my types templates using the C# types (not appropritate for C++ code as same types does not share the same values). Maybe we should statuate about the values in a more pragmatic way when describing files and protocols. Here's the info we need about each field to describe them correctly cross language:
    • number of bytes:1, 2, 4, 8, n or 2n (1/2/4/8/n/N ?)
    • little or big endianess (L/B ?)
    • signed or unsigned (U ?)
    • integer, real or string (I/R/S ?)

I have yet no precise idea of a clear way to write it. Just ideas. What do you all think?