Graphic Tools GuideFormat list

SpriteEditor

Ver1.32

Text format


■ 1. C format (no rotation)

XXX.cl file example
/ ********************************
        Color Table
****************************** /

/ * 0: 16 * / ← Palette entry number & color mode SPR_PAL pal_testFile_000 [] = {
        0x8000, / * 0 * / ← Actual color data 0xE318, / * 1 * / (Continued for 16 or 256 colors depending on the mode)
        0xD318, / * 2 * /
          :
          :
          :

SPR_PAL_DAT paldata_testFile [] = {
        SPR_PAL_DEF (0x0040, 16, pal_AtestFile_000),
        SPR_PAL_DEF (0x0020, 16, pal_AtestFile_001),
          : ↑
          : Palette address, color mode, label when editing  
          : (Unused area is basically not output)

XXX.cg file example
/ ********************************
        CG
****************************** /

/ * 0: 88x136 * / ← Sprite number & sprite size SPR_CG cg_testFile_000 [] = {
        0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011,
        0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011,
        0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011,
        0x0011, 0x0011, 0x0011, 0x0011, 0x0021, 0x0099, 0x0066, 0x00AA,
          : ↑
          : Real pixel data        
          : (Palette code in palette mode 32K color mode is actual color data)

SPR_CG_DAT cgdata_testFile [] = {
        SPR_CG_DEF (88,136,0x00000000),
        SPR_CG_DEF (24, 16,0x00001760),
        SPR_CG_DEF (32, 23,0x00001820),
        SPR_CG_DEF (40, 23,0x00001990),
        SPR_CG_DEF (56, 48, 0x00001B5C),
          : ↑
          : H size, V size, relative address for each sprite:

XXX.map file example
/ ********************************
        MAP
****************************** /
/ * 0: * / ← Pattern number SPR_MAP map_testFile_000 [] = {
        SPR_MAP_DEF (1,COL_16, cg_testFile_005, 24, 16, 7, -62,0x0010),
        SPR_MAP_DEF (2, COL_16, cg_testFile_002, 32, 23, 2, -46, 0x0030),
                : ↑
                : Sprite number, color mode (COL_16, COL_256, COL_DC)
                :     
Sply travel, H size, V size, H offset, V offset: Inversion information (0x0010 = H inversion, 0x0020 = V inversion)

XXX.anm file example
/ ********************************
        ANIME
****************************** /
/ * 0: * /
ANM_BNK bank_testFile_000 [] = {
        ANM_DEF (map_testFile_000, 5),
        ANM_DEF (map_testFile_010, 20),
        ANM_DEF (map_testFile_001, 5),
                : ↑
                : Display target pattern label, display time:

■ 2. C format (+ rotation)

* Exactly the same as (1) except for XXX.pat

XXX.pat file example
/ ********************************
        PATTERN (+ rot)
****************************** /
/ * 0: * /
PAT_MAP pat_testFile_000 [] = {
        PAT_MAP_DEF (0, COL_256, cg_testFile_000, 0, 3, -16, -16, 16, 
16,0x20B6,0x0000)
};;

/ * 1: * /
PAT_MAP pat_testFile_001 [] = {
        PAT_MAP_DEF (1,COL_256, cg_testFile_001, 0, 3, -16, -16, 16, 16, 
16,0xF60A, 0x0000),,
        PAT_MAP_DEF (1,COL_256, cg_testFile_001, -19, 5, -16, -16, 16, 
16,0xEAAA, 0x0000),,
        PAT_MAP_DEF (2, COL_256, cg_testFile_002, 27, -17, -16, -16, 16, 
16,0x18E2,0x0000)
                : ↑
                : Sprite number, color mode (COL_16, COL_256, COL_DC)
                : Sprite travel, rotating center H coordinate, rotating center V coordinate,
                : Offset A, Offset B, Offset C, Offset D,
                : Rotation angle, inversion information (0x0010 = H inversion, 0x0020 = V inversion)
 
* Rotation center coordinates = Relative coordinate values from the pattern origin * Offsets A to D = Relative coordinate values between the rotation center point and each vertex of the sprite (at an angle of 0 °) (A = TopLeft-H coordinates B = TopLeft-V coordinates) C = BottomRight-H coordinates D = BottomRight-V coordinates)
* Rotation angle = Rotation angle for each sprite (0 ° to 360 ° is expressed in hexadecimal from $ 0000 to $ FFFF)

■ 3. ASM format (no rotation)

XXX.cl file example
; --------------------------
; color data

; --------------------------
; global
        .global pal_Test_000
        .global pal_Test_000_END
                :
                :

; --------------------------
; cg_Test_131 ← Sprite pal_Test_000: that used the corresponding palette at the time of editing
        CLSIZE pal_Test_000_END-pal_Test_000-4 ← Data size COLOR  
h'E318, h'F39C, h'D2DD, h'BA1C, h'A114, h'BA58, h'FA0C, h'F968; No = 00-07
        COLOR  
h'D808, h'A194, h'990E, h'8088, h'82FD, h'8000, h'8000, h'8000; No = 08-0F
                : ↑
                : Actual color code:
pal_Test_000_END:

XXX.cg file example
; --------------------------
CG-data 

; --------------------------
; global
        .global cg_Test_000 ← global definition of label used .global cg_Test_000_END
                :
                :
                
; --------------------------
x_size: 40 y_size: 43 (16colors)         
← H size, V size, color mode cg_Test_000:
        CGSIZE cg_Test_000_END-cg_Test_000-4 ← Data size .data.b
h'00, h'00, h'00, h'00, h'00, h'00, h'00, h'00, h'00, h'00, h'02, h'20, h' 00, h'00, h'00, h
'00
        .data.b
h'00, h'00, h'00, h'00, h'00, h'00, h'00, h'00, h'00, h'00, h'00, h'00, h' 00, h'00, h'2B, h
'B2
                : ↑
                : Pixel data (4bit / pixel in 16 color mode)
, 8bit / pixel in 256 color mode)
                
cg_Test_000_END:

; --------------------------
x_size: 56 y_size: 105 (32Kcolors)
cg_Test_001:
        CGSIZE cg_Test_001_END-cg_Test_001-4

        .data.w h'6F7B, h'6F7B, h'6F7B, h'4631, h'0000, h'7FFF, h'6F7B, h'6F7B
        .data.w h'6F7B, h'6F7B, h'0000, h'7FFF, h'7FFF, h'7FFF, h'7FFF, h'7FFF
                : ↑
                : Pixel data (16bit / pixel in 32K color mode)
cg_Test_001_END:

XXX.map file example
; --------------------------
; Sprite Map 

; --------------------------
; global
        .global map_Test_000
        .global map_Test_001
                :
                :
                
map_test_000:
        SPRNUM 8 ← Total number of sprites SPRDEF 1, 24, 16, -16, -60, NONE
        SPRDEF 2, 32, 23, -19, -44, NONE
        SPRDEF 3, 40, 23, -24, -21, HREV
        SPRDEF 4, 56, 48, 45, -18, HREV | VREV
        SPRDEF 5, 40, 72, 5, -18, HREV
        SPRDEF 6, 48, 25, -60, 1, NONE
        SPRDEF 7, 48, 21, -60, 36, VREV
        SPRDEF 8, 24, 10, -52, 26, NONE
        SPREND ↑
               
Sprite number, H size, V size, H offset, V offset, inversion information (H inversion = HREV, V inversion = VREV, none = NONE)

XXX.anm file example
; --------------------------
Anime Table 

; --------------------------
; global
        .global bank_Test_000
        .global bank_Test_001
                :
                :

bank_anumSamp_000:
        ANIMNUM 12 ← Total number of patterns used ANIM map_Test_000, 5
        ANIM map_Test_010, 20
        ANIM map_Test_001, 5
                : ↑ Target pattern, display time:
        ANIMEND

■ 4. ASM format (+ rotation)

* Exactly the same as (3) except for XXX.pat

; --------------------------
; Sprite Pattern (+ rot) 

; --------------------------
; global
        .global pat_anumSamp_000
        .global pat_anumSamp_001
                :
                :

pat_anumSamp_000:
        PATNUM 5
        PATTERN 1, 0, 3, -16, -16, 16, 16, h'F60A, NONE
        PATTERN 1, -19, 5, -16, -16, 16, 16, h'EAAA, NONE
                : ↑
                : Sprite number, rotating center H coordinate, rotating center V coordinate,
                : Offset A, Offset B, Offset C, Offset D,
                : Rotation angle, inversion information (H inversion = HREV, V inversion = VREV, none = NONE)
PATEND

* Rotation center coordinates = Relative coordinate values from the pattern origin * Offsets A to D = Relative coordinate values between the rotation center point and each vertex of the sprite (at an angle of 0 °) (A = TopLeft-H coordinates B = TopLeft-V coordinates) C = BottomRight-H coordinates D = BottomRight-V coordinates)
* Rotation angle = Rotation angle for each sprite (0 ° to 360 ° is expressed in hexadecimal from $ 0000 to $ FFFF)

■ 5. C format (+ rotation + reverse Pri)

■ 6. ASM format (+ rotation + reverse Pri)

Each ■ 2. ■ 4. For the pattern data output by XXX.pat, change the priority of the sprites placed on the tool in the reverse order and output.

The file format itself is ■ 2. ■ 4. Same as.


Graphic Tools GuideFormat list
Copyright SEGA ENTERPRISES, LTD ,. 1997