huangmipi 发表于 2011-2-16 14:18:03

求助!~~谁有SLP文件格式的详细说明文档,我想移植到flash上.

如题~

千骑卷平XX 发表于 2011-2-16 16:19:22

LZ注意,你问的问题属于修改类,应发到游戏修改技术区。
更重要的是,在发帖求助前请你最好能去阅读下相关板块的置顶帖,像这种问题,可以查阅游戏修改技术区的置顶帖https://www.hawkaoe.net/bbs/thread-12620-1-1.html。
另外,请善用搜索功能https://www.hawkaoe.net/bbs/search.php

_MZR_阔比多华 发表于 2011-2-16 17:51:56

貌似办不到。。

王文祎 发表于 2011-2-16 18:59:46

Genie uses the SLP format to store its graphics. The reason behind the name "SLP" is unknown, but
it is known that Ensemble Studios used the name internally because each file has the string
"ArtDesk 1.00 SLP Writer" embedded in it. The format allows for special features such as player
colors, but is a bit dated when compared to the possibilities modern standards (such as PNG)
allow. Following is a description of the format.
Data format
The first item in an SLP file is the header, of the following format:
struct file_header
{
      charversion;
      longnum_frames;
      charcomment;
};
version: Given as a string, usually "2.0N".
num_frames: The total number of frames in the SLP.
comment: The above string "ArtDesk 1.00 SLP Writer".
Following is frame information, one of the following structures for each frame (see num_frames
above):
struct frame_info
{
      unsigned long cmd_table_offset;
      unsigned long outline_table_offset;
      unsigned long palette_offset;
      unsigned long properties;
      long width;
      long height;
      long hotspot_x;
      long hotspot_y;
};
properties: This value is suspected to change which palette the SLP uses, but the possible options
seem to be the same so this has never been confirmed.
hotspot_x, hotspot_y: These points set the hotspot of a frame, which is the "center" of the unit.
A unit's coordinates in a scenario specify the location of this pixel.
Per-frame data
The following data are repeated as a whole for each frame.
The first data are edge structures, one for each row. To conserve disk space, commands (see below)
are only included for the necessary area, and these edges specify the blank space surrounding a
unit.
struct rowedge
{
      short left, right;
};
Following are an array of longs, specifying the offset for the commands (see below) for each row.
These are not actually necessary as the commands can be read sequentially, but can be used for
checking purposes.
After the array is the command data itself. Each command is a single-byte integer followed by
command-specific data. To make the data very compact, the command byte sometimes also contains the
command-specific data. For example, the Color List command (0x00) only uses the least-significant
bits to specify the command type and the rest of the byte is the number of palette indices to
follow.
The following are the known commands:
ValueCommand namePixel countDescription
0x00Color list>>2An array of palette indices. This is about as bitmap as it gets in SLPs.
0x01Skip>>2 or nextThe specified number of pixels are transparent.
0x02Big color list>>4 * 256 and nextAn array of palette indexes. Supports a greater number
of pixels than the above color list.
0x03Big skip>>4 * 256 and nextThe specified number of pixels are transparent. Supports a
greater number of pixels than the above skip.
0x06Player color list>>4 or nextAn array of player color indexes. The actual palette index
is given by adding ( * 16) + 16 to these values.
0x07Fill>>4 or nextFills the specified number of pixels with the following palette index.
0x0APlayer color fill>>4 or nextSame as above, but using the player color formula (see
Player color list).
0x0BShadow transparent>>4 or nextSpecifies the shadow for a unit, but most SLPs do not use
this.
0x0EShadow playernextUnknown.
0x0FEnd of row0Specifies the end of commands for this row.
0x4EOutline1When normally drawing a unit, this single pixel acts normally. When the unit is
behind something, this pixel is replaced with the player color.
0x5EOutline spannextSame function as above, but supports multiple pixels.
Possible pixel count values:
Next byte: Stored in the next byte.
>>2: Command byte right-shifted 2 bits.
>>4 or next: Either the command byte right-shifted 4 bits or in the next byte if the former is 0.
>>2 or next: Either the command byte right-shifted 2 bits or in the next byte if the former is 0.
>>2 * 256 and next: The command byte right-shifted 2 bits and then added to the next byte's value.
>>4 * 256 and next: The command byte right-shifted 4 bits and then added to the next byte's value.

huangmipi 发表于 2011-2-16 19:44:43

原帖由 千骑卷平冈 于 2011-2-16 16:19 发表 https://www.hawkaoe.net/bbs/images/common/back.gif
LZ注意,你问的问题属于修改类,应发到游戏修改技术区。
更重要的是,在发帖求助前请你最好能去阅读下相关板块的置顶帖,像这种问题,可以查阅游戏修改技术区的置顶帖https://www.hawkaoe.net/bbs/thread-12620-1-1. ...

都看过了没有相关信息.

huangmipi 发表于 2011-2-16 19:45:39

原帖由 王文祎 于 2011-2-16 18:59 发表 https://www.hawkaoe.net/bbs/images/common/back.gif
Genie uses the SLP format to store its graphics. The reason behind the name "SLP" is unknown, but
it is known that Ensemble Studios used the name internally because each file has the string
"ArtDe ...

这个之前也看过了,其中挺多地方没有说清楚,还是一个简版的说明

[ 本帖最后由 huangmipi 于 2011-2-16 20:12 编辑 ]

打得你昂 发表于 2011-2-16 20:10:48

威武啊,鬼火没能破解的SLP居然被破解了……

我是谁004 发表于 2011-2-16 20:38:33

问问帝国2的工作人员

huangmipi 发表于 2011-2-16 20:40:43

汗~~他们应该不会说的吧~

huangmipi 发表于 2011-2-17 12:19:28

救助啊!~~
页: [1]
查看完整版本: 求助!~~谁有SLP文件格式的详细说明文档,我想移植到flash上.