mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-09 14:05:28 -04:00
+5
-5
@@ -165,11 +165,11 @@ if args.no_asm:
|
||||
|
||||
# Tool versions
|
||||
config.binutils_tag = "2.42-1"
|
||||
config.compilers_tag = "20250812"
|
||||
config.dtk_tag = "v1.7.1"
|
||||
config.objdiff_tag = "v3.4.1"
|
||||
config.compilers_tag = "20251118"
|
||||
config.dtk_tag = "v1.7.6"
|
||||
config.objdiff_tag = "v3.5.1"
|
||||
config.sjiswrap_tag = "v1.2.2"
|
||||
config.wibo_tag = "1.0.0-beta.5"
|
||||
config.wibo_tag = "1.0.0"
|
||||
|
||||
# Project
|
||||
config.config_path = Path("config") / config.version / "config.yml"
|
||||
@@ -1788,7 +1788,7 @@ config.libs = [
|
||||
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_tori_flag"),
|
||||
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_wall"),
|
||||
ActorRel(Matching, "d_a_warpfout"),
|
||||
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_warpgn"),
|
||||
ActorRel(Matching, "d_a_warpgn"),
|
||||
ActorRel(NonMatching, "d_a_warpls"),
|
||||
ActorRel(NonMatching, "d_a_warpmj"),
|
||||
ActorRel(NonMatching, "d_a_waterfall"),
|
||||
|
||||
+17
-11
@@ -592,18 +592,12 @@ If done correctly, the scratch should compile and show the same issue as you wer
|
||||
|
||||
Note that scratches only show functions, not data. So if all the functions match 100% but some data doesn't, you'll have to figure that out locally using objdiff.
|
||||
|
||||
### Missing weak data
|
||||
### Extra weak data/functions
|
||||
|
||||
Many actors TUs in TWW have unused data included into them, usually in the .bss or .data sections. This data won't be referenced by any of the functions, but it's still necessary to include it in order for the TU to match.
|
||||
You might notice that you have some extra data on the right side with names like `@1234` and `std::sqrtf(float)::_three`, or extra weak functions like destructors.
|
||||
|
||||
You can tell if this is the case for the TU you're working on by looking at the symbol list in objdiff. If one of the data sections has a bunch of symbols on the left side but not on the right side, and they have names like `@1036`, they may be missing weak data.
|
||||
|
||||
The exact cause of these aren't fully understood yet, but we have headers you can include that should match these symbols. Copy either the .bss include or the .data include below, or both, depending on which section(s) in your TU the missing symbols are in:
|
||||
|
||||
```cpp
|
||||
#include "weak_bss_936_to_1036.h" // IWYU pragma: keep
|
||||
#include "weak_data_1811.h" // IWYU pragma: keep
|
||||
```
|
||||
This is normal. They're from a header that gets included in every TU. The linker will strip them out if they're unused, so they shouldn't cause any problems.
|
||||
The important thing is for all sections on the left side to show 100%, so you can safely ignore extra symbols on the right side in most cases.
|
||||
|
||||
### Diffing data values with objdiff
|
||||
|
||||
@@ -677,7 +671,19 @@ Even if all functions match 100%, it's possible for the TU to not match if the c
|
||||
|
||||

|
||||
|
||||
This issue is called **weak function ordering**, and it's so common, and has so many different possible causes, that it gets its [own entire guide](weak_func_order.md).
|
||||
This issue is called **weak function ordering**. It has a large number of possible causes, but we're only going to go over the most common ones.
|
||||
|
||||
The most common cause of weak function ordering is when a function is defined in the wrong file - for example, you might need to move a class definition from the header to the .cpp file or vice versa in order to get the inlines defined in that class body in the right order.
|
||||
|
||||
Another possible cause is explicit vs implicit definition of a class's empty destructor. If you explicitly define `~SomeClass() {}`, that can cause the destructor to be placed in a different order compared to letting the compiler generate it automatically.
|
||||
|
||||
If neither of those fix it, I recommend marking the TU as `Equivalent` in [configure.py](../configure.py) and adding a comment about the weak function order, e.g.:
|
||||
|
||||
```py
|
||||
ActorRel(Equivalent, "d_a_pirate_flag"), # weak func order
|
||||
```
|
||||
|
||||
Then you can just submit a pull request as-is instead of worrying about it any more. The build system won't be able to automatically verify that the TU is accurately decompiled, but it will still contribute to the project's overall percent completion and be useful for anyone interested in understanding the code of the actor you just decompiled or modding the actor, as weak function order has no effect on the functionality of the code.
|
||||
|
||||
## Documentation and naming
|
||||
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
# Fixing weak function ordering
|
||||
|
||||
If everything symbol in a TU is 100% matched, but the order of weak functions (ones with `[gw]` in objdiff) is different on the left and the right, then the TU is functionally equivalent, but it won't actually match when linked.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Compiler flags](#compiler-flags)
|
||||
2. [Factors affecting weak function order within a .text section](#factors-affecting-weak-function-order-within-a-text-section)
|
||||
3. [Factors affecting the number of .text sections](#factors-affecting-the-number-of-text-sections)
|
||||
|
||||
## Compiler flags
|
||||
|
||||
The most common cause of weak functions being ordered incorrectly is simply the compiler flags. The following compiler flags are currently known to affect it:
|
||||
|
||||
* `-sym on` (the default)
|
||||
* `-sym off`
|
||||
* `-pragma "nosyminline on"`
|
||||
|
||||
If the weak function ordering is incorrect with the default (`-sym on`), you should try modifying [configure.py](../configure.py) to add different flags for the TU you're working on, like so:
|
||||
|
||||
```py
|
||||
ActorRel(Matching, "d_a_am", extra_cflags=['-pragma "nosyminline on"']),
|
||||
```
|
||||
|
||||
First try adding `-pragma "nosyminline on"`, as that fixes the weak function ordering for many actors. Try running `ninja` again to check if it matches this time. If it still doesn't match and the order is still wrong in objdiff, try using `-sym off` instead and checking again.
|
||||
|
||||
If neither of those fix it, I recommend marking the TU as `Equivalent` in [configure.py](../configure.py) and adding a comment about the weak function order, e.g.:
|
||||
|
||||
```py
|
||||
ActorRel(Equivalent, "d_a_pirate_flag"), # weak func order
|
||||
```
|
||||
|
||||
Then you can just submit a pull request as-is instead of worrying about it any more. The build system won't be able to automatically verify that the TU is accurately decompiled, but it will still contribute to the project's overall percent completion and be useful for anyone interested in understanding the code of the actor you just decompiled or modding the actor, as weak function order has no effect on the functionality of the code.
|
||||
|
||||
**You can stop reading here if you're new to decompilation and working on learning the basics.** The rest of this document will go into more advanced details about weak function ordering, but all of the exact specifics are not fully understood by anyone yet.
|
||||
|
||||
### Explanation of compiler flags
|
||||
|
||||
`-sym on` is a flag that enables debugging information, such as line numbers (you can see these line numbers in objdiff, to the left of the assembly instructions).
|
||||
Due to a strange quirk of the compiler, this flag has the side effect of causing functions to be split up into multiple .text sections, one for each unique filename that a function is defined in. So functions defined in the .cpp file would go in the first .text section, functions defined in one header file would get their own separate .text section, functions defined in a different header file would go in a third .text section, etc.
|
||||
|
||||
`-sym off` disables that debugging information, removing line numbers.
|
||||
This also disables the multiple .text sections side effect - all functions will go in a single section instead.
|
||||
|
||||
When `-sym on` is enabled, using the `-pragma "nosyminline on"` flag too will cause inline functions to have their debugging information disabled, while normal functions will still have debugging information.
|
||||
This has an unpredictable effect on the number of .text sections in the file. Some of the weak functions defined in headers will be merged into the main .text section for the .cpp file, while others will be merged into a different .text section that's for a different header, others will not be merged at all, etc. It's not currently understood how this is determined.
|
||||
|
||||
## Factors affecting weak function order within a .text section
|
||||
|
||||
If one of those three compiler flags result in the .text sections being split up correctly, but there are still weak functions out of order compared to other functions in the same section, there are a number of known factors that can affect this.
|
||||
|
||||
### Defining template virtual weak functions inside vs outside a class body
|
||||
|
||||
For template classes, sometimes defining virtual weak functions within the class body like this:
|
||||
|
||||
```cpp
|
||||
template<typename T>
|
||||
class JPACallBackBase {
|
||||
public:
|
||||
JPACallBackBase() {}
|
||||
virtual ~JPACallBackBase() {}
|
||||
|
||||
virtual void init(T) {}
|
||||
virtual void execute(T) {}
|
||||
virtual void executeAfter(T) {}
|
||||
virtual void draw(T) {}
|
||||
}; // Size: 0x04
|
||||
```
|
||||
|
||||
Will result in those functions being put out of order. These can be fixed by moving the definitions to after the class body (but still in the header), and marking the declarations as `inline` within the class body:
|
||||
|
||||
```cpp
|
||||
template<typename T>
|
||||
class JPACallBackBase {
|
||||
public:
|
||||
JPACallBackBase() {}
|
||||
virtual ~JPACallBackBase() {}
|
||||
|
||||
inline virtual void init(T);
|
||||
inline virtual void execute(T);
|
||||
inline virtual void executeAfter(T);
|
||||
inline virtual void draw(T);
|
||||
}; // Size: 0x04
|
||||
|
||||
template<>
|
||||
void JPACallBackBase<JPABaseEmitter*>::init(JPABaseEmitter*) {}
|
||||
template<>
|
||||
void JPACallBackBase<JPABaseEmitter*>::execute(JPABaseEmitter*) {}
|
||||
template<>
|
||||
void JPACallBackBase<JPABaseEmitter*>::executeAfter(JPABaseEmitter*) {}
|
||||
template<>
|
||||
void JPACallBackBase<JPABaseEmitter*>::draw(JPABaseEmitter*) {}
|
||||
```
|
||||
|
||||
### TODO HeartPiece's list
|
||||
|
||||
* [ ] pure virtual base class
|
||||
* [ ] pure virtual declarations in classes inheriting from a pure virtual base class (i.e. re-declaring something pure virtual)
|
||||
* [ ] implicit vs explicit definitions of special virtual functions (such as dtors)
|
||||
* [ ] ordering of virtual weak function declaration in inheriting classes after their order is defined in a base class
|
||||
* [ ] ordering of virtual function declaration in "higher" (more base) classes when the virtuals are weak in an inheriting class
|
||||
* [x] definition within or external to a class within a given header for template virtuals (and template weak functions in general, do not have to be virtual)
|
||||
* [ ] order of declaration of weak AND virtual weak functions in template class definitions (interweaving non-virtual weak function definitions between virtual function definitions affects ordering)
|
||||
* [ ] calling of inlines within weak virtual template function definitions (calling inlines, even if they don't get generated as actual functions, affects where stuff spits out, such as "invisible" getters and setters)
|
||||
* [ ] stripped functions calling virtual functions within files
|
||||
* [ ] ordering of NON-weak functions within virtual tables (previously ordered by declaration in base classes) causing vtable spawn ordering adjustments (i.e. hitting the "key" method for a vtable before or after a "key" method for another table)
|
||||
* [ ] calling a virtual function from an inheriting class vs a base class on the same object
|
||||
|
||||
## Factors affecting the number of .text sections
|
||||
|
||||
If none of the three sym compiler flags mentioned above result in the .text sections being split up correctly, then there are a few known factors that can influence this splitting, but for the most part this is still an unsolved problem.
|
||||
|
||||
We have a list of decompiled actors that cannot be linked due to this issue [here on GitHub](https://github.com/zeldaret/tww/issues?q=is%3Aissue%20state%3Aopen%20label%3Aweakfunc-order).
|
||||
|
||||
### TODO
|
||||
|
||||
* constructor defined in header vs cpp
|
||||
* explicit vs implicit definition of virtual weak destructor in child class (e.g. `virtual ~dCcD_Cyl() {}`) (only has an effect WITHOUT nosyminline) (also applies to non-virtual destructors if the class has other virtual functions?)
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
struct J3DGXColorS10 {
|
||||
J3DGXColorS10() {}
|
||||
J3DGXColorS10(const GXColorS10& other) { mColor = other; }
|
||||
J3DGXColorS10(const J3DGXColorS10& other) { mColor = other.mColor; }
|
||||
J3DGXColorS10(GXColorS10& other) { mColor = other; }
|
||||
J3DGXColorS10(J3DGXColorS10& other) { mColor = other.mColor; }
|
||||
J3DGXColorS10& operator=(const J3DGXColorS10& other) {
|
||||
mColor = other.mColor;
|
||||
return *this;
|
||||
@@ -25,8 +25,8 @@ struct J3DGXColorS10 {
|
||||
|
||||
struct J3DGXColor {
|
||||
J3DGXColor() {}
|
||||
J3DGXColor(const GXColor& other) { mColor = other; }
|
||||
J3DGXColor(const J3DGXColor& other) { mColor = other.mColor; }
|
||||
J3DGXColor(GXColor& other) { mColor = other; }
|
||||
J3DGXColor(J3DGXColor& other) { mColor = other.mColor; }
|
||||
J3DGXColor& operator=(const J3DGXColor& other) {
|
||||
mColor = other.mColor;
|
||||
return *this;
|
||||
@@ -625,8 +625,6 @@ struct J3DBlend : public J3DBlendInfo {
|
||||
// void operator==(J3DBlend&) {}
|
||||
};
|
||||
|
||||
extern const J3DFogInfo j3dDefaultFogInfo;
|
||||
|
||||
struct J3DFog : public J3DFogInfo {
|
||||
// J3DFog() { *getFogInfo() = j3dDefaultFogInfo; } // Produces the wrong codegen for mDoExt_backupMatBlock_c's constructor
|
||||
J3DFog() { J3DFogInfo::operator=(j3dDefaultFogInfo); }
|
||||
@@ -641,17 +639,6 @@ struct J3DFog : public J3DFogInfo {
|
||||
void setType(u8 type) { mType = type; }
|
||||
};
|
||||
|
||||
struct J3DAlphaCompInfo {
|
||||
/* 0x0 */ u8 mComp0;
|
||||
/* 0x1 */ u8 mRef0;
|
||||
/* 0x2 */ u8 mOp;
|
||||
/* 0x3 */ u8 mComp1;
|
||||
/* 0x4 */ u8 mRef1;
|
||||
/* 0x5 */ u8 field_0x5;
|
||||
/* 0x6 */ u8 field_0x6;
|
||||
/* 0x7 */ u8 field_0x7;
|
||||
};
|
||||
|
||||
inline u16 calcAlphaCmpID(u8 comp0, u8 op, u8 comp1) {
|
||||
return (comp0 << 5) + (op << 3) + (comp1);
|
||||
}
|
||||
|
||||
@@ -240,4 +240,15 @@ struct J3DZModeInfo {
|
||||
/* 0x03 */ u8 pad;
|
||||
};
|
||||
|
||||
struct J3DAlphaCompInfo {
|
||||
/* 0x0 */ u8 mComp0;
|
||||
/* 0x1 */ u8 mRef0;
|
||||
/* 0x2 */ u8 mOp;
|
||||
/* 0x3 */ u8 mComp1;
|
||||
/* 0x4 */ u8 mRef1;
|
||||
/* 0x5 */ u8 field_0x5;
|
||||
/* 0x6 */ u8 field_0x6;
|
||||
/* 0x7 */ u8 field_0x7;
|
||||
};
|
||||
|
||||
#endif /* J3DSTRUCT_H */
|
||||
|
||||
@@ -369,9 +369,12 @@ template<> struct TBox<TVec2<f32> > {
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct TBox2 : TBox<TVec2<T> > {
|
||||
struct TBox2 : public TBox<TVec2<T> > {
|
||||
TBox2() {}
|
||||
TBox2(const TVec2<f32>& i, const TVec2<f32> f) { set(i, f); }
|
||||
TBox2(const TVec2<f32>& _i, const TVec2<f32>& _f) {
|
||||
TBox<TVec2<T> >::i.set(_i);
|
||||
TBox<TVec2<T> >::f.set(_f);
|
||||
}
|
||||
TBox2(f32 x0, f32 y0, f32 x1, f32 y1) { set(x0, y0, x1, y1); }
|
||||
|
||||
void absolute() {
|
||||
|
||||
@@ -10,11 +10,8 @@
|
||||
class JKRHeap;
|
||||
class JPABaseEmitter;
|
||||
class JPABaseParticle;
|
||||
class JPAEmitterCallBack;
|
||||
class JPAEmitterManager;
|
||||
class JPAParticleCallBack;
|
||||
class JPAResourceManager;
|
||||
struct JPAEmitterWorkData;
|
||||
|
||||
template<typename T>
|
||||
class JPACallBackBase;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef JSYSTEM_H
|
||||
#define JSYSTEM_H
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#if defined(__MWERKS__) && !defined(DECOMPCTX)
|
||||
#include "JSystem/JSystem.mch" // IWYU pragma: export
|
||||
#else
|
||||
#include "JSystem/JSystem.pch" // IWYU pragma: export
|
||||
|
||||
@@ -51,9 +51,6 @@ public:
|
||||
bool operator<(const cSAngle& other) const { return mAngle < other.mAngle; }
|
||||
bool operator>(const cSAngle& other) const { return mAngle > other.mAngle; }
|
||||
operator s16() const { return mAngle; }
|
||||
#ifdef __MWERKS__
|
||||
void operator=(const cSAngle& other) { mAngle = other.mAngle; }
|
||||
#endif
|
||||
static inline cSAngle getMaxNegative() { return cSAngle((s16)-0x8000); }
|
||||
inline void mirrorAtMaxNeg() { *this = cSAngle((s16)-0x8000) - *this; }
|
||||
};
|
||||
|
||||
@@ -7,8 +7,7 @@ class csXyz : public SVec {
|
||||
public:
|
||||
static const csXyz Zero;
|
||||
~csXyz() {}
|
||||
/* inline */ csXyz() {}
|
||||
/* inline */ csXyz(const csXyz& other) : SVec(other){};
|
||||
csXyz() {}
|
||||
csXyz(s16, s16, s16);
|
||||
csXyz operator+(csXyz&);
|
||||
void operator+=(csXyz&);
|
||||
|
||||
@@ -10,6 +10,11 @@ public:
|
||||
cPhs_State CreateInit();
|
||||
void checkTalk();
|
||||
|
||||
inline cPhs_State _create();
|
||||
inline BOOL _delete();
|
||||
inline BOOL _draw();
|
||||
inline BOOL _execute();
|
||||
|
||||
static const char m_arcname[];
|
||||
|
||||
public:
|
||||
|
||||
@@ -198,8 +198,7 @@ namespace daObjMovebox {
|
||||
|
||||
void prmZ_init();
|
||||
void prmX_init();
|
||||
const Attr_c* attr() const; // TODO weak?
|
||||
inline const Attr_c* i_attr() const { return &M_attr[mType]; } // TODO weak?
|
||||
inline const Attr_c* attr() const;
|
||||
void set_mtx();
|
||||
void init_mtx();
|
||||
void path_init();
|
||||
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
daPyFlg1_SHIP_TACT = 0x00001000,
|
||||
daPyFlg1_USE_ARROW_EFFECT = 0x00002000,
|
||||
daPyFlg1_LETTER_READ_EYE_MOVE = 0x00004000,
|
||||
daPyFlg1_UNK8000 = 0x00008000,
|
||||
daPyFlg1_SOUP_POWER_UP = 0x00008000,
|
||||
daPyFlg1_FORCE_VOMIT_JUMP_SHORT = 0x00010000,
|
||||
daPyFlg1_FOREST_WATER_USE = 0x00020000,
|
||||
daPyFlg1_UNK40000 = 0x00040000,
|
||||
@@ -217,10 +217,10 @@ public:
|
||||
daPyRFlg0_AUTO_JUMP_LAND = 0x00000040,
|
||||
daPyRFlg0_UNK80 = 0x00000080,
|
||||
daPyRFlg0_UNK100 = 0x00000100,
|
||||
daPyRFlg0_UNK200 = 0x00000200,
|
||||
daPyRFlg0_ROPE_JUMP_LAND = 0x00000200,
|
||||
daPyRFlg0_RIGHT_FOOT_ON_GROUND = 0x00000400,
|
||||
daPyRFlg0_LEFT_FOOT_ON_GROUND = 0x00000800,
|
||||
daPyRFlg0_UNK1000 = 0x00001000,
|
||||
daPyRFlg0_CRAWL_AUTO_MOVE = 0x00001000,
|
||||
daPyRFlg0_FRONT_ROLL_CRASH = 0x00002000,
|
||||
daPyRFlg0_UNK4000 = 0x00004000,
|
||||
daPyRFlg0_GRAB_UP_START = 0x00008000,
|
||||
@@ -234,14 +234,11 @@ public:
|
||||
daPyRFlg0_UNK800000 = 0x00800000,
|
||||
daPyRFlg0_TACT_INPUT = 0x01000000,
|
||||
daPyRFlg0_FAIRY_USE = 0x02000000,
|
||||
daPyRFlg0_UNK4000000 = 0x04000000,
|
||||
daPyRFlg0_SUBJECT_ACCEPT = 0x04000000,
|
||||
daPyRFlg0_UNK8000000 = 0x08000000,
|
||||
daPyRFlg0_UNK10000000 = 0x10000000,
|
||||
daPyRFlg0_ARROW_SHOOT = 0x20000000,
|
||||
daPyRFlg0_UNK40000000 = 0x40000000,
|
||||
// 0x00000001 and 0x00000002 set in daPy_lk_c::dProcLastCombo
|
||||
// 0x00001000 set in daPy_lk_c::procCrawlMove_init, checked in checkNoCollisionCorret__9daPy_lk_cFv
|
||||
// 0x04000000 set in daPy_lk_c::procShipPaddle
|
||||
daPyRFlg0_ROPE_FORCE_END = 0x40000000,
|
||||
};
|
||||
|
||||
enum daPy_FACE {
|
||||
@@ -510,6 +507,7 @@ public:
|
||||
void onUseArrowEffect() { onNoResetFlg1(daPyFlg1_USE_ARROW_EFFECT); }
|
||||
void offUseArrowEffect() { offNoResetFlg1(daPyFlg1_USE_ARROW_EFFECT); }
|
||||
void onLetterReadEyeMove() { onNoResetFlg1(daPyFlg1_LETTER_READ_EYE_MOVE); }
|
||||
u32 checkSoupPowerUp() const { return checkNoResetFlg1(daPyFlg1_SOUP_POWER_UP); }
|
||||
void onForceVomitJumpShort() { onNoResetFlg1(daPyFlg1_FORCE_VOMIT_JUMP_SHORT); }
|
||||
u32 checkForestWaterUse() const { return checkNoResetFlg1(daPyFlg1_FOREST_WATER_USE); }
|
||||
void onWaterDrop() { onNoResetFlg1(daPyFlg1_WATER_DROP); }
|
||||
@@ -522,6 +520,7 @@ public:
|
||||
u32 getRopeGrabRightHand() const { return checkResetFlg0(daPyRFlg0_ROPE_GRAB_RIGHT_HAND); }
|
||||
u32 getGrabUpEnd() const { return checkResetFlg0(daPyRFlg0_GRAB_UP_END); }
|
||||
u32 getAutoJumpLand() const { return checkResetFlg0(daPyRFlg0_AUTO_JUMP_LAND); }
|
||||
u32 getRopeJumpLand() const { return checkResetFlg0(daPyRFlg0_ROPE_JUMP_LAND); }
|
||||
u32 getRightFootOnGround() const { return checkResetFlg0(daPyRFlg0_RIGHT_FOOT_ON_GROUND); }
|
||||
u32 getLeftFootOnGround() const { return checkResetFlg0(daPyRFlg0_LEFT_FOOT_ON_GROUND); }
|
||||
u32 getFootOnGround() const { return getRightFootOnGround() || getLeftFootOnGround(); }
|
||||
@@ -533,7 +532,9 @@ public:
|
||||
u32 getGrabPutStart() const { return checkResetFlg0(daPyRFlg0_GRAB_PUT_START); }
|
||||
u32 checkFairyUse() const { return checkResetFlg0(daPyRFlg0_FAIRY_USE); }
|
||||
u32 checkTactInput() const { return checkResetFlg0(daPyRFlg0_TACT_INPUT); }
|
||||
u32 checkSubjectAccept() const { return checkResetFlg0(daPyRFlg0_SUBJECT_ACCEPT); }
|
||||
u32 checkArrowShoot() const { return checkResetFlg0(daPyRFlg0_ARROW_SHOOT); }
|
||||
u32 checkRopeForceEnd() const { return checkResetFlg0(daPyRFlg0_ROPE_FORCE_END); }
|
||||
|
||||
BOOL checkGrabWear() const { return field_0x2b0 < 0.0f; }
|
||||
BOOL checkNormalSwordEquip() const {
|
||||
@@ -552,10 +553,6 @@ public:
|
||||
|
||||
BOOL checkSwordMiniGame() const { return dComIfGp_getMiniGameType() == 2; }
|
||||
BOOL checkBowMiniGame() const { return mDemo.getDemoMode() == daPy_demo_c::DEMO_BOW_MINIGAME_e; }
|
||||
void checkSoupPowerUp() const {}
|
||||
void checkSubjectAccept() const {}
|
||||
u32 getRopeJumpLand() const { return checkResetFlg0(daPyRFlg0_UNK200); }
|
||||
u32 checkRopeForceEnd() const { return checkResetFlg0(daPyRFlg0_UNK40000000); }
|
||||
|
||||
virtual MtxP getLeftHandMatrix() = 0;
|
||||
virtual MtxP getRightHandMatrix() = 0;
|
||||
|
||||
@@ -488,6 +488,10 @@ public:
|
||||
inline void setHeapLockFlag(u8 flag) { mHeapLockFlag = flag; }
|
||||
inline void offHeapLockFlag() { mHeapLockFlag = 0; }
|
||||
|
||||
bool getMetronome() { return mMetronome; }
|
||||
void setMetronomeOn() { mMetronome = true; }
|
||||
void setMetronomeOff() { mMetronome = false; }
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
// These inlines aren't present in WW demo debug maps, but are present in TP debug.
|
||||
inline u8 getNowVibration() { return mNowVibration; }
|
||||
@@ -741,7 +745,7 @@ public:
|
||||
/* 0x4944 */ u8 field_0x4944;
|
||||
/* 0x4945 */ u8 mScopeType;
|
||||
/* 0x4946 */ u8 mOperateWind;
|
||||
/* 0x4947 */ u8 field_0x4947;
|
||||
/* 0x4947 */ bool mMetronome;
|
||||
/* 0x4948 */ u8 mMesgSendButton;
|
||||
/* 0x4949 */ u8 mMesgCancelButton;
|
||||
/* 0x494A */ u8 field_0x494a[6];
|
||||
@@ -3247,6 +3251,18 @@ inline u8 dComIfGp_event_getTactFreeCStick(int which) {
|
||||
return g_dComIfG_gameInfo.play.getEvent().getTactFreeCStick(which);
|
||||
}
|
||||
|
||||
inline bool dComIfGp_getMetronome() {
|
||||
return g_dComIfG_gameInfo.play.getMetronome();
|
||||
}
|
||||
|
||||
inline void dComIfGp_setMetronomeOn() {
|
||||
g_dComIfG_gameInfo.play.setMetronomeOn();
|
||||
}
|
||||
|
||||
inline void dComIfGp_setMetronomeOff() {
|
||||
g_dComIfG_gameInfo.play.setMetronomeOff();
|
||||
}
|
||||
|
||||
/**
|
||||
* === EVENT MANAGER ===
|
||||
*/
|
||||
|
||||
+37
-27
@@ -94,16 +94,13 @@ void daKmon_c::checkTalk() {
|
||||
}
|
||||
}
|
||||
|
||||
/* 000006E8-000007F8 .text daKmonCreate__FPv */
|
||||
static cPhs_State daKmonCreate(void* i_this) {
|
||||
daKmon_c* pKmon = static_cast<daKmon_c*>(i_this);
|
||||
cPhs_State daKmon_c::_create() {
|
||||
fopAcM_SetupActor(this, daKmon_c);
|
||||
|
||||
fopAcM_SetupActor(pKmon, daKmon_c);
|
||||
|
||||
cPhs_State state = dComIfG_resLoad(&pKmon->mPhase, daKmon_c::m_arcname);
|
||||
cPhs_State state = dComIfG_resLoad(&mPhase, daKmon_c::m_arcname);
|
||||
if(state == cPhs_COMPLEATE_e) {
|
||||
if(fopAcM_entrySolidHeap(pKmon, CheckCreateHeap, 0x10000)) {
|
||||
state = pKmon->CreateInit();
|
||||
if(fopAcM_entrySolidHeap(this, CheckCreateHeap, 0x10000)) {
|
||||
state = CreateInit();
|
||||
} else {
|
||||
state = cPhs_ERROR_e;
|
||||
}
|
||||
@@ -111,35 +108,48 @@ static cPhs_State daKmonCreate(void* i_this) {
|
||||
return state;
|
||||
}
|
||||
|
||||
/* 000006E8-000007F8 .text daKmonCreate__FPv */
|
||||
static cPhs_State daKmonCreate(void* i_this) {
|
||||
return ((daKmon_c*)i_this)->_create();
|
||||
}
|
||||
|
||||
BOOL daKmon_c::_delete() {
|
||||
dComIfG_resDelete(&mPhase, daKmon_c::m_arcname);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* 00000968-00000998 .text daKmonDelete__FPv */
|
||||
static BOOL daKmonDelete(void* i_this) {
|
||||
daKmon_c* actor = static_cast<daKmon_c*>(i_this);
|
||||
dComIfG_resDelete(&actor->mPhase, daKmon_c::m_arcname);
|
||||
return TRUE;
|
||||
return ((daKmon_c*)i_this)->_delete();
|
||||
}
|
||||
|
||||
BOOL daKmon_c::_execute() {
|
||||
checkTalk();
|
||||
fopAcM_posMoveF(this, NULL);
|
||||
mAcch.CrrPos(*dComIfG_Bgsp());
|
||||
mBckAnm.play();
|
||||
mBtkAnm.play();
|
||||
set_mtx();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* 00000998-00000A00 .text daKmonExecute__FPv */
|
||||
static BOOL daKmonExecute(void* i_this) {
|
||||
daKmon_c* actor = static_cast<daKmon_c*>(i_this);
|
||||
actor->checkTalk();
|
||||
fopAcM_posMoveF(actor, NULL);
|
||||
actor->mAcch.CrrPos(*dComIfG_Bgsp());
|
||||
actor->mBckAnm.play();
|
||||
actor->mBtkAnm.play();
|
||||
actor->set_mtx();
|
||||
return FALSE;
|
||||
return ((daKmon_c*)i_this)->_execute();
|
||||
}
|
||||
|
||||
BOOL daKmon_c::_draw() {
|
||||
g_env_light.settingTevStruct(TEV_TYPE_BG1_PLIGHT, ¤t.pos, &tevStr);
|
||||
g_env_light.setLightTevColorType(mpModel, &tevStr);
|
||||
mBckAnm.entry(mpModel->getModelData());
|
||||
mBtkAnm.entry(mpModel->getModelData());
|
||||
mDoExt_modelUpdateDL(mpModel);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* 00000A00-00000A9C .text daKmonDraw__FPv */
|
||||
static BOOL daKmonDraw(void* i_this) {
|
||||
daKmon_c* actor = static_cast<daKmon_c*>(i_this);
|
||||
dKy_tevstr_c* pTev;
|
||||
g_env_light.settingTevStruct(TEV_TYPE_BG1_PLIGHT, &actor->current.pos, (pTev = &actor->tevStr));
|
||||
g_env_light.setLightTevColorType(actor->mpModel, pTev);
|
||||
actor->mBckAnm.entry(actor->mpModel->getModelData());
|
||||
actor->mBtkAnm.entry(actor->mpModel->getModelData());
|
||||
mDoExt_modelUpdateDL(actor->mpModel);
|
||||
return TRUE;
|
||||
return ((daKmon_c*)i_this)->_draw();
|
||||
}
|
||||
|
||||
/* 00000A9C-00000AA4 .text daKmonIsDelete__FPv */
|
||||
|
||||
@@ -79,9 +79,9 @@ namespace daObjMovebox {
|
||||
if (mbShouldAppear) {
|
||||
phase_state = dComIfG_resLoad(&mPhs, M_arcname[mType]);
|
||||
if (phase_state == cPhs_COMPLEATE_e) {
|
||||
u32 heapSize = i_attr()->mDZBHeapSize;
|
||||
u32 heapSize = attr()->mDZBHeapSize;
|
||||
path_init();
|
||||
phase_state = MoveBGCreate(M_arcname[mType], i_attr()->mDZBFileIndex, dBgS_MoveBGProc_Trans, heapSize);
|
||||
phase_state = MoveBGCreate(M_arcname[mType], attr()->mDZBFileIndex, dBgS_MoveBGProc_Trans, heapSize);
|
||||
JUT_ASSERT(1998, (phase_state == cPhs_COMPLEATE_e) || (phase_state == cPhs_ERROR_e));
|
||||
}
|
||||
}
|
||||
@@ -1102,7 +1102,7 @@ namespace daObjMovebox {
|
||||
mkie->setup(&targetPos);
|
||||
}
|
||||
} else {
|
||||
cXyz buoyOffset(0.0f, i_attr()->m68 - 5.0f, 0.0f);
|
||||
cXyz buoyOffset(0.0f, attr()->m68 - 5.0f, 0.0f);
|
||||
cXyz buoyOffsetSR;
|
||||
MtxP mtx = mDoMtx_stack_c::get();
|
||||
cMtx_multVecSR(mtx, &buoyOffset, &buoyOffsetSR);
|
||||
@@ -1209,8 +1209,8 @@ namespace daObjMovebox {
|
||||
/* 00001A10-00001B00 .text CreateHeap__Q212daObjMovebox5Act_cFv */
|
||||
BOOL Act_c::CreateHeap() {
|
||||
BOOL success = TRUE;
|
||||
if (i_attr()->mModelFileIndex >= 0) {
|
||||
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(M_arcname[mType], i_attr()->mModelFileIndex);
|
||||
if (attr()->mModelFileIndex >= 0) {
|
||||
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(M_arcname[mType], attr()->mModelFileIndex);
|
||||
JUT_ASSERT(1722, modelData != NULL);
|
||||
|
||||
mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000022);
|
||||
@@ -1227,18 +1227,18 @@ namespace daObjMovebox {
|
||||
if (movebox->mMode != MODE_AFLOAT) {
|
||||
return;
|
||||
}
|
||||
const Attr_c* attr = movebox->i_attr();
|
||||
f32 f0 = movebox->i_attr()->m2C + movebox->i_attr()->m30;
|
||||
const Attr_c* attr = movebox->attr();
|
||||
f32 f0 = movebox->attr()->m2C + movebox->attr()->m30;
|
||||
f32 deltaX = actor2->current.pos.x - actor1->current.pos.x;
|
||||
f32 deltaZ = actor2->current.pos.z - actor1->current.pos.z;
|
||||
f32 f3;
|
||||
f32 f4;
|
||||
if (fopAcM_GetProfName(actor2) == PROC_PLAYER) {
|
||||
f3 = movebox->i_attr()->m2C;
|
||||
f4 = movebox->i_attr()->m74 * movebox->i_attr()->m44;
|
||||
f3 = movebox->attr()->m2C;
|
||||
f4 = movebox->attr()->m74 * movebox->attr()->m44;
|
||||
} else {
|
||||
f3 = movebox->i_attr()->m30;
|
||||
f4 = movebox->i_attr()->m74 * movebox->i_attr()->m48;
|
||||
f3 = movebox->attr()->m30;
|
||||
f4 = movebox->attr()->m74 * movebox->attr()->m48;
|
||||
}
|
||||
f32 f6 = std::sqrtf(deltaX*deltaX + deltaZ*deltaZ);
|
||||
f6 = 1.0f - f6 * attr->m74;
|
||||
@@ -1262,7 +1262,7 @@ namespace daObjMovebox {
|
||||
dBgW::PushPullLabel pp_label = static_cast<dBgW::PushPullLabel>(orig_pp_label & (dBgW::PPLABEL_PUSH | dBgW::PPLABEL_PULL));
|
||||
if (pp_label) {
|
||||
bool unk;
|
||||
if (!i_this->i_attr()->m9A) {
|
||||
if (!i_this->attr()->m9A) {
|
||||
unk = true;
|
||||
} else {
|
||||
unk = orig_pp_label & dBgW::PPLABEL_HEAVY;
|
||||
@@ -1310,7 +1310,7 @@ namespace daObjMovebox {
|
||||
m618 = 0.0f;
|
||||
m61C = 0.0f;
|
||||
m620 = 0.0f;
|
||||
m624 = i_attr()->m68 * 0.5f;
|
||||
m624 = attr()->m68 * 0.5f;
|
||||
m628 = 0;
|
||||
m62C = 0;
|
||||
m630 = 0.0f;
|
||||
@@ -1333,12 +1333,12 @@ namespace daObjMovebox {
|
||||
|
||||
fopAcM_SetMtx(this, mMtx);
|
||||
fopAcM_setCullSizeBox(this,
|
||||
i_attr()->mCullMinX, i_attr()->mCullMinY, i_attr()->mCullMinZ,
|
||||
i_attr()->mCullMaxX, i_attr()->mCullMaxY, i_attr()->mCullMaxZ
|
||||
attr()->mCullMinX, attr()->mCullMinY, attr()->mCullMinZ,
|
||||
attr()->mCullMaxX, attr()->mCullMaxY, attr()->mCullMaxZ
|
||||
);
|
||||
|
||||
speedF = 0.0f;
|
||||
gravity = i_attr()->m14;
|
||||
gravity = attr()->m14;
|
||||
fopAcM_posMoveF(this, NULL);
|
||||
mBgc.proc_vertical(this);
|
||||
cLib_offBit(mBgc.mStateFlags, static_cast<Bgc_c::State_e>(Bgc_c::BgcState_JUST_LEFT_GROUND_e | Bgc_c::BgcState_JUST_HIT_GROUND_e | Bgc_c::BgcState_JUST_HIT_WATER_e));
|
||||
@@ -1348,7 +1348,7 @@ namespace daObjMovebox {
|
||||
|
||||
mChildPID = fpcM_ERROR_PROCESS_ID_e;
|
||||
if (prm_get_buoy() == 0) {
|
||||
cXyz buoyPos(current.pos.x, current.pos.y + i_attr()->m68 - 5.0f, current.pos.z);
|
||||
cXyz buoyPos(current.pos.x, current.pos.y + attr()->m68 - 5.0f, current.pos.z);
|
||||
mChildPID = daObjBuoyflag::Act_c::make_norm(fopAcM_GetID(this), &buoyPos, fopAcM_GetRoomNo(this), &shape_angle);
|
||||
} else if (mType == TYPE_METAL_BOX_WITH_SPRING) {
|
||||
u32 jumpParams = daObjJump::Act_c::prm_make_b();
|
||||
@@ -1382,13 +1382,13 @@ namespace daObjMovebox {
|
||||
/* 00002214-000024D4 .text afl_sway__Q212daObjMovebox5Act_cFv */
|
||||
void Act_c::afl_sway() {
|
||||
f32 f31 = m60C*m60C + m610*m610;
|
||||
f32 f30 = i_attr()->m4C*i_attr()->m4C;
|
||||
f32 f30 = attr()->m4C*attr()->m4C;
|
||||
|
||||
int bgcSrcCount;
|
||||
BgcSrc_c* bgcSrc;
|
||||
// fakematch? a cast here seems necessary to get the bgcSrc to temporarily be placed in r0 and then moved
|
||||
bgcSrc = const_cast<BgcSrc_c*>(i_attr()->m9A ? Bgc_c::M_lin20 : Bgc_c::M_lin5);
|
||||
bgcSrcCount = i_attr()->m9A ? ARRAY_SIZE(Bgc_c::M_lin20)-2 : ARRAY_SIZE(Bgc_c::M_lin5);
|
||||
bgcSrc = const_cast<BgcSrc_c*>(attr()->m9A ? Bgc_c::M_lin20 : Bgc_c::M_lin5);
|
||||
bgcSrcCount = attr()->m9A ? ARRAY_SIZE(Bgc_c::M_lin20)-2 : ARRAY_SIZE(Bgc_c::M_lin5);
|
||||
|
||||
bool touchedFrontBack = mBgc.chk_wall_touch2(this, bgcSrc, bgcSrcCount, M_dir_base[0]) ||
|
||||
mBgc.chk_wall_touch2(this, bgcSrc, bgcSrcCount, M_dir_base[2]);
|
||||
@@ -1397,15 +1397,15 @@ namespace daObjMovebox {
|
||||
mBgc.chk_wall_touch2(this, bgcSrc, bgcSrcCount, M_dir_base[3]);
|
||||
|
||||
if (f31 > f30) {
|
||||
f32 temp = i_attr()->m4C / std::sqrtf(f31);
|
||||
f32 temp = attr()->m4C / std::sqrtf(f31);
|
||||
m60C *= temp;
|
||||
m610 *= temp;
|
||||
}
|
||||
|
||||
f32 f5 = -(m618 - m610) * i_attr()->m50;
|
||||
f32 f6 = -m620 * i_attr()->m54;
|
||||
f32 f1 = -(m614 - m60C) * i_attr()->m50;
|
||||
f32 f0 = -m61C * i_attr()->m54;
|
||||
f32 f5 = -(m618 - m610) * attr()->m50;
|
||||
f32 f6 = -m620 * attr()->m54;
|
||||
f32 f1 = -(m614 - m60C) * attr()->m50;
|
||||
f32 f0 = -m61C * attr()->m54;
|
||||
m61C += f1 + f0;
|
||||
m620 += f5 + f6;
|
||||
m614 += m61C;
|
||||
@@ -1433,22 +1433,22 @@ namespace daObjMovebox {
|
||||
s16 r0;
|
||||
if (temp) {
|
||||
if (r3) {
|
||||
r0 = i_attr()->m06;
|
||||
r0 = attr()->m06;
|
||||
} else {
|
||||
r0 = i_attr()->m08;
|
||||
r0 = attr()->m08;
|
||||
}
|
||||
} else {
|
||||
if (r3) {
|
||||
r0 = i_attr()->m00;
|
||||
r0 = attr()->m00;
|
||||
} else {
|
||||
r0 = i_attr()->m02;
|
||||
r0 = attr()->m02;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < (int)ARRAY_SIZE(mMomentCnt); i++) {
|
||||
if (mMomentCnt[i] >= r0) {
|
||||
const BgcSrc_c* bgcSrc = i_attr()->m9A ? Bgc_c::M_lin20 : Bgc_c::M_lin5;
|
||||
int bgcSrcCount = i_attr()->m9A ? (mType == TYPE_MIRROR ? ARRAY_SIZE(Bgc_c::M_lin20) : ARRAY_SIZE(Bgc_c::M_lin20)-2) : ARRAY_SIZE(Bgc_c::M_lin5);
|
||||
const BgcSrc_c* bgcSrc = attr()->m9A ? Bgc_c::M_lin20 : Bgc_c::M_lin5;
|
||||
int bgcSrcCount = attr()->m9A ? (mType == TYPE_MIRROR ? ARRAY_SIZE(Bgc_c::M_lin20) : ARRAY_SIZE(Bgc_c::M_lin20)-2) : ARRAY_SIZE(Bgc_c::M_lin5);
|
||||
if (!mBgc.chk_wall_pre(this, bgcSrc, bgcSrcCount, M_dir_base[i])) {
|
||||
r30 = i;
|
||||
}
|
||||
@@ -1499,7 +1499,7 @@ namespace daObjMovebox {
|
||||
|
||||
s16 angle = home.angle.y + M_dir_base[m634];
|
||||
|
||||
f32 scaleMag = i_attr()->mScaleXZ;
|
||||
f32 scaleMag = attr()->mScaleXZ;
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::YrotM(angle);
|
||||
mDoMtx_stack_c::transM(0.0f, 0.0f, 10.0f);
|
||||
@@ -1548,7 +1548,7 @@ namespace daObjMovebox {
|
||||
/* 00002AD4-00002B48 .text mode_wait_init__Q212daObjMovebox5Act_cFv */
|
||||
void Act_c::mode_wait_init() {
|
||||
speedF = 0.0f;
|
||||
gravity = i_attr()->m14;
|
||||
gravity = attr()->m14;
|
||||
mpBgW->SetCrrFunc(dBgS_MoveBGProc_Trans);
|
||||
clr_moment_cnt();
|
||||
m634 = -1;
|
||||
@@ -1568,11 +1568,11 @@ namespace daObjMovebox {
|
||||
path_save();
|
||||
}
|
||||
|
||||
daObj::posMoveF_stream(this, NULL, &cXyz::Zero, i_attr()->m18, i_attr()->m1C);
|
||||
daObj::posMoveF_stream(this, NULL, &cXyz::Zero, attr()->m18, attr()->m1C);
|
||||
|
||||
mDoMtx_stack_c::transS(home.pos);
|
||||
mDoMtx_stack_c::YrotM(home.angle.y);
|
||||
mDoMtx_stack_c::transM(m628 * i_attr()->m0C, 0.0f, m62C * i_attr()->m0C);
|
||||
mDoMtx_stack_c::transM(m628 * attr()->m0C, 0.0f, m62C * attr()->m0C);
|
||||
cXyz pos;
|
||||
mDoMtx_stack_c::multVec(&cXyz::Zero, &pos);
|
||||
current.pos.x = pos.x;
|
||||
@@ -1585,11 +1585,11 @@ namespace daObjMovebox {
|
||||
mode_walk_init();
|
||||
|
||||
if (cLib_checkBit(mPPLabel, dBgW::PPLABEL_PULL)) {
|
||||
m644 = i_attr()->m0A;
|
||||
m630 = (f32)0x8000 / i_attr()->m0A;
|
||||
m644 = attr()->m0A;
|
||||
m630 = (f32)0x8000 / attr()->m0A;
|
||||
} else {
|
||||
m644 = i_attr()->m04;
|
||||
m630 = (f32)0x8000 / i_attr()->m04;
|
||||
m644 = attr()->m04;
|
||||
m630 = (f32)0x8000 / attr()->m04;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1615,9 +1615,9 @@ namespace daObjMovebox {
|
||||
mDoMtx_stack_c::transS(home.pos);
|
||||
mDoMtx_stack_c::YrotM(home.angle.y);
|
||||
mDoMtx_stack_c::transM(
|
||||
(m628 + temp * dir_vec[m634].x) * i_attr()->m0C,
|
||||
(m628 + temp * dir_vec[m634].x) * attr()->m0C,
|
||||
0.0f,
|
||||
(m62C + temp * dir_vec[m634].z) * i_attr()->m0C
|
||||
(m62C + temp * dir_vec[m634].z) * attr()->m0C
|
||||
);
|
||||
cXyz temp2;
|
||||
mDoMtx_stack_c::multVec(&cXyz::Zero, &temp2);
|
||||
@@ -1627,8 +1627,8 @@ namespace daObjMovebox {
|
||||
sound_slip();
|
||||
|
||||
if (r28) {
|
||||
const BgcSrc_c* bgcSrc = i_attr()->m9A ? Bgc_c::M_lin20 : Bgc_c::M_lin5;
|
||||
int bgcSrcCount = i_attr()->m9A ? (mType == TYPE_MIRROR ? ARRAY_SIZE(Bgc_c::M_lin20) : ARRAY_SIZE(Bgc_c::M_lin20)-2) : ARRAY_SIZE(Bgc_c::M_lin5);
|
||||
const BgcSrc_c* bgcSrc = attr()->m9A ? Bgc_c::M_lin20 : Bgc_c::M_lin5;
|
||||
int bgcSrcCount = attr()->m9A ? (mType == TYPE_MIRROR ? ARRAY_SIZE(Bgc_c::M_lin20) : ARRAY_SIZE(Bgc_c::M_lin20)-2) : ARRAY_SIZE(Bgc_c::M_lin5);
|
||||
if (mBgc.chk_wall_pre(this, bgcSrc, bgcSrcCount, M_dir_base[m634])) {
|
||||
sound_limit();
|
||||
}
|
||||
@@ -1637,7 +1637,7 @@ namespace daObjMovebox {
|
||||
eff_set_slip_smoke_pos();
|
||||
}
|
||||
|
||||
daObj::posMoveF_stream(this, NULL, &cXyz::Zero, i_attr()->m18, i_attr()->m1C);
|
||||
daObj::posMoveF_stream(this, NULL, &cXyz::Zero, attr()->m18, attr()->m1C);
|
||||
current.pos.x = temp2.x;
|
||||
current.pos.z = temp2.z;
|
||||
|
||||
@@ -1670,30 +1670,30 @@ namespace daObjMovebox {
|
||||
if (f1 >= 0.0f) {
|
||||
f0 = 0.0f;
|
||||
} else {
|
||||
if (f1 <= -i_attr()->m68) {
|
||||
if (f1 <= -attr()->m68) {
|
||||
f0 = 1.0f;
|
||||
} else {
|
||||
f1 = -f1;
|
||||
f0 = f1 * i_attr()->m6C;
|
||||
f0 = f1 * attr()->m6C;
|
||||
}
|
||||
}
|
||||
|
||||
s16 r3 = i_attr()->m38 * (1.0f + cM_rnd());
|
||||
s16 r3 = attr()->m38 * (1.0f + cM_rnd());
|
||||
m604 += r3;
|
||||
gravity = (f0 * i_attr()->m28) + i_attr()->m14 + i_attr()->m34 * cM_ssin(m604) + m608;
|
||||
gravity = (f0 * attr()->m28) + attr()->m14 + attr()->m34 * cM_ssin(m604) + m608;
|
||||
m608 = 0.0f;
|
||||
|
||||
afl_sway();
|
||||
|
||||
f32 temp3 = 1.0f - f0;
|
||||
f32 temp1 = f0*i_attr()->m3C + temp3*i_attr()->m18;
|
||||
f32 temp2 = f0*i_attr()->m40 + temp3*i_attr()->m1C;
|
||||
f32 temp1 = f0*attr()->m3C + temp3*attr()->m18;
|
||||
f32 temp2 = f0*attr()->m40 + temp3*attr()->m1C;
|
||||
|
||||
m624 = mBgc.mWaterY - current.pos.y;
|
||||
if (m624 < 0.0f) {
|
||||
m624 = 0.0f;
|
||||
} else if (m624 > i_attr()->m68) {
|
||||
m624 = i_attr()->m68;
|
||||
} else if (m624 > attr()->m68) {
|
||||
m624 = attr()->m68;
|
||||
}
|
||||
|
||||
daObj::posMoveF_stream(this, NULL, &cXyz::Zero, temp1, temp2);
|
||||
@@ -1752,7 +1752,7 @@ namespace daObjMovebox {
|
||||
}
|
||||
}
|
||||
|
||||
mDoAud_seStart(i_attr()->mMoveSE, &eyePos, mtrlSndId, mReverb);
|
||||
mDoAud_seStart(attr()->mMoveSE, &eyePos, mtrlSndId, mReverb);
|
||||
}
|
||||
|
||||
/* 00003BA4-00003C68 .text sound_limit__Q212daObjMovebox5Act_cFv */
|
||||
@@ -1765,7 +1765,7 @@ namespace daObjMovebox {
|
||||
}
|
||||
}
|
||||
|
||||
mDoAud_seStart(i_attr()->mCantMoveSE, &eyePos, mtrlSndId, mReverb);
|
||||
mDoAud_seStart(attr()->mCantMoveSE, &eyePos, mtrlSndId, mReverb);
|
||||
}
|
||||
|
||||
/* 00003C68-00003D2C .text sound_land__Q212daObjMovebox5Act_cFv */
|
||||
@@ -1778,7 +1778,7 @@ namespace daObjMovebox {
|
||||
}
|
||||
}
|
||||
|
||||
mDoAud_seStart(i_attr()->mNormalFallSE, &eyePos, mtrlSndId, mReverb);
|
||||
mDoAud_seStart(attr()->mNormalFallSE, &eyePos, mtrlSndId, mReverb);
|
||||
}
|
||||
|
||||
/* 00003D2C-00003D80 .text vib_land__Q212daObjMovebox5Act_cFv */
|
||||
@@ -1789,7 +1789,7 @@ namespace daObjMovebox {
|
||||
/* 00003D80-00003E04 .text eff_land_smoke__Q212daObjMovebox5Act_cFv */
|
||||
void Act_c::eff_land_smoke() {
|
||||
cXyz smokeScale;
|
||||
smokeScale.setall(i_attr()->mLandSmokeScale);
|
||||
smokeScale.setall(attr()->mLandSmokeScale);
|
||||
smokeScale *= 5.0f/3.0f;
|
||||
fopAcM_create(PROC_Obj_Eff, 0x3, ¤t.pos, -1, NULL, &smokeScale);
|
||||
// TODO daObjEff::Act_c::make_land_smoke(cXyz*, float)
|
||||
@@ -1804,13 +1804,13 @@ namespace daObjMovebox {
|
||||
fopAcM_delete(this);
|
||||
} else {
|
||||
if (cLib_checkBit(mBgc.mStateFlags, Bgc_c::BgcState_JUST_HIT_WATER_e)) {
|
||||
mDoAud_seStart(i_attr()->mWaterFallSE, &eyePos, 0, mReverb);
|
||||
mDoAud_seStart(attr()->mWaterFallSE, &eyePos, 0, mReverb);
|
||||
}
|
||||
|
||||
if (mMode == MODE_WAIT) {
|
||||
if (cLib_checkBit(mBgc.mStateFlags, Bgc_c::BgcState_IN_WATER_e) && m646 == 0) {
|
||||
if (cLib_checkBit(mBgc.mStateFlags, Bgc_c::BgcState_ON_GROUND_e)) {
|
||||
if (i_attr()->m28 + i_attr()->m14 > 0.0f) {
|
||||
if (attr()->m28 + attr()->m14 > 0.0f) {
|
||||
mode_afl_init();
|
||||
}
|
||||
} else {
|
||||
@@ -1856,7 +1856,7 @@ namespace daObjMovebox {
|
||||
/* 000040D0-00004254 .text Draw__Q212daObjMovebox5Act_cFv */
|
||||
BOOL Act_c::Draw() {
|
||||
if (mpModel) {
|
||||
int tevType = !i_attr()->mbUseBGTevType ? TEV_TYPE_ACTOR : TEV_TYPE_BG0;
|
||||
int tevType = !attr()->mbUseBGTevType ? TEV_TYPE_ACTOR : TEV_TYPE_BG0;
|
||||
g_env_light.settingTevStruct(tevType, ¤t.pos, &tevStr);
|
||||
g_env_light.setLightTevColorType(mpModel, &tevStr);
|
||||
dComIfGd_setListBG();
|
||||
@@ -1864,13 +1864,13 @@ namespace daObjMovebox {
|
||||
dComIfGd_setList();
|
||||
}
|
||||
|
||||
if (!i_attr()->mbCastsShadow && mBgc.mMaxGroundIdx >= 0) {
|
||||
if (!attr()->mbCastsShadow && mBgc.mMaxGroundIdx >= 0) {
|
||||
int temp = mBgc.mMaxGroundIdx;
|
||||
f32 groundH = mBgc.mGroundY[temp];
|
||||
cM3dGPla* triPla = dComIfG_Bgsp()->GetTriPla(Bgc_c::M_gnd_work[temp]);
|
||||
cXyz* norm = triPla->GetNP();
|
||||
if (norm && groundH != -G_CM3D_F_INF) {
|
||||
dComIfGd_setSimpleShadow(¤t.pos, groundH, i_attr()->m10, norm, shape_angle.y, 1.0f, NULL);
|
||||
dComIfGd_setSimpleShadow(¤t.pos, groundH, attr()->m10, norm, shape_angle.y, 1.0f, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,8 +29,7 @@ void daObj_Pbco_c::set_mtx() {
|
||||
|
||||
/* 0000018C-000001AC .text CheckCreateHeap__FP10fopAc_ac_c */
|
||||
static int CheckCreateHeap(fopAc_ac_c* i_this) {
|
||||
daObj_Pbco_c* a_this = static_cast<daObj_Pbco_c*>(i_this);
|
||||
return a_this->CreateHeap();
|
||||
return ((daObj_Pbco_c*)i_this)->CreateHeap();
|
||||
}
|
||||
|
||||
/* 000001AC-00000348 .text CreateHeap__12daObj_Pbco_cFv */
|
||||
@@ -80,7 +79,7 @@ cPhs_State daObj_Pbco_c::_create() {
|
||||
|
||||
/* 000003A4-00000434 .text daObj_PbcoCreate__FPv */
|
||||
static cPhs_State daObj_PbcoCreate(void* i_this) {
|
||||
return static_cast<daObj_Pbco_c*>(i_this)->_create();
|
||||
return ((daObj_Pbco_c*)i_this)->_create();
|
||||
}
|
||||
|
||||
bool daObj_Pbco_c::_delete() {
|
||||
@@ -93,8 +92,7 @@ bool daObj_Pbco_c::_delete() {
|
||||
|
||||
/* 00000434-0000048C .text daObj_PbcoDelete__FPv */
|
||||
static BOOL daObj_PbcoDelete(void* i_this) {
|
||||
static_cast<daObj_Pbco_c*>(i_this)->_delete();
|
||||
return TRUE;
|
||||
return ((daObj_Pbco_c*)i_this)->_delete();
|
||||
}
|
||||
|
||||
bool daObj_Pbco_c::_execute() {
|
||||
@@ -106,21 +104,19 @@ bool daObj_Pbco_c::_execute() {
|
||||
|
||||
/* 0000048C-000004D0 .text daObj_PbcoExecute__FPv */
|
||||
static BOOL daObj_PbcoExecute(void* i_this) {
|
||||
return static_cast<daObj_Pbco_c*>(i_this)->_execute();
|
||||
return ((daObj_Pbco_c*)i_this)->_execute();
|
||||
}
|
||||
|
||||
bool daObj_Pbco_c::_draw() {
|
||||
dKy_tevstr_c* pTevStr;
|
||||
g_env_light.settingTevStruct(TEV_TYPE_BG0, ¤t.pos, pTevStr = &tevStr);
|
||||
g_env_light.setLightTevColorType(mpModel, pTevStr);
|
||||
g_env_light.settingTevStruct(TEV_TYPE_BG0, ¤t.pos, &tevStr);
|
||||
g_env_light.setLightTevColorType(mpModel, &tevStr);
|
||||
mDoExt_modelUpdateDL(mpModel);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* 000004D0-0000053C .text daObj_PbcoDraw__FPv */
|
||||
static BOOL daObj_PbcoDraw(void* i_this) {
|
||||
daObj_Pbco_c* a_this = (daObj_Pbco_c*)i_this;
|
||||
return a_this->_draw();
|
||||
return ((daObj_Pbco_c*)i_this)->_draw();
|
||||
}
|
||||
|
||||
/* 0000053C-00000544 .text daObj_PbcoIsDelete__FPv */
|
||||
|
||||
@@ -61,7 +61,7 @@ cPhs_State daObjPbka_c::_create() {
|
||||
|
||||
/* 0000024C-000002EC .text daObjPbka_Create__FPv */
|
||||
static cPhs_State daObjPbka_Create(void* i_this) {
|
||||
return static_cast<daObjPbka_c*>(i_this)->_create();
|
||||
return ((daObjPbka_c*)i_this)->_create();
|
||||
}
|
||||
|
||||
bool daObjPbka_c::_delete() {
|
||||
@@ -71,14 +71,12 @@ bool daObjPbka_c::_delete() {
|
||||
|
||||
/* 000002EC-0000031C .text daObjPbka_Delete__FPv */
|
||||
static BOOL daObjPbka_Delete(void* i_this) {
|
||||
static_cast<daObjPbka_c*>(i_this)->_delete();
|
||||
return TRUE;
|
||||
return ((daObjPbka_c*)i_this)->_delete();
|
||||
}
|
||||
|
||||
bool daObjPbka_c::_draw() {
|
||||
dKy_tevstr_c * pTevStr;
|
||||
g_env_light.settingTevStruct(TEV_TYPE_BG0, ¤t.pos, pTevStr = &tevStr);
|
||||
g_env_light.setLightTevColorType(mpModel, pTevStr);
|
||||
g_env_light.settingTevStruct(TEV_TYPE_BG0, ¤t.pos, &tevStr);
|
||||
g_env_light.setLightTevColorType(mpModel, &tevStr);
|
||||
dComIfGd_setListBG();
|
||||
mDoExt_modelUpdateDL(mpModel);
|
||||
dComIfGd_setList();
|
||||
@@ -87,8 +85,7 @@ bool daObjPbka_c::_draw() {
|
||||
|
||||
/* 0000031C-000003C0 .text daObjPbka_Draw__FPv */
|
||||
static BOOL daObjPbka_Draw(void* i_this) {
|
||||
daObjPbka_c* a_this = (daObjPbka_c*)i_this;
|
||||
return a_this->_draw();
|
||||
return ((daObjPbka_c*)i_this)->_draw();
|
||||
}
|
||||
|
||||
bool daObjPbka_c::_execute() {
|
||||
@@ -101,7 +98,7 @@ bool daObjPbka_c::_execute() {
|
||||
|
||||
/* 000003C0-00000450 .text daObjPbka_Execute__FPv */
|
||||
static BOOL daObjPbka_Execute(void* i_this) {
|
||||
return static_cast<daObjPbka_c*>(i_this)->_execute();
|
||||
return ((daObjPbka_c*)i_this)->_execute();
|
||||
}
|
||||
|
||||
/* 00000450-00000458 .text daObjPbka_IsDelete__FPv */
|
||||
|
||||
@@ -46,7 +46,7 @@ static BOOL nodeCallBack(J3DNode*, int);
|
||||
|
||||
/* 00000078-00000098 .text CheckCreateHeap__FP10fopAc_ac_c */
|
||||
static BOOL CheckCreateHeap(fopAc_ac_c* i_this) {
|
||||
return static_cast<daObjRflw_c*>(i_this)->CreateHeap();
|
||||
return ((daObjRflw_c*)i_this)->CreateHeap();
|
||||
}
|
||||
|
||||
/* 00000098-000001E0 .text CreateHeap__11daObjRflw_cFv */
|
||||
@@ -133,9 +133,8 @@ inline BOOL daObjRflw_c::_delete() {
|
||||
}
|
||||
|
||||
inline BOOL daObjRflw_c::_draw() {
|
||||
dKy_tevstr_c* p_tev_str;
|
||||
g_env_light.settingTevStruct(TEV_TYPE_BG0, ¤t.pos, p_tev_str = &tevStr); // fakematch
|
||||
g_env_light.setLightTevColorType(mpModel, p_tev_str);
|
||||
g_env_light.settingTevStruct(TEV_TYPE_BG0, ¤t.pos, &tevStr);
|
||||
g_env_light.setLightTevColorType(mpModel, &tevStr);
|
||||
dComIfGd_setListBG();
|
||||
mDoExt_modelUpdateDL(mpModel);
|
||||
dComIfGd_setList();
|
||||
@@ -179,20 +178,17 @@ inline BOOL daObjRflw_c::_execute() {
|
||||
|
||||
/* 000003E8-0000051C .text daObjRflw_Create__FPv */
|
||||
static cPhs_State daObjRflw_Create(void* i_this) {
|
||||
daObjRflw_c* rflw = static_cast<daObjRflw_c*>(i_this);
|
||||
return rflw->_create();
|
||||
return ((daObjRflw_c*)i_this)->_create();
|
||||
}
|
||||
|
||||
/* 000006D4-00000704 .text daObjRflw_Delete__FPv */
|
||||
static BOOL daObjRflw_Delete(void* i_this) {
|
||||
daObjRflw_c* rflw = static_cast<daObjRflw_c*>(i_this);
|
||||
return rflw->_delete();
|
||||
return ((daObjRflw_c*)i_this)->_delete();
|
||||
}
|
||||
|
||||
/* 00000704-000007A8 .text daObjRflw_Draw__FPv */
|
||||
static BOOL daObjRflw_Draw(void* i_this) {
|
||||
daObjRflw_c* rflw = static_cast<daObjRflw_c*>(i_this);
|
||||
return rflw->_draw();
|
||||
return ((daObjRflw_c*)i_this)->_draw();
|
||||
}
|
||||
|
||||
/* 000007A8-000009EC .text daObjRflw_Execute__FPv */
|
||||
|
||||
@@ -144,7 +144,7 @@ BOOL daPy_lk_c::procBottleDrink() {
|
||||
dComIfGp_setItemMagicCount(dComIfGs_getMaxMagic());
|
||||
}
|
||||
if (mEquipItem == dItem_SOUP_BOTTLE_e || mEquipItem == dItem_HALF_SOUP_BOTTLE_e) {
|
||||
onNoResetFlg1(daPyFlg1_UNK8000);
|
||||
onNoResetFlg1(daPyFlg1_SOUP_POWER_UP);
|
||||
}
|
||||
resetCurse();
|
||||
} else {
|
||||
|
||||
@@ -245,7 +245,7 @@ void daPy_lk_c::setDoStatusCrawl() {
|
||||
}
|
||||
} else if (dCam_getBody()->ChangeModeOK(4)) {
|
||||
if (m35D0 <= current.pos.y) {
|
||||
onResetFlg0(daPyRFlg0_UNK4000000);
|
||||
onResetFlg0(daPyRFlg0_SUBJECT_ACCEPT);
|
||||
if (dComIfGp_checkCameraAttentionStatus(mCameraInfoIdx, 0x1000) && !dComIfGp_event_runCheck()) {
|
||||
setSubjectMode();
|
||||
}
|
||||
@@ -349,7 +349,7 @@ BOOL daPy_lk_c::procCrawlMove_init(s16 param_0, s16 param_1) {
|
||||
current.angle.y = shape_angle.y;
|
||||
setSingleMoveAnime(ANM_LIEFORWARD, dVar4, 0.0f, -1, m_HIO->mCrouch.m.field_0x38);
|
||||
} else {
|
||||
onResetFlg0(daPyRFlg0_UNK1000);
|
||||
onResetFlg0(daPyRFlg0_CRAWL_AUTO_MOVE);
|
||||
}
|
||||
m35A0 = -1.0f;
|
||||
mProcVar0.m3570 = var_r29 ^ 1;
|
||||
@@ -397,8 +397,8 @@ BOOL daPy_lk_c::procCrawlMove() {
|
||||
iVar6 = checkNotCrawlStand(&sp118);
|
||||
iVar7 = checkNotCrawlStand(&sp124);
|
||||
iVar8 = checkNotCrawlStand(&sp10C);
|
||||
if ((((iVar6 != 0 || iVar7 != 0) || iVar8 != 0) ||
|
||||
(checkNotCrawlStand(&sp124, &sp100) || checkNotCrawlStand(&sp10C, &sp100))) ||
|
||||
if (iVar6 != 0 || iVar7 != 0 || iVar8 != 0 ||
|
||||
checkNotCrawlStand(&sp124, &sp100) || checkNotCrawlStand(&sp10C, &sp100) ||
|
||||
checkNotCrawlStand(&sp118, &sp100))
|
||||
{
|
||||
bVar5 = false;
|
||||
@@ -462,7 +462,7 @@ BOOL daPy_lk_c::procCrawlMove() {
|
||||
checkCrawlSideWall(&spF4, &spDC, &spC4, &spD0, &sp08, &sp0A)))
|
||||
{
|
||||
mProcVar0.m3570 = 1;
|
||||
onResetFlg0(daPyRFlg0_UNK1000);
|
||||
onResetFlg0(daPyRFlg0_CRAWL_AUTO_MOVE);
|
||||
m370C = ((spD0 + spC4) * 0.5f) - spB8;
|
||||
m34D4 = sp0A + 0x4000;
|
||||
}
|
||||
@@ -541,7 +541,7 @@ BOOL daPy_lk_c::procCrawlAutoMove_init(int param_0, cXyz* param_1) {
|
||||
dComIfGp_setPlayerStatus0(0, daPyStts0_CRAWL_e);
|
||||
setCrawlMoveDirectionArrow();
|
||||
mVelocity = 0.0f;
|
||||
onResetFlg0(daPyRFlg0_UNK1000);
|
||||
onResetFlg0(daPyRFlg0_CRAWL_AUTO_MOVE);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
mAcchCir[i].SetWallR(9.99f);
|
||||
}
|
||||
@@ -558,7 +558,7 @@ BOOL daPy_lk_c::procCrawlAutoMove() {
|
||||
|
||||
dComIfGp_setRStatus(dActStts_CROUCH_e);
|
||||
J3DFrameCtrl& frameCtrl = mFrameCtrlUnder[UNDER_MOVE0_e];
|
||||
onResetFlg0(daPyRFlg0_UNK1000);
|
||||
onResetFlg0(daPyRFlg0_CRAWL_AUTO_MOVE);
|
||||
s16 sVar4 = shape_angle.y;
|
||||
s16 sVar5 = current.angle.y;
|
||||
if (m34D0 > 0) {
|
||||
|
||||
@@ -1381,7 +1381,7 @@ BOOL daPy_lk_c::checkNoCollisionCorret() {
|
||||
mDemo.getDemoType() == 1 ||
|
||||
mDemo.getDemoMode() == daPy_demo_c::DEMO_OPEN_TREASURE_e ||
|
||||
mDemo.getDemoMode() == daPy_demo_c::DEMO_UNK_030_e ||
|
||||
checkResetFlg0(daPyRFlg0_UNK1000) ||
|
||||
checkResetFlg0(daPyRFlg0_CRAWL_AUTO_MOVE) ||
|
||||
eventInfo.checkCommandDoor() ||
|
||||
mCurProc == daPyProc_VERTICAL_JUMP_e ||
|
||||
mCurProc == daPyProc_CRAWL_END_e ||
|
||||
@@ -1997,7 +1997,7 @@ BOOL daPy_lk_c::draw() {
|
||||
}
|
||||
entryDLSetLight(mpEquipItemModel, checkFreezeState());
|
||||
if (mpSwordModel1 != NULL) {
|
||||
if (checkChanceMode() || checkNoResetFlg1(daPyFlg1_UNK8000) || checkFinalMasterSwordEquip()) {
|
||||
if (checkChanceMode() || checkNoResetFlg1(daPyFlg1_SOUP_POWER_UP) || checkFinalMasterSwordEquip()) {
|
||||
updateDLSetLight(mpSwordModel1, 0);
|
||||
}
|
||||
}
|
||||
@@ -4342,7 +4342,7 @@ BOOL daPy_lk_c::checkNextActionFromButton() {
|
||||
if ((daPy_getPlayerActorClass() == this && !dComIfGp_event_runCheck()) &&
|
||||
!checkGrabWear())
|
||||
{
|
||||
onResetFlg0(daPyRFlg0_UNK4000000);
|
||||
onResetFlg0(daPyRFlg0_SUBJECT_ACCEPT);
|
||||
if (dComIfGp_checkCameraAttentionStatus(mCameraInfoIdx, 0x1000)) {
|
||||
return procSubjectivity_init(0);
|
||||
}
|
||||
@@ -5019,7 +5019,7 @@ BOOL daPy_lk_c::setDamagePoint(f32 amount) {
|
||||
if (!checkNoDamageMode()) {
|
||||
dComIfGp_setItemLifeCount(amount);
|
||||
if (amount < 0.0f) {
|
||||
offNoResetFlg1(daPyFlg1_UNK8000);
|
||||
offNoResetFlg1(daPyFlg1_SOUP_POWER_UP);
|
||||
#if VERSION > VERSION_JPN
|
||||
if (!checkFinalMasterSwordEquip())
|
||||
#endif
|
||||
@@ -6437,7 +6437,7 @@ BOOL daPy_lk_c::procCrouchDefense_init() {
|
||||
BOOL daPy_lk_c::procCrouchDefense() {
|
||||
dComIfGp_setRStatus(dActStts_DEFEND_e);
|
||||
if (dCam_getBody()->ChangeModeOK(4) && current.pos.y >= m35D0) {
|
||||
onResetFlg0(daPyRFlg0_UNK4000000);
|
||||
onResetFlg0(daPyRFlg0_SUBJECT_ACCEPT);
|
||||
if (dComIfGp_checkCameraAttentionStatus(mCameraInfoIdx, 0x1000) && !dComIfGp_event_runCheck()) {
|
||||
return procSubjectivity_init(1);
|
||||
}
|
||||
@@ -6564,7 +6564,7 @@ BOOL daPy_lk_c::procCrouch() {
|
||||
|
||||
dComIfGp_setRStatus(dActStts_CROUCH_e);
|
||||
if (dCam_getBody()->ChangeModeOK(4) && current.pos.y >= m35D0) {
|
||||
onResetFlg0(daPyRFlg0_UNK4000000);
|
||||
onResetFlg0(daPyRFlg0_SUBJECT_ACCEPT);
|
||||
if (dComIfGp_checkCameraAttentionStatus(mCameraInfoIdx, 0x1000) && !dComIfGp_event_runCheck()) {
|
||||
return procSubjectivity_init(1);
|
||||
}
|
||||
@@ -9640,7 +9640,7 @@ void daPy_lk_c::setWorldMatrix() {
|
||||
/* 8011D070-8011D0E4 .text setAtParam__9daPy_lk_cFUli11dCcG_At_SplUcUcUcf */
|
||||
void daPy_lk_c::setAtParam(u32 type, int atp, dCcG_At_Spl spl, u8 se, u8 hitMark, u8 cutType, f32 radius) {
|
||||
dCcD_Cps* cps = mAtCps;
|
||||
if (type == AT_TYPE_SWORD && checkNoResetFlg1(daPyFlg1_UNK8000)) {
|
||||
if (type == AT_TYPE_SWORD && checkNoResetFlg1(daPyFlg1_SOUP_POWER_UP)) {
|
||||
atp *= 2;
|
||||
}
|
||||
if (type != AT_TYPE_SWORD) {
|
||||
@@ -9868,7 +9868,7 @@ void daPy_lk_c::setCollision() {
|
||||
if (mpCutfBrk != NULL) {
|
||||
if (checkModeFlg(ModeFlg_PARRY)) {
|
||||
mpCutfBrk->setFrame(2.0f);
|
||||
} else if (checkNoResetFlg1(daPyFlg1_UNK8000)) {
|
||||
} else if (checkNoResetFlg1(daPyFlg1_SOUP_POWER_UP)) {
|
||||
mpCutfBrk->setFrame(1.0f);
|
||||
} else {
|
||||
mpCutfBrk->setFrame(0.0f);
|
||||
@@ -9931,7 +9931,7 @@ void daPy_lk_c::setCollision() {
|
||||
prm0 = &nm_turn_prm0;
|
||||
prm1 = &nm_turn_prm1;
|
||||
env = &nm_turn_env;
|
||||
} else if (mCurProc == daPyProc_CUT_ROLL_e || checkNoResetFlg1(daPyFlg1_UNK8000)) {
|
||||
} else if (mCurProc == daPyProc_CUT_ROLL_e || checkNoResetFlg1(daPyFlg1_SOUP_POWER_UP)) {
|
||||
if (checkNormalSwordEquip()) {
|
||||
if (mCurProc == daPyProc_CUT_ROLL_e) {
|
||||
dVar27 = m_HIO->mCut.mCutRoll.m.field_0x18;
|
||||
@@ -11531,7 +11531,7 @@ BOOL daPy_lk_c::execute() {
|
||||
}
|
||||
offNoResetFlg0(daPyFlg0_UNK20000);
|
||||
if (checkNoResetFlg0(daPyFlg0_UNK400000)) {
|
||||
onResetFlg0(daPyRFlg0_UNK200);
|
||||
onResetFlg0(daPyRFlg0_ROPE_JUMP_LAND);
|
||||
}
|
||||
offNoResetFlg0(daPyFlg0_UNK400000);
|
||||
if (current.pos.y < 2000.0f && dComIfG_Bgsp()->GetSpecialCode(mAcch.m_gnd) != 1) {
|
||||
@@ -11860,7 +11860,7 @@ BOOL daPy_lk_c::playerDelete() {
|
||||
|
||||
dComIfGp_clearPlayerStatus0(0, daPyStts0_BOOMERANG_WAIT_e);
|
||||
dComIfGp_clearPlayerStatus1(0, daPyStts1_UNK40000_e);
|
||||
g_dComIfG_gameInfo.play.field_0x4947 = 0;
|
||||
dComIfGp_setMetronomeOff();
|
||||
|
||||
cancelNoDamageMode();
|
||||
|
||||
@@ -12706,7 +12706,7 @@ cPhs_State daPy_lk_c::makeBgWait() {
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
if ((dComIfGs_getLastSceneMode() & 0x4000) != 0) {
|
||||
onNoResetFlg1(daPyFlg1_UNK8000);
|
||||
onNoResetFlg1(daPyFlg1_SOUP_POWER_UP);
|
||||
}
|
||||
|
||||
l_debug_keep_pos = current.pos;
|
||||
|
||||
@@ -29,13 +29,13 @@ void daPy_lk_c::freeRopeItem() {
|
||||
if (mEquipItem == dItem_GRAPPLING_HOOK_e) {
|
||||
fopAc_ac_c* rope = mActorKeepRope.getActor();
|
||||
if (mActorKeepEquip.getActor() != NULL) {
|
||||
onResetFlg0(daPyRFlg0_UNK40000000);
|
||||
onResetFlg0(daPyRFlg0_ROPE_FORCE_END);
|
||||
}
|
||||
if (rope != NULL) {
|
||||
if (fopAcM_GetName(rope) == PROC_HIMO2) {
|
||||
fopAcM_SetParam(rope, 4);
|
||||
mActorKeepRope.clearData();
|
||||
onResetFlg0(daPyRFlg0_UNK40000000);
|
||||
onResetFlg0(daPyRFlg0_ROPE_FORCE_END);
|
||||
} else if (fopAcM_GetName(rope) == PROC_HIMO3) {
|
||||
mEquipItem = daPyItem_NONE_e;
|
||||
fopAcM_SetParam(rope, 3);
|
||||
|
||||
@@ -655,7 +655,7 @@ BOOL daPy_lk_c::procShipPaddle() {
|
||||
dComIfGp_clearPlayerStatus0(0, daPyStts0_UNK2000_e);
|
||||
}
|
||||
} else {
|
||||
onResetFlg0(daPyRFlg0_UNK4000000);
|
||||
onResetFlg0(daPyRFlg0_SUBJECT_ACCEPT);
|
||||
if (dComIfGp_checkCameraAttentionStatus(mCameraInfoIdx, 0x1000) && !dComIfGp_event_runCheck()) {
|
||||
setSubjectMode();
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ void daPy_lk_c::setLightSaver() {
|
||||
}
|
||||
if (checkChanceMode()) {
|
||||
mpEquipItemBrk->setFrame(1.0f);
|
||||
} else if (checkNoResetFlg1(daPyFlg1_UNK8000)) {
|
||||
} else if (checkNoResetFlg1(daPyFlg1_SOUP_POWER_UP)) {
|
||||
mpEquipItemBrk->setFrame(0.0f);
|
||||
} else {
|
||||
mpEquipItemBrk->setFrame(2.0f);
|
||||
@@ -168,10 +168,10 @@ void daPy_lk_c::setLightSaver() {
|
||||
#else
|
||||
!checkDemoSwordNoDraw(0) &&
|
||||
#endif
|
||||
((checkChanceMode() || checkNoResetFlg1(daPyFlg1_UNK8000)) || checkFinalMasterSwordEquip()))
|
||||
((checkChanceMode() || checkNoResetFlg1(daPyFlg1_SOUP_POWER_UP)) || checkFinalMasterSwordEquip()))
|
||||
{
|
||||
simpleAnmPlay(mpSwordBtk);
|
||||
if ((m3454.getEmitter() == NULL) && (checkChanceMode() || checkNoResetFlg1(daPyFlg1_UNK8000))) {
|
||||
if ((m3454.getEmitter() == NULL) && (checkChanceMode() || checkNoResetFlg1(daPyFlg1_SOUP_POWER_UP))) {
|
||||
pJVar7 = m3454.makeEmitter(dPa_name::ID_COMMON_0309, mpSwordModel1->getAnmMtx(2), ¤t.pos, NULL);
|
||||
if (pJVar7 != 0) {
|
||||
if (checkMasterSwordEquip()) {
|
||||
@@ -179,7 +179,7 @@ void daPy_lk_c::setLightSaver() {
|
||||
pJVar7->setGlobalParticleScale(p_scale);
|
||||
}
|
||||
}
|
||||
} else if (!checkChanceMode() && (!checkNoResetFlg1(daPyFlg1_UNK8000) && checkFinalMasterSwordEquip())) {
|
||||
} else if (!checkChanceMode() && (!checkNoResetFlg1(daPyFlg1_SOUP_POWER_UP) && checkFinalMasterSwordEquip())) {
|
||||
m3454.end();
|
||||
}
|
||||
if (checkChanceMode()) {
|
||||
@@ -195,14 +195,14 @@ void daPy_lk_c::setLightSaver() {
|
||||
pJVar7->setGlobalEnvColor(pbVar9->r, pbVar9->g, pbVar9->b);
|
||||
}
|
||||
if ((dComIfGp_getDoStatus() == dActStts_PARRY_e && m355C == 0) ||
|
||||
((checkNoResetFlg1(daPyFlg1_UNK8000) || checkFinalMasterSwordEquip()) &&
|
||||
((checkNoResetFlg1(daPyFlg1_SOUP_POWER_UP) || checkFinalMasterSwordEquip()) &&
|
||||
!checkNoResetFlg1(daPyFlg1_UNK200000)))
|
||||
{
|
||||
if (dComIfGp_getDoStatus() == dActStts_PARRY_e && m355C == 0) {
|
||||
pbVar9 = &g_prm1;
|
||||
pbVar8 = pbVar9;
|
||||
dComIfGp_getVibration().StartShock(6, 1, cXyz(0.0f, 1.0f, 0.0f));
|
||||
} else if (checkNoResetFlg1(daPyFlg1_UNK8000)) {
|
||||
} else if (checkNoResetFlg1(daPyFlg1_SOUP_POWER_UP)) {
|
||||
pbVar9 = &y_prm1;
|
||||
pbVar8 = &y_env1;
|
||||
} else {
|
||||
@@ -288,7 +288,7 @@ int daPy_lk_c::getSwordBlurColor() {
|
||||
if (checkChanceMode()) {
|
||||
return 2;
|
||||
}
|
||||
if (checkNoResetFlg1(daPyFlg1_UNK8000)) {
|
||||
if (checkNoResetFlg1(daPyFlg1_SOUP_POWER_UP)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1336,14 +1336,14 @@ BOOL daPy_lk_c::procCutTurn_init(int param_0) {
|
||||
}
|
||||
if (checkNormalSwordEquip()) {
|
||||
m35A4 = m_HIO->mCut.mCutTurn.m.field_0x40;
|
||||
if (checkNoResetFlg1(daPyFlg1_UNK8000)) {
|
||||
if (checkNoResetFlg1(daPyFlg1_SOUP_POWER_UP)) {
|
||||
mAtCyl.SetAtAtp(4);
|
||||
} else {
|
||||
mAtCyl.SetAtAtp(2);
|
||||
}
|
||||
} else {
|
||||
m35A4 = m_HIO->mCut.mCutTurn.m.field_0x44;
|
||||
if (checkNoResetFlg1(daPyFlg1_UNK8000)) {
|
||||
if (checkNoResetFlg1(daPyFlg1_SOUP_POWER_UP)) {
|
||||
mAtCyl.SetAtAtp(8);
|
||||
} else {
|
||||
mAtCyl.SetAtAtp(4);
|
||||
@@ -1509,14 +1509,14 @@ BOOL daPy_lk_c::procCutRoll_init() {
|
||||
offResetFlg0(daPyRFlg0_UNK8000000);
|
||||
if (checkNormalSwordEquip()) {
|
||||
m35A4 = m_HIO->mCut.mCutRoll.m.field_0x20;
|
||||
if (checkNoResetFlg1(daPyFlg1_UNK8000)) {
|
||||
if (checkNoResetFlg1(daPyFlg1_SOUP_POWER_UP)) {
|
||||
mAtCyl.SetAtAtp(4);
|
||||
} else {
|
||||
mAtCyl.SetAtAtp(2);
|
||||
}
|
||||
} else {
|
||||
m35A4 = m_HIO->mCut.mCutRoll.m.field_0x24;
|
||||
if (checkNoResetFlg1(daPyFlg1_UNK8000)) {
|
||||
if (checkNoResetFlg1(daPyFlg1_SOUP_POWER_UP)) {
|
||||
mAtCyl.SetAtAtp(8);
|
||||
} else {
|
||||
mAtCyl.SetAtAtp(4);
|
||||
|
||||
@@ -198,9 +198,9 @@ BOOL daPy_lk_c::procTactWait_init(int r30) {
|
||||
}
|
||||
mProcVar0.m3570 = r30;
|
||||
if (mProcVar0.m3570 != -4) {
|
||||
g_dComIfG_gameInfo.play.field_0x4947 = 1;
|
||||
dComIfGp_setMetronomeOn();
|
||||
} else {
|
||||
g_dComIfG_gameInfo.play.field_0x4947 = 0;
|
||||
dComIfGp_setMetronomeOff();
|
||||
}
|
||||
return TRUE;
|
||||
} else if (r30 == -1) {
|
||||
@@ -292,7 +292,7 @@ BOOL daPy_lk_c::procTactWait_init(int r30) {
|
||||
setTactZev(-1, -1, NULL);
|
||||
|
||||
if (mProcVar0.m3570 != -4) {
|
||||
g_dComIfG_gameInfo.play.field_0x4947 = 1;
|
||||
dComIfGp_setMetronomeOn();
|
||||
}
|
||||
mDoAud_taktModeMute();
|
||||
|
||||
@@ -316,7 +316,7 @@ BOOL daPy_lk_c::procTactWait() {
|
||||
if (m34D2 == 0) {
|
||||
if (mProcVar0.m3570 == -5 || mProcVar0.m3570 == 6 || mProcVar0.m3570 == 7) {
|
||||
dComIfGp_evmng_cutEnd(mStaffIdx);
|
||||
g_dComIfG_gameInfo.play.field_0x4947 = 0;
|
||||
dComIfGp_setMetronomeOff();
|
||||
} else if (mProcVar0.m3570 == -1 || mProcVar0.m3570 == -3 || mProcVar0.m3570 >= 0) {
|
||||
procTactPlay_init(m3574, mProcVar0.m3570 == -1, mProcVar0.m3570 >= 0);
|
||||
}
|
||||
@@ -342,7 +342,7 @@ BOOL daPy_lk_c::procTactWait() {
|
||||
seStartSystem(JA_SE_TAKT_USE_CANCEL);
|
||||
}
|
||||
|
||||
g_dComIfG_gameInfo.play.field_0x4947 = 0;
|
||||
dComIfGp_setMetronomeOff();
|
||||
|
||||
if (cancelTrigger() && mProcVar0.m3570 == 5) {
|
||||
m35AC = -1000.0f;
|
||||
@@ -587,7 +587,7 @@ BOOL daPy_lk_c::procTactPlay() {
|
||||
|
||||
if (m34D0 != 0) {
|
||||
if (m34D8 != 0) {
|
||||
g_dComIfG_gameInfo.play.field_0x4947 = 0;
|
||||
dComIfGp_setMetronomeOff();
|
||||
dComIfGp_evmng_cutEnd(mStaffIdx);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -595,7 +595,7 @@ BOOL daPy_lk_c::procTactPlay() {
|
||||
msg_class* msg_p = fopMsgM_SearchByID(m3628);
|
||||
if (msg_p == NULL || msg_p->mStatus == fopMsgStts_BOX_CLOSED_e) {
|
||||
fopAc_ac_c* tactZevPartner = NULL;
|
||||
g_dComIfG_gameInfo.play.field_0x4947 = 0;
|
||||
dComIfGp_setMetronomeOff();
|
||||
|
||||
if (msg_p != NULL) {
|
||||
msg_p->mStatus = fopMsgStts_MSG_DESTROYED_e;
|
||||
|
||||
@@ -177,7 +177,7 @@ bool daWarpgn_c::_execute() {
|
||||
demo_execute();
|
||||
}
|
||||
|
||||
if (m388 != false || dComIfGs_isEventBit(dSv_event_flag_c::UNK_3D02) != 0) {
|
||||
if (m388 || dComIfGs_isEventBit(dSv_event_flag_c::UNK_3D02) != 0) {
|
||||
fopAcM_seStart(this, JA_SE_OBJ_GN_WAPR_EFF, 0);
|
||||
}
|
||||
mpModel->setBaseScale(scale);
|
||||
@@ -252,7 +252,7 @@ void daWarpgn_c::demo_proc() {
|
||||
(this->*event_init_tbl[action_index])(mStaffId);
|
||||
}
|
||||
|
||||
if ((this->*event_action_tbl[action_index])(mStaffId) != FALSE) {
|
||||
if ((this->*event_action_tbl[action_index])(mStaffId)) {
|
||||
dComIfGp_evmng_cutEnd(mStaffId);
|
||||
}
|
||||
}
|
||||
@@ -393,24 +393,28 @@ void daWarpgn_c::eventOrder() {
|
||||
/* 0000114C-00001258 .text checkOrder__10daWarpgn_cFv */
|
||||
void daWarpgn_c::checkOrder() {
|
||||
if (eventInfo.checkCommandDemoAccrpt()) {
|
||||
if ((dComIfGp_evmng_startCheck(mEvtToMajyuuWarpIdx) != FALSE) && (m2C4 != 0)) {
|
||||
if (dComIfGp_evmng_startCheck(mEvtToMajyuuWarpIdx) && m2C4 != 0) {
|
||||
m2C4 = 0;
|
||||
}
|
||||
|
||||
if ((dComIfGp_evmng_startCheck(mEvtAppearWarpIdx) != FALSE) && (m2C4 != 0)) {
|
||||
if (dComIfGp_evmng_startCheck(mEvtAppearWarpIdx) && m2C4 != 0) {
|
||||
m2C4 = 0;
|
||||
}
|
||||
|
||||
if (dComIfGp_evmng_endCheck(mEvtToMajyuuWarpIdx) != FALSE) {
|
||||
if (dComIfGp_evmng_endCheck(mEvtToMajyuuWarpIdx)) {
|
||||
dLib_setNextStageBySclsNum(mSceneNo, fopAcM_GetRoomNo(this));
|
||||
}
|
||||
|
||||
if (dComIfGp_evmng_endCheck(mEvtAppearWarpIdx) != FALSE) {
|
||||
if (dComIfGp_evmng_endCheck(mEvtAppearWarpIdx)) {
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::UNK_3D02);
|
||||
mEvtAppearWarpIdx = -1;
|
||||
dComIfGp_event_reset();
|
||||
}
|
||||
} else if (m2C4 == 0) {
|
||||
} else if (m2C4 == 0
|
||||
#if VERSION == VERSION_DEMO
|
||||
&& !dComIfGp_event_runCheck()
|
||||
#endif
|
||||
) {
|
||||
normal_execute();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ void dComIfG_play_c::itemInit() {
|
||||
field_0x4944 = 7;
|
||||
mScopeType = 0;
|
||||
mOperateWind = 0;
|
||||
field_0x4947 = 0;
|
||||
mMetronome = false;
|
||||
mMesgSendButton = 0;
|
||||
mMesgCancelButton = 0;
|
||||
|
||||
@@ -660,7 +660,7 @@ void dComIfGp_setNextStage(const char* i_stageName, s16 i_point, s8 i_roomNo, s8
|
||||
|
||||
i_lastMode |= link->checkTinkleShield() << 0x10;
|
||||
|
||||
if (link->checkNoResetFlg1(daPy_lk_c::daPyFlg1_UNK8000)) {
|
||||
if (link->checkNoResetFlg1(daPy_lk_c::daPyFlg1_SOUP_POWER_UP)) {
|
||||
i_lastMode |= 0x4000;
|
||||
}
|
||||
}
|
||||
|
||||
+7
-11
@@ -750,9 +750,9 @@ void dMeter_statusCheck(sub_meter_class* i_Meter) {
|
||||
} else if ((dComIfGp_checkPlayerStatus1(0, daPyStts1_WIND_WAKER_CONDUCT_e)) && (dComIfGp_getAStatus() == dActStts_RETURN_e)) {
|
||||
i_Meter->mStatusFlags |= dMtrStts_UNK200000_e;
|
||||
} else if ((dComIfGp_event_runCheck()) && (dMenu_getMenuStatus() != 4)) {
|
||||
if (((dComIfGp_demo_mode() != 1) && (dComIfGp_getMesgStatus() != 0)) && (g_dComIfG_gameInfo.play.field_0x4947 == 0)) {
|
||||
if (((dComIfGp_demo_mode() != 1) && (dComIfGp_getMesgStatus() != 0)) && !dComIfGp_getMetronome()) {
|
||||
i_Meter->mStatusFlags |= dMtrStts_UNK100_e;
|
||||
} else if ((dComIfGp_demo_mode() != 1) && (g_dComIfG_gameInfo.play.field_0x4947 != 0)) {
|
||||
} else if ((dComIfGp_demo_mode() != 1) && dComIfGp_getMetronome()) {
|
||||
i_Meter->mStatusFlags |= dMtrStts_UNK200000_e;
|
||||
dComIfGp_setAStatusForce(dActStts_HIDDEN_e);
|
||||
} else {
|
||||
@@ -1450,7 +1450,7 @@ void dMeter_heartColor(sub_meter_class* i_Meter) {
|
||||
JUtility::TColor white(0xFF, 0xFF, 0xFF, 0xFF);
|
||||
JUtility::TColor black(0x00, 0x00, 0x00, 0x00);
|
||||
|
||||
if ((daPy_getPlayerActorClass()->checkNoResetFlg1(daPy_lk_c::daPyFlg1_UNK8000)) && (dComIfGp_getMiniGameType() != 6)) {
|
||||
if ((daPy_getPlayerActorClass()->checkSoupPowerUp()) && (dComIfGp_getMiniGameType() != 6)) {
|
||||
JUtility::TColor white2 = -1;
|
||||
JUtility::TColor black2 = -1;
|
||||
if (i_Meter->mHeartShadow[0].mUserArea == 0) {
|
||||
@@ -4638,7 +4638,7 @@ void dMeter_windMove(sub_meter_class* i_Meter) {
|
||||
|
||||
/* 801FBD7C-801FBF24 .text dMeter_metronomeMove__FP15sub_meter_class */
|
||||
void dMeter_metronomeMove(sub_meter_class* i_Meter) {
|
||||
if ((((g_dComIfG_gameInfo.play.field_0x4947 != 0) && (!(i_Meter->mStatusFlags & dMtrStts_UNK8_e))) && (!(i_Meter->mStatusFlags & dMtrStts_UNK10_e))) &&
|
||||
if (((dComIfGp_getMetronome() && (!(i_Meter->mStatusFlags & dMtrStts_UNK8_e))) && (!(i_Meter->mStatusFlags & dMtrStts_UNK10_e))) &&
|
||||
((!(i_Meter->mStatusFlags & dMtrStts_UNK800000_e)) && (!(i_Meter->mStatusFlags & dMtrStts_UNK20_e))))
|
||||
{
|
||||
if ((i_Meter->field_0x3028 == 0) && (dMn_c == NULL)) {
|
||||
@@ -7090,7 +7090,7 @@ static BOOL dMeter_Draw(sub_meter_class* i_Meter) {
|
||||
}
|
||||
dComIfGd_set2DOpaTop(&meter2);
|
||||
dMeter_moveItemDraw(i_Meter);
|
||||
if ((i_Meter->field_0x3028 == 1) && (g_dComIfG_gameInfo.play.field_0x4947 != 0) && (!(i_Meter->mStatusFlags & dMtrStts_UNK8_e)) &&
|
||||
if ((i_Meter->field_0x3028 == 1) && dComIfGp_getMetronome() && (!(i_Meter->mStatusFlags & dMtrStts_UNK8_e)) &&
|
||||
(!(i_Meter->mStatusFlags & dMtrStts_UNK10_e)) && (!(i_Meter->mStatusFlags & dMtrStts_UNK800000_e)) && (!(i_Meter->mStatusFlags & dMtrStts_UNK20_e)))
|
||||
{
|
||||
dComIfGd_set2DOpa(dMn_c);
|
||||
@@ -7430,7 +7430,6 @@ void mapCtrlDisp_c::initMapCtrlDisp() {
|
||||
/* 80205A44-80205D24 .text moveMapCtrlDisp__13mapCtrlDisp_cFv */
|
||||
void mapCtrlDisp_c::moveMapCtrlDisp() {
|
||||
f32 fVar1;
|
||||
bool bVar5;
|
||||
s8 uVar6;
|
||||
f32 dVar7;
|
||||
|
||||
@@ -7468,11 +7467,8 @@ void mapCtrlDisp_c::moveMapCtrlDisp() {
|
||||
}
|
||||
if (dComIfGp_checkCameraAttentionStatus(0, 0x400)) {
|
||||
daPy_py_c* player = daPy_getPlayerActorClass();
|
||||
bVar5 = false;
|
||||
if ((player->checkResetFlg0(daPy_py_c::daPyRFlg0_UNK4000000)) && (dComIfGp_event_getMode() == dEvtMode_NONE_e)) {
|
||||
bVar5 = true;
|
||||
}
|
||||
if (bVar5) {
|
||||
BOOL temp = player->checkSubjectAccept() && !dComIfGp_event_runCheck();
|
||||
if (temp) {
|
||||
dMap_c::mIconSelfAlpha = 0xcc;
|
||||
dMap_c::mIconDispMode = 2;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1180,7 +1180,7 @@ u8 dSv_event_c::getEventReg(u16 i_reg) {
|
||||
|
||||
/* 8005CB94-8005CBB0 .text init__13dSv_reserve_cFv */
|
||||
void dSv_reserve_c::init() {
|
||||
for (int i = 0; i < sizeof(dSv_reserve_c); i++) {
|
||||
for (int i = 0; i < ARRAY_SIZE(mReserve); i++) {
|
||||
mReserve[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,9 +276,9 @@ s32 fopAcM_createHeap(fopAc_ac_c* i_this, u32 size, u32 align) {
|
||||
align = 0x20;
|
||||
|
||||
i_this->heap = mDoExt_createSolidHeapFromGameToCurrent(size, align);
|
||||
if (i_this->heap == 0) {
|
||||
if (i_this->heap == NULL) {
|
||||
OSReport_Error("fopAcM_createHeap 確保失敗\n");
|
||||
JUT_CONFIRM(0x34c, i_this->heap != 0);
|
||||
JUT_CONFIRM(0x34c, i_this->heap != NULL);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,14 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if VERSION <= VERSION_JPN
|
||||
#define HEADER_TITLE "ゼルダの伝説~風のタクト~"
|
||||
#define HEADER_COMMENT "%d月%d日のセーブデータです"
|
||||
#else
|
||||
#define HEADER_TITLE "Zelda: The Wind Waker"
|
||||
#define HEADER_COMMENT "%d/%d Save Data"
|
||||
#endif
|
||||
|
||||
static u8 sTmpBuf[0x2000] ALIGN_DECL(32);
|
||||
static u8 sTmpBuf2[0x2000] ALIGN_DECL(32);
|
||||
static u32 sSaveCount;
|
||||
@@ -197,19 +205,11 @@ s32 mDoMemCdRWm_Restore2(CARDFileInfo* card) {
|
||||
|
||||
/* 80019F4C-8001A0A8 .text mDoMemCdRWm_BuildHeader__FP22mDoMemCdRWm_HeaderData */
|
||||
void mDoMemCdRWm_BuildHeader(mDoMemCdRWm_HeaderData* header) {
|
||||
#if VERSION <= VERSION_JPN
|
||||
snprintf(header->comment, sizeof(header->comment), "ゼルダの伝説~風のタクト~");
|
||||
#else
|
||||
snprintf(header->comment, sizeof(header->comment), "Zelda: The Wind Waker");
|
||||
#endif
|
||||
snprintf(header->comment, sizeof(header->comment), HEADER_TITLE);
|
||||
OSTime time = OSGetTime();
|
||||
OSCalendarTime cal;
|
||||
OSTicksToCalendarTime(time, &cal);
|
||||
#if VERSION <= VERSION_JPN
|
||||
snprintf(header->info, sizeof(header->info), "%d月%d日のセーブデータです", cal.month + 1, cal.day_of_month);
|
||||
#elif VERSION == VERSION_USA
|
||||
snprintf(header->info, sizeof(header->info), "%d/%d Save Data", cal.month + 1, cal.day_of_month);
|
||||
#else
|
||||
#if VERSION == VERSION_PAL
|
||||
switch (dComIfGs_getPalLanguage()) {
|
||||
case 0:
|
||||
snprintf(header->info, sizeof(header->info), "%d/%d Save Data", cal.month + 1, cal.day_of_month);
|
||||
@@ -227,6 +227,8 @@ void mDoMemCdRWm_BuildHeader(mDoMemCdRWm_HeaderData* header) {
|
||||
snprintf(header->info, sizeof(header->info), "Dati salvati: %d/%d", cal.day_of_month, cal.month + 1);
|
||||
break;
|
||||
}
|
||||
#else
|
||||
snprintf(header->info, sizeof(header->info), HEADER_COMMENT, cal.month + 1, cal.day_of_month);
|
||||
#endif
|
||||
mDoDvdThd_mountArchive_c* cmd = mDoDvdThd_mountArchive_c::create("/res/CardIcon/cardicon.arc", 0, NULL);
|
||||
while (!cmd->sync()) ;
|
||||
|
||||
Reference in New Issue
Block a user