mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-11 19:38:47 -04:00
JASInstRand
This commit is contained in:
+1
-1
@@ -685,7 +685,7 @@ config.libs = [
|
||||
Object(Matching, "JSystem/JAudio/JASSimpleWaveBank.cpp"),
|
||||
Object(Matching, "JSystem/JAudio/JASInstEffect.cpp"),
|
||||
Object(NonMatching, "JSystem/JAudio/JASInstSense.cpp"),
|
||||
Object(NonMatching, "JSystem/JAudio/JASInstRand.cpp"),
|
||||
Object(Matching, "JSystem/JAudio/JASInstRand.cpp"),
|
||||
Object(NonMatching, "JSystem/JAudio/JASWSParser.cpp"),
|
||||
Object(NonMatching, "JSystem/JAudio/JASBNKParser.cpp"),
|
||||
Object(Matching, "JSystem/JAudio/JASWaveArcLoader.cpp"),
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef JASINSTRAND_H
|
||||
#define JASINSTRAND_H
|
||||
|
||||
#include "JSystem/JAudio/JASInstEffect.h"
|
||||
|
||||
namespace JASystem {
|
||||
class TInstRand : public TInstEffect {
|
||||
public:
|
||||
TInstRand() {
|
||||
field_0x8 = 1.0f;
|
||||
field_0xc = 0.0f;
|
||||
}
|
||||
virtual f32 getY(int, int) const;
|
||||
|
||||
/* 0x08 */ f32 field_0x8;
|
||||
/* 0x0C */ f32 field_0xc;
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* JASINSTRAND_H */
|
||||
@@ -3,11 +3,13 @@
|
||||
// Translation Unit: JASInstRand.cpp
|
||||
//
|
||||
|
||||
#include "JASInstRand.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "JSystem/JAudio/JASInstRand.h"
|
||||
#include "JSystem/JMath/random.h"
|
||||
|
||||
/* 80286B58-80286BF4 .text getY__Q28JASystem9TInstRandCFii */
|
||||
void JASystem::TInstRand::getY(int, int) const {
|
||||
/* Nonmatching */
|
||||
f32 JASystem::TInstRand::getY(int, int) const {
|
||||
static JMath::TRandom_fast_ oRandom(0);
|
||||
f32 tmp = (oRandom.get_ufloat_1() * 2.0f - 0.9999999f);
|
||||
tmp *= field_0xc;
|
||||
return tmp + field_0x8;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user