view 07/sht.xhtml @ 13:2925b0e246c6 default tip

Fix a lot of things, and add a TODO.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 17 Feb 2012 12:54:08 +0100
parents
children
line wrap: on
line source

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="../style.css"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
		<title>SHT format</title>
	</head>
	<body>
		<h1>SHT format</h1>
		<p>The SHT format defines a character and its shots in PCB.</p>


		<h2>Header</h2>
<pre>
typedef struct {
    uint16_t unknown1; // Seems ignored
    uint16_t level_count;

    // All hitboxes have only one value, the same for the width and the height.
    float bombs; // Why is it a float?
    float unknown2; //TODO
    float hitbox;
    float graze_hitbox;
    float autocollected_item_speed; // Applies to all items going towards us
    float item_hitbox;
    float percentage_of_cherry_loss_on_die; //TODO: verify the formula
    float point_of_collection;
    float horizontal_vertical_speed;
    float horizontal_vertical_focused_speed;
    float diagonal_speed;
    float diagonal_focused_speed;

    thsht_offset_t offsets[level_count];

    thsht_shot_type_t shots[];
} thsht_header_t;
</pre>

<pre>
typedef struct {
    uint32_t offset;
    uint32_t power;
} thsht_offset_t;
</pre>

		<h2>Shot type</h2>
<pre>
typedef struct {
    // If these 2 are 0xffff, then end the parsing.
    uint16_t interval;
    uint16_t unknown1;

    float x;
    float y;
    float hitbox_x;
    float hitbox_y;
    float angle;
    float speed;
    uint16_t damage;
    uint8_t orb; // 0 = character, 1 = left orb, 2 = right orb
    uint8_t unknown2;
    uint16_t sprite;
    uint16_t unknown3;

    // These 4 are actually booleans.
    uint32_t unknown4;
    uint32_t homing; // accelerates too
    uint32_t unknown5;
    uint32_t unknown6;
} thsht_shot_type_t;
</pre>
	</body>
</html>