Open main menu

SAGA/Datafiles/Object Map

< SAGA‎ | Datafiles
Revision as of 21:11, 7 May 2008 by Clone2727 (talk | contribs) (Adding the SAGA Object Map resource)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Object Map Resource Format

Object Map resources define the click-areas of each object in the scene.

Each Object Map resource begins with a simple header:

Type Order Name Description
INT16 LE object_count The number of objects present

Each 'object' entry in the Object Map resource consists of the following:

Type Order Name Description
BYTE - ? ?
BYTE - clickarea_count Number of click-areas in this entry
INT16 LE ? ?
INT16 LE object_num Number of the object in Object Name List
INT16 LE script_num Script number associated with object

Each click-area is defined by a list of vertices, which begins with a simple vertex count:

Type Order Name Description
INT16 LE vertex_count The number of vertices in this click area

Followed by a list of x,y pairs:

Type Order Name Description
INT16 LE x X coordinate of vertex
INT16 LE y Y coordinate of vertex

A [vertex_count] of 2 indicates that the click area is box, and the following 2 vertices are the boxes' corners.

Example Object Map Resource

( ITE: Resource #568, Fairegrounds, bleachers empty )

	0600  				; number of object clickareas 
             	
	; * Exit to fairegrounds *
	0102 				; 2 clickareas in this object
	0D00 0100 0000 		;( 13, 1, 0 )
             	
		0200 			; 2 vertices (box)
			0000 6900	;( 0, 105 )
			1000 8100 	;( 16, 129 )
					
		0200 			; 2 vertices (box)
			2D01 6C00	;( 301, 108 )
			3F01 8200	;( 319, 130 )
					
	; * Bleachers *
	0102 				; 2 clickareas in this object
	0200 0200 2000		;( 2, 2, 32 )
					
		0500			; 5 vertices
			0000 3B00 	;( 0, 59 )
			2E00 3200	;( 46, 50 )
			6D00 4C00	;( 109, 76 )
			2A00 6E00	;( 42, 110 )
			0000 5C00	;( 0, 92 )
					
		0500 			; 5 vertices
			D200 4B00	;( 210, 75 )
			1601 3200	;( 278, 50 )
			3F01 3C00	;( 319, 60 )
			3F01 5C00	;( 319, 92 )
			1B01 6E00	;( 283, 110 )
					
	; * Banners *
	0502 				; 2 clickareas in this object
	0200 0300 2100		;( 2, 3, 33 )
					
		0C00			; 12 vertices
			0000 1B00	;( 0, 27 )
			2700 1300	;( 39, 19 )
			4700 0000	;( 71, 0 )
			5300 0000	;( 83, 0 )
			6B00 0D00	;( 107, 13 )
			8400 0B00	;( 132, 11 )
			9500 0000	;( 149, 0 )
			9500 1700	;( 149, 23 )
			7200 1F00	;( 114, 31 )
			4C00 0F00	;( 76, 15 )
			1900 2600	;( 25, 38 )
			0000 2C00	;( 0, 44 )
						 
		0C00			; 12 vertices
			A100 0000
			C000 0E00
			EA00 0000
			F100 0000
			1001 0F00
			3F01 1C00
			3F01 2900
			2801 2500
			F200 0C00
			CD00 1F00
			B300 1700
			A100 0800
				
	; * Hay Bales *		 
	0502				; 2 clickareas in this object
	0200 0400 2200		;( 2, 4, 34 )
				
		0400 			; 4 vertices
			7600 5800	;( 118, 88 )
			8500 5800	;( 133, 88 )
			7D00 6900
			6A00 6900 
	
		0500			; 5 vertices
			B300 5B00
			C100 5A00
			D000 6300
			D000 6A00
			B800 6A00
					
	; * Game Board *

	0101				; 1 clickarea in this object
	0200 0600 2400		;( 2, 6, 36 )
					
		0400			; 4 vertices
			9400 5000	;( 148, 80 )
			A500 5000	;( 165, 80 )
			A800 5500	;( 168, 85 )
			9100 5500	;( 145, 85 )
					
	; * Game Table * 
	0102				; 2 clickareas in this object
	0200 0500 2300		;( 2, 5, 35 )

		0400 			; 4 vertices
			9000 4E00	;( 144, 78 )
			A900 4E00	;( 169, 78 )
			B100 5C00	;( 177, 92 )
			8700 5C00   ;( 135, 92 )
			
		0200 			; 2 vertices
			9100 5C00	;( 145, 92 )
			A800 6700	;( 168, 103 )