Add ymls for Torch code generator (#497)

* Add torch

* update jenkinsfile
This commit is contained in:
MegaMech
2024-04-09 21:29:57 -06:00
committed by GitHub
parent 2b66867af1
commit 3da5a4f343
95 changed files with 4794 additions and 9877 deletions
+1 -1
View File
@@ -58,6 +58,6 @@ extern BombKart gBombKarts[NUM_BOMB_KARTS_MAX];
extern Collision D_80164038[NUM_BOMB_KARTS_MAX];
// data/data_0DD0A0_1.s
extern BombKartSpawn D_800DCC08[NUM_COURSES][NUM_BOMB_KARTS_MAX];
extern BombKartSpawn gBombKartSpawns[NUM_COURSES][NUM_BOMB_KARTS_MAX];
#endif
+3
View File
@@ -4,6 +4,9 @@
#include "ultra64.h"
typedef f32 Vec3f[3];
typedef f32 Vec4f[4];
typedef s32 Vec3iu[3];
typedef s16 Vec3s[3];
typedef u16 Vec3su[3];
+17 -2
View File
@@ -290,7 +290,7 @@
/**
* @brief Item IDs
*/
typedef enum {
typedef enum ITEMS {
/* 0x00 */ ITEM_NONE = 0,
/* 0x01 */ ITEM_BANANA,
/* 0x02 */ ITEM_BANANA_BUNCH,
@@ -307,7 +307,22 @@ typedef enum {
/* 0x0D */ ITEM_DOUBLE_MUSHROOM,
/* 0x0E */ ITEM_TRIPLE_MUSHROOM,
/* 0x0F */ ITEM_SUPER_MUSHROOM
} ITEMS;
};
typedef enum KART_AI_BEHAVIOURS {
BEHAVIOUR_NONE = 0,
BEHAVIOUR_1,
BEHAVIOUR_HOP,
BEHAVIOUR_3,
BEHAVIOUR_4,
BEHAVIOUR_5,
BEHAVIOUR_NORMAL_SPEED,
BEHAVIOUR_FAST_SPEED,
BEHAVIOUR_SLOW_SPEED,
BEHAVIOUR_9,
BEHAVIOUR_10,
BEHAVIOUR_MAX_SPEED
};
/**
* @brief Balloon status
+17
View File
@@ -52,6 +52,23 @@
#define ALIGNED16
#endif
// Fixed point macros
#define FTOFIX(f) ((s32)((f) * 65536.0))
#define ITOFIX(i) ((s32)((i) << 16))
#define FIXTOF(x) ((double)((x) / 65536.0))
#define FIXTOI(x) ((s32)((x) >> 16))
// Split fixed-point values into its integer or fractional parts.
#define toFixedInt(f) (FTOFIX(f) >> 16)
#define toFrac(f) (FTOFIX(f) & 0xFFFF)
// Setup a fixed-point matrix using floats or doubles. Recommend using doubles for more precision.
#define toFixedPointMatrix(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) \
{{((toFixedInt(x1)) << 16) | toFixedInt(x2), ((toFixedInt(x3)) << 16) | toFixedInt(x4), (toFixedInt(x5) << 16) | toFixedInt(x6), (toFixedInt(x7) << 16) | toFixedInt(x8)}, \
{((toFixedInt(x9)) << 16) | toFixedInt(x10), ((toFixedInt(x11)) << 16) | toFixedInt(x12), (toFixedInt(x13) << 16) | toFixedInt(x14), (toFixedInt(x15) << 16) | toFixedInt(x16)}, \
{((toFrac(x1)) << 16) | toFrac(x2), ((toFrac(x3)) << 16) | toFrac(x4), (toFrac(x5) << 16) | toFrac(x6), (toFrac(x7) << 16) | toFrac(x8)}, \
{((toFrac(x9)) << 16) | toFrac(x10), ((toFrac(x11)) << 16) | toFrac(x12), (toFrac(x13) << 16) | toFrac(x14), (toFrac(x15) << 16) | toFrac(x16)}}
// convert a virtual address to physical.
#define VIRTUAL_TO_PHYSICAL(addr) ((uintptr_t)(addr) & 0x1FFFFFFF)
+6
View File
@@ -5,6 +5,12 @@
#include <common_structs.h>
#include "camera.h"
typedef struct {
/* 0x0 */ s16 waypointStart;
/* 0x2 */ s16 waypointEnd;
/* 0x4 */ s32 type;
} KartAIBehaviour; // size = 0x8
enum SpTaskState {
SPTASK_STATE_NOT_STARTED,
SPTASK_STATE_RUNNING,