Fix indentation
This commit is contained in:
parent
4061489a98
commit
a5fc05a953
|
|
@ -9009,12 +9009,12 @@ glabel chrCanSeeEntity
|
|||
bool chrCanSeeAttackTarget(struct chrdata *chr, struct coord *pos, s16 *rooms, bool arg3)
|
||||
{
|
||||
u32 entitytype = ENTITYTYPE_TARGET;
|
||||
u32 entityid = 0;
|
||||
u32 entityid = 0;
|
||||
|
||||
if (chr->actiontype == ACT_ATTACK) {
|
||||
entitytype = chr->act_attack.entitytype;
|
||||
entityid = chr->act_attack.entityid;
|
||||
}
|
||||
if (chr->actiontype == ACT_ATTACK) {
|
||||
entitytype = chr->act_attack.entitytype;
|
||||
entityid = chr->act_attack.entityid;
|
||||
}
|
||||
|
||||
return chrCanSeeEntity(chr, pos, rooms, arg3, entitytype, entityid);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,12 +225,12 @@ char *soloMenuTextAccuracy(struct menuitem *item)
|
|||
accuracy = 0;
|
||||
}
|
||||
|
||||
if (accuracy > 100.0f) {
|
||||
accuracy = 100.0f;
|
||||
}
|
||||
if (accuracy > 100.0f) {
|
||||
accuracy = 100.0f;
|
||||
}
|
||||
|
||||
sprintf(g_StringPointer, "%s%s%.1f%%", "", "", accuracy);
|
||||
return g_StringPointer;
|
||||
sprintf(g_StringPointer, "%s%s%.1f%%", "", "", accuracy);
|
||||
return g_StringPointer;
|
||||
}
|
||||
|
||||
char *soloMenuTextMissionStatus(struct menuitem *item)
|
||||
|
|
|
|||
|
|
@ -413,8 +413,8 @@ Gfx *func0f153780(Gfx *gdl)
|
|||
Gfx *gfxSetPrimColour(Gfx *gdl, u32 colour)
|
||||
{
|
||||
gDPPipeSync(gdl++);
|
||||
gDPSetRenderMode(gdl++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
|
||||
gDPSetCombineMode(gdl++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||
gDPSetRenderMode(gdl++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
|
||||
gDPSetCombineMode(gdl++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||
|
||||
gDPSetPrimColorViaWord(gdl++, 0, 0, colour);
|
||||
|
||||
|
|
|
|||
|
|
@ -1146,7 +1146,7 @@ Gfx *lvRenderFade(Gfx *gdl)
|
|||
|
||||
gDPPipeSync(gdl++);
|
||||
gDPSetRenderMode(gdl++, G_RM_CLD_SURF, G_RM_CLD_SURF2);
|
||||
gDPSetCombineMode(gdl++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||
gDPSetCombineMode(gdl++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||
gDPSetPrimColorViaWord(gdl++, 0, 0, colour);
|
||||
|
||||
gDPFillRectangle(gdl++,
|
||||
|
|
|
|||
|
|
@ -5968,10 +5968,10 @@ Gfx *menuRenderItemObjectives(Gfx *gdl, struct menurendercontext *context)
|
|||
|
||||
position++;
|
||||
|
||||
if (context->item->param == 0) {
|
||||
y += 18;
|
||||
} else if (context->item->param == 2) {
|
||||
y += PAL ? 34 : 30;
|
||||
if (context->item->param == 0) {
|
||||
y += 18;
|
||||
} else if (context->item->param == 2) {
|
||||
y += PAL ? 34 : 30;
|
||||
} else {
|
||||
y += 14;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -389,7 +389,7 @@ Gfx *propsRender(Gfx *gdl, s16 arg1, s32 arg2, s16 *arg3)
|
|||
|
||||
if (prop) {
|
||||
if ((arg2 == 0 && (prop->flags & (PROPFLAG_20 | PROPFLAG_01)) == 0)
|
||||
|| (arg2 == 2 && (prop->flags & (PROPFLAG_20 | PROPFLAG_01)) == 1)) {
|
||||
|| (arg2 == 2 && (prop->flags & (PROPFLAG_20 | PROPFLAG_01)) == 1)) {
|
||||
gdl = propRender(gdl, prop, false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ void frametimeCalculate(void)
|
|||
u32 diffframe60;
|
||||
u32 diffframe240;
|
||||
|
||||
do {
|
||||
do {
|
||||
count = osGetCount();
|
||||
thisframeticks = count - g_Vars.thisframetime;
|
||||
g_Vars.thisframeticks = thisframeticks;
|
||||
|
|
@ -49,15 +49,15 @@ void frametimeCalculate(void)
|
|||
} while (diffframe60 < g_Vars.mininc60);
|
||||
|
||||
#if PAL
|
||||
g_Vars.lostframetime = (g_Vars.lostframetime + thisframeticks) - (diffframe60 * 937500);
|
||||
g_Vars.lostframetime240 = (g_Vars.lostframetime240 + thisframeticks) - (diffframe240 * 234375);
|
||||
g_Vars.lostframetime = (g_Vars.lostframetime + thisframeticks) - (diffframe60 * 937500);
|
||||
g_Vars.lostframetime240 = (g_Vars.lostframetime240 + thisframeticks) - (diffframe240 * 234375);
|
||||
#else
|
||||
g_Vars.lostframetime = (g_Vars.lostframetime + thisframeticks) - (diffframe60 * 781250);
|
||||
g_Vars.lostframetime240 = (g_Vars.lostframetime240 + thisframeticks) - (diffframe240 * 195312);
|
||||
g_Vars.lostframetime = (g_Vars.lostframetime + thisframeticks) - (diffframe60 * 781250);
|
||||
g_Vars.lostframetime240 = (g_Vars.lostframetime240 + thisframeticks) - (diffframe240 * 195312);
|
||||
#endif
|
||||
g_Vars.mininc60 = 1;
|
||||
|
||||
frametimeApply(diffframe60, diffframe240, count);
|
||||
frametimeApply(diffframe60, diffframe240, count);
|
||||
}
|
||||
|
||||
void func0f16cf8c(s32 arg0)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
#define gDPSetVerticeArray(pkt, ptr, numvertices) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
\
|
||||
_g->words.w0 = (_SHIFTL(0x04, 24, 8) \
|
||||
| _SHIFTL(numvertices - 1, 20, 4) \
|
||||
| _SHIFTL(numvertices * sizeof(struct gfxvtx), 0, 20)); \
|
||||
|
|
@ -40,7 +39,6 @@
|
|||
#define gDPSetColorArray(pkt, ptr, numcolors) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
\
|
||||
_g->words.w0 = (_SHIFTL(0x07, 24, 8) \
|
||||
| _SHIFTL((numcolors - 1) * 4, 16, 8) \
|
||||
| _SHIFTL(numcolors * 4, 0, 16)); \
|
||||
|
|
@ -72,7 +70,6 @@
|
|||
#define gDPTri4(pkt, x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
\
|
||||
_g->words.w0 = (_SHIFTL(0xb1, 24, 8) \
|
||||
| _SHIFTL(z4, 12, 4) \
|
||||
| _SHIFTL(z3, 8, 4) \
|
||||
|
|
@ -98,7 +95,6 @@
|
|||
#define gDPSetPrimColorViaWord(pkt, m, l, rgba) \
|
||||
{ \
|
||||
Gfx *_g = (Gfx *)(pkt); \
|
||||
\
|
||||
_g->words.w0 = (_SHIFTL(G_SETPRIMCOLOR, 24, 8) \
|
||||
| _SHIFTL(m, 8, 8) \
|
||||
| _SHIFTL(l, 0, 8)); \
|
||||
|
|
|
|||
|
|
@ -4,20 +4,20 @@
|
|||
|
||||
typedef struct
|
||||
{
|
||||
u32 initialized; //probably something like initialized?
|
||||
OSThread *mgrThread;
|
||||
OSMesgQueue *unk08;
|
||||
OSMesgQueue *unk0c;
|
||||
OSMesgQueue *unk10;
|
||||
s32 (*dma_func)(s32,u32,void*,size_t);
|
||||
u64 force_align;
|
||||
u32 initialized; //probably something like initialized?
|
||||
OSThread *mgrThread;
|
||||
OSMesgQueue *unk08;
|
||||
OSMesgQueue *unk0c;
|
||||
OSMesgQueue *unk10;
|
||||
s32 (*dma_func)(s32,u32,void*,size_t);
|
||||
u64 force_align;
|
||||
} OSMgrArgs;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* 0x0 */ __OSInode inode;
|
||||
/* 0x100 */ u8 bank;
|
||||
/* 0x101 */ u8 map[256];
|
||||
/* 0x0 */ __OSInode inode;
|
||||
/* 0x100 */ u8 bank;
|
||||
/* 0x101 */ u8 map[256];
|
||||
} __OSInodeCache;
|
||||
|
||||
s32 __osDisableInt();
|
||||
|
|
|
|||
|
|
@ -140,12 +140,12 @@ typedef unsigned long long __uint64_t;
|
|||
#else
|
||||
|
||||
typedef struct {
|
||||
int hi32;
|
||||
int lo32;
|
||||
int hi32;
|
||||
int lo32;
|
||||
} __int64_t;
|
||||
typedef struct {
|
||||
unsigned int hi32;
|
||||
unsigned int lo32;
|
||||
unsigned int hi32;
|
||||
unsigned int lo32;
|
||||
} __uint64_t;
|
||||
|
||||
#endif /* _LONGLONG */
|
||||
|
|
@ -178,7 +178,7 @@ typedef __uint64_t __scunsigned_t;
|
|||
typedef __int32_t __scint_t;
|
||||
typedef __uint32_t __scunsigned_t;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* C || C++ */
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
// Mtxs use a union and a long long int to force alignments. Mtxfs are not
|
||||
// aligned but still use the union for consistency with Mtx.
|
||||
typedef union {
|
||||
f32 m[4][4];
|
||||
s32 unused;
|
||||
f32 m[4][4];
|
||||
s32 unused;
|
||||
} Mtxf;
|
||||
|
||||
// This hacky structure allows coords to be accessed using
|
||||
|
|
@ -6731,14 +6731,14 @@ struct var80067e6c {
|
|||
};
|
||||
|
||||
struct textureconfig {
|
||||
u32 texturenum;
|
||||
u8 width;
|
||||
u8 height;
|
||||
u8 level;
|
||||
u8 format;
|
||||
u8 depth;
|
||||
u8 s;
|
||||
u8 t;
|
||||
u32 texturenum;
|
||||
u8 width;
|
||||
u8 height;
|
||||
u8 level;
|
||||
u8 format;
|
||||
u8 depth;
|
||||
u8 s;
|
||||
u8 t;
|
||||
};
|
||||
|
||||
struct gfxvtx {
|
||||
|
|
|
|||
|
|
@ -20,36 +20,36 @@ u32 wp = 0;
|
|||
struct huft *huftlist = NULL;
|
||||
|
||||
u8 border[] = { /* Order of the bit length code lengths */
|
||||
16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
|
||||
16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
|
||||
|
||||
/* Tables for deflate from PKZIP's appnote.txt. */
|
||||
u16 cplens[] = { /* Copy lengths for literal codes 257..285 */
|
||||
3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
|
||||
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
|
||||
3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
|
||||
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
|
||||
|
||||
/* actually lengths - 2; also see note #13 above about 258 */
|
||||
/* actually lengths - 2; also see note #13 above about 258 */
|
||||
u8 cplext[] = { /* Extra bits for literal codes 257..285 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
|
||||
3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99}; /* 128==invalid */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
|
||||
3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99}; /* 128==invalid */
|
||||
|
||||
u16 cpdist[] = { /* Copy offsets for distance codes 0..29 */
|
||||
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
|
||||
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
|
||||
8193, 12289, 16385, 24577};
|
||||
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
|
||||
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
|
||||
8193, 12289, 16385, 24577};
|
||||
|
||||
u8 cpdext[] = { /* Extra bits for distance codes */
|
||||
0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
|
||||
7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
|
||||
12, 12, 13, 13};
|
||||
0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
|
||||
7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
|
||||
12, 12, 13, 13};
|
||||
|
||||
u32 bb = 0;
|
||||
u32 bk = 0;
|
||||
|
||||
/* And'ing with mask[n] masks the lower n bits */
|
||||
u16 mask_bits[] = {
|
||||
0x0000,
|
||||
0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
|
||||
0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
|
||||
0x0000,
|
||||
0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
|
||||
0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
|
||||
};
|
||||
|
||||
u32 lbits = 9;
|
||||
|
|
@ -190,8 +190,9 @@ s32 huft_build(u32 *b, u32 n, u32 s, u16 *d, u8 *e, struct huft **t, s32 *m)
|
|||
z = (z = g - w) > l ? l : z; /* upper limit on table size */
|
||||
|
||||
if ((f = 1 << (j = k - w)) > a + 1) { /* try a k-w bit table */
|
||||
/* too few codes for k-w bit table */
|
||||
f -= a + 1; /* deduct codes from patterns left */
|
||||
/* too few codes for k-w bit table */
|
||||
/* deduct codes from patterns left */
|
||||
f -= a + 1;
|
||||
xp = c + k;
|
||||
|
||||
while (++j < z) { /* try smaller tables up to z bits */
|
||||
|
|
|
|||
|
|
@ -611,12 +611,12 @@ s32 osPfsInitPak(OSMesgQueue *queue, OSPfs *pfs, s32 channel)
|
|||
|
||||
ret = 0;
|
||||
|
||||
__osSiGetAccess();
|
||||
ret = __osPfsGetStatus(queue, channel);
|
||||
__osSiRelAccess();
|
||||
__osSiGetAccess();
|
||||
ret = __osPfsGetStatus(queue, channel);
|
||||
__osSiRelAccess();
|
||||
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
pfs->queue = queue;
|
||||
|
|
|
|||
|
|
@ -25,33 +25,33 @@ struct crashdescription {
|
|||
|
||||
struct crashdescription g_CrashCauseDescriptions[] = {
|
||||
{ CAUSE_BD, CAUSE_BD, "BD" },
|
||||
{ CAUSE_IP8, CAUSE_IP8, "IP8" },
|
||||
{ CAUSE_IP7, CAUSE_IP7, "IP7" },
|
||||
{ CAUSE_IP6, CAUSE_IP6, "IP6" },
|
||||
{ CAUSE_IP5, CAUSE_IP5, "IP5" },
|
||||
{ CAUSE_IP4, CAUSE_IP4, "IP4" },
|
||||
{ CAUSE_IP3, CAUSE_IP3, "IP3" },
|
||||
{ CAUSE_SW2, CAUSE_SW2, "IP2" },
|
||||
{ CAUSE_SW1, CAUSE_SW1, "IP1" },
|
||||
{ CAUSE_EXCMASK, EXC_INT, "Int" },
|
||||
{ CAUSE_EXCMASK, EXC_MOD, "TLBmod" },
|
||||
{ CAUSE_EXCMASK, EXC_RMISS, "TLBload" },
|
||||
{ CAUSE_EXCMASK, EXC_WMISS, "TLBstore" },
|
||||
{ CAUSE_EXCMASK, EXC_RADE, "Address error on load or instruction fetch" },
|
||||
{ CAUSE_EXCMASK, EXC_WADE, "Address error on store" },
|
||||
{ CAUSE_EXCMASK, EXC_IBE, "Bus error exception on instruction fetch" },
|
||||
{ CAUSE_EXCMASK, EXC_DBE, "Bus error exception on data reference" },
|
||||
{ CAUSE_EXCMASK, EXC_SYSCALL, "Syscall" },
|
||||
{ CAUSE_EXCMASK, EXC_BREAK, "Brk" },
|
||||
{ CAUSE_EXCMASK, EXC_II, "Reserved instruction" },
|
||||
{ CAUSE_EXCMASK, EXC_CPU, "Cop unusable" },
|
||||
{ CAUSE_EXCMASK, EXC_OV, "Overflow" },
|
||||
{ CAUSE_EXCMASK, EXC_TRAP, "Trap" },
|
||||
{ CAUSE_EXCMASK, EXC_VCEI, "Virtual coherency exception on intruction fetch" },
|
||||
{ CAUSE_EXCMASK, EXC_FPE, "Fp exception" },
|
||||
{ CAUSE_EXCMASK, EXC_WATCH, "Watchpoint" },
|
||||
{ CAUSE_EXCMASK, EXC_VCED, "Virtual coherency exception on data reference" },
|
||||
{ 0, 0, "" },
|
||||
{ CAUSE_IP8, CAUSE_IP8, "IP8" },
|
||||
{ CAUSE_IP7, CAUSE_IP7, "IP7" },
|
||||
{ CAUSE_IP6, CAUSE_IP6, "IP6" },
|
||||
{ CAUSE_IP5, CAUSE_IP5, "IP5" },
|
||||
{ CAUSE_IP4, CAUSE_IP4, "IP4" },
|
||||
{ CAUSE_IP3, CAUSE_IP3, "IP3" },
|
||||
{ CAUSE_SW2, CAUSE_SW2, "IP2" },
|
||||
{ CAUSE_SW1, CAUSE_SW1, "IP1" },
|
||||
{ CAUSE_EXCMASK, EXC_INT, "Int" },
|
||||
{ CAUSE_EXCMASK, EXC_MOD, "TLBmod" },
|
||||
{ CAUSE_EXCMASK, EXC_RMISS, "TLBload" },
|
||||
{ CAUSE_EXCMASK, EXC_WMISS, "TLBstore" },
|
||||
{ CAUSE_EXCMASK, EXC_RADE, "Address error on load or instruction fetch" },
|
||||
{ CAUSE_EXCMASK, EXC_WADE, "Address error on store" },
|
||||
{ CAUSE_EXCMASK, EXC_IBE, "Bus error exception on instruction fetch" },
|
||||
{ CAUSE_EXCMASK, EXC_DBE, "Bus error exception on data reference" },
|
||||
{ CAUSE_EXCMASK, EXC_SYSCALL, "Syscall" },
|
||||
{ CAUSE_EXCMASK, EXC_BREAK, "Brk" },
|
||||
{ CAUSE_EXCMASK, EXC_II, "Reserved instruction" },
|
||||
{ CAUSE_EXCMASK, EXC_CPU, "Cop unusable" },
|
||||
{ CAUSE_EXCMASK, EXC_OV, "Overflow" },
|
||||
{ CAUSE_EXCMASK, EXC_TRAP, "Trap" },
|
||||
{ CAUSE_EXCMASK, EXC_VCEI, "Virtual coherency exception on intruction fetch" },
|
||||
{ CAUSE_EXCMASK, EXC_FPE, "Fp exception" },
|
||||
{ CAUSE_EXCMASK, EXC_WATCH, "Watchpoint" },
|
||||
{ CAUSE_EXCMASK, EXC_VCED, "Virtual coherency exception on data reference" },
|
||||
{ 0, 0, "" },
|
||||
};
|
||||
|
||||
struct crashdescription g_CrashSrDescriptions[] = {
|
||||
|
|
|
|||
|
|
@ -627,20 +627,20 @@ void func00025928(struct tile *tile, struct coord *arg1)
|
|||
s32 sp20[3];
|
||||
|
||||
sp38[0] = tile0->vertices[1][0] - tile0->vertices[0][0];
|
||||
sp38[1] = tile0->vertices[1][1] - tile0->vertices[0][1];
|
||||
sp38[2] = tile0->vertices[1][2] - tile0->vertices[0][2];
|
||||
sp38[1] = tile0->vertices[1][1] - tile0->vertices[0][1];
|
||||
sp38[2] = tile0->vertices[1][2] - tile0->vertices[0][2];
|
||||
|
||||
sp2c[0] = tile0->vertices[2][0] - tile0->vertices[0][0];
|
||||
sp2c[1] = tile0->vertices[2][1] - tile0->vertices[0][1];
|
||||
sp2c[2] = tile0->vertices[2][2] - tile0->vertices[0][2];
|
||||
sp2c[0] = tile0->vertices[2][0] - tile0->vertices[0][0];
|
||||
sp2c[1] = tile0->vertices[2][1] - tile0->vertices[0][1];
|
||||
sp2c[2] = tile0->vertices[2][2] - tile0->vertices[0][2];
|
||||
|
||||
sp20[0] = sp38[1] * sp2c[2] - sp38[2] * sp2c[1];
|
||||
sp20[1] = sp38[2] * sp2c[0] - sp38[0] * sp2c[2];
|
||||
sp20[2] = sp38[0] * sp2c[1] - sp38[1] * sp2c[0];
|
||||
sp20[0] = sp38[1] * sp2c[2] - sp38[2] * sp2c[1];
|
||||
sp20[1] = sp38[2] * sp2c[0] - sp38[0] * sp2c[2];
|
||||
sp20[2] = sp38[0] * sp2c[1] - sp38[1] * sp2c[0];
|
||||
|
||||
arg1->x = sp20[0];
|
||||
arg1->y = sp20[1];
|
||||
arg1->z = sp20[2];
|
||||
arg1->x = sp20[0];
|
||||
arg1->y = sp20[1];
|
||||
arg1->z = sp20[2];
|
||||
} else if (tile->type == TILETYPE_01) {
|
||||
struct tiletype1 *tile1 = (struct tiletype1 *) tile;
|
||||
f32 sp10[3];
|
||||
|
|
|
|||
|
|
@ -497,8 +497,8 @@ ALParam *__allocParam()
|
|||
|
||||
void __freeParam(ALParam *param)
|
||||
{
|
||||
param->next = n_syn->drvr.paramList;
|
||||
n_syn->drvr.paramList = param;
|
||||
param->next = n_syn->drvr.paramList;
|
||||
n_syn->drvr.paramList = param;
|
||||
}
|
||||
|
||||
void _collectPVoices(void)
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ void resetproc(void *data)
|
|||
osViBlack(1);
|
||||
|
||||
// Wait about 0.048 seconds
|
||||
prenmitime = osGetTime();
|
||||
prenmitime = osGetTime();
|
||||
|
||||
while (osGetTime() < prenmitime + OS_NSEC_TO_CYCLES(48484848)) {
|
||||
// empty
|
||||
|
|
|
|||
|
|
@ -210,9 +210,9 @@ OSMesgQueue *osScGetCmdQ(OSSched *sc)
|
|||
|
||||
void __scMain(void *arg)
|
||||
{
|
||||
OSMesg msg = 0;
|
||||
OSSched *sc = (OSSched *)arg;
|
||||
int done = 0;
|
||||
OSMesg msg = 0;
|
||||
OSSched *sc = (OSSched *)arg;
|
||||
int done = 0;
|
||||
|
||||
bbufResetBuffers();
|
||||
|
||||
|
|
|
|||
|
|
@ -385,65 +385,67 @@ glabel func00039718
|
|||
|
||||
u8 __getTrackByte(ALCSeq *seq, u32 track)
|
||||
{
|
||||
u8 theByte;
|
||||
u8 theByte;
|
||||
|
||||
if (seq->curBULen[track]) {
|
||||
theByte = *seq->curBUPtr[track];
|
||||
seq->curBUPtr[track]++;
|
||||
seq->curBULen[track]--;
|
||||
} else /* need to handle backup mode */ {
|
||||
theByte = *seq->curLoc[track];
|
||||
seq->curLoc[track]++;
|
||||
if (seq->curBULen[track]) {
|
||||
theByte = *seq->curBUPtr[track];
|
||||
seq->curBUPtr[track]++;
|
||||
seq->curBULen[track]--;
|
||||
} else /* need to handle backup mode */ {
|
||||
theByte = *seq->curLoc[track];
|
||||
seq->curLoc[track]++;
|
||||
|
||||
if (theByte == AL_CMIDI_BLOCK_CODE) {
|
||||
u8 loBackUp, hiBackUp, theLen, nextByte;
|
||||
u32 backup;
|
||||
if (theByte == AL_CMIDI_BLOCK_CODE) {
|
||||
u8 loBackUp, hiBackUp, theLen, nextByte;
|
||||
u32 backup;
|
||||
|
||||
nextByte = *seq->curLoc[track];
|
||||
seq->curLoc[track]++;
|
||||
nextByte = *seq->curLoc[track];
|
||||
seq->curLoc[track]++;
|
||||
|
||||
if (nextByte != AL_CMIDI_BLOCK_CODE) {
|
||||
/* if here, then got a backup section. get the amount of
|
||||
backup, and the len of the section. Subtract the amount of
|
||||
backup from the curLoc ptr, and subtract four more, since
|
||||
curLoc has been advanced by four while reading the codes. */
|
||||
hiBackUp = nextByte;
|
||||
loBackUp = *seq->curLoc[track];
|
||||
seq->curLoc[track]++;
|
||||
theLen = *seq->curLoc[track];
|
||||
seq->curLoc[track]++;
|
||||
backup = (u32)hiBackUp;
|
||||
backup = backup << 8;
|
||||
backup += loBackUp;
|
||||
seq->curBUPtr[track] = seq->curLoc[track] - (backup + 4);
|
||||
seq->curBULen[track] = (u32)theLen;
|
||||
if (nextByte != AL_CMIDI_BLOCK_CODE) {
|
||||
/**
|
||||
* if here, then got a backup section. get the amount of
|
||||
* backup, and the len of the section. Subtract the amount of
|
||||
* backup from the curLoc ptr, and subtract four more, since
|
||||
* curLoc has been advanced by four while reading the codes.
|
||||
*/
|
||||
hiBackUp = nextByte;
|
||||
loBackUp = *seq->curLoc[track];
|
||||
seq->curLoc[track]++;
|
||||
theLen = *seq->curLoc[track];
|
||||
seq->curLoc[track]++;
|
||||
backup = (u32)hiBackUp;
|
||||
backup = backup << 8;
|
||||
backup += loBackUp;
|
||||
seq->curBUPtr[track] = seq->curLoc[track] - (backup + 4);
|
||||
seq->curBULen[track] = (u32)theLen;
|
||||
|
||||
/* now get the byte */
|
||||
theByte = *seq->curBUPtr[track];
|
||||
seq->curBUPtr[track]++;
|
||||
seq->curBULen[track]--;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* now get the byte */
|
||||
theByte = *seq->curBUPtr[track];
|
||||
seq->curBUPtr[track]++;
|
||||
seq->curBULen[track]--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return theByte;
|
||||
return theByte;
|
||||
}
|
||||
|
||||
u32 __readVarLen(ALCSeq *seq, u32 track)
|
||||
{
|
||||
u32 value;
|
||||
u32 c;
|
||||
u32 value;
|
||||
u32 c;
|
||||
|
||||
value = (u32)__getTrackByte(seq, track);
|
||||
value = (u32)__getTrackByte(seq, track);
|
||||
|
||||
if (value & 0x80) {
|
||||
value &= 0x7f;
|
||||
if (value & 0x80) {
|
||||
value &= 0x7f;
|
||||
|
||||
do {
|
||||
c = (u32)__getTrackByte(seq, track);
|
||||
value = (value << 7) + (c & 0x7f);
|
||||
} while (c & 0x80);
|
||||
}
|
||||
do {
|
||||
c = (u32)__getTrackByte(seq, track);
|
||||
value = (value << 7) + (c & 0x7f);
|
||||
} while (c & 0x80);
|
||||
}
|
||||
|
||||
return value;
|
||||
return value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ void guOrthoF(float mf[4][4], float l, float r, float b, float t, float n, float
|
|||
mf[3][3] = 1;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (j = 0; j < 4; j++) {
|
||||
for (j = 0; j < 4; j++) {
|
||||
mf[i][j] *= scale;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@
|
|||
|
||||
void osDpSetStatus(u32 data)
|
||||
{
|
||||
IO_WRITE(DPC_STATUS_REG, data);
|
||||
IO_WRITE(DPC_STATUS_REG, data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ s32 osEPiRawStartDma(OSPiHandle *handle, s32 direction, u32 devAddr, void *dramA
|
|||
{
|
||||
u32 stat = IO_READ(PI_STATUS_REG);
|
||||
|
||||
while (stat & (PI_STATUS_IO_BUSY | PI_STATUS_DMA_BUSY)) {
|
||||
stat = IO_READ(PI_STATUS_REG);
|
||||
while (stat & (PI_STATUS_IO_BUSY | PI_STATUS_DMA_BUSY)) {
|
||||
stat = IO_READ(PI_STATUS_REG);
|
||||
}
|
||||
|
||||
if (handle->type != __osCurrentHandle[handle->domain]->type) {
|
||||
|
|
@ -28,7 +28,7 @@ s32 osEPiRawStartDma(OSPiHandle *handle, s32 direction, u32 devAddr, void *dramA
|
|||
if (cHandle->pulse != handle->pulse) {
|
||||
IO_WRITE(PI_BSD_DOM1_PWD_REG, handle->pulse);
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
if (cHandle->latency != handle->latency) {
|
||||
IO_WRITE(PI_BSD_DOM2_LAT_REG, handle->latency);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ s32 osEPiRawReadIo(OSPiHandle *handle, u32 devAddr, u32 *data)
|
|||
{
|
||||
u32 stat = IO_READ(PI_STATUS_REG);
|
||||
|
||||
while (stat & (PI_STATUS_IO_BUSY | PI_STATUS_DMA_BUSY)) {
|
||||
stat = IO_READ(PI_STATUS_REG);
|
||||
while (stat & (PI_STATUS_IO_BUSY | PI_STATUS_DMA_BUSY)) {
|
||||
stat = IO_READ(PI_STATUS_REG);
|
||||
}
|
||||
|
||||
if (__osCurrentHandle[handle->domain]->type != handle->type) {
|
||||
OSPiHandle *cHandle = __osCurrentHandle[handle->domain];
|
||||
if (__osCurrentHandle[handle->domain]->type != handle->type) {
|
||||
OSPiHandle *cHandle = __osCurrentHandle[handle->domain];
|
||||
|
||||
if (handle->domain == PI_DOMAIN1) {
|
||||
if (handle->domain == PI_DOMAIN1) {
|
||||
if (cHandle->latency != handle->latency) {
|
||||
IO_WRITE(PI_BSD_DOM1_LAT_REG, handle->latency);
|
||||
}
|
||||
|
|
@ -28,7 +28,7 @@ s32 osEPiRawReadIo(OSPiHandle *handle, u32 devAddr, u32 *data)
|
|||
if (cHandle->pulse != handle->pulse) {
|
||||
IO_WRITE(PI_BSD_DOM1_PWD_REG, handle->pulse);
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
if (cHandle->latency != handle->latency) {
|
||||
IO_WRITE(PI_BSD_DOM2_LAT_REG, handle->latency);
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@ s32 osEPiRawReadIo(OSPiHandle *handle, u32 devAddr, u32 *data)
|
|||
if (cHandle->pulse != handle->pulse) {
|
||||
IO_WRITE(PI_BSD_DOM2_PWD_REG, handle->pulse);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cHandle->type = handle->type;
|
||||
cHandle->latency = handle->latency;
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ s32 osEPiRawWriteIo(OSPiHandle *handle, u32 devAddr, u32 data)
|
|||
{
|
||||
u32 stat = IO_READ(PI_STATUS_REG);
|
||||
|
||||
while (stat & (PI_STATUS_IO_BUSY | PI_STATUS_DMA_BUSY)) {
|
||||
stat = IO_READ(PI_STATUS_REG);
|
||||
while (stat & (PI_STATUS_IO_BUSY | PI_STATUS_DMA_BUSY)) {
|
||||
stat = IO_READ(PI_STATUS_REG);
|
||||
}
|
||||
|
||||
if (__osCurrentHandle[handle->domain]->type != handle->type) {
|
||||
OSPiHandle *cHandle = __osCurrentHandle[handle->domain];
|
||||
if (__osCurrentHandle[handle->domain]->type != handle->type) {
|
||||
OSPiHandle *cHandle = __osCurrentHandle[handle->domain];
|
||||
|
||||
if (handle->domain == PI_DOMAIN1) {
|
||||
if (handle->domain == PI_DOMAIN1) {
|
||||
if (cHandle->latency != handle->latency) {
|
||||
IO_WRITE(PI_BSD_DOM1_LAT_REG, handle->latency);
|
||||
}
|
||||
|
|
@ -28,7 +28,7 @@ s32 osEPiRawWriteIo(OSPiHandle *handle, u32 devAddr, u32 data)
|
|||
if (cHandle->pulse != handle->pulse) {
|
||||
IO_WRITE(PI_BSD_DOM1_PWD_REG, handle->pulse);
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
if (cHandle->latency != handle->latency) {
|
||||
IO_WRITE(PI_BSD_DOM2_LAT_REG, handle->latency);
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@ s32 osEPiRawWriteIo(OSPiHandle *handle, u32 devAddr, u32 data)
|
|||
if (cHandle->pulse != handle->pulse) {
|
||||
IO_WRITE(PI_BSD_DOM2_PWD_REG, handle->pulse);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cHandle->type = handle->type;
|
||||
cHandle->latency = handle->latency;
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ void __osPfsGetOneChannelData(int channel, OSContStatus *data)
|
|||
|
||||
ptr = (u8*)&__osPfsPifRam;
|
||||
|
||||
for (i = 0; i < channel; i++) {
|
||||
ptr++;
|
||||
for (i = 0; i < channel; i++) {
|
||||
ptr++;
|
||||
}
|
||||
|
||||
requestformat = *(__OSContRequestFormatShort *)ptr;
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
s32 __osSiRawWriteIo(u32 devAddr, u32 data)
|
||||
{
|
||||
if (__osSiDeviceBusy()) {
|
||||
return -1;
|
||||
if (__osSiDeviceBusy()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
IO_WRITE(devAddr, data);
|
||||
IO_WRITE(devAddr, data);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
|
||||
void *osViGetCurrentFramebuffer(void)
|
||||
{
|
||||
register u32 saveMask;
|
||||
void *framep;
|
||||
register u32 saveMask;
|
||||
void *framep;
|
||||
|
||||
saveMask = __osDisableInt();
|
||||
saveMask = __osDisableInt();
|
||||
|
||||
framep = __osViCurr->framep;
|
||||
framep = __osViCurr->framep;
|
||||
|
||||
__osRestoreInt(saveMask);
|
||||
__osRestoreInt(saveMask);
|
||||
|
||||
return framep;
|
||||
return framep;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,14 @@
|
|||
|
||||
void *osViGetNextFramebuffer(void)
|
||||
{
|
||||
register u32 saveMask;
|
||||
void *framep;
|
||||
register u32 saveMask;
|
||||
void *framep;
|
||||
|
||||
saveMask = __osDisableInt();
|
||||
saveMask = __osDisableInt();
|
||||
|
||||
framep = __osViNext->framep;
|
||||
framep = __osViNext->framep;
|
||||
|
||||
__osRestoreInt(saveMask);
|
||||
__osRestoreInt(saveMask);
|
||||
|
||||
return framep;
|
||||
return framep;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
char *proutSprintf(char *dst, const char *src, size_t count)
|
||||
{
|
||||
return (char *)memcpy((u8 *)dst, (u8 *)src, count) + count;
|
||||
return (char *)memcpy((u8 *)dst, (u8 *)src, count) + count;
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
|
|
|
|||
Loading…
Reference in New Issue