mirror of
https://github.com/SMGCommunity/Petari.git
synced 2024-11-27 15:30:44 +00:00
No progress with hashcode, but fix minor issues elsewhere
This commit is contained in:
parent
9330de8cbc
commit
0210ac0556
@ -3,5 +3,5 @@
|
||||
#include <revolution/types.h>
|
||||
|
||||
namespace JGadget {
|
||||
u32 getHashCode(const char *);
|
||||
//u32 getHashCode(const char *);
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ namespace JGadget {
|
||||
}
|
||||
};
|
||||
|
||||
TLinkList() : TNodeLinkList() {}
|
||||
TLinkList() NO_INLINE : TNodeLinkList() {}
|
||||
|
||||
~TLinkList() NO_INLINE {};
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "JSystem/JAudio2/JASReport.h"
|
||||
|
||||
// At address 80560cb8
|
||||
const static u16 sIIRCutoff[0x208] = {
|
||||
const static s16 sIIRCutoff[0x208] = {
|
||||
0x0000, 0x0000, 0x0000, 0x8048, 0x947C, 0x8048, 0x96D0, 0x8048,
|
||||
0x94C8, 0x8048, 0x95D4, 0x8048, 0x9534, 0x8048, 0x954C, 0x8048,
|
||||
0x9590, 0x8048, 0x9708, 0x0F5C, 0x0A3D, 0x4665, 0x1E73, 0x0F5E,
|
||||
@ -571,11 +571,11 @@ s32 JASSeqParser::cmdNop(JASTrack *track, u32 *args) {
|
||||
return 0;
|
||||
}
|
||||
s32 JASSeqParser::cmdFIRSet(JASTrack *track, u32 *args) {
|
||||
track->setFIR((const u16 *)((u8 *)track->mSeqBuff + args[0]));
|
||||
track->setFIR((const s16 *)((u8 *)track->mSeqBuff + args[0]));
|
||||
return 0;
|
||||
}
|
||||
s32 JASSeqParser::cmdIIRSet(JASTrack *track, u32 *args) {
|
||||
u16 iir[4];
|
||||
s16 iir[4];
|
||||
for(u32 i = 0; i < 4; i++) {
|
||||
iir[i] = args[i];
|
||||
}
|
||||
|
@ -1,27 +1,36 @@
|
||||
#include "JSystem/JGadget/hashcode.h"
|
||||
|
||||
#pragma c9x_alias_by_type on
|
||||
/*
|
||||
//#pragma optimization_level 0
|
||||
|
||||
namespace JGadget {
|
||||
s32 doCrazyThings(s32 &term, s32 seed) {return term = seed;}
|
||||
inline u32 helper(const char *data, s32 &term) {s32 acc = 0;
|
||||
//s32 terminator = *data - *data;
|
||||
inline bool gg(char &dst, const char *data, s32 terminator) {
|
||||
dst = *data;
|
||||
return *data != terminator;
|
||||
}
|
||||
inline void helper(s32 &acc, const char *data) {
|
||||
//doCrazyThings(acc, acc);
|
||||
//s32 tmp1 = 0;
|
||||
// = 0;
|
||||
//char tmpValue2;
|
||||
for(;*data != term;) {
|
||||
doCrazyThings(term, term);
|
||||
s32 term = 0;
|
||||
s32 &terminator = term;
|
||||
//char &uni = unimportant;
|
||||
char unimportant;
|
||||
while(gg(unimportant, data, term)) {
|
||||
//terminator = *data - *data;
|
||||
//s32 tmp2 = tmp1;
|
||||
//tmp1 = acc + 1;
|
||||
//tmp1 = tmp2;
|
||||
// doCrazyThings(tmp1, tmp1);
|
||||
//unimportant = *data;
|
||||
s32 tmp = acc * 31;
|
||||
acc = *data;
|
||||
acc += tmp;
|
||||
acc = unimportant;
|
||||
doCrazyThings(terminator, terminator);
|
||||
data++;
|
||||
acc += tmp;
|
||||
//acc += tmp;
|
||||
}
|
||||
return acc;
|
||||
}
|
||||
void mull(s32 &a, s32 b) {a = b * 31;}
|
||||
inline void function(const char *data, s32 &r4, s32 &acc, char &r6) {
|
||||
@ -32,26 +41,14 @@ namespace JGadget {
|
||||
data++;
|
||||
}
|
||||
}
|
||||
char doubleBS(char &a, char b) {return a = b;}
|
||||
u32 getHashCode(const char *data) {
|
||||
s32 acc = 0;
|
||||
//doCrazyThings(acc, acc);
|
||||
//s32 tmp1 = 0;
|
||||
// = 0;
|
||||
//char tmpValue2;
|
||||
s32 term = 0;
|
||||
s32 &terminator = term;
|
||||
for(;*data != term;) {
|
||||
//terminator = *data - *data;
|
||||
//s32 tmp2 = tmp1;
|
||||
//tmp1 = acc + 1;
|
||||
//tmp1 = tmp2;
|
||||
// doCrazyThings(tmp1, tmp1);
|
||||
s32 tmp = acc * 31;
|
||||
acc = *data;
|
||||
doCrazyThings(terminator, terminator);
|
||||
acc += tmp;
|
||||
data++;
|
||||
//acc += tmp;
|
||||
}
|
||||
helper(acc, data);
|
||||
return acc;
|
||||
|
||||
/*s32 r4 = 0, acc = 0;
|
||||
@ -68,6 +65,6 @@ namespace JGadget {
|
||||
//doCrazyThings(tmp, tmp);
|
||||
acc += tmp;
|
||||
return acc;*/
|
||||
}
|
||||
/* }
|
||||
|
||||
}
|
||||
}*/
|
||||
|
Loading…
Reference in New Issue
Block a user