mirror of
https://github.com/izzy2lost/Starship.git
synced 2026-07-05 15:19:42 -07:00
WIP on script documentation, some cleanup (#194)
* gfx * script * Torch * headers * format
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
#ifndef AST_ENDING_EXPERT_H
|
||||
#define AST_ENDING_EXPERT_H
|
||||
|
||||
#include "gfx.h"
|
||||
#include "sf64object.h"
|
||||
#include "structs.h"
|
||||
|
||||
extern u16 gEndingExpertReward[];
|
||||
extern u16 gEndingNormalReward[];
|
||||
|
||||
#endif
|
||||
@@ -487,12 +487,6 @@ s32 func_800A7974(Player* player, f32* hitboxData, s32* index, f32 xPos, f32 yPo
|
||||
bool func_800A8054(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, Vec3f* arg7, Vec3f* arg8);
|
||||
void Object_58_Initialize(Object_58*);
|
||||
|
||||
// fox_radio
|
||||
s32 func_800BA7BC(u16*, s32);
|
||||
void Radio_PlayMessage(u16*, RadioCharacterId);
|
||||
void func_800BB388(void);
|
||||
void func_800BB5D0(void);
|
||||
|
||||
// fox_versus
|
||||
s32 func_800C1E9C(void);
|
||||
void func_800C1ED4(void);
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@
|
||||
G_TX_RENDERTILE, 0, cmt, maskt, shiftt, cms, masks, shifts), \
|
||||
gsDPSetTileSize(G_TX_RENDERTILE, dw, dh, \
|
||||
((width)-1) << G_TEXTURE_IMAGE_FRAC, \
|
||||
((height)-1) << G_TEXTURE_IMAGE_FRAC),
|
||||
((height)-1) << G_TEXTURE_IMAGE_FRAC)
|
||||
|
||||
#define gDPLoadTileTexture(pkt, timg, fmt, siz, width, height) \
|
||||
{ \
|
||||
@@ -54,7 +54,7 @@
|
||||
gsDPLoadSync(), \
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, \
|
||||
(((width)*(height) + siz##_INCR) >> siz##_SHIFT) -1, \
|
||||
CALC_DXT(width, siz##_BYTES)),
|
||||
CALC_DXT(width, siz##_BYTES))
|
||||
|
||||
#define gSPSetOtherModeHi(pkt, settings) gSPSetOtherMode(pkt, G_SETOTHERMODE_H, G_MDSFT_BLENDMASK, 24, settings)
|
||||
#define gsSPSetOtherModeHi(settings) gsSPSetOtherMode(G_SETOTHERMODE_H, G_MDSFT_BLENDMASK, 24, settings)
|
||||
|
||||
@@ -7,9 +7,9 @@ extern int Dummyhalf;
|
||||
// struct Dummy2 {int x;};
|
||||
// struct Dummy3 {int x;};
|
||||
// struct Dummy4 {int x;};
|
||||
struct Dummy5 {int x;};
|
||||
struct Dummy6 {int x;};
|
||||
struct Dummy7 {int x;};
|
||||
// struct Dummy5 {int x;};
|
||||
// struct Dummy6 {int x;};
|
||||
// struct Dummy7 {int x;};
|
||||
struct Dummy8 {int x;};
|
||||
struct Dummy9 {int x;};
|
||||
struct Dummy10 {int x;};
|
||||
|
||||
@@ -115,4 +115,149 @@ typedef enum VsStage {
|
||||
/* 2 */ VS_STAGE_SECTOR_Z,
|
||||
} VsStage;
|
||||
|
||||
#define EVENT_CMD(opcode, arg1, arg2) ((((opcode) & 0x7F) << 9) | ((arg1) & 0x1FF)), (arg2)
|
||||
#define EVENT_PLAY_MSG(rcid, msg) EVENT_CMD(EVOP_PLAY_MSG, rcid, msg)
|
||||
#define EVENT_STOP_SCRIPT() EVENT_CMD(EVOP_STOP_SCRIPT, 0, 0)
|
||||
#define EVENT_MAKE_TEXLINE(color) EVENT_CMD(EVOP_MAKE_TEXLINE, 0, color)
|
||||
#define EVENT_STOP_TEXLINE() EVENT_CMD(EVOP_STOP_TEXLINE, 0, 0)
|
||||
#define EVENT_INIT_ACTOR(health, info) EVENT_CMD(EVOP_INIT_ACTOR, health, info)
|
||||
#define EVENT_SET_SPEED(speed, time, flag1, flag2) EVENT_CMD(EVOP_SET_SPEED, (((flag1) & 1) << 8) | (((flag2) & 1) << 7) | ((speed) & 0x7F), time)
|
||||
#define EVENT_SET_ACCEL(speedTarget, time, flag1, flag2) EVENT_CMD(EVOP_SET_ACCEL, (((flag1) & 1) << 8) | (((flag2) & 1) << 7) | ((speedTarget) & 0x7F), time)
|
||||
#define EVENT_SET_ROTATE() EVENT_CMD(EVOP_SET_ROTATE, 0, 0)
|
||||
#define EVENT_STOP_ROTATE() EVENT_CMD(EVOP_STOP_ROTATE, 0, 0)
|
||||
#define EVENT_BRANCH(cond, cmd) EVENT_CMD(EVOP_BRANCH, cmd, cond)
|
||||
#define EVENT_LOOP(cmd, count) EVENT_CMD(EVOP_LOOP, cmd, count)
|
||||
|
||||
typedef enum EventOpcode {
|
||||
/* 0 */ EVOP_SET_SPEED,
|
||||
/* 1 */ EVOP_SET_ACCEL,
|
||||
/* 2 */ EVOP_2,
|
||||
/* 3 */ EVOP_3,
|
||||
/* 4 */ EVOP_4,
|
||||
/* 8 */ EVOP_8 = 8,
|
||||
/* 9 */ EVOP_9,
|
||||
/* 10 */ EVOP_10,
|
||||
/* 11 */ EVOP_11,
|
||||
/* 12 */ EVOP_12,
|
||||
/* 16 */ EVOP_16 = 16,
|
||||
/* 17 */ EVOP_17,
|
||||
/* 18 */ EVOP_18,
|
||||
/* 19 */ EVOP_19,
|
||||
/* 20 */ EVOP_20,
|
||||
/* 21 */ EVOP_21,
|
||||
/* 24 */ EVOP_SET_ROTATE = 24,
|
||||
/* 25 */ EVOP_STOP_ROTATE,
|
||||
/* 40 */ EVOP_40 = 40,
|
||||
/* 41 */ EVOP_41,
|
||||
/* 42 */ EVOP_42,
|
||||
/* 43 */ EVOP_43,
|
||||
/* 44 */ EVOP_44,
|
||||
/* 45 */ EVOP_45,
|
||||
/* 46 */ EVOP_46,
|
||||
/* 47 */ EVOP_47,
|
||||
/* 48 */ EVOP_48,
|
||||
/* 56 */ EVOP_56 = 56,
|
||||
/* 57 */ EVOP_57,
|
||||
/* 58 */ EVOP_58,
|
||||
/* 59 */ EVOP_59,
|
||||
/* 96 */ EVOP_BRANCH = 96,
|
||||
/* 104 */ EVOP_INIT_ACTOR = 104,
|
||||
/* 105 */ EVOP_105,
|
||||
/* 112 */ EVOP_112 = 112,
|
||||
/* 113 */ EVOP_113,
|
||||
/* 116 */ EVOP_116 = 116,
|
||||
/* 118 */ EVOP_118 = 118,
|
||||
/* 119 */ EVOP_119,
|
||||
/* 120 */ EVOP_PLAY_MSG, // play message. arg1 is portrait, arg2 is message ID
|
||||
/* 121 */ EVOP_121,
|
||||
/* 122 */ EVOP_122,
|
||||
/* 124 */ EVOP_MAKE_TEXLINE = 124,
|
||||
/* 125 */ EVOP_STOP_TEXLINE,
|
||||
/* 126 */ EVOP_LOOP,
|
||||
/* 127 */ EVOP_STOP_SCRIPT, // stop script
|
||||
} EventOpcode;
|
||||
|
||||
typedef enum EventCondition {
|
||||
/* 0 */ EVC_0,
|
||||
/* 1 */ EVC_1,
|
||||
/* 2 */ EVC_2,
|
||||
/* 3 */ EVC_3,
|
||||
/* 4 */ EVC_4,
|
||||
/* 5 */ EVC_5,
|
||||
/* 6 */ EVC_6,
|
||||
/* 7 */ EVC_7,
|
||||
/* 8 */ EVC_8,
|
||||
/* 9 */ EVC_9,
|
||||
/* 10 */ EVC_10,
|
||||
/* 11 */ EVC_11,
|
||||
/* 12 */ EVC_12,
|
||||
/* 13 */ EVC_13,
|
||||
/* 14 */ EVC_14,
|
||||
/* 15 */ EVC_15,
|
||||
/* 16 */ EVC_16,
|
||||
/* 17 */ EVC_17,
|
||||
/* 18 */ EVC_18,
|
||||
/* 19 */ EVC_19,
|
||||
/* 20 */ EVC_20,
|
||||
/* 21 */ EVC_21,
|
||||
/* 22 */ EVC_22,
|
||||
/* 23 */ EVC_23,
|
||||
/* 24 */ EVC_24,
|
||||
/* 25 */ EVC_25,
|
||||
/* 26 */ EVC_26,
|
||||
/* 27 */ EVC_27,
|
||||
/* 28 */ EVC_28,
|
||||
/* 29 */ EVC_29,
|
||||
/* 30 */ EVC_30,
|
||||
/* 31 */ EVC_31,
|
||||
/* 32 */ EVC_32,
|
||||
/* 33 */ EVC_33,
|
||||
/* 34 */ EVC_34,
|
||||
/* 35 */ EVC_35,
|
||||
/* 36 */ EVC_36,
|
||||
/* 37 */ EVC_37,
|
||||
/* 38 */ EVC_38,
|
||||
/* 39 */ EVC_39,
|
||||
/* 40 */ EVC_40,
|
||||
/* 41 */ EVC_41,
|
||||
/* 42 */ EVC_42,
|
||||
/* 43 */ EVC_43,
|
||||
/* 44 */ EVC_44,
|
||||
/* 45 */ EVC_45,
|
||||
/* 46 */ EVC_46,
|
||||
/* 47 */ EVC_47,
|
||||
/* 48 */ EVC_48,
|
||||
/* 49 */ EVC_49,
|
||||
/* 50 */ EVC_50,
|
||||
/* 51 */ EVC_51,
|
||||
/* 52 */ EVC_52,
|
||||
/* 53 */ EVC_53,
|
||||
/* 54 */ EVC_54,
|
||||
/* 55 */ EVC_55,
|
||||
/* 56 */ EVC_56,
|
||||
/* 57 */ EVC_57,
|
||||
/* 58 */ EVC_58,
|
||||
/* 59 */ EVC_59,
|
||||
/* 60 */ EVC_60,
|
||||
/* 61 */ EVC_61,
|
||||
/* 62 */ EVC_62,
|
||||
/* 63 */ EVC_63,
|
||||
/* 64 */ EVC_64,
|
||||
/* 65 */ EVC_65,
|
||||
/* 66 */ EVC_66,
|
||||
/* 67 */ EVC_67,
|
||||
/* 68 */ EVC_68,
|
||||
/* 69 */ EVC_69,
|
||||
/* 100 */ EVC_100=100,
|
||||
} EventCondition;
|
||||
|
||||
typedef enum TexLineColor {
|
||||
/* 0 */ TXLC_WHITE,
|
||||
/* 1 */ TXLC_LIGHT_BLUE,
|
||||
/* 2 */ TXLC_BLUE,
|
||||
/* 3 */ TXLC_GREEN,
|
||||
/* 4 */ TXLC_RED,
|
||||
/* 5 */ TXLC_YELLOW,
|
||||
} TexLineColor;
|
||||
|
||||
#endif
|
||||
|
||||
+5
-1
@@ -18,7 +18,7 @@ bool Message_DisplayText(Gfx** gfxPtr, u16* msgPtr, s32 xPos, s32 yPos, s32 len)
|
||||
void Message_DisplayScrollingText(Gfx** gfxPtr, u16* msgPtr, s32 xPos, s32 yPos, s32 yRangeHi, s32 yRangeLo, s32 len);
|
||||
bool Message_IsPrintingChar(u16* msgPtr, s32 charPos);
|
||||
|
||||
typedef enum {
|
||||
typedef enum RadioCharacterId {
|
||||
RCID_FOX = 0,
|
||||
RCID_FOX_OPEN,
|
||||
RCID_FOX_RED = 5,
|
||||
@@ -99,6 +99,10 @@ typedef enum {
|
||||
RCID_FOX_EXPERT_OPEN,
|
||||
} RadioCharacterId;
|
||||
|
||||
void Radio_PlayMessage(u16*, enum RadioCharacterId);
|
||||
void func_800BB388(void);
|
||||
void func_800BB5D0(void);
|
||||
|
||||
typedef enum {
|
||||
MSGCHAR_END,
|
||||
MSGCHAR_NWL,
|
||||
|
||||
+12
-63
@@ -85,17 +85,17 @@ typedef struct {
|
||||
} ObjectInit; // size = 0x14
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Gfx* unk_00;
|
||||
/* 0x04 */ f32* unk_04;
|
||||
/* 0x08 */ f32 unk_08;
|
||||
/* 0x0C */ f32 unk_0C;
|
||||
/* 0x00 */ Gfx* dList;
|
||||
/* 0x04 */ f32* hitbox;
|
||||
/* 0x08 */ f32 scale;
|
||||
/* 0x0C */ f32 info_unk_10;
|
||||
/* 0x10 */ f32 unk_10;
|
||||
/* 0x14 */ u8 unk_14;
|
||||
/* 0x15 */ u8 unk_15;
|
||||
/* 0x16 */ u8 unk_16;
|
||||
/* 0x17 */ u8 unk_17;
|
||||
/* 0x18 */ f32 unk_18;
|
||||
/* 0x1C */ u8 unk_1C;
|
||||
/* 0x14 */ u8 info_unk_16;
|
||||
/* 0x15 */ u8 info_unk_14;
|
||||
/* 0x16 */ u8 sfx;
|
||||
/* 0x17 */ u8 info_unk_19;
|
||||
/* 0x18 */ f32 info_unk_1C;
|
||||
/* 0x1C */ u8 bonus;
|
||||
} UnkStruct_D003C; // size = 0x20
|
||||
|
||||
typedef enum ObjectStatus {
|
||||
@@ -275,8 +275,8 @@ typedef struct {
|
||||
/* 0x0D4 */ s16 unk_0D4;
|
||||
/* 0x0D6 */ u16 damage;
|
||||
/* 0x0D8 */ Vec3f unk_0D8;
|
||||
/* 0x0E4 */ s16 unk_0E4;
|
||||
/* 0x0E6 */ s16 unk_0E6;
|
||||
/* 0x0E4 */ s16 aiType;
|
||||
/* 0x0E6 */ s16 aiIndex;
|
||||
/* 0x0E8 */ Vec3f vel;
|
||||
/* 0x0F4 */ Vec3f unk_0F4;
|
||||
/* 0x100 */ f32 sfxSource[3];
|
||||
@@ -286,57 +286,6 @@ typedef struct {
|
||||
/* 0x18C */ Vec3f vwork[30];
|
||||
} Actor; // size = 0x2F4
|
||||
|
||||
#define EVENT_CMD(opcode, arg1, arg2) ((((opcode) & 0x7F) << 9) | ((arg1) & 0x1FF)), (arg2)
|
||||
|
||||
typedef enum EventOpcode {
|
||||
/* 0 */ EVOP_0,
|
||||
/* 1 */ EVOP_1,
|
||||
/* 2 */ EVOP_2,
|
||||
/* 3 */ EVOP_3,
|
||||
/* 4 */ EVOP_4,
|
||||
/* 8 */ EVOP_8 = 8,
|
||||
/* 9 */ EVOP_9,
|
||||
/* 10 */ EVOP_10,
|
||||
/* 11 */ EVOP_11,
|
||||
/* 12 */ EVOP_12,
|
||||
/* 16 */ EVOP_16 = 16,
|
||||
/* 17 */ EVOP_17,
|
||||
/* 18 */ EVOP_18,
|
||||
/* 19 */ EVOP_19,
|
||||
/* 20 */ EVOP_20,
|
||||
/* 21 */ EVOP_21,
|
||||
/* 24 */ EVOP_24 = 24,
|
||||
/* 25 */ EVOP_25,
|
||||
/* 40 */ EVOP_40 = 40,
|
||||
/* 41 */ EVOP_41,
|
||||
/* 42 */ EVOP_42,
|
||||
/* 43 */ EVOP_43,
|
||||
/* 44 */ EVOP_44,
|
||||
/* 45 */ EVOP_45,
|
||||
/* 46 */ EVOP_46,
|
||||
/* 47 */ EVOP_47,
|
||||
/* 48 */ EVOP_48,
|
||||
/* 56 */ EVOP_56 = 56,
|
||||
/* 57 */ EVOP_57,
|
||||
/* 58 */ EVOP_58,
|
||||
/* 59 */ EVOP_59,
|
||||
/* 96 */ EVOP_96 = 96,
|
||||
/* 104 */ EVOP_104 = 104,
|
||||
/* 105 */ EVOP_105,
|
||||
/* 112 */ EVOP_112 = 112,
|
||||
/* 113 */ EVOP_113,
|
||||
/* 116 */ EVOP_116 = 116,
|
||||
/* 118 */ EVOP_118 = 118,
|
||||
/* 119 */ EVOP_119,
|
||||
/* 120 */ EVOP_120, // play message. arg1 is portrait, arg2 is message ID
|
||||
/* 121 */ EVOP_121,
|
||||
/* 122 */ EVOP_122,
|
||||
/* 124 */ EVOP_124 = 124,
|
||||
/* 125 */ EVOP_125,
|
||||
/* 126 */ EVOP_126,
|
||||
/* 127 */ EVOP_127, // stop script
|
||||
} EventOpcode;
|
||||
|
||||
typedef enum ObjectId {
|
||||
/* -1 */ OBJ_INVALID=-1,
|
||||
/* 0 */ OBJ_80_0,
|
||||
|
||||
Reference in New Issue
Block a user