mirror of https://github.com/PrimeDecomp/prime.git
Match CScriptSpecialFunction constructor
This commit is contained in:
parent
3a23d993a0
commit
f16397257b
|
@ -3964,7 +3964,7 @@ lbl_800C8844:
|
||||||
/* 800C89D8 000C5938 C8 01 00 C0 */ lfd f0, 0xc0(r1)
|
/* 800C89D8 000C5938 C8 01 00 C0 */ lfd f0, 0xc0(r1)
|
||||||
/* 800C89DC 000C593C 93 61 00 28 */ stw r27, 0x28(r1)
|
/* 800C89DC 000C593C 93 61 00 28 */ stw r27, 0x28(r1)
|
||||||
/* 800C89E0 000C5940 EC 60 18 28 */ fsubs f3, f0, f3
|
/* 800C89E0 000C5940 EC 60 18 28 */ fsubs f3, f0, f3
|
||||||
/* 800C89E4 000C5944 48 08 A1 DD */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypesss"
|
/* 800C89E4 000C5944 48 08 A1 DD */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypeUsUsUs"
|
||||||
/* 800C89E8 000C5948 7C 7C 1B 78 */ mr r28, r3
|
/* 800C89E8 000C5948 7C 7C 1B 78 */ mr r28, r3
|
||||||
lbl_800C89EC:
|
lbl_800C89EC:
|
||||||
/* 800C89EC 000C594C 7F 20 07 75 */ extsb. r0, r25
|
/* 800C89EC 000C594C 7F 20 07 75 */ extsb. r0, r25
|
||||||
|
@ -5569,7 +5569,7 @@ lbl_800CA054:
|
||||||
/* 800CA1A8 000C7108 C8 01 00 80 */ lfd f0, 0x80(r1)
|
/* 800CA1A8 000C7108 C8 01 00 80 */ lfd f0, 0x80(r1)
|
||||||
/* 800CA1AC 000C710C 93 61 00 28 */ stw r27, 0x28(r1)
|
/* 800CA1AC 000C710C 93 61 00 28 */ stw r27, 0x28(r1)
|
||||||
/* 800CA1B0 000C7110 EC 40 10 28 */ fsubs f2, f0, f2
|
/* 800CA1B0 000C7110 EC 40 10 28 */ fsubs f2, f0, f2
|
||||||
/* 800CA1B4 000C7114 48 08 8A 0D */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypesss"
|
/* 800CA1B4 000C7114 48 08 8A 0D */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypeUsUsUs"
|
||||||
/* 800CA1B8 000C7118 7C 7D 1B 78 */ mr r29, r3
|
/* 800CA1B8 000C7118 7C 7D 1B 78 */ mr r29, r3
|
||||||
lbl_800CA1BC:
|
lbl_800CA1BC:
|
||||||
/* 800CA1BC 000C711C 7F 40 07 75 */ extsb. r0, r26
|
/* 800CA1BC 000C711C 7F 40 07 75 */ extsb. r0, r26
|
||||||
|
@ -5919,7 +5919,7 @@ lbl_800CA580:
|
||||||
/* 800CA6C0 000C7620 93 41 00 20 */ stw r26, 0x20(r1)
|
/* 800CA6C0 000C7620 93 41 00 20 */ stw r26, 0x20(r1)
|
||||||
/* 800CA6C4 000C7624 93 41 00 24 */ stw r26, 0x24(r1)
|
/* 800CA6C4 000C7624 93 41 00 24 */ stw r26, 0x24(r1)
|
||||||
/* 800CA6C8 000C7628 93 41 00 28 */ stw r26, 0x28(r1)
|
/* 800CA6C8 000C7628 93 41 00 28 */ stw r26, 0x28(r1)
|
||||||
/* 800CA6CC 000C762C 48 08 84 F5 */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypesss"
|
/* 800CA6CC 000C762C 48 08 84 F5 */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypeUsUsUs"
|
||||||
/* 800CA6D0 000C7630 7C 7B 1B 78 */ mr r27, r3
|
/* 800CA6D0 000C7630 7C 7B 1B 78 */ mr r27, r3
|
||||||
lbl_800CA6D4:
|
lbl_800CA6D4:
|
||||||
/* 800CA6D4 000C7634 7F C0 07 75 */ extsb. r0, r30
|
/* 800CA6D4 000C7634 7F C0 07 75 */ extsb. r0, r30
|
||||||
|
@ -15309,7 +15309,7 @@ lbl_800D2E70:
|
||||||
/* 800D3020 000CFF80 93 81 00 20 */ stw r28, 0x20(r1)
|
/* 800D3020 000CFF80 93 81 00 20 */ stw r28, 0x20(r1)
|
||||||
/* 800D3024 000CFF84 93 81 00 24 */ stw r28, 0x24(r1)
|
/* 800D3024 000CFF84 93 81 00 24 */ stw r28, 0x24(r1)
|
||||||
/* 800D3028 000CFF88 93 81 00 28 */ stw r28, 0x28(r1)
|
/* 800D3028 000CFF88 93 81 00 28 */ stw r28, 0x28(r1)
|
||||||
/* 800D302C 000CFF8C 48 07 FB 95 */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypesss"
|
/* 800D302C 000CFF8C 48 07 FB 95 */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypeUsUsUs"
|
||||||
/* 800D3030 000CFF90 7C 7F 1B 78 */ mr r31, r3
|
/* 800D3030 000CFF90 7C 7F 1B 78 */ mr r31, r3
|
||||||
lbl_800D3034:
|
lbl_800D3034:
|
||||||
/* 800D3034 000CFF94 7F 40 07 75 */ extsb. r0, r26
|
/* 800D3034 000CFF94 7F 40 07 75 */ extsb. r0, r26
|
||||||
|
@ -15473,7 +15473,7 @@ lbl_800D31AC:
|
||||||
/* 800D328C 000D01EC 93 21 00 20 */ stw r25, 0x20(r1)
|
/* 800D328C 000D01EC 93 21 00 20 */ stw r25, 0x20(r1)
|
||||||
/* 800D3290 000D01F0 93 01 00 24 */ stw r24, 0x24(r1)
|
/* 800D3290 000D01F0 93 01 00 24 */ stw r24, 0x24(r1)
|
||||||
/* 800D3294 000D01F4 92 E1 00 28 */ stw r23, 0x28(r1)
|
/* 800D3294 000D01F4 92 E1 00 28 */ stw r23, 0x28(r1)
|
||||||
/* 800D3298 000D01F8 48 07 F9 29 */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypesss"
|
/* 800D3298 000D01F8 48 07 F9 29 */ bl "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypeUsUsUs"
|
||||||
/* 800D329C 000D01FC 7C 7A 1B 78 */ mr r26, r3
|
/* 800D329C 000D01FC 7C 7A 1B 78 */ mr r26, r3
|
||||||
lbl_800D32A0:
|
lbl_800D32A0:
|
||||||
/* 800D32A0 000D0200 38 61 00 44 */ addi r3, r1, 0x44
|
/* 800D32A0 000D0200 38 61 00 44 */ addi r3, r1, 0x44
|
||||||
|
|
|
@ -4288,8 +4288,8 @@ lbl_80152BA8:
|
||||||
/* 80152BB8 0014FB18 38 21 00 10 */ addi r1, r1, 0x10
|
/* 80152BB8 0014FB18 38 21 00 10 */ addi r1, r1, 0x10
|
||||||
/* 80152BBC 0014FB1C 4E 80 00 20 */ blr
|
/* 80152BBC 0014FB1C 4E 80 00 20 */ blr
|
||||||
|
|
||||||
.global "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypesss"
|
.global "__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypeUsUsUs"
|
||||||
"__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypesss":
|
"__ct__22CScriptSpecialFunctionF9TUniqueIdRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>RC11CEntityInfoRC12CTransform4fQ222CScriptSpecialFunction16ESpecialFunctionRCQ24rstl66basic_string<c,Q24rstl14char_traits<c>,Q24rstl17rmemory_allocator>ffffRC9CVector3fRC6CColorbRC11CDamageInfollQ212CPlayerState9EItemTypeUsUsUs":
|
||||||
/* 80152BC0 0014FB20 94 21 FE 70 */ stwu r1, -0x190(r1)
|
/* 80152BC0 0014FB20 94 21 FE 70 */ stwu r1, -0x190(r1)
|
||||||
/* 80152BC4 0014FB24 7C 08 02 A6 */ mflr r0
|
/* 80152BC4 0014FB24 7C 08 02 A6 */ mflr r0
|
||||||
/* 80152BC8 0014FB28 90 01 01 94 */ stw r0, 0x194(r1)
|
/* 80152BC8 0014FB28 90 01 01 94 */ stw r0, 0x194(r1)
|
||||||
|
@ -4410,7 +4410,7 @@ lbl_80152BA8:
|
||||||
/* 80152D94 0014FCF4 38 80 00 06 */ li r4, 6
|
/* 80152D94 0014FCF4 38 80 00 06 */ li r4, 6
|
||||||
/* 80152D98 0014FCF8 38 AD 8C 50 */ addi r5, r13, lbl_805A7810@sda21
|
/* 80152D98 0014FCF8 38 AD 8C 50 */ addi r5, r13, lbl_805A7810@sda21
|
||||||
/* 80152D9C 0014FCFC D0 1A 01 80 */ stfs f0, 0x180(r26)
|
/* 80152D9C 0014FCFC D0 1A 01 80 */ stfs f0, 0x180(r26)
|
||||||
/* 80152DA0 0014FD00 48 00 01 B5 */ bl "__ct__Q24rstl36vector<f,Q24rstl17rmemory_allocator>FRCQ24rstl17rmemory_allocator"
|
/* 80152DA0 0014FD00 48 00 01 B5 */ bl "__ct__11TAverage<f>FiRCf"
|
||||||
/* 80152DA4 0014FD04 C0 02 9D 9C */ lfs f0, lbl_805ABABC@sda21(r2)
|
/* 80152DA4 0014FD04 C0 02 9D 9C */ lfs f0, lbl_805ABABC@sda21(r2)
|
||||||
/* 80152DA8 0014FD08 3C 60 80 5A */ lis r3, sZeroVector__9CVector3f@ha
|
/* 80152DA8 0014FD08 3C 60 80 5A */ lis r3, sZeroVector__9CVector3f@ha
|
||||||
/* 80152DAC 0014FD0C 38 A0 00 00 */ li r5, 0
|
/* 80152DAC 0014FD0C 38 A0 00 00 */ li r5, 0
|
||||||
|
@ -4523,8 +4523,8 @@ lbl_80152F1C:
|
||||||
/* 80152F4C 0014FEAC 38 21 01 90 */ addi r1, r1, 0x190
|
/* 80152F4C 0014FEAC 38 21 01 90 */ addi r1, r1, 0x190
|
||||||
/* 80152F50 0014FEB0 4E 80 00 20 */ blr
|
/* 80152F50 0014FEB0 4E 80 00 20 */ blr
|
||||||
|
|
||||||
.global "__ct__Q24rstl36vector<f,Q24rstl17rmemory_allocator>FRCQ24rstl17rmemory_allocator"
|
.global "__ct__11TAverage<f>FiRCf"
|
||||||
"__ct__Q24rstl36vector<f,Q24rstl17rmemory_allocator>FRCQ24rstl17rmemory_allocator":
|
"__ct__11TAverage<f>FiRCf":
|
||||||
/* 80152F54 0014FEB4 94 21 FF F0 */ stwu r1, -0x10(r1)
|
/* 80152F54 0014FEB4 94 21 FF F0 */ stwu r1, -0x10(r1)
|
||||||
/* 80152F58 0014FEB8 7C 08 02 A6 */ mflr r0
|
/* 80152F58 0014FEB8 7C 08 02 A6 */ mflr r0
|
||||||
/* 80152F5C 0014FEBC 90 01 00 14 */ stw r0, 0x14(r1)
|
/* 80152F5C 0014FEBC 90 01 00 14 */ stw r0, 0x14(r1)
|
||||||
|
@ -4534,7 +4534,7 @@ lbl_80152F1C:
|
||||||
/* 80152F6C 0014FECC 90 03 00 04 */ stw r0, 4(r3)
|
/* 80152F6C 0014FECC 90 03 00 04 */ stw r0, 4(r3)
|
||||||
/* 80152F70 0014FED0 90 03 00 08 */ stw r0, 8(r3)
|
/* 80152F70 0014FED0 90 03 00 08 */ stw r0, 8(r3)
|
||||||
/* 80152F74 0014FED4 90 03 00 0C */ stw r0, 0xc(r3)
|
/* 80152F74 0014FED4 90 03 00 0C */ stw r0, 0xc(r3)
|
||||||
/* 80152F78 0014FED8 48 00 00 1D */ bl sub_80152f94
|
/* 80152F78 0014FED8 48 00 00 1D */ bl "resize__Q24rstl36vector<f,Q24rstl17rmemory_allocator>FiRCf"
|
||||||
/* 80152F7C 0014FEDC 80 01 00 14 */ lwz r0, 0x14(r1)
|
/* 80152F7C 0014FEDC 80 01 00 14 */ lwz r0, 0x14(r1)
|
||||||
/* 80152F80 0014FEE0 7F E3 FB 78 */ mr r3, r31
|
/* 80152F80 0014FEE0 7F E3 FB 78 */ mr r3, r31
|
||||||
/* 80152F84 0014FEE4 83 E1 00 0C */ lwz r31, 0xc(r1)
|
/* 80152F84 0014FEE4 83 E1 00 0C */ lwz r31, 0xc(r1)
|
||||||
|
@ -4542,8 +4542,8 @@ lbl_80152F1C:
|
||||||
/* 80152F8C 0014FEEC 38 21 00 10 */ addi r1, r1, 0x10
|
/* 80152F8C 0014FEEC 38 21 00 10 */ addi r1, r1, 0x10
|
||||||
/* 80152F90 0014FEF0 4E 80 00 20 */ blr
|
/* 80152F90 0014FEF0 4E 80 00 20 */ blr
|
||||||
|
|
||||||
.global sub_80152f94
|
.global "resize__Q24rstl36vector<f,Q24rstl17rmemory_allocator>FiRCf"
|
||||||
sub_80152f94:
|
"resize__Q24rstl36vector<f,Q24rstl17rmemory_allocator>FiRCf":
|
||||||
/* 80152F94 0014FEF4 94 21 FF D0 */ stwu r1, -0x30(r1)
|
/* 80152F94 0014FEF4 94 21 FF D0 */ stwu r1, -0x30(r1)
|
||||||
/* 80152F98 0014FEF8 7C 08 02 A6 */ mflr r0
|
/* 80152F98 0014FEF8 7C 08 02 A6 */ mflr r0
|
||||||
/* 80152F9C 0014FEFC 90 01 00 34 */ stw r0, 0x34(r1)
|
/* 80152F9C 0014FEFC 90 01 00 34 */ stw r0, 0x34(r1)
|
||||||
|
|
|
@ -119,14 +119,6 @@ public:
|
||||||
bool IsGeneratingObject() const { return xf94_26_generatingObject; }
|
bool IsGeneratingObject() const { return xf94_26_generatingObject; }
|
||||||
void SetIsGeneratingObject(bool gen) { xf94_26_generatingObject = gen; }
|
void SetIsGeneratingObject(bool gen) { xf94_26_generatingObject = gen; }
|
||||||
|
|
||||||
inline TUniqueId GenerateObjectInline(TEditorId eid) {
|
|
||||||
bool wasGeneratingObject = IsGeneratingObject();
|
|
||||||
SetIsGeneratingObject(true);
|
|
||||||
TUniqueId objUid = GenerateObject(eid).second;
|
|
||||||
SetIsGeneratingObject(wasGeneratingObject);
|
|
||||||
return objUid;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ApplyDamageToWorld(TUniqueId, const CActor&, const CVector3f&, const CDamageInfo& info,
|
void ApplyDamageToWorld(TUniqueId, const CActor&, const CVector3f&, const CDamageInfo& info,
|
||||||
CMaterialFilter&);
|
CMaterialFilter&);
|
||||||
bool ApplyDamage(TUniqueId damagerId, TUniqueId damageeId, TUniqueId radiusSender,
|
bool ApplyDamage(TUniqueId damagerId, TUniqueId damageeId, TUniqueId radiusSender,
|
||||||
|
|
|
@ -9,11 +9,10 @@
|
||||||
#include "Kyoto/Math/CAABox.hpp"
|
#include "Kyoto/Math/CAABox.hpp"
|
||||||
#include "Kyoto/Math/CTransform4f.hpp"
|
#include "Kyoto/Math/CTransform4f.hpp"
|
||||||
#include "Kyoto/Math/CVector3f.hpp"
|
#include "Kyoto/Math/CVector3f.hpp"
|
||||||
#include "Kyoto/TReservedAverage.hpp"
|
#include "Kyoto/TAverage.hpp"
|
||||||
|
|
||||||
#include "MetroidPrime/Player/CPlayerState.hpp"
|
#include "MetroidPrime/Player/CPlayerState.hpp"
|
||||||
|
|
||||||
|
|
||||||
class CScriptSpecialFunction : public CActor {
|
class CScriptSpecialFunction : public CActor {
|
||||||
public:
|
public:
|
||||||
enum ESpecialFunction {
|
enum ESpecialFunction {
|
||||||
|
@ -90,8 +89,7 @@ private:
|
||||||
CSfxHandle x178_sfxHandle;
|
CSfxHandle x178_sfxHandle;
|
||||||
u32 x17c_;
|
u32 x17c_;
|
||||||
float x180_;
|
float x180_;
|
||||||
TReservedAverage<uchar, 6> x184_; // metaforce has this as TReservedAverage<float, 6>, but volume is uchar here
|
TAverage< f32 > x184_;
|
||||||
u8 x190_pad[4]; // type change in x184_ fixes it being too big, but then it becomes 4 bytes too small
|
|
||||||
float x194_;
|
float x194_;
|
||||||
rstl::vector< SRingController > x198_ringControllers;
|
rstl::vector< SRingController > x198_ringControllers;
|
||||||
ERingState x1a8_ringState;
|
ERingState x1a8_ringState;
|
||||||
|
@ -114,9 +112,10 @@ private:
|
||||||
bool x1e5_26_displayBillboard : 1;
|
bool x1e5_26_displayBillboard : 1;
|
||||||
rstl::optional_object< CToken > x1e8_; // CTexture?
|
rstl::optional_object< CToken > x1e8_; // CTexture?
|
||||||
public:
|
public:
|
||||||
CScriptSpecialFunction(TUniqueId, const rstl::string&, const CEntityInfo&, const CTransform4f&, ESpecialFunction,
|
CScriptSpecialFunction(TUniqueId, const rstl::string&, const CEntityInfo&, const CTransform4f&,
|
||||||
const rstl::string&, float, float, float, float, const CVector3f&, const CColor&,
|
ESpecialFunction, const rstl::string&, float, float, float, float,
|
||||||
bool, const CDamageInfo&, s32, s32, CPlayerState::EItemType, s16, s16, s16);
|
const CVector3f&, const CColor&, bool, const CDamageInfo&, s32, s32,
|
||||||
|
CPlayerState::EItemType, u16, u16, u16);
|
||||||
|
|
||||||
void Accept(IVisitor& visitor) override;
|
void Accept(IVisitor& visitor) override;
|
||||||
void Think(float, CStateManager&) override;
|
void Think(float, CStateManager&) override;
|
||||||
|
|
|
@ -38,15 +38,22 @@ public:
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
const_pointer_iterator operator+(int v) const {
|
const_pointer_iterator operator+(int v) const {
|
||||||
return const_pointer_iterator(this->current + v);
|
const_pointer_iterator it = *this;
|
||||||
|
return it += v;
|
||||||
}
|
}
|
||||||
const_pointer_iterator operator-(int v) const {
|
const_pointer_iterator operator-(int v) const {
|
||||||
return const_pointer_iterator(this->current - v);
|
const_pointer_iterator it = *this;
|
||||||
|
return it -= v;
|
||||||
}
|
}
|
||||||
|
int operator-(const const_pointer_iterator& other) const { return this->current - other.current; }
|
||||||
const T& operator*() const { return *current; }
|
const T& operator*() const { return *current; }
|
||||||
const T* operator->() const { return current; }
|
const T* operator->() const { return current; }
|
||||||
bool operator==(const const_pointer_iterator& other) { return current == other.current; }
|
bool operator==(const const_pointer_iterator& other) { return current == other.current; }
|
||||||
bool operator!=(const const_pointer_iterator& other) { return current != other.current; }
|
bool operator!=(const const_pointer_iterator& other) { return current != other.current; }
|
||||||
|
bool operator<(const const_pointer_iterator& other) { return current < other.current; }
|
||||||
|
bool operator>(const const_pointer_iterator& other) { return current > other.current; }
|
||||||
|
bool operator<=(const const_pointer_iterator& other) { return current <= other.current; }
|
||||||
|
bool operator>=(const const_pointer_iterator& other) { return current >= other.current; }
|
||||||
|
|
||||||
// friend const_pointer_iterator operator+(const const_pointer_iterator& x, int v) {
|
// friend const_pointer_iterator operator+(const const_pointer_iterator& x, int v) {
|
||||||
// return const_pointer_iterator(x.current + v);
|
// return const_pointer_iterator(x.current + v);
|
||||||
|
@ -86,8 +93,14 @@ public:
|
||||||
this->current -= v;
|
this->current -= v;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
pointer_iterator operator+(int v) const { return pointer_iterator(this->current + v); }
|
pointer_iterator operator+(int v) const {
|
||||||
pointer_iterator operator-(int v) const { return pointer_iterator(this->current - v); }
|
pointer_iterator it = *this;
|
||||||
|
return it += v;
|
||||||
|
}
|
||||||
|
pointer_iterator operator-(int v) const {
|
||||||
|
pointer_iterator it = *this;
|
||||||
|
return it -= v;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
} // namespace rstl
|
} // namespace rstl
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ public:
|
||||||
inline const_iterator end() const { return const_iterator(data() + x0_count); }
|
inline const_iterator end() const { return const_iterator(data() + x0_count); }
|
||||||
|
|
||||||
reserved_vector() : x0_count(0) {}
|
reserved_vector() : x0_count(0) {}
|
||||||
reserved_vector(const T& value) : x0_count(N) { rstl::uninitialized_fill_n(data(), N, value); }
|
// reserved_vector(const T& value) : x0_count(N) { rstl::uninitialized_fill_n(data(), N, value); }
|
||||||
reserved_vector(const reserved_vector& other) {
|
reserved_vector(const reserved_vector& other) {
|
||||||
x0_count = other.size();
|
x0_count = other.size();
|
||||||
// rstl::uninitialized_copy_n(other.data(), size(), data());
|
// rstl::uninitialized_copy_n(other.data(), size(), data());
|
||||||
|
|
|
@ -70,6 +70,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void reserve(int size);
|
void reserve(int size);
|
||||||
|
void resize(int size, const T& in);
|
||||||
iterator erase(iterator it);
|
iterator erase(iterator it);
|
||||||
|
|
||||||
void push_back(const T& in) {
|
void push_back(const T& in) {
|
||||||
|
@ -118,6 +119,19 @@ public:
|
||||||
inline const T& operator[](int idx) const { return xc_items[idx]; }
|
inline const T& operator[](int idx) const { return xc_items[idx]; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template < typename T, typename Alloc >
|
||||||
|
void vector< T, Alloc >::resize(int size, const T& in) {
|
||||||
|
if (x4_count != size) {
|
||||||
|
if (size > x4_count) {
|
||||||
|
reserve(size);
|
||||||
|
uninitialized_fill_n(xc_items + x4_count, size - x4_count, in);
|
||||||
|
} else {
|
||||||
|
destroy(begin() + size, end());
|
||||||
|
}
|
||||||
|
x4_count = size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
template < typename T, typename Alloc >
|
template < typename T, typename Alloc >
|
||||||
void vector< T, Alloc >::reserve(int size) {
|
void vector< T, Alloc >::reserve(int size) {
|
||||||
if (size <= x8_capacity)
|
if (size <= x8_capacity)
|
||||||
|
|
|
@ -24,7 +24,7 @@ CScriptSpecialFunction::CScriptSpecialFunction(
|
||||||
TUniqueId uid, const rstl::string& name, const CEntityInfo& info, const CTransform4f& xf,
|
TUniqueId uid, const rstl::string& name, const CEntityInfo& info, const CTransform4f& xf,
|
||||||
ESpecialFunction func, const rstl::string& lcName, float f1, float f2, float f3, float f4,
|
ESpecialFunction func, const rstl::string& lcName, float f1, float f2, float f3, float f4,
|
||||||
const CVector3f& vec, const CColor& col, bool active, const CDamageInfo& dInfo, s32 aId1,
|
const CVector3f& vec, const CColor& col, bool active, const CDamageInfo& dInfo, s32 aId1,
|
||||||
s32 aId2, CPlayerState::EItemType itemType, s16 sId1, s16 sId2, s16 sId3)
|
s32 aId2, CPlayerState::EItemType itemType, u16 sId1, u16 sId2, u16 sId3)
|
||||||
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(),
|
: CActor(uid, active, name, info, xf, CModelData::CModelDataNull(), CMaterialList(),
|
||||||
CActorParameters::None(), kInvalidUniqueId)
|
CActorParameters::None(), kInvalidUniqueId)
|
||||||
, xe8_function(func)
|
, xe8_function(func)
|
||||||
|
@ -37,14 +37,31 @@ CScriptSpecialFunction::CScriptSpecialFunction(
|
||||||
, x118_color(col)
|
, x118_color(col)
|
||||||
, x11c_damageInfo(dInfo)
|
, x11c_damageInfo(dInfo)
|
||||||
, x13c_spinnerInitialXf(CTransform4f::Identity())
|
, x13c_spinnerInitialXf(CTransform4f::Identity())
|
||||||
|
, x138_(0.f)
|
||||||
|
, x16c_(0.f)
|
||||||
, x170_sfx1(CSfxManager::TranslateSFXID(sId1))
|
, x170_sfx1(CSfxManager::TranslateSFXID(sId1))
|
||||||
, x172_sfx2(CSfxManager::TranslateSFXID(sId2))
|
, x172_sfx2(CSfxManager::TranslateSFXID(sId2))
|
||||||
, x174_sfx3(CSfxManager::TranslateSFXID(sId3))
|
, x174_sfx3(CSfxManager::TranslateSFXID(sId3))
|
||||||
, x184_(0.f)
|
, x180_(0.f)
|
||||||
|
, x184_(6, 0.f)
|
||||||
|
, x194_(0.f)
|
||||||
|
, x1a8_ringState(kRS_Stopped)
|
||||||
, x1ac_ringRotateTarget(CVector3f::Zero())
|
, x1ac_ringRotateTarget(CVector3f::Zero())
|
||||||
|
, x1b8_ringReverse(true)
|
||||||
, x1bc_areaSaveId(aId1)
|
, x1bc_areaSaveId(aId1)
|
||||||
, x1c0_layerIdx(aId2)
|
, x1c0_layerIdx(aId2)
|
||||||
, x1c4_item(itemType) {
|
, x1c4_item(itemType)
|
||||||
|
, x1e4_24_spinnerInitializedXf(false)
|
||||||
|
, x1e4_25_spinnerCanMove(false)
|
||||||
|
, x1e4_26_sfx2Played(true)
|
||||||
|
, x1e4_27_sfx3Played(false)
|
||||||
|
// , x1e4_28_frustumEntered(false)
|
||||||
|
// , x1e4_29_frustumExited(false)
|
||||||
|
// , x1e4_30_(false)
|
||||||
|
, x1e4_31_inAreaDamage(false)
|
||||||
|
, x1e5_24_doSave(false)
|
||||||
|
, x1e5_25_playerInArea(false)
|
||||||
|
, x1e5_26_displayBillboard(false) {
|
||||||
if (xe8_function == kSF_HUDTarget) {
|
if (xe8_function == kSF_HUDTarget) {
|
||||||
x1c8_touchBounds = CAABox(CVector3f(-1.f, -1.f, -1.f), CVector3f(1.f, 1.f, 1.f));
|
x1c8_touchBounds = CAABox(CVector3f(-1.f, -1.f, -1.f), CVector3f(1.f, 1.f, 1.f));
|
||||||
}
|
}
|
||||||
|
@ -361,7 +378,8 @@ void CScriptSpecialFunction::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId
|
||||||
if (aId != kInvalidAreaId) {
|
if (aId != kInvalidAreaId) {
|
||||||
// worldLayerState = mgr.WorldLayerState();
|
// worldLayerState = mgr.WorldLayerState();
|
||||||
} else {
|
} else {
|
||||||
const rstl::pair<CAssetId, TAreaId> worldAreaPair = gpMemoryCard->GetAreaAndWorldIdForSaveId(x1bc_areaSaveId);
|
const rstl::pair< CAssetId, TAreaId > worldAreaPair =
|
||||||
|
gpMemoryCard->GetAreaAndWorldIdForSaveId(x1bc_areaSaveId);
|
||||||
|
|
||||||
if (worldAreaPair.first != kInvalidAssetId) {
|
if (worldAreaPair.first != kInvalidAssetId) {
|
||||||
// worldLayerState = gpGameState->StateForWorld(worldAreaPair.first).GetLayerState();
|
// worldLayerState = gpGameState->StateForWorld(worldAreaPair.first).GetLayerState();
|
||||||
|
|
Loading…
Reference in New Issue