Strict Standards: Declaration of action_plugin_importoldchangelog::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /nfsmnt/hosting1_2/8/2/82f54cb0-e474-4da4-9cdc-40dcd737e16b/mypage.sk/sub/tery/dokuwiki/lib/plugins/importoldchangelog/action.php on line 8

Strict Standards: Declaration of action_plugin_safefnrecode::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /nfsmnt/hosting1_2/8/2/82f54cb0-e474-4da4-9cdc-40dcd737e16b/mypage.sk/sub/tery/dokuwiki/lib/plugins/safefnrecode/action.php on line 0

Strict Standards: Declaration of action_plugin_popularity::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /nfsmnt/hosting1_2/8/2/82f54cb0-e474-4da4-9cdc-40dcd737e16b/mypage.sk/sub/tery/dokuwiki/lib/plugins/popularity/action.php on line 0

Strict Standards: Declaration of Doku_Renderer_metadata::table_open() should be compatible with Doku_Renderer::table_open($maxcols = NULL, $numrows = NULL, $pos = NULL) in /nfsmnt/hosting1_2/8/2/82f54cb0-e474-4da4-9cdc-40dcd737e16b/mypage.sk/sub/tery/dokuwiki/inc/parser/metadata.php on line 24

Strict Standards: Declaration of Doku_Renderer_metadata::table_close() should be compatible with Doku_Renderer::table_close($pos = NULL) in /nfsmnt/hosting1_2/8/2/82f54cb0-e474-4da4-9cdc-40dcd737e16b/mypage.sk/sub/tery/dokuwiki/inc/parser/metadata.php on line 24
tery:level_file [TeryWiki]
 

/*

file structure. Latest format version: 2
header:
8 bytes magic 'TERYSTOR'
2 bytes int version
version1:{
  22 bytes string description, unused parts of string filled up with zeroes
}
chunks follow
chunk header, file version 1:
2 byte type  
2 byte int version 
4 bytes chunk data length (length of chunk without header)
data follow
chunk description
'LI' - Level information
version 1 {
string - level name
string - level description
}
'LT' - level tiles
version 1
4byte int	number of tiles in x size;
4byte int	number of tiles in y size;
for each tile
struct s_File_LevelTile {
	short	FgSpriteId;
	short	BgSpriteId;
	unsigned short	data;
};
rows first, from left to right (right=positive), from up to down (down=positive)
'LO' - level objects
version 1
long - number of objects in level
each item starts with [s_File_Level_object_v1]
then, depending on [s_File_Level_object_v1.type] follows chunk OD with data:
s_File_Level_creature_v1
s_File_Level_path_point_v1
s_File_Level_path_follower_v1
s_File_Level_quad_blocker_v1
s_File_Level_decoration_v1
'TR' - triggers data
version 1
'SI' - sprite indexes
pairs of sprite_id - sprite_path_name
purpose is that in case that sprite database gets reorganized, id's would lose their 
information, and would have to be reconstructed.
'SC' - script
  name of the script and list of events
'EV' - event of the script
  type and data

{

header
TL
SI
LO
 OT object type data (s_File_Level_object_v1)
  OD (type data, skip if unknown type)
 OT
  OD
 OT
  OD
 ..
LS
 SC
  EV
EV
EV
 SC
  EV
EV
 SC
EV
EV
..

}

strings written as: 
 2 bytes len of str (with closing zero), then so many bytes ASCIZ string
 use WriteString() and ReadString() for it

*/

tery/level_file.txt · Last modified: 2007/08/14 00:08 by mirex
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki