mirror of
https://github.com/zeldaret/ss
synced 2026-08-21 22:40:29 -04:00
Some camera stuff
This commit is contained in:
@@ -410,21 +410,33 @@ toBeSorted/d_enemy_sword_mdl.cpp:
|
||||
.data start:0x8050E060 end:0x8050E090
|
||||
.sdata2 start:0x80579230 end:0x80579238
|
||||
|
||||
toBeSorted/d_camera.cpp:
|
||||
.text start:0x8006BBE0 end:0x80083370 align:16
|
||||
.ctors start:0x804DB6AC end:0x804DB6B0
|
||||
.sbss start:0x80575290 end:0x80575370
|
||||
toBeSorted/d_camera_base.cpp:
|
||||
.text start:0x8006BBE0 end:0x8006BE20 align:16
|
||||
|
||||
toBeSorted/d_event_1.cpp:
|
||||
toBeSorted/d_camera_game.cpp:
|
||||
.text start:0x8006BE20 end:0x80083370 align:16
|
||||
.ctors start:0x804DB6AC end:0x804DB6B0
|
||||
.data start:0x8050E090 end:0x8050EA18
|
||||
.sdata start:0x80571D70 end:0x80571ED8
|
||||
.sbss start:0x80575290 end:0x80575370
|
||||
.sdata2 start:0x80579238 end:0x80579418
|
||||
.bss start:0x805A08C8 end:0x805A1660
|
||||
|
||||
toBeSorted/d_camera_event.cpp:
|
||||
.text start:0x80083370 end:0x800928F0 align:16
|
||||
.ctors start:0x804DB6B0 end:0x804DB6B4
|
||||
.data start:0x8050EA18 end:0x8050F180
|
||||
|
||||
toBeSorted/unk_map_cam.cpp:
|
||||
toBeSorted/d_camera_map.cpp:
|
||||
.text start:0x800928F0 end:0x8009345C align:16
|
||||
.ctors start:0x804DB6B4 end:0x804DB6B8
|
||||
.data start:0x8050F180 end:0x8050F1C8
|
||||
.sdata2 start:0x80579538 end:0x805795A0
|
||||
.bss start:0x805A2F18 end:0x805A2F58
|
||||
|
||||
toBeSorted/unk_vec_math_event.cpp:
|
||||
toBeSorted/d_camera_math.cpp:
|
||||
.text start:0x80093460 end:0x80093A74 align:16
|
||||
.sdata2 start:0x805795A0 end:0x80579600
|
||||
|
||||
toBeSorted/attention.cpp:
|
||||
.text start:0x80093A80 end:0x80096EAC align:16
|
||||
@@ -1353,7 +1365,10 @@ d/d_camera.cpp:
|
||||
.text start:0x8019D160 end:0x8019ED0C align:16
|
||||
.ctors start:0x804DB800 end:0x804DB804
|
||||
.data start:0x8052C180 end:0x8052C230
|
||||
.sdata start:0x80572EA0 end:0x80572EB8
|
||||
.sbss start:0x80575708 end:0x80575710
|
||||
.sdata2 start:0x8057AF50 end:0x8057AFA8
|
||||
.bss start:0x805B27A0 end:0x805B27D8
|
||||
|
||||
d/d_light_obj.cpp:
|
||||
.text start:0x8019ED10 end:0x801A65C8 align:16
|
||||
|
||||
+108
-108
@@ -3063,30 +3063,30 @@ fn_8006B810 = .text:0x8006B810; // type:function size:0x5C
|
||||
fn_8006B870 = .text:0x8006B870; // type:function size:0x10
|
||||
calc__16dEnemySwordMdl_cFRC6mMtx_cRC7mVec3_cb = .text:0x8006B880; // type:function size:0x2A8
|
||||
entry__16dEnemySwordMdl_cFP12dAcObjBase_cP15dShadowCircle_cP7mQuat_c = .text:0x8006BB30; // type:function size:0xA4
|
||||
fn_8006BBE0 = .text:0x8006BBE0; // type:function size:0x70
|
||||
fn_8006BC50 = .text:0x8006BC50; // type:function size:0x18
|
||||
fn_8006BC70 = .text:0x8006BC70; // type:function size:0xA8
|
||||
fn_8006BD20 = .text:0x8006BD20; // type:function size:0x4
|
||||
fn_8006BD30 = .text:0x8006BD30; // type:function size:0x24
|
||||
fn_8006BD60 = .text:0x8006BD60; // type:function size:0x44
|
||||
fn_8006BDB0 = .text:0x8006BDB0; // type:function size:0xC
|
||||
fn_8006BDC0 = .text:0x8006BDC0; // type:function size:0xC
|
||||
fn_8006BDD0 = .text:0x8006BDD0; // type:function size:0x8
|
||||
fn_8006BDE0 = .text:0x8006BDE0; // type:function size:0x40
|
||||
fn_8006BE20 = .text:0x8006BE20; // type:function size:0x40
|
||||
doCreate__13dCameraBase_cFl = .text:0x8006BBE0; // type:function size:0x70
|
||||
doRemove__13dCameraBase_cFv = .text:0x8006BC50; // type:function size:0x18
|
||||
doExecute__13dCameraBase_cFv = .text:0x8006BC70; // type:function size:0xA8
|
||||
vt_0x0C__13dCameraBase_cFv = .text:0x8006BD20; // type:function size:0x4
|
||||
doDraw__13dCameraBase_cFv = .text:0x8006BD30; // type:function size:0x24
|
||||
setView__13dCameraBase_cFRC7CamView = .text:0x8006BD60; // type:function size:0x44
|
||||
vt_0x2C__13dCameraBase_cFv = .text:0x8006BDB0; // type:function size:0xC
|
||||
vt_0x28__13dCameraBase_cFv = .text:0x8006BDC0; // type:function size:0xC
|
||||
getView__13dCameraBase_cFv = .text:0x8006BDD0; // type:function size:0x8
|
||||
__dt__7CamViewFv = .text:0x8006BDE0; // type:function size:0x40
|
||||
__dt__17dCameraGame_HIO_cFv = .text:0x8006BE20; // type:function size:0x40
|
||||
debugNotif = .text:0x8006BE60; // type:function size:0x50
|
||||
debugPrintf4 = .text:0x8006BEB0; // type:function size:0x50
|
||||
debugPrintf4__FPCce = .text:0x8006BEB0; // type:function size:0x50
|
||||
debugPrintf6 = .text:0x8006BF00; // type:function size:0x50
|
||||
fn_8006BF50 = .text:0x8006BF50; // type:function size:0x4
|
||||
fn_8006BF60 = .text:0x8006BF60; // type:function size:0x8
|
||||
GetCameraDatTrendIndex = .text:0x8006BF70; // type:function size:0xF0
|
||||
getCurrentRoomId = .text:0x8006C060; // type:function size:0x10
|
||||
fn_8006C070 = .text:0x8006C070; // type:function size:0x5C
|
||||
fn_8006C0D0 = .text:0x8006C0D0; // type:function size:0x10
|
||||
fn_8006C0E0 = .text:0x8006C0E0; // type:function size:0x28
|
||||
GetCameraDatStyleIdx = .text:0x8006C110; // type:function size:0x48
|
||||
SetCameraParamTrendIndexes = .text:0x8006C160; // type:function size:0x208
|
||||
initCameraParamData = .text:0x8006C370; // type:function size:0xEC
|
||||
getTrendIndex__13dCameraGame_cFPCc = .text:0x8006BF70; // type:function size:0xF0
|
||||
getCurrentRoomId__Fv = .text:0x8006C060; // type:function size:0x10
|
||||
getCam__Fll = .text:0x8006C070; // type:function size:0x5C
|
||||
getCam__FRC5CamId = .text:0x8006C0D0; // type:function size:0x10
|
||||
getCamTrend__FRC5CamId = .text:0x8006C0E0; // type:function size:0x28
|
||||
getStyleIndex__13dCameraGame_cFUl = .text:0x8006C110; // type:function size:0x48
|
||||
cacheIdxes__13dCameraGame_cFv = .text:0x8006C160; // type:function size:0x208
|
||||
initCamParamDat__13dCameraGame_cFv = .text:0x8006C370; // type:function size:0xEC
|
||||
fn_8006C460 = .text:0x8006C460; // type:function size:0x6DC
|
||||
fn_8006CB40 = .text:0x8006CB40; // type:function size:0x9C
|
||||
fn_8006CBE0 = .text:0x8006CBE0; // type:function size:0x8
|
||||
@@ -3142,33 +3142,33 @@ fn_8007D1C0 = .text:0x8007D1C0; // type:function size:0xADC
|
||||
fn_8007DCA0 = .text:0x8007DCA0; // type:function size:0xE8
|
||||
fn_8007DD90 = .text:0x8007DD90; // type:function size:0x10
|
||||
fn_8007DDA0 = .text:0x8007DDA0; // type:function size:0x30
|
||||
fn_8007DDD0 = .text:0x8007DDD0; // type:function size:0x33C
|
||||
fn_8007E110 = .text:0x8007E110; // type:function size:0x4
|
||||
fn_8007E120 = .text:0x8007E120; // type:function size:0x4
|
||||
fn_8007E130 = .text:0x8007E130; // type:function size:0x7C
|
||||
fn_8007E1B0 = .text:0x8007E1B0; // type:function size:0x51C
|
||||
fn_8007E6D0 = .text:0x8007E6D0; // type:function size:0x1CC
|
||||
fn_8007E8A0 = .text:0x8007E8A0; // type:function size:0x230
|
||||
fn_8007EAD0 = .text:0x8007EAD0; // type:function size:0x75C
|
||||
__ct__17dCameraGame_HIO_cFv = .text:0x8007DDD0; // type:function size:0x33C
|
||||
create__17dCameraGame_HIO_cFv = .text:0x8007E110; // type:function size:0x4
|
||||
remove__17dCameraGame_HIO_cFv = .text:0x8007E120; // type:function size:0x4
|
||||
fn_8007E130__12UnkCamChecksFP13dCameraGame_c = .text:0x8007E130; // type:function size:0x7C
|
||||
fn_8007E1B0__12UnkCamChecksFP12dAcObjBase_c = .text:0x8007E1B0; // type:function size:0x51C
|
||||
__ct__13dCameraGame_cFv = .text:0x8007E6D0; // type:function size:0x1CC
|
||||
create__13dCameraGame_cFv = .text:0x8007E8A0; // type:function size:0x230
|
||||
execute__13dCameraGame_cFv = .text:0x8007EAD0; // type:function size:0x75C
|
||||
fn_8007F230 = .text:0x8007F230; // type:function size:0x94
|
||||
fn_8007F2D0 = .text:0x8007F2D0; // type:function size:0x38
|
||||
fn_8007F310 = .text:0x8007F310; // type:function size:0x1EC
|
||||
fn_8007F500 = .text:0x8007F500; // type:function size:0xF4
|
||||
fn_8007F600 = .text:0x8007F600; // type:function size:0x34
|
||||
fn_8007F640 = .text:0x8007F640; // type:function size:0x70
|
||||
fn_8007F6B0 = .text:0x8007F6B0; // type:function size:0x130
|
||||
linChkAttentionTarget__FRC7mVec3_cRC7mVec3_cR11dBgS_LinChki = .text:0x8007F500; // type:function size:0xF4
|
||||
linCross__FR11dBgS_LinChki = .text:0x8007F600; // type:function size:0x34
|
||||
camLinChkAttentionTarget__FRC7mVec3_cRC7mVec3_ci = .text:0x8007F640; // type:function size:0x70
|
||||
linCrossAttentionTarget__FRC7mVec3_cRC7mVec3_cR7mVec3_c = .text:0x8007F6B0; // type:function size:0x130
|
||||
fn_8007F7E0 = .text:0x8007F7E0; // type:function size:0x384
|
||||
fn_8007FB70 = .text:0x8007FB70; // type:function size:0x168
|
||||
fn_8007FCE0 = .text:0x8007FCE0; // type:function size:0x128
|
||||
fn_8007FE10 = .text:0x8007FE10; // type:function size:0x268
|
||||
fn_80080080 = .text:0x80080080; // type:function size:0x10
|
||||
fn_80080090 = .text:0x80080090; // type:function size:0x86C
|
||||
fn_80080900 = .text:0x80080900; // type:function size:0x8
|
||||
RemoveCameraParamData = .text:0x80080910; // type:function size:0x44
|
||||
fn_80080960 = .text:0x80080960; // type:function size:0x118
|
||||
draw__13dCameraGame_cFv = .text:0x80080900; // type:function size:0x8
|
||||
remove__13dCameraGame_cFv = .text:0x80080910; // type:function size:0x44
|
||||
fn_80080960__13dCameraGame_cFllScl = .text:0x80080960; // type:function size:0x118
|
||||
fn_80080A80 = .text:0x80080A80; // type:function size:0x6C
|
||||
fn_80080AF0 = .text:0x80080AF0; // type:function size:0x10
|
||||
fn_80080B00 = .text:0x80080B00; // type:function size:0x6C
|
||||
clearCamIds__13dCameraGame_cFv = .text:0x80080B00; // type:function size:0x6C
|
||||
fn_80080B70 = .text:0x80080B70; // type:function size:0x220
|
||||
fn_80080D90 = .text:0x80080D90; // type:function size:0x7C8
|
||||
getNewStyle = .text:0x80081560; // type:function size:0x34
|
||||
@@ -3177,16 +3177,16 @@ fn_800819E0 = .text:0x800819E0; // type:function size:0x244
|
||||
fn_80081C30 = .text:0x80081C30; // type:function size:0x25C
|
||||
doModeChange = .text:0x80081E90; // type:function size:0xEC
|
||||
doStyleChange = .text:0x80081F80; // type:function size:0x58
|
||||
fn_80081FE0 = .text:0x80081FE0; // type:function size:0x40
|
||||
fn_80082020 = .text:0x80082020; // type:function size:0xB4
|
||||
fn_800820E0 = .text:0x800820E0; // type:function size:0xC8
|
||||
isCurrentTrend__13dCameraGame_cCFPCc = .text:0x80081FE0; // type:function size:0x40
|
||||
setView__13dCameraGame_cFRC7CamView = .text:0x80082020; // type:function size:0xB4
|
||||
vt_0x08__13dCameraGame_cFv = .text:0x800820E0; // type:function size:0xC8
|
||||
fn_800821B0 = .text:0x800821B0; // type:function size:0xC0
|
||||
fn_80082270 = .text:0x80082270; // type:function size:0x44
|
||||
fn_800822C0 = .text:0x800822C0; // type:function size:0x10
|
||||
fn_800822D0 = .text:0x800822D0; // type:function size:0x24
|
||||
fn_80082300 = .text:0x80082300; // type:function size:0xC
|
||||
fn_80082310 = .text:0x80082310; // type:function size:0xB0
|
||||
fn_800823C0 = .text:0x800823C0; // type:function size:0xCF8
|
||||
__dt__13dCameraGame_cFv = .text:0x80082310; // type:function size:0xB0
|
||||
__sinit_\d_camera_game_cpp = .text:0x800823C0; // type:function size:0xCF8
|
||||
fn_800830C0 = .text:0x800830C0; // type:function size:0x60
|
||||
fn_80083120 = .text:0x80083120; // type:function size:0x60
|
||||
fn_80083180 = .text:0x80083180; // type:function size:0x60
|
||||
@@ -3201,8 +3201,8 @@ getActorName = .text:0x80083470; // type:function size:0x8
|
||||
fn_80083480 = .text:0x80083480; // type:function size:0x14
|
||||
fn_800834A0 = .text:0x800834A0; // type:function size:0x4
|
||||
fn_800834B0 = .text:0x800834B0; // type:function size:0x8
|
||||
fn_800834C0 = .text:0x800834C0; // type:function size:0x40
|
||||
fn_80083500 = .text:0x80083500; // type:function size:0x28
|
||||
__dt__18dCameraEvent_HIO_cFv = .text:0x800834C0; // type:function size:0x40
|
||||
__ct__18dCameraEvent_HIO_cFv = .text:0x80083500; // type:function size:0x28
|
||||
fn_80083530 = .text:0x80083530; // type:function size:0xD4
|
||||
getEventDZevDat = .text:0x80083610; // type:function size:0xC
|
||||
fn_80083620 = .text:0x80083620; // type:function size:0x4
|
||||
@@ -3277,12 +3277,12 @@ fn_80090AD0 = .text:0x80090AD0; // type:function size:0x48C
|
||||
fn_80090F60 = .text:0x80090F60; // type:function size:0x360
|
||||
fn_800912C0 = .text:0x800912C0; // type:function size:0x244
|
||||
getEventSubMgrDefForIndex = .text:0x80091510; // type:function size:0x30
|
||||
fn_80091540 = .text:0x80091540; // type:function size:0xD0
|
||||
__ct__14dCameraEvent_cFv = .text:0x80091540; // type:function size:0xD0
|
||||
fn_80091610 = .text:0x80091610; // type:function size:0xC4
|
||||
fn_800916E0 = .text:0x800916E0; // type:function size:0x8
|
||||
advanceCameraRelatedEventSubmanagers = .text:0x800916F0; // type:function size:0x134
|
||||
fn_80091830 = .text:0x80091830; // type:function size:0xA8
|
||||
fn_800918E0 = .text:0x800918E0; // type:function size:0xA8
|
||||
fn_800918E0__14dCameraEvent_cFls = .text:0x800918E0; // type:function size:0xA8
|
||||
fn_80091990 = .text:0x80091990; // type:function size:0xF4
|
||||
fn_80091A90 = .text:0x80091A90; // type:function size:0x44
|
||||
fn_80091AE0 = .text:0x80091AE0; // type:function size:0xA4
|
||||
@@ -3290,7 +3290,7 @@ fn_80091B90 = .text:0x80091B90; // type:function size:0x8C
|
||||
fn_80091C20 = .text:0x80091C20; // type:function size:0x8
|
||||
fn_80091C30 = .text:0x80091C30; // type:function size:0x74
|
||||
fn_80091CB0 = .text:0x80091CB0; // type:function size:0x40
|
||||
initEventRelocationStuff = .text:0x80091CF0; // type:function size:0x6A4
|
||||
__sinit_\d_camera_event_cpp = .text:0x80091CF0; // type:function size:0x6A4
|
||||
ActorReference__ActorReference = .text:0x800923A0; // type:function size:0x14
|
||||
EventSystemActorRelation__EventSystemActorRelation = .text:0x800923C0; // type:function size:0x44
|
||||
EventSystemActorRelation____dt = .text:0x80092410; // type:function size:0x60
|
||||
@@ -3304,31 +3304,31 @@ fn_80092730 = .text:0x80092730; // type:function size:0x60
|
||||
fn_80092790 = .text:0x80092790; // type:function size:0x60
|
||||
fn_800927F0 = .text:0x800927F0; // type:function size:0xA0
|
||||
fn_80092890 = .text:0x80092890; // type:function size:0x60
|
||||
fn_800928F0 = .text:0x800928F0; // type:function size:0x40
|
||||
fn_80092930 = .text:0x80092930; // type:function size:0x88
|
||||
fn_800929C0 = .text:0x800929C0; // type:function size:0x1BC
|
||||
__dt__16dCameraMap_HIO_cFv = .text:0x800928F0; // type:function size:0x40
|
||||
__ct__16dCameraMap_HIO_cFv = .text:0x80092930; // type:function size:0x88
|
||||
fn_800929C0__FRC7mVec3_cRC7mVec3_cP12dAcObjBase_c = .text:0x800929C0; // type:function size:0x1BC
|
||||
fn_80092B80 = .text:0x80092B80; // type:function size:0x138
|
||||
fn_80092CC0 = .text:0x80092CC0; // type:function size:0x50
|
||||
fn_80092D10 = .text:0x80092D10; // type:function size:0x170
|
||||
fn_80092E80 = .text:0x80092E80; // type:function size:0x8
|
||||
fn_80092E90 = .text:0x80092E90; // type:function size:0x430
|
||||
execute__12dCameraMap_cFv = .text:0x80092E90; // type:function size:0x430
|
||||
fn_800932C0 = .text:0x800932C0; // type:function size:0x8
|
||||
fn_800932D0 = .text:0x800932D0; // type:function size:0x8
|
||||
fn_800932E0 = .text:0x800932E0; // type:function size:0x8
|
||||
fn_800932F0 = .text:0x800932F0; // type:function size:0x4C
|
||||
fn_80093340 = .text:0x80093340; // type:function size:0x14
|
||||
fn_80093360 = .text:0x80093360; // type:function size:0x18
|
||||
fn_80093380 = .text:0x80093380; // type:function size:0x18
|
||||
fn_800933A0 = .text:0x800933A0; // type:function size:0x64
|
||||
fn_80093340__12dCameraMap_cFv = .text:0x80093340; // type:function size:0x14
|
||||
fn_80093360__12dCameraMap_cFv = .text:0x80093360; // type:function size:0x18
|
||||
fn_80093380__12dCameraMap_cFv = .text:0x80093380; // type:function size:0x18
|
||||
setView__12dCameraMap_cFRC7CamView = .text:0x800933A0; // type:function size:0x64
|
||||
fn_80093410 = .text:0x80093410; // type:function size:0x40
|
||||
fn_80093450 = .text:0x80093450; // type:function size:0xC
|
||||
fn_80093460 = .text:0x80093460; // type:function size:0x18C
|
||||
fn_800935F0 = .text:0x800935F0; // type:function size:0xD8
|
||||
fn_800936D0 = .text:0x800936D0; // type:function size:0xF4
|
||||
fn_800937D0 = .text:0x800937D0; // type:function size:0x98
|
||||
fn_80093870 = .text:0x80093870; // type:function size:0xA4
|
||||
fn_80093920 = .text:0x80093920; // type:function size:0xA4
|
||||
fn_800939D0 = .text:0x800939D0; // type:function size:0xA4
|
||||
__sinit_\d_camera_map_cpp = .text:0x80093450; // type:function size:0xC
|
||||
camEaseIn__Fff = .text:0x80093460; // type:function size:0x18C
|
||||
camEaseInOut__Fff = .text:0x800935F0; // type:function size:0xD8
|
||||
camGetPointOnLine__FRC7mVec3_cRC7mVec3_cRC7mVec3_c = .text:0x800936D0; // type:function size:0xF4
|
||||
camOffsetPoint__FP12dAcObjBase_cRC7mVec3_c = .text:0x800937D0; // type:function size:0x98
|
||||
camOffsetPoint__FP12dAcObjBase_cRC7mVec3_cRC7mAng3_c = .text:0x80093870; // type:function size:0xA4
|
||||
camPointToLocal__FP12dAcObjBase_cRC7mVec3_c = .text:0x80093920; // type:function size:0xA4
|
||||
camPointToLocal__FP12dAcObjBase_cRC7mVec3_cRC7mAng3_c = .text:0x800939D0; // type:function size:0xA4
|
||||
getPosCopy3__FRC12dAcObjBase_c = .text:0x80093A80; // type:function size:0x1C
|
||||
__dt__16dAttention_HIO_cFv = .text:0x80093AA0; // type:function size:0x40
|
||||
init__16dAttention_HIO_cFv = .text:0x80093AE0; // type:function size:0x4
|
||||
@@ -3510,7 +3510,7 @@ fn_8009C8E0 = .text:0x8009C8E0; // type:function size:0x10
|
||||
fn_8009C8F0 = .text:0x8009C8F0; // type:function size:0x8
|
||||
EventRelocTable__processAdvancement2 = .text:0x8009C900; // type:function size:0x4
|
||||
__ct__17ActorEventRelatedFR9dAcBase_cPv = .text:0x8009C910; // type:function size:0x70
|
||||
fn_8009C980 = .text:0x8009C980; // type:function size:0x70
|
||||
__ct__17ActorEventRelatedFiPv = .text:0x8009C980; // type:function size:0x70
|
||||
__dt__17ActorEventRelatedFv = .text:0x8009C9F0; // type:function size:0x70
|
||||
fn_8009CA60 = .text:0x8009CA60; // type:function size:0x4C
|
||||
fn_8009CAB0 = .text:0x8009CAB0; // type:function size:0x44
|
||||
@@ -10545,7 +10545,7 @@ StageManager__init2 = .text:0x80198D90; // type:function size:0x25C
|
||||
changeState__80sStateMgr_c<11dStageMgr_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x80198FF0; // type:function size:0x10
|
||||
fn_80199000 = .text:0x80199000; // type:function size:0x110
|
||||
fn_80199110 = .text:0x80199110; // type:function size:0x8
|
||||
fn_80199120 = .text:0x80199120; // type:function size:0x10
|
||||
getScreen__11dStageMgr_cFl = .text:0x80199120; // type:function size:0x10
|
||||
addObjId__11dStageMgr_cFUs = .text:0x80199130; // type:function size:0x8
|
||||
addStageArcn__11dStageMgr_cFPCc = .text:0x80199140; // type:function size:0x8
|
||||
addActorId__11dStageMgr_cFUs = .text:0x80199150; // type:function size:0x8
|
||||
@@ -10588,7 +10588,7 @@ fn_8019A010 = .text:0x8019A010; // type:function size:0xC
|
||||
fn_8019A020 = .text:0x8019A020; // type:function size:0xC
|
||||
fn_8019A030 = .text:0x8019A030; // type:function size:0x1C
|
||||
fn_8019A050 = .text:0x8019A050; // type:function size:0x1C
|
||||
fn_8019A070 = .text:0x8019A070; // type:function size:0x30
|
||||
setGlobalAlpha__11dStageMgr_cFUc = .text:0x8019A070; // type:function size:0x30
|
||||
getGlobalAlpha__11dStageMgr_cCFv = .text:0x8019A0A0; // type:function size:0x20
|
||||
fn_8019A0C0 = .text:0x8019A0C0; // type:function size:0x2C8
|
||||
fn_8019A390 = .text:0x8019A390; // type:function size:0x44
|
||||
@@ -10701,24 +10701,24 @@ AcLast__destroy = .text:0x8019D050; // type:function size:0x8
|
||||
AcLast__update = .text:0x8019D060; // type:function size:0x5C
|
||||
AcLast__draw = .text:0x8019D0C0; // type:function size:0x38
|
||||
AcLast__dtor = .text:0x8019D100; // type:function size:0x5C
|
||||
fn_8019D160 = .text:0x8019D160; // type:function size:0x40
|
||||
fn_8019D1A0 = .text:0x8019D1A0; // type:function size:0x6C
|
||||
dCamera__ctor = .text:0x8019D210; // type:function size:0x30
|
||||
dCamera__ctorCont = .text:0x8019D240; // type:function size:0x234
|
||||
dCamera__init = .text:0x8019D480; // type:function size:0x248
|
||||
debugWarn2 = .text:0x8019D6D0; // type:function size:0x50
|
||||
debugPrintf7 = .text:0x8019D720; // type:function size:0x50
|
||||
fn_8019D770 = .text:0x8019D770; // type:function size:0x78
|
||||
__dt__13dCamera_HIO_cFv = .text:0x8019D160; // type:function size:0x40
|
||||
__ct__13dCamera_HIO_cFv = .text:0x8019D1A0; // type:function size:0x6C
|
||||
dCamera_c_classInit__Fv = .text:0x8019D210; // type:function size:0x30
|
||||
__ct__9dCamera_cFv = .text:0x8019D240; // type:function size:0x234
|
||||
create__9dCamera_cFv = .text:0x8019D480; // type:function size:0x248
|
||||
debugWarn2__FPCce = .text:0x8019D6D0; // type:function size:0x50
|
||||
debugPrintf7__FPCce = .text:0x8019D720; // type:function size:0x50
|
||||
doDelete__9dCamera_cFv = .text:0x8019D770; // type:function size:0x78
|
||||
fn_8019D7F0 = .text:0x8019D7F0; // type:function size:0xA0
|
||||
fn_8019D890 = .text:0x8019D890; // type:function size:0x2E8
|
||||
fn_8019DB80 = .text:0x8019DB80; // type:function size:0x158
|
||||
fn_8019DCE0 = .text:0x8019DCE0; // type:function size:0x140
|
||||
fn_8019DE20 = .text:0x8019DE20; // type:function size:0x3C
|
||||
execute__9dCamera_cFv = .text:0x8019D890; // type:function size:0x2E8
|
||||
fn_8019DB80__9dCamera_cFv = .text:0x8019DB80; // type:function size:0x158
|
||||
fn_8019DCE0__9dCamera_cFv = .text:0x8019DCE0; // type:function size:0x140
|
||||
draw__9dCamera_cFv = .text:0x8019DE20; // type:function size:0x3C
|
||||
isUnderwater__9dCamera_cCFv = .text:0x8019DE60; // type:function size:0xC
|
||||
fn_8019DE70 = .text:0x8019DE70; // type:function size:0x2A4
|
||||
fn_8019DE70__9dCamera_cFv = .text:0x8019DE70; // type:function size:0x2A4
|
||||
fn_8019E120 = .text:0x8019E120; // type:function size:0xC4
|
||||
fn_8019E1F0 = .text:0x8019E1F0; // type:function size:0x10
|
||||
fn_8019E200 = .text:0x8019E200; // type:function size:0x18C
|
||||
fn_8019E1F0__9dCamera_cFv = .text:0x8019E1F0; // type:function size:0x10
|
||||
setFrustum__9dCamera_cFfff = .text:0x8019E200; // type:function size:0x18C
|
||||
fn_8019E390 = .text:0x8019E390; // type:function size:0xC
|
||||
getYRot__9dCamera_cCFv = .text:0x8019E3A0; // type:function size:0x8
|
||||
fn_8019E3B0__9dCamera_cCFv = .text:0x8019E3B0; // type:function size:0xC
|
||||
@@ -10727,21 +10727,21 @@ fn_8019E410__9dCamera_cFv = .text:0x8019E410; // type:function size:0x1C
|
||||
fn_8019E430__9dCamera_cFv = .text:0x8019E430; // type:function size:0x18
|
||||
fn_8019E450 = .text:0x8019E450; // type:function size:0x7C
|
||||
fn_8019E4D0 = .text:0x8019E4D0; // type:function size:0x5C
|
||||
fn_8019E530 = .text:0x8019E530; // type:function size:0x130
|
||||
fn_8019E660 = .text:0x8019E660; // type:function size:0x8
|
||||
updateUnderwaterDepth__9dCamera_cFRC7mVec3_c = .text:0x8019E530; // type:function size:0x130
|
||||
isUnderwater___9dCamera_cCFv = .text:0x8019E660; // type:function size:0x8
|
||||
getUnderwaterDepth__9dCamera_cCFv = .text:0x8019E670; // type:function size:0x8
|
||||
fn_8019E680 = .text:0x8019E680; // type:function size:0x1D8
|
||||
fn_8019E860 = .text:0x8019E860; // type:function size:0x1C
|
||||
fn_8019E880 = .text:0x8019E880; // type:function size:0x8
|
||||
fn_8019E890 = .text:0x8019E890; // type:function size:0x40
|
||||
fn_8019E8D0 = .text:0x8019E8D0; // type:function size:0x54
|
||||
fn_8019E930 = .text:0x8019E930; // type:function size:0xC
|
||||
fn_8019E940 = .text:0x8019E940; // type:function size:0xC0
|
||||
setCamera__Q29dCamera_c11substruct_1FP9dCamera_c = .text:0x8019E880; // type:function size:0x8
|
||||
fn_8019E890__Q29dCamera_c11substruct_1Fv = .text:0x8019E890; // type:function size:0x40
|
||||
fn_8019E8D0__Q29dCamera_c11substruct_1FRC4mAng = .text:0x8019E8D0; // type:function size:0x54
|
||||
fn_8019E930__Q29dCamera_c11substruct_1Fv = .text:0x8019E930; // type:function size:0xC
|
||||
fn_8019E940__Q29dCamera_c11substruct_1Fv = .text:0x8019E940; // type:function size:0xC0
|
||||
fn_8019EA00__9dCamera_cFRC7mVec3_cRC7mVec3_cff = .text:0x8019EA00; // type:function size:0x70
|
||||
fn_8019EA70__9dCamera_cFb = .text:0x8019EA70; // type:function size:0x11C
|
||||
fn_8019EB90 = .text:0x8019EB90; // type:function size:0xC
|
||||
fn_8019EBA0 = .text:0x8019EBA0; // type:function size:0x160
|
||||
fn_8019ED00 = .text:0x8019ED00; // type:function size:0xC
|
||||
__dt__9dCamera_cFv = .text:0x8019EBA0; // type:function size:0x160
|
||||
__sinit_\d_camera_cpp = .text:0x8019ED00; // type:function size:0xC
|
||||
GetInstance__11dObjLight_cFv = .text:0x8019ED10; // type:function size:0x8
|
||||
ObjLight__ctor = .text:0x8019ED20; // type:function size:0x30
|
||||
spawnLightObject = .text:0x8019ED50; // type:function size:0x40
|
||||
@@ -11183,11 +11183,11 @@ setSpawnData__12SpawnInfoExtFPCcUcUcUcRC7mVec3_c4mAng = .text:0x801BB2F0; // typ
|
||||
set__14LinkReloadInfoFUcRC7mVec3_c4mAngUl = .text:0x801BB380; // type:function size:0x34
|
||||
isCurrentStage__9dScGame_cFPCc = .text:0x801BB3C0; // type:function size:0x10
|
||||
isStageSkyloftLayer20__9dScGame_cFv = .text:0x801BB3D0; // type:function size:0x54
|
||||
isInCredits = .text:0x801BB430; // type:function size:0x54
|
||||
isStateLayerWithSeekerStoneHintMenu__9dScGame_cFv = .text:0x801BB490; // type:function size:0x78
|
||||
isInCredits__9dScGame_cFv = .text:0x801BB430; // type:function size:0x54
|
||||
isSeekerStoneStageAndLayer__9dScGame_cFv = .text:0x801BB490; // type:function size:0x78
|
||||
copySpawnNextToCurrent__9dScGame_cFv = .text:0x801BB510; // type:function size:0xBC
|
||||
actuallyTriggerEntrance__9dScGame_cFPCcUcUcUciiUcUsSc = .text:0x801BB5D0; // type:function size:0x104
|
||||
setCamera = .text:0x801BB6E0; // type:function size:0x10
|
||||
setCamera__9dScGame_cFlP9dCamera_c = .text:0x801BB6E0; // type:function size:0x10
|
||||
getCamera__9dScGame_cFl = .text:0x801BB6F0; // type:function size:0x10
|
||||
fn_801BB700 = .text:0x801BB700; // type:function size:0x4C
|
||||
fn_801BB750 = .text:0x801BB750; // type:function size:0x4C
|
||||
@@ -17804,7 +17804,7 @@ getStatus__12mFaderBase_cCFv = .text:0x802F0730; // type:function size:0x8
|
||||
fadeIn__12mFaderBase_cFv = .text:0x802F0740; // type:function size:0x28
|
||||
fadeOut__12mFaderBase_cFv = .text:0x802F0770; // type:function size:0x2C
|
||||
calc__12mFaderBase_cFv = .text:0x802F07A0; // type:function size:0x7C
|
||||
mFrustum_c__set = .text:0x802F0820; // type:function size:0xB8
|
||||
set__10mFrustum_cFffffRC6mMtx_c = .text:0x802F0820; // type:function size:0xB8
|
||||
set__10mFrustum_cFffffffRC6mMtx_cb = .text:0x802F08E0; // type:function size:0x370
|
||||
fn_802F0C50 = .text:0x802F0C50; // type:function size:0x160
|
||||
fn_802F0DB0 = .text:0x802F0DB0; // type:function size:0x8
|
||||
@@ -30960,11 +30960,11 @@ lbl_8050EF88 = .data:0x8050EF88; // type:object size:0x31 data:string
|
||||
lbl_8050EFBC = .data:0x8050EFBC; // type:object size:0x14 data:string
|
||||
lbl_8050EFD0 = .data:0x8050EFD0; // type:object size:0x33 data:string
|
||||
lbl_8050F004 = .data:0x8050F004; // type:object size:0x12C
|
||||
lbl_8050F130 = .data:0x8050F130; // type:object size:0xC
|
||||
lbl_8050F13C = .data:0x8050F13C; // type:object size:0x34
|
||||
__vt__18dCameraEvent_HIO_c = .data:0x8050F130; // type:object size:0xC
|
||||
__vt__14dCameraEvent_c = .data:0x8050F13C; // type:object size:0x34
|
||||
lbl_8050F170 = .data:0x8050F170; // type:object size:0x10
|
||||
lbl_8050F180 = .data:0x8050F180; // type:object size:0x10
|
||||
lbl_8050F190 = .data:0x8050F190; // type:object size:0x38
|
||||
__vt__16dCameraMap_HIO_c = .data:0x8050F180; // type:object size:0x10
|
||||
__vt__12dCameraMap_c = .data:0x8050F190; // type:object size:0x38
|
||||
lbl_8050F1C8 = .data:0x8050F1C8; // type:object size:0xA data:string
|
||||
lbl_8050F1D4 = .data:0x8050F1D4; // type:object size:0x9 data:string
|
||||
lbl_8050F1E0 = .data:0x8050F1E0; // type:object size:0x11 data:string
|
||||
@@ -35631,7 +35631,7 @@ lbl_8052C1AC = .data:0x8052C1AC; // type:object size:0xC data:string
|
||||
lbl_8052C1B8 = .data:0x8052C1B8; // type:object size:0x9 data:string
|
||||
lbl_8052C1C4 = .data:0x8052C1C4; // type:object size:0xE data:string
|
||||
lbl_8052C1D4 = .data:0x8052C1D4; // type:object size:0xC
|
||||
dCamera__vtable = .data:0x8052C1E0; // type:object size:0x50
|
||||
__vt__9dCamera_c = .data:0x8052C1E0; // type:object size:0x50
|
||||
g_profile_LIGHT_OBJECT = .data:0x8052C230; // type:object size:0xC
|
||||
jumptable_8052C23C = .data:0x8052C23C; // type:object size:0x2C scope:local
|
||||
jumptable_8052C268 = .data:0x8052C268; // type:object size:0x24 scope:local
|
||||
@@ -42247,12 +42247,12 @@ lbl_80575338 = .sbss:0x80575338; // type:object size:0x4
|
||||
lbl_8057533C = .sbss:0x8057533C; // type:object size:0x4 data:4byte
|
||||
lbl_80575340 = .sbss:0x80575340; // type:object size:0x4 data:4byte
|
||||
lbl_80575344 = .sbss:0x80575344; // type:object size:0x4 data:4byte
|
||||
CAMERA_PARAMETER_DATA = .sbss:0x80575348; // type:object size:0x4 data:4byte
|
||||
CAMERA_PARAM_FLOAT_START = .sbss:0x8057534C; // type:object size:0x4 data:4byte
|
||||
CAMERA_PARAM_FLAG_START = .sbss:0x80575350; // type:object size:0x4 data:4byte
|
||||
CAMERA_PARAM_STYLE_START = .sbss:0x80575354; // type:object size:0x4 data:4byte
|
||||
CAMERA_PARAM_TREND_START = .sbss:0x80575358; // type:object size:0x4 data:4byte
|
||||
CAM_STYLE_IDX_TA22 = .sbss:0x8057535C; // type:object size:0x4 data:4byte
|
||||
sHeader__13dCameraGame_c = .sbss:0x80575348; // type:object size:0x4 data:4byte
|
||||
sFloats__13dCameraGame_c = .sbss:0x8057534C; // type:object size:0x4 data:4byte
|
||||
sFlags__13dCameraGame_c = .sbss:0x80575350; // type:object size:0x4 data:4byte
|
||||
sStyles__13dCameraGame_c = .sbss:0x80575354; // type:object size:0x4 data:4byte
|
||||
sTrends__13dCameraGame_c = .sbss:0x80575358; // type:object size:0x4 data:4byte
|
||||
sStyleIdxes__13dCameraGame_c = .sbss:0x8057535C; // type:object size:0x4 data:4byte
|
||||
GROOSENATOR_REF = .sbss:0x80575360; // type:object size:0x4 data:4byte
|
||||
lbl_80575364 = .sbss:0x80575364; // type:object size:0x4 data:4byte
|
||||
lbl_80575368 = .sbss:0x80575368; // type:object size:0x8 data:4byte
|
||||
@@ -51242,7 +51242,7 @@ sRumblePreset10__9dRumble_c = .bss:0x805A07F0; // type:object size:0xC data:4byt
|
||||
@LOCAL@start__9dRumble_cFRC14dRumbleEntry_cUl@rumble_string = .bss:0x805A0840; // type:object size:0x21 scope:local data:byte
|
||||
@LOCAL@getCurrentStageDirectory__22CurrentStageArcManagerFv@sStageDirTmp = .bss:0x805A0868; // type:object size:0x40 scope:local data:byte
|
||||
s_roomArcTmp = .bss:0x805A08A8; // type:object size:0x20 scope:local data:byte
|
||||
lbl_805A08C8 = .bss:0x805A08C8; // type:object size:0x138 data:2byte
|
||||
sHio = .bss:0x805A08C8; // type:object size:0x138 scope:local data:2byte
|
||||
lbl_805A0A00 = .bss:0x805A0A00; // type:object size:0x28 data:byte
|
||||
lbl_805A0A28 = .bss:0x805A0A28; // type:object size:0x28 data:byte
|
||||
lbl_805A0A50 = .bss:0x805A0A50; // type:object size:0x28 data:byte
|
||||
@@ -51256,7 +51256,7 @@ lbl_805A0B68 = .bss:0x805A0B68; // type:object size:0x28 data:byte
|
||||
lbl_805A0B90 = .bss:0x805A0B90; // type:object size:0x28 data:byte
|
||||
lbl_805A0BB8 = .bss:0x805A0BB8; // type:object size:0x28 data:byte
|
||||
lbl_805A0BE0 = .bss:0x805A0BE0; // type:object size:0x28 data:byte
|
||||
CAM_TREND_IDX_BalanceBall = .bss:0x805A0C08; // type:object size:0x90 data:4byte
|
||||
sTrendIdxes__13dCameraGame_c = .bss:0x805A0C08; // type:object size:0x90 data:4byte
|
||||
lbl_805A0C98 = .bss:0x805A0C98; // type:object size:0x208 data:4byte
|
||||
lbl_805A0EA0 = .bss:0x805A0EA0; // type:object size:0x28 data:byte
|
||||
lbl_805A0EC8 = .bss:0x805A0EC8; // type:object size:0xD0 data:byte
|
||||
@@ -51290,7 +51290,7 @@ lbl_805A2BF0 = .bss:0x805A2BF0; // type:object size:0xB8 data:byte
|
||||
lbl_805A2CA8 = .bss:0x805A2CA8; // type:object size:0x140 data:byte
|
||||
lbl_805A2DE8 = .bss:0x805A2DE8; // type:object size:0xA8 data:byte
|
||||
lbl_805A2E90 = .bss:0x805A2E90; // type:object size:0x88 data:byte
|
||||
lbl_805A2F18 = .bss:0x805A2F18; // type:object size:0x40
|
||||
sHio = .bss:0x805A2F18; // type:object size:0x40 scope:local
|
||||
lbl_805A2F58 = .bss:0x805A2F58; // type:object size:0x10
|
||||
attnVectors = .bss:0x805A2F68; // type:object size:0x30
|
||||
sHio = .bss:0x805A2F98; // type:object size:0x18 scope:local
|
||||
@@ -52223,7 +52223,7 @@ StageMgr__STATE_READ_OBJECT_SOUND = .bss:0x805B26B0; // type:object size:0x40 da
|
||||
StageMgr__STATE_SCENE_CHANGE_SAVE = .bss:0x805B26F0; // type:object size:0x40 data:4byte
|
||||
StageMgr__STATE_RESTART_SCENE_WAIT = .bss:0x805B2730; // type:object size:0x40 data:4byte
|
||||
StageMgr__STATE_RESTART_SCENE = .bss:0x805B2770; // type:object size:0x30 data:4byte
|
||||
lbl_805B27A0 = .bss:0x805B27A0; // type:object size:0x38
|
||||
sHio = .bss:0x805B27A0; // type:object size:0x38 scope:local
|
||||
lbl_805B27D8 = .bss:0x805B27D8; // type:object size:0xD8 align:4 data:float
|
||||
lbl_805B28B0 = .bss:0x805B28B0; // type:object size:0x10
|
||||
WeatherTag__STATE_WAIT = .bss:0x805B28C0; // type:object size:0x30 data:4byte
|
||||
|
||||
+5
-4
@@ -484,10 +484,11 @@ config.libs = [
|
||||
Object(Matching, "toBeSorted/actor_info.cpp"),
|
||||
Object(NonMatching, "toBeSorted/d_sword_swing_effect_mgr.cpp"),
|
||||
Object(NonMatching, "toBeSorted/d_enemy_sword_mdl.cpp"),
|
||||
Object(NonMatching, "toBeSorted/d_camera.cpp"),
|
||||
Object(NonMatching, "toBeSorted/d_event_1.cpp"),
|
||||
Object(NonMatching, "toBeSorted/unk_map_cam.cpp"),
|
||||
Object(NonMatching, "toBeSorted/unk_vec_math_event.cpp"),
|
||||
Object(NonMatching, "toBeSorted/d_camera_base.cpp"),
|
||||
Object(NonMatching, "toBeSorted/d_camera_game.cpp"),
|
||||
Object(NonMatching, "toBeSorted/d_camera_event.cpp"),
|
||||
Object(NonMatching, "toBeSorted/d_camera_map.cpp"),
|
||||
Object(NonMatching, "toBeSorted/d_camera_math.cpp"),
|
||||
Object(NonMatching, "toBeSorted/attention.cpp"),
|
||||
Object(NonMatching, "toBeSorted/d_t_camera.cpp"),
|
||||
Object(Matching, "toBeSorted/dowsing_target.cpp"),
|
||||
|
||||
@@ -37,7 +37,7 @@ struct CAM {
|
||||
/* 0x04 */ mVec3_c position;
|
||||
/* 0x10 */ f32 angle;
|
||||
/* 0x14 */ u8 _0x14[8];
|
||||
/* 0x1C */ char name[16];
|
||||
/* 0x1C */ char trendName[16];
|
||||
};
|
||||
|
||||
// Size 0x38
|
||||
@@ -61,6 +61,7 @@ struct EVNT {
|
||||
|
||||
// Size 0x???
|
||||
struct bzsFILE {
|
||||
/* 0x00 */ s16 field_0x00;
|
||||
// ???
|
||||
};
|
||||
|
||||
|
||||
+116
-45
@@ -3,84 +3,155 @@
|
||||
|
||||
#include "common.h"
|
||||
#include "d/d_base.h"
|
||||
#include "egg/gfx/eggCamera.h"
|
||||
#include "m/m_angle.h"
|
||||
#include "m/m_frustum.h"
|
||||
#include "m/m_vec.h"
|
||||
|
||||
extern "C" bool fn_80081FE0(void *, const char *);
|
||||
extern "C" bool fn_800918E0(void *, s32, s16);
|
||||
extern "C" void fn_80080960(void *, s32, s32, s8, s32);
|
||||
extern "C" void fn_80093340(void *);
|
||||
extern "C" void fn_80093360(void *);
|
||||
extern "C" void fn_80093380(void *);
|
||||
#include "toBeSorted/d_camera_base.h"
|
||||
#include "toBeSorted/d_camera_event.h"
|
||||
#include "toBeSorted/d_camera_game.h"
|
||||
#include "toBeSorted/d_camera_map.h"
|
||||
|
||||
class dCamera_c : public dBase_c {
|
||||
private:
|
||||
class substruct_1 {
|
||||
public:
|
||||
substruct_1() : mActive(false), mFSStickAngle(0), field_0x04(0) {}
|
||||
|
||||
void setCamera(dCamera_c *cam);
|
||||
void fn_8019E890();
|
||||
mAng fn_8019E930();
|
||||
void fn_8019E940();
|
||||
|
||||
private:
|
||||
void fn_8019E8D0(const mAng &ang);
|
||||
|
||||
/* 0x00 */ bool mActive;
|
||||
/* 0x02 */ mAng mFSStickAngle;
|
||||
/* 0x04 */ mAng field_0x04;
|
||||
/* 0x08 */ dCamera_c *mpCamera;
|
||||
};
|
||||
|
||||
enum CameraIdx_e {
|
||||
CAM_GAME_0,
|
||||
CAM_GAME_1,
|
||||
CAM_EVENT,
|
||||
CAM_MAP,
|
||||
|
||||
CAM_MAX,
|
||||
};
|
||||
|
||||
enum Flags_e {
|
||||
CAM_FLAGS_0x40 = (1 << 6),
|
||||
CAM_FLAGS_0x80 = (1 << 7),
|
||||
CAM_FLAGS_0x100 = (1 << 8),
|
||||
CAM_FLAGS_0x200 = (1 << 9),
|
||||
};
|
||||
|
||||
public:
|
||||
bool isCurrentTrend(const char *name) const {
|
||||
return fn_80081FE0(field_0xD98, name);
|
||||
dCamera_c();
|
||||
virtual int create() override;
|
||||
virtual int doDelete() override;
|
||||
virtual int execute() override;
|
||||
virtual int draw() override;
|
||||
|
||||
void setFrustum(f32 fov, f32 near, f32 far);
|
||||
|
||||
dCameraGame_c *getGameCam1() {
|
||||
return static_cast<dCameraGame_c *>(mpCameras[CAM_GAME_0]);
|
||||
}
|
||||
|
||||
void *getField_0xD98() const {
|
||||
return field_0xD98;
|
||||
dCameraGame_c *getGameCam2() {
|
||||
return static_cast<dCameraGame_c *>(mpCameras[CAM_GAME_1]);
|
||||
}
|
||||
|
||||
dCameraEvent_c *getEventCam() {
|
||||
return static_cast<dCameraEvent_c *>(mpCameras[CAM_EVENT]);
|
||||
}
|
||||
|
||||
dCameraMap_c *getMapCam() {
|
||||
return static_cast<dCameraMap_c *>(mpCameras[CAM_MAP]);
|
||||
}
|
||||
|
||||
const mVec3_c &getPositionMaybe() const {
|
||||
return mPositionMaybe;
|
||||
return mView.field_0x00;
|
||||
}
|
||||
const mVec3_c &getField_0x78() const {
|
||||
return field_0x78;
|
||||
return mView.field_0x0C;
|
||||
}
|
||||
f32 getField_0x2A8() const {
|
||||
return field_0x2A8;
|
||||
f32 getWaterHeight() const {
|
||||
return mWaterHeight;
|
||||
}
|
||||
mAng getYRot() const;
|
||||
|
||||
bool doFn_800918E0(s32 a1, s16 a2) {
|
||||
return fn_800918E0(field_0xDA0, a1, a2);
|
||||
}
|
||||
|
||||
void doFn_80093340() {
|
||||
fn_80093340(field_0xDA4);
|
||||
}
|
||||
|
||||
void doFn_80093360() {
|
||||
fn_80093360(field_0xDA4);
|
||||
}
|
||||
|
||||
void doFn_80093380() {
|
||||
fn_80093380(field_0xDA4);
|
||||
}
|
||||
|
||||
void setScreenShakeIntensity(f32 val) {
|
||||
mScreenShakeIntensity = val;
|
||||
}
|
||||
|
||||
UNKWORD getField_0xDA8() const {
|
||||
return field_0xDA8;
|
||||
return mActiveCameraIdx;
|
||||
}
|
||||
|
||||
bool isUnderwater() const;
|
||||
f32 getUnderwaterDepth() const;
|
||||
|
||||
void fn_8019EA00(const mVec3_c&, const mVec3_c&, f32, f32);
|
||||
void fn_8019EA00(const mVec3_c &, const mVec3_c &, f32, f32);
|
||||
void fn_8019E430();
|
||||
void fn_8019E410();
|
||||
mAng fn_8019E3B0() const;
|
||||
void fn_8019EA70(bool);
|
||||
|
||||
private:
|
||||
/* 0x068 */ u8 _0x068[0x6C - 0x068];
|
||||
/* 0x06C */ mVec3_c mPositionMaybe;
|
||||
/* 0x078 */ mVec3_c field_0x78;
|
||||
/* 0x084 */ u8 _0x084[0x2A8 - 0x084];
|
||||
/* 0x2A8 */ f32 field_0x2A8;
|
||||
/* 0x2AC */ u8 _0x2AC[0xD98 - 0x2AC];
|
||||
/* 0xD98 */ void *field_0xD98;
|
||||
/* 0xD9C */ u8 _0xD9C[0xDA0 - 0xD9C];
|
||||
/* 0xDA0 */ void *field_0xDA0;
|
||||
/* 0xDA4 */ void *field_0xDA4;
|
||||
/* 0xDA8 */ UNKWORD field_0xDA8;
|
||||
/* 0xDAC */ u8 _0xDAC[0xDB0 - 0xDAC];
|
||||
void fn_8019DB80();
|
||||
void fn_8019DCE0();
|
||||
void fn_8019DE70();
|
||||
f32 fn_8019E1F0();
|
||||
|
||||
void updateUnderwaterDepth(const mVec3_c &pos);
|
||||
bool isUnderwater_() const;
|
||||
|
||||
/* 0x068 */ s32 mMyCameraIndex;
|
||||
/* 0x06C */ CamView mView;
|
||||
/* 0x08C */ mVec3_c field_0x08C;
|
||||
/* 0x098 */ mAng field_0x098;
|
||||
/* 0x09A */ mAng field_0x09A;
|
||||
/* 0x09C */ mFrustum_c mFrustum;
|
||||
|
||||
/* 0x18C */ u8 _0x18C[0x1F8 - 0x18C];
|
||||
|
||||
/* 0x1F8 */ UNKWORD field_0x1F8;
|
||||
/* 0x1FC */ u8 field_0x1FC;
|
||||
/* 0x200 */ EGG::Screen *mpScreen;
|
||||
/* 0x204 */ EGG::LookAtCamera mLookAtCamera;
|
||||
|
||||
/* 0x28C */ f32 mLetterboxAmount;
|
||||
/* 0x290 */ f32 field_0x290;
|
||||
/* 0x294 */ f32 mGlobalAlpha;
|
||||
/* 0x298 */ u8 field_0x298;
|
||||
/* 0x299 */ u8 field_0x299;
|
||||
/* 0x29C */ f32 field_0x29C;
|
||||
/* 0x2A0 */ u8 field_0x2A0;
|
||||
/* 0x2A1 */ u8 field_0x2A1;
|
||||
/* 0x2A4 */ f32 mUnderwaterDepth;
|
||||
/* 0x2A8 */ f32 mWaterHeight;
|
||||
/* 0x2AC */ bool mIsUnderwater;
|
||||
/* 0x2B0 */ u32 mFlags;
|
||||
/* 0x2B4 */ dCameraGame_c mGameCam1;
|
||||
/* 0x728 */ dCameraGame_c mGameCam2;
|
||||
/* 0xB9C */ dCameraEvent_c mEventCam;
|
||||
/* 0xCDC */ dCameraMap_c mMapCam;
|
||||
|
||||
/* 0xD8C */ u8 _0xD8C[0xD94 - 0xD8C];
|
||||
|
||||
/* 0xD94 */ f32 field_0xD94;
|
||||
/* 0xD98 */ dCameraBase_c *mpCameras[CAM_MAX];
|
||||
/* 0xDA8 */ s32 mActiveCameraIdx;
|
||||
/* 0xDAC */ void *field_0xDAC;
|
||||
/* 0xDB0 */ f32 mScreenShakeIntensity;
|
||||
/* 0xDB4 */ mVec3_c field_0xDB4;
|
||||
/* 0xDC0 */ substruct_1 field_0xDC0;
|
||||
/* 0xDCC */ u8 field_0xDCC;
|
||||
/* 0xDD0 */ CamView mView1;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -132,6 +132,10 @@ public:
|
||||
mpFile = file;
|
||||
}
|
||||
|
||||
const bzsFILE *getFile() const {
|
||||
return mpFile;
|
||||
}
|
||||
|
||||
void setScen(const SCEN *scen, u16 count) {
|
||||
mScenCount = count;
|
||||
mpScen = scen;
|
||||
|
||||
@@ -34,6 +34,10 @@ public:
|
||||
|
||||
f32 fn_801BBEC0() const;
|
||||
|
||||
void setLetterboxAmount(f32 v) {
|
||||
mLetterboxAmount = v;
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x98 */ f32 mLetterboxAmount;
|
||||
};
|
||||
@@ -152,7 +156,7 @@ public:
|
||||
static bool isCurrentStage(const char *stageName);
|
||||
static bool isStageSkyloftLayer20();
|
||||
static bool isInCredits();
|
||||
static bool isStateLayerWithSeekerStoneHintMenu();
|
||||
static bool isSeekerStoneStageAndLayer();
|
||||
|
||||
static SpawnInfo currentSpawnInfo;
|
||||
static SpawnInfo nextSpawnInfo;
|
||||
@@ -223,6 +227,10 @@ public:
|
||||
return mFader.isStatus(mFaderBase_c::FADING_IN);
|
||||
}
|
||||
|
||||
void setTargetingScreenLetterboxAmount(f32 amt) {
|
||||
mScreen1.setLetterboxAmount(amt);
|
||||
}
|
||||
|
||||
f32 targetingScreenFn_801BBEC0() const {
|
||||
return mScreen1.fn_801BBEC0();
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ public:
|
||||
STATE_FUNC_DECLARE(dStageMgr_c, RestartScene);
|
||||
|
||||
public:
|
||||
void setGlobalAlpha(u8 alpha);
|
||||
u8 getGlobalAlpha() const;
|
||||
|
||||
bool isAreaTypeNormal() const;
|
||||
@@ -123,6 +124,10 @@ public:
|
||||
void initUnkWithWater(u32 val, d3d::UnkWithWater *waterThing);
|
||||
void destroyUnkWithWater(u32 val, d3d::UnkWithWater *waterThing);
|
||||
|
||||
const STIF *getStif() const {
|
||||
return mpStif;
|
||||
}
|
||||
|
||||
const RMPL *getRmpl() const {
|
||||
return mpRmpl;
|
||||
}
|
||||
@@ -173,6 +178,7 @@ public:
|
||||
void addActorId(u16 actorId);
|
||||
|
||||
nw4r::g3d::Camera getCamera(s32 idx);
|
||||
EGG::Screen *getScreen(s32 idx);
|
||||
|
||||
void fn_80199B60(u8);
|
||||
|
||||
|
||||
@@ -110,6 +110,10 @@ public:
|
||||
SetSizeY(size.y);
|
||||
}
|
||||
|
||||
f32 GetAspect() const {
|
||||
return GetSize().x / GetSize().y;
|
||||
}
|
||||
|
||||
void SetNearZ(f32 nearZ) {
|
||||
mNearZ = nearZ;
|
||||
}
|
||||
|
||||
@@ -124,6 +124,9 @@ public:
|
||||
static f32 s2r_c(f32 ang) {
|
||||
return ang * sAngToRad;
|
||||
}
|
||||
static f32 s2n_c(f32 ang) {
|
||||
return ang * sAngToNorm;
|
||||
}
|
||||
static f32 r2s_c(f32 ang) {
|
||||
return ang * sRadToAng;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
// Bunch of untested assumptions in here
|
||||
class mFrustum_c {
|
||||
public:
|
||||
void set(f32, f32, f32 near, f32 far, const mMtx_c &mtx);
|
||||
void set(f32, f32, f32, f32, f32 near, f32 far, const mMtx_c &mtx, bool);
|
||||
|
||||
|
||||
/* 0x00 */ mMtx_c mView;
|
||||
/* 0x30 */ nw4r::math::PLANE mPlane_0x30;
|
||||
/* 0x40 */ nw4r::math::PLANE mPlane_0x40;
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
class ActorEventRelated {
|
||||
public:
|
||||
ActorEventRelated();
|
||||
ActorEventRelated(dAcBase_c &owner, void *);
|
||||
ActorEventRelated(UNKWORD, void *);
|
||||
~ActorEventRelated();
|
||||
|
||||
bool isThisActorInEvent();
|
||||
|
||||
@@ -222,6 +222,17 @@ public:
|
||||
|
||||
bool checkLink2() const;
|
||||
|
||||
dAcObjBase_c *getTargetedActor() {
|
||||
if (!isInNormalGameState() || !mTargeted) {
|
||||
return nullptr;
|
||||
}
|
||||
return getTargetedActorUnchecked();
|
||||
}
|
||||
|
||||
dAcObjBase_c *getTargetedActorUnchecked() {
|
||||
return mGroups[1].getOtherPool()->getActor(mModels.mCurrentTargetInfoIdx);
|
||||
}
|
||||
|
||||
private:
|
||||
bool isInNormalGameState() const;
|
||||
bool checkZButtonPressed() const;
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
#ifndef TO_BE_SORTED_D_CAMERA_BASE_H
|
||||
#define TO_BE_SORTED_D_CAMERA_BASE_H
|
||||
|
||||
#include "common.h"
|
||||
#include "m/m_vec.h"
|
||||
|
||||
// A basic description of a camera perspective, with
|
||||
// position, target point, a field of view, and something else.
|
||||
struct CamView {
|
||||
CamView() : field_0x00(0.0f, 0.0f, 0.0f), field_0x0C(0.0f, 0.0f, 1.0f), mFov(50.0f), field_0x1C(0.0f) {}
|
||||
~CamView() {}
|
||||
|
||||
/* 0x00 */ mVec3_c field_0x00;
|
||||
/* 0x0C */ mVec3_c field_0x0C;
|
||||
/* 0x18 */ f32 mFov;
|
||||
/* 0x1C */ f32 field_0x1C;
|
||||
};
|
||||
|
||||
// Abstract camera base class. The game camera class will hold various subclasses
|
||||
// of this base class.
|
||||
class dCameraBase_c {
|
||||
protected:
|
||||
/* 0x00 */ bool mCreated;
|
||||
/* 0x01 */ u8 field_0x01;
|
||||
/* 0x02 */ u8 field_0x02;
|
||||
/* 0x04 */ s32 mIndex;
|
||||
/* 0x08 */ CamView mView;
|
||||
|
||||
public:
|
||||
dCameraBase_c() : mCreated(false), field_0x01(0), field_0x02(0), mIndex(-1) {}
|
||||
|
||||
bool doCreate(s32 index);
|
||||
bool doRemove();
|
||||
bool doExecute();
|
||||
bool doDraw();
|
||||
|
||||
// vt at 0x28
|
||||
/* vt 0x08 */ virtual void vt_0x08() {}
|
||||
/* vt 0x0C */ virtual void vt_0x0C() {}
|
||||
/* vt 0x10 */ virtual bool create() {
|
||||
return true;
|
||||
}
|
||||
/* vt 0x14 */ virtual bool remove() {
|
||||
return true;
|
||||
}
|
||||
/* vt 0x18 */ virtual bool execute() {
|
||||
return true;
|
||||
}
|
||||
/* vt 0x1C */ virtual bool draw() {
|
||||
return true;
|
||||
}
|
||||
/* vt 0x20 */ virtual ~dCameraBase_c() {}
|
||||
/* vt 0x24 */ virtual CamView &getView() {
|
||||
// TODO - const?
|
||||
return mView;
|
||||
}
|
||||
/* vt 0x28 */ virtual void vt_0x28() {
|
||||
field_0x02 = 1;
|
||||
}
|
||||
/* vt 0x2C */ virtual void vt_0x2C() {
|
||||
field_0x02 = 0;
|
||||
}
|
||||
/* vt 0x30 */ virtual void setView(const CamView &view) {
|
||||
// TODO - is this actually a base impl?
|
||||
mView = view;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,34 @@
|
||||
#ifndef TO_BE_SORTED_D_CAMERA_EVENT_H
|
||||
#define TO_BE_SORTED_D_CAMERA_EVENT_H
|
||||
|
||||
#include "toBeSorted/actor_event.h"
|
||||
#include "toBeSorted/d_camera_base.h"
|
||||
|
||||
class dCameraEvent_c : public dCameraBase_c {
|
||||
public:
|
||||
dCameraEvent_c();
|
||||
/* vt 0x08 */ virtual void vt_0x08() override;
|
||||
/* vt 0x0C */ virtual void vt_0x0C() override;
|
||||
/* vt 0x10 */ virtual bool create() override;
|
||||
/* vt 0x14 */ virtual bool remove() override;
|
||||
/* vt 0x18 */ virtual bool execute() override;
|
||||
/* vt 0x1C */ virtual bool draw() override;
|
||||
/* vt 0x20 */ virtual ~dCameraEvent_c() {}
|
||||
|
||||
void fn_800918E0(s32, s16);
|
||||
|
||||
private:
|
||||
/* 0x2C */ u8 field_0x2C[0x48 - 0x2C];
|
||||
/* 0x48 */ u8 field_0x48;
|
||||
/* 0x4A */ s16 field_0x4A;
|
||||
/* 0x4C */ u8 field_0x4C[0x50 - 0x4C];
|
||||
/* 0x50 */ ActorEventRelated mEventRelated;
|
||||
/* 0xA0 */ u8 field_0xA0;
|
||||
/* 0xA4 */ s32 field_0xA4;
|
||||
/* 0xA8 */ u8 field_0xA8[0xAC - 0xA8];
|
||||
/* 0xAC */ s32 field_0xAC;
|
||||
/* 0xB0 */ u8 field_0xB0[0xB4 - 0xB0];
|
||||
/* 0xB4 */ CamView mViews[4];
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,205 @@
|
||||
#ifndef TO_BE_SORTED_D_CAMERA_GAME_H
|
||||
#define TO_BE_SORTED_D_CAMERA_GAME_H
|
||||
|
||||
#include "common.h"
|
||||
#include "d/a/d_a_base.h"
|
||||
#include "d/a/d_a_player.h"
|
||||
#include "d/a/obj/d_a_obj_base.h"
|
||||
#include "d/col/bg/d_bg_s_gnd_chk.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "toBeSorted/d_camera_base.h"
|
||||
#include "toBeSorted/deg_angle_util.h"
|
||||
|
||||
// Size: 0xC
|
||||
struct CamParamHeader {
|
||||
/* 0x00 */ u32 magic;
|
||||
/* 0x04 */ s16 numFloats;
|
||||
/* 0x06 */ s16 numFlags;
|
||||
/* 0x08 */ s16 numStyles;
|
||||
/* 0x0A */ s16 numTrends;
|
||||
};
|
||||
|
||||
// Size: 0xA
|
||||
#pragma pack(push, 2)
|
||||
struct CamParamStyle {
|
||||
/* 0x00 */ u32 id;
|
||||
/* 0x04 */ u8 _0x04[6];
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
// Size: 0x24
|
||||
struct CamParamTrend {
|
||||
/* 0x00 */ char name[16]; // not sure
|
||||
/* 0x10 */ u8 _0x10[0x24 - 0x10];
|
||||
};
|
||||
|
||||
enum CamTrendIndex_e {
|
||||
CAM_TREND_IDX_BalanceBall,
|
||||
CAM_TREND_IDX_Swim,
|
||||
CAM_TREND_IDX_Surface,
|
||||
CAM_TREND_IDX_SkyDive,
|
||||
CAM_TREND_IDX_Dive,
|
||||
CAM_TREND_IDX_Lift,
|
||||
CAM_TREND_IDX_Crawl,
|
||||
CAM_TREND_IDX_Field,
|
||||
CAM_TREND_IDX_Dungeon,
|
||||
CAM_TREND_IDX_mogu,
|
||||
CAM_TREND_IDX_Tornade,
|
||||
CAM_TREND_IDX_Rope,
|
||||
CAM_TREND_IDX_Tightrope,
|
||||
CAM_TREND_IDX_Parachute,
|
||||
CAM_TREND_IDX_DialKey,
|
||||
CAM_TREND_IDX_BirdRide,
|
||||
CAM_TREND_IDX_Trolley,
|
||||
CAM_TREND_IDX_Boomerang,
|
||||
CAM_TREND_IDX_Room,
|
||||
CAM_TREND_IDX_AfterCrawl,
|
||||
CAM_TREND_IDX_TerryShip_Island,
|
||||
CAM_TREND_IDX_Catapult,
|
||||
CAM_TREND_IDX_TightropeHang,
|
||||
CAM_TREND_IDX_BossKey,
|
||||
CAM_TREND_IDX_SkyDiveNear,
|
||||
CAM_TREND_IDX_mogu2,
|
||||
CAM_TREND_IDX_ClawShot,
|
||||
CAM_TREND_IDX_Town,
|
||||
CAM_TREND_IDX_Cannon,
|
||||
CAM_TREND_IDX_BirdRideLD,
|
||||
CAM_TREND_IDX_Nushi,
|
||||
CAM_TREND_IDX_Island,
|
||||
CAM_TREND_IDX_Windmill,
|
||||
|
||||
CAM_TREND_IDX_MAX,
|
||||
};
|
||||
|
||||
enum CamStyleIndex_e {
|
||||
CAM_STYLE_IDX_TA22,
|
||||
|
||||
CAM_STYLE_IDX_MAX,
|
||||
};
|
||||
|
||||
class dCameraGame_c;
|
||||
|
||||
struct CamId {
|
||||
CamId() : roomCamId(-1), roomId(-1), field_0x04(0) {}
|
||||
s16 roomCamId;
|
||||
s16 roomId;
|
||||
s16 field_0x04;
|
||||
|
||||
void clear() {
|
||||
roomCamId = -1;
|
||||
roomId = dAcPy_c::GetLinkM()->mRoomID;
|
||||
field_0x04 = 0;
|
||||
}
|
||||
|
||||
bool someCheck() const {
|
||||
if (field_0x04 < 3 && roomId != dAcPy_c::GetLinkM()->mRoomID) {
|
||||
return false;
|
||||
} else {
|
||||
return field_0x04 >= -1 && roomCamId >= 0 && roomCamId < 0xFF;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct UnkCamCheck {
|
||||
/* 0x000 */ u8 field_0x000;
|
||||
/* 0x004 */ dBgS_CamGndChk chk;
|
||||
/* 0x094 */ f32 field_0x094;
|
||||
/* 0x098 */ CamId camId;
|
||||
};
|
||||
|
||||
struct UnkCamRef {
|
||||
/* 0x00 */ bool field_0x00;
|
||||
/* 0x04 */ mVec3_c field_0x04;
|
||||
/* 0x10 */ dAcRef_c<dAcObjBase_c> mMoveBgActorRef;
|
||||
};
|
||||
|
||||
struct UnkCamChecks {
|
||||
/* 0x000 */ UnkCamCheck mChk1;
|
||||
/* 0x0A0 */ UnkCamCheck mChk2;
|
||||
/* 0x140 */ UnkCamRef mRef;
|
||||
/* 0x15C */ UNKWORD field_0x15C;
|
||||
/* 0x160 */ UNKWORD field_0x160;
|
||||
/* 0x164 */ CamId field_0x164;
|
||||
/* 0x16A */ u8 field_0x16A;
|
||||
/* 0x16B */ u8 field_0x16B;
|
||||
/* 0x16C */ CamId field_0x16C;
|
||||
/* 0x174 */ dCameraGame_c *mpCamera;
|
||||
|
||||
void fn_8007E130(dCameraGame_c *system);
|
||||
void fn_8007E1B0(dAcObjBase_c *ac);
|
||||
};
|
||||
|
||||
class dCameraGame_c : public dCameraBase_c {
|
||||
public:
|
||||
static bool initCamParamDat();
|
||||
static s32 getTrendIndex(const char *name);
|
||||
static s32 getStyleIndex(u32 id);
|
||||
|
||||
static s32 sTrendIdxes[CAM_TREND_IDX_MAX];
|
||||
static s32 sStyleIdxes[CAM_STYLE_IDX_MAX];
|
||||
|
||||
dCameraGame_c();
|
||||
/* vt 0x08 */ virtual void vt_0x08() override;
|
||||
/* vt 0x0C */ virtual void vt_0x0C() override;
|
||||
/* vt 0x10 */ virtual bool create() override;
|
||||
/* vt 0x14 */ virtual bool remove() override;
|
||||
/* vt 0x18 */ virtual bool execute() override;
|
||||
/* vt 0x1C */ virtual bool draw() override;
|
||||
/* vt 0x20 */ virtual ~dCameraGame_c() {}
|
||||
/* vt 0x30 */ virtual void setView(const CamView &view) override;
|
||||
|
||||
CamId getCamId0x60() {
|
||||
return field_0x060;
|
||||
}
|
||||
|
||||
void clearCamIds();
|
||||
|
||||
bool isCurrentTrend(const char *name) const;
|
||||
|
||||
void fn_80080960(s32, s32, s8, s32);
|
||||
|
||||
private:
|
||||
static void cacheIdxes();
|
||||
|
||||
static CamParamHeader *sHeader;
|
||||
static f32 *sFloats;
|
||||
static u16 *sFlags;
|
||||
static CamParamStyle *sStyles;
|
||||
static CamParamTrend *sTrends;
|
||||
|
||||
/* 0x02C */ dPolar field_0x02C;
|
||||
/* 0x038 */ CamView mView2;
|
||||
/* 0x058 */ UNKWORD field_0x058;
|
||||
/* 0x05C */ UNKWORD field_0x05C;
|
||||
/* 0x060 */ CamId field_0x060;
|
||||
/* 0x068 */ s32 mCurrentTrendIdx;
|
||||
/* 0x06C */ UNKWORD field_0x06C;
|
||||
/* 0x070 */ UNKWORD field_0x070;
|
||||
/* 0x074 */ UNKWORD field_0x074;
|
||||
/* 0x078 */ u8 field_0x078;
|
||||
/* 0x079 */ u8 field_0x079;
|
||||
/* 0x07A */ u8 field_0x07A;
|
||||
/* 0x07C */ UNKWORD field_0x07C;
|
||||
/* 0x080 */ CamId field_0x080;
|
||||
/* 0x086 */ CamId field_0x086;
|
||||
/* 0x08C */ UNKWORD field_0x08C;
|
||||
/* 0x090 */ UNKWORD field_0x090;
|
||||
/* 0x094 */ s16 field_0x094;
|
||||
/* 0x096 */ s16 field_0x096;
|
||||
/* 0x098 */ dAcObjBase_c *field_0x098;
|
||||
/* 0x09C */ dAcRef_c<dAcObjBase_c> mRef;
|
||||
/* 0x0A8 */ UNKWORD field_0x0A8;
|
||||
/* 0x0AC */ f32 field_0x0AC;
|
||||
/* 0x0B0 */ f32 field_0x0B0;
|
||||
/* 0x0B4 */ UnkCamChecks mChk;
|
||||
/* 0x22C */ UNKWORD field_0x22C;
|
||||
/* 0x230 */ UNKWORD field_0x230;
|
||||
/* 0x234 */ mVec3_c field_0x234;
|
||||
/* 0x240 */ mVec3_c field_0x240;
|
||||
/* 0x24C */ u8 _0x24C[0x264 - 0x24C];
|
||||
/* 0x264 */ f32 field_0x264;
|
||||
/* 0x268 */ f32 field_0x268;
|
||||
/* 0x26C */ u8 _0x0[0x474 - 0x26C];
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,43 @@
|
||||
#ifndef TO_BE_SORTED_D_CAMERA_MAP_H
|
||||
#define TO_BE_SORTED_D_CAMERA_MAP_H
|
||||
|
||||
#include "toBeSorted/d_camera_base.h"
|
||||
|
||||
class dAcObjBase_c;
|
||||
|
||||
class dCameraMap_c : public dCameraBase_c {
|
||||
public:
|
||||
dCameraMap_c() {}
|
||||
/* vt 0x08 */ virtual void vt_0x08() override;
|
||||
/* vt 0x0C */ virtual void vt_0x0C() override;
|
||||
/* vt 0x10 */ virtual bool create() override;
|
||||
/* vt 0x14 */ virtual bool remove() override;
|
||||
/* vt 0x18 */ virtual bool execute() override;
|
||||
/* vt 0x1C */ virtual bool draw() override;
|
||||
/* vt 0x20 */ virtual ~dCameraMap_c() {}
|
||||
/* vt 0x30 */ virtual void setView(const CamView &view) override;
|
||||
// Not sure what this is...
|
||||
/* vt 0x34 */ virtual bool vt_0x34() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void fn_80093340();
|
||||
void fn_80093360();
|
||||
void fn_80093380();
|
||||
|
||||
private:
|
||||
/* 0x2C */ u8 _0x2C[0x40 - 0x2C];
|
||||
/* 0x40 */ f32 field_0x40;
|
||||
/* 0x44 */ dAcObjBase_c *field_0x44;
|
||||
/* 0x48 */ CamView mView1;
|
||||
/* 0x68 */ CamView mView2;
|
||||
/* 0x88 */ CamView mView3;
|
||||
/* 0xA8 */ u8 _0xA8[0xAC - 0xA8];
|
||||
/* 0xAC */ u8 field_0xAC;
|
||||
/* 0xAD */ u8 _0xAD[0xB4 - 0xAD];
|
||||
/* 0xB4 */ u8 field_0xB4;
|
||||
/* 0xB5 */ u8 _0xB5[0xB8 - 0xB5];
|
||||
/* 0xB8 */ UNKWORD field_0xB8;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,54 @@
|
||||
#ifndef TOBESORTED_D_CAMERA_MATH_H
|
||||
#define TOBESORTED_D_CAMERA_MATH_H
|
||||
|
||||
#include "common.h"
|
||||
#include "m/m_angle.h"
|
||||
#include "m/m_vec.h"
|
||||
|
||||
class dAcObjBase_c;
|
||||
|
||||
/**
|
||||
* @brief A function that looks like an ease-in tween.
|
||||
*
|
||||
* @param arg The time argument in [0, 1]
|
||||
* @param param The power of the easing function. 0 = linear, 1 = quite powerful
|
||||
* @return f32 The result in [0, 1]
|
||||
*/
|
||||
f32 camEaseIn(f32 arg, f32 param);
|
||||
|
||||
/**
|
||||
* @brief A function that looks like an ease-in-out tween.
|
||||
*
|
||||
* @param arg The time argument in [0, 1]
|
||||
* @param param The power of the easing function. 0 = linear, 1 = a little bit
|
||||
* @return f32 The result in [0, 1]
|
||||
*/
|
||||
f32 camEaseInOut(f32 arg, f32 param);
|
||||
|
||||
/**
|
||||
* @brief Get a point on the line from origin to target that is as
|
||||
* far away from origin as point is away from origin.
|
||||
*/
|
||||
mVec3_c camGetPointOnLine(const mVec3_c &target, const mVec3_c &origin, const mVec3_c &point);
|
||||
|
||||
/**
|
||||
* @brief Get a point relative to ac's position. localOffset is rotated by the actor's XY rotation first.
|
||||
*/
|
||||
mVec3_c camOffsetPoint(dAcObjBase_c *ac, const mVec3_c &localOffset);
|
||||
|
||||
/**
|
||||
* @brief Like the other camOffsetPoint, but with an explicitly passed rotation.
|
||||
*/
|
||||
mVec3_c camOffsetPoint(dAcObjBase_c *ac, const mVec3_c &localOffset, const mAng3_c &rot);
|
||||
|
||||
/**
|
||||
* @brief The inverse of camOffsetPoint
|
||||
*/
|
||||
mVec3_c camPointToLocal(dAcObjBase_c *ac, const mVec3_c &pos);
|
||||
|
||||
/**
|
||||
* @brief The inverse of camOffsetPoint
|
||||
*/
|
||||
mVec3_c camPointToLocal(dAcObjBase_c *ac, const mVec3_c &pos, const mAng3_c &rot);
|
||||
|
||||
#endif
|
||||
@@ -43,6 +43,7 @@ public:
|
||||
|
||||
struct dPolar {
|
||||
public:
|
||||
dPolar() : R(0.0f), U(0.0f), V(0.0f) {}
|
||||
dPolar(f32 r, f32 u, f32 v);
|
||||
dPolar(const mVec3_c &v);
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ int dTgGateToGround_c::doDelete() {
|
||||
|
||||
int dTgGateToGround_c::actorExecute() {
|
||||
dAcPy_c *player;
|
||||
dCamera_c *cam;
|
||||
|
||||
if (params_FF_FF_00_00 != -1 && StoryflagManager::sInstance->getCounterOrFlag(params_FF_FF_00_00) == 0) {
|
||||
return SUCCEEDED;
|
||||
@@ -57,8 +56,7 @@ int dTgGateToGround_c::actorExecute() {
|
||||
}
|
||||
} else {
|
||||
if (params_00_00_00_FF != -1) {
|
||||
cam = dScGame_c::getCamera(0);
|
||||
fn_80080960(cam->getField_0xD98(), params_00_00_00_FF, 0, mRoomID, 0);
|
||||
dScGame_c::getCamera(0)->getGameCam1()->fn_80080960(params_00_00_00_FF, 0, mRoomID, 0);
|
||||
}
|
||||
delayFrames = 0;
|
||||
}
|
||||
|
||||
@@ -158,9 +158,9 @@ void dSporeProc_c::execute() {
|
||||
mSporesPos[i] += point * (field_0x12D8[i] * 5.f);
|
||||
}
|
||||
|
||||
f32 camY = pCam->getField_0x2A8();
|
||||
if (end != camY && mSporesPos[i].y < camY) {
|
||||
mSporesPos[i].y = camY;
|
||||
f32 waterHeight = pCam->getWaterHeight();
|
||||
if (end != waterHeight && mSporesPos[i].y < waterHeight) {
|
||||
mSporesPos[i].y = waterHeight;
|
||||
}
|
||||
} break;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,354 @@
|
||||
#include "d/d_camera.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "d/a/d_a_player.h"
|
||||
#include "d/col/bg/d_bg_s_gnd_chk.h"
|
||||
#include "d/col/bg/d_bg_s_roof_chk.h"
|
||||
#include "d/d_gfx.h"
|
||||
#include "d/d_pad.h"
|
||||
#include "d/d_sc_game.h"
|
||||
#include "d/d_stage_mgr.h"
|
||||
#include "egg/gfx/eggFrustum.h"
|
||||
#include "f/f_base.h"
|
||||
#include "f/f_profile.h"
|
||||
#include "m/m_mtx.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "toBeSorted/d_camera_math.h"
|
||||
#include "toBeSorted/event_manager.h"
|
||||
|
||||
class dCamera_HIO_c {
|
||||
public:
|
||||
dCamera_HIO_c();
|
||||
virtual ~dCamera_HIO_c();
|
||||
|
||||
/* 0x04 */ f32 field_0x04;
|
||||
/* 0x08 */ f32 field_0x08;
|
||||
/* 0x0C */ f32 field_0x0C;
|
||||
/* 0x10 */ s16 field_0x10;
|
||||
/* 0x12 */ s16 field_0x12;
|
||||
/* 0x14 */ f32 field_0x14;
|
||||
/* 0x18 */ u16 field_0x18;
|
||||
/* 0x1C */ f32 field_0x1C;
|
||||
/* 0x20 */ f32 field_0x20;
|
||||
/* 0x24 */ s16 field_0x24;
|
||||
/* 0x28 */ f32 field_0x28;
|
||||
/* 0x2C */ f32 field_0x2C;
|
||||
/* 0x30 */ s16 field_0x30;
|
||||
};
|
||||
|
||||
dCamera_HIO_c::~dCamera_HIO_c() {}
|
||||
dCamera_HIO_c::dCamera_HIO_c() {
|
||||
field_0x04 = 1.0f;
|
||||
field_0x08 = 240000.0f;
|
||||
field_0x14 = 0.1f;
|
||||
field_0x18 = 0x1555;
|
||||
field_0x1C = 30.0f;
|
||||
field_0x20 = 30.0f;
|
||||
field_0x24 = 8;
|
||||
field_0x28 = 0.7f;
|
||||
field_0x2C = 0.2f;
|
||||
field_0x30 = 0;
|
||||
field_0x0C = 1.0f;
|
||||
field_0x10 = 1;
|
||||
field_0x12 = 1;
|
||||
}
|
||||
|
||||
static dCamera_HIO_c sHio;
|
||||
|
||||
SPECIAL_BASE_PROFILE(CAMERA, dCamera_c, fProfile::CAMERA, 0xA, 0x30);
|
||||
|
||||
void debugWarn2(const char *fmt, ...);
|
||||
void debugPrintf7(const char *fmt, ...);
|
||||
|
||||
dCamera_c::dCamera_c()
|
||||
: mMyCameraIndex(0),
|
||||
mpScreen(dStageMgr_c::GetInstance()->getScreen(0)),
|
||||
field_0x098(0),
|
||||
field_0x09A(0),
|
||||
field_0xD94(0.0f),
|
||||
field_0x1F8(0),
|
||||
field_0x1FC(0),
|
||||
mFlags(0) {
|
||||
field_0xDAC = this;
|
||||
mScreenShakeIntensity = 0.0f;
|
||||
field_0xDB4.set(mVec3_c::Zero.x, mVec3_c::Zero.y, mVec3_c::Zero.z);
|
||||
field_0xDC0.setCamera(this);
|
||||
field_0x08C = mVec3_c(0.0f, 1.0f, 0.0f);
|
||||
|
||||
mActiveCameraIdx = 0;
|
||||
for (int i = 0; i < CAM_MAX; i++) {
|
||||
mpCameras[i] = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
int dCamera_c::create() {
|
||||
mFlags = 0;
|
||||
mMyCameraIndex = getFromParams(0, 0xF);
|
||||
dScGame_c::setCamera(mMyCameraIndex, nullptr);
|
||||
mpCameras[0] = &mGameCam1;
|
||||
mpCameras[1] = &mGameCam2;
|
||||
mpCameras[2] = &mEventCam;
|
||||
mpCameras[3] = &mMapCam;
|
||||
|
||||
for (int i = 0; i < CAM_MAX; i++) {
|
||||
if (mpCameras[i] == nullptr) {
|
||||
continue;
|
||||
}
|
||||
if (!mpCameras[i]->doCreate(i)) {
|
||||
return NOT_READY;
|
||||
}
|
||||
}
|
||||
|
||||
debugWarn2("u can NOT use debug camera!!"); // aww
|
||||
mActiveCameraIdx = 0;
|
||||
|
||||
mpCameras[0]->vt_0x28();
|
||||
|
||||
mLetterboxAmount = fn_8019E1F0();
|
||||
field_0x290 = 1.0f;
|
||||
mFlags |= CAM_FLAGS_0x80;
|
||||
|
||||
// TODO maybe struct + inline
|
||||
mGlobalAlpha = 1.0f;
|
||||
field_0x298 = field_0x299 = 0;
|
||||
|
||||
field_0x29C = 1.0f;
|
||||
field_0x2A0 = field_0x2A1 = 0;
|
||||
|
||||
mView1 = mpCameras[mActiveCameraIdx]->getView();
|
||||
|
||||
field_0xDCC = 0;
|
||||
field_0x098 = 0;
|
||||
field_0x09A = 0;
|
||||
|
||||
dScGame_c::setCamera(mMyCameraIndex, this);
|
||||
fn_8019DCE0();
|
||||
fn_8019DE70();
|
||||
|
||||
const STIF *stif = dStageMgr_c::GetInstance()->getStif();
|
||||
if (stif != nullptr) {
|
||||
sHio.field_0x04 = stif->field_0x00;
|
||||
sHio.field_0x08 = stif->field_0x04;
|
||||
}
|
||||
|
||||
field_0x1FC = 0;
|
||||
if ((dScGame_c::isCurrentStage("F000") && 26 <= dScGame_c::currentSpawnInfo.layer &&
|
||||
dScGame_c::currentSpawnInfo.layer <= 28) ||
|
||||
dScGame_c::isInCredits() || dScGame_c::isSeekerStoneStageAndLayer()) {
|
||||
mFlags |= 0x200;
|
||||
dScGame_c::GetInstance()->setTargetingScreenLetterboxAmount(0.0f);
|
||||
}
|
||||
|
||||
debugPrintf7("create ok!!");
|
||||
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
// Maybe inlines that couldn't be inlined due to variadics...
|
||||
void debugWarn2(const char *fmt, ...) {
|
||||
// no-op
|
||||
}
|
||||
|
||||
void debugPrintf7(const char *fmt, ...) {
|
||||
// no-op
|
||||
}
|
||||
|
||||
int dCamera_c::doDelete() {
|
||||
debugPrintf7("delete!!");
|
||||
for (int i = 0; i < CAM_MAX; i++) {
|
||||
// No null check needed :)
|
||||
mpCameras[i]->doRemove();
|
||||
}
|
||||
dScGame_c::setCamera(mMyCameraIndex, nullptr);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dCamera_c::execute() {
|
||||
dAcPy_c *link = dAcPy_c::GetLinkM();
|
||||
|
||||
fn_8019DB80();
|
||||
|
||||
for (int i = 0; i < CAM_MAX; i++) {
|
||||
if (mpCameras[i] != nullptr) {
|
||||
mpCameras[i]->doExecute();
|
||||
}
|
||||
}
|
||||
|
||||
if (mActiveCameraIdx == CAM_EVENT) {
|
||||
// hmmmm
|
||||
static_cast<dCameraGame_c *>(mpCameras[0])->clearCamIds();
|
||||
}
|
||||
|
||||
fn_8019DCE0();
|
||||
fn_8019DE70();
|
||||
field_0xDC0.fn_8019E940();
|
||||
|
||||
field_0xDCC = 0;
|
||||
if (mActiveCameraIdx == CAM_EVENT) {
|
||||
mFlags |= CAM_FLAGS_0x80;
|
||||
}
|
||||
|
||||
if ((mFlags & (CAM_FLAGS_0x100 | CAM_FLAGS_0x80)) != 0) {
|
||||
field_0x290 += (1.0f / sHio.field_0x24);
|
||||
if (field_0x290 > 1.0f) {
|
||||
field_0x290 = 1.0f;
|
||||
}
|
||||
} else {
|
||||
field_0x290 = field_0x290 - (1.0f / sHio.field_0x24);
|
||||
if (field_0x290 < 0.0f) {
|
||||
field_0x290 = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
f32 scale = (mFlags & CAM_FLAGS_0x80) != 0 ? fn_8019E1F0() : sHio.field_0x20;
|
||||
f32 target = camEaseInOut(field_0x290, 1.0f);
|
||||
mLetterboxAmount += (target * scale - mLetterboxAmount) * 0.5f;
|
||||
|
||||
if (mActiveCameraIdx == CAM_EVENT && (mFlags & CAM_FLAGS_0x200) != 0) {
|
||||
mLetterboxAmount = 0.0f;
|
||||
}
|
||||
|
||||
dScGame_c::GetInstance()->setTargetingScreenLetterboxAmount(mLetterboxAmount);
|
||||
mFlags &= ~(CAM_FLAGS_0x100 | CAM_FLAGS_0x80);
|
||||
|
||||
if (!link->checkActionFlagsCont(0x400000)) {
|
||||
field_0x299 = 0;
|
||||
}
|
||||
|
||||
f32 alphaTarget;
|
||||
f32 alphaUpdateSpeed = sHio.field_0x2C;
|
||||
if (EventManager::isInEvent()) {
|
||||
alphaUpdateSpeed = 1.0f;
|
||||
if (field_0x2A1 != 0) {
|
||||
alphaTarget = field_0x2A0 ? sHio.field_0x28 : 0.0f;
|
||||
} else {
|
||||
alphaTarget = 1.0f;
|
||||
}
|
||||
} else {
|
||||
if (field_0x299 != 0) {
|
||||
alphaTarget = field_0x298 ? sHio.field_0x28 : 0.0f;
|
||||
} else {
|
||||
alphaTarget = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
mGlobalAlpha += alphaUpdateSpeed * (alphaTarget - mGlobalAlpha);
|
||||
dStageMgr_c::GetInstance()->setGlobalAlpha((u8)(mGlobalAlpha * 255.1f) & 0xFF);
|
||||
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dCamera_c::draw() {
|
||||
if (mpCameras[mActiveCameraIdx] != nullptr) {
|
||||
mpCameras[mActiveCameraIdx]->doDraw();
|
||||
}
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
bool dCamera_c::isUnderwater() const {
|
||||
return mFlags & CAM_FLAGS_0x40;
|
||||
}
|
||||
|
||||
void dCamera_c::setFrustum(f32 fov, f32 near, f32 far) {
|
||||
if (dGfx_c::isTvMode4To3()) {
|
||||
mpScreen->Reset(
|
||||
0.0f, dGfx_c::getEFBHeightDifferenceF(), dGfx_c::getCurrentScreenWidthF(), dGfx_c::getHeightScaledF(),
|
||||
mpScreen->GetCanvasMode()
|
||||
);
|
||||
} else {
|
||||
mpScreen->Reset(
|
||||
0.0f, 0.0f, dGfx_c::getCurrentScreenWidthF(), dGfx_c::getCurrentScreenHeightF(), mpScreen->GetCanvasMode()
|
||||
);
|
||||
if (dGfx_c::isTvMode4To3()) {
|
||||
// Unreachable...
|
||||
fov *= sHio.field_0x0C;
|
||||
}
|
||||
}
|
||||
|
||||
mpScreen->SetProjectionType(EGG::Frustum::PROJ_PERSP);
|
||||
mpScreen->SetNearZ(near);
|
||||
mpScreen->SetFarZ(far);
|
||||
mpScreen->SetFovy(fov);
|
||||
|
||||
// Possible fakematch: Either the internals of EGG::Matrix34f allow
|
||||
// copying the data via compiler-generated struct copies (lwz/stw),
|
||||
// or this is really what they did. NSMBW symbols confirm that this function
|
||||
// takes mMtx_c while it's clear that EGG cameras return EGG matrices.
|
||||
mMtx_c mtx = *(mMtx_c *)&mLookAtCamera.getViewMatrix();
|
||||
mFrustum.set(fov, mpScreen->GetAspect(), near, far, mtx);
|
||||
}
|
||||
|
||||
void dCamera_c::updateUnderwaterDepth(const mVec3_c &pos) {
|
||||
mVec3_c chkPos = pos;
|
||||
dBgS_RoofChk roofChk;
|
||||
roofChk.SetPos(&chkPos);
|
||||
roofChk.SetUnderwaterRoof();
|
||||
roofChk.SetField_0x7C(1);
|
||||
|
||||
f32 f = dBgS::GetInstance()->RoofChk(&roofChk);
|
||||
if (f != 1e9f) {
|
||||
chkPos.y = f;
|
||||
} else {
|
||||
chkPos.y += 10000.0f;
|
||||
}
|
||||
|
||||
dBgS_ObjGndChk_Wtr wtrChk;
|
||||
wtrChk.SetPos(chkPos);
|
||||
f32 waterHeight = dBgS::GetInstance()->GroundCross(&wtrChk);
|
||||
if (waterHeight != 1e9f) {
|
||||
mIsUnderwater = waterHeight > pos.y;
|
||||
mWaterHeight = waterHeight;
|
||||
} else {
|
||||
mIsUnderwater = false;
|
||||
mWaterHeight = -1e9f;
|
||||
}
|
||||
|
||||
if (mIsUnderwater) {
|
||||
mUnderwaterDepth = waterHeight - pos.y;
|
||||
} else {
|
||||
mUnderwaterDepth = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
bool dCamera_c::isUnderwater_() const {
|
||||
return mIsUnderwater;
|
||||
}
|
||||
|
||||
f32 dCamera_c::getUnderwaterDepth() const {
|
||||
return mUnderwaterDepth;
|
||||
}
|
||||
|
||||
void dCamera_c::substruct_1::setCamera(dCamera_c *cam) {
|
||||
mpCamera = cam;
|
||||
}
|
||||
|
||||
void dCamera_c::substruct_1::fn_8019E890() {
|
||||
fn_8019E8D0(mpCamera->fn_8019E3B0());
|
||||
}
|
||||
|
||||
void dCamera_c::substruct_1::fn_8019E8D0(const mAng &ang) {
|
||||
if (!mActive) {
|
||||
mActive = true;
|
||||
field_0x04 = ang;
|
||||
mFSStickAngle = dPad::getFSStickAngle();
|
||||
}
|
||||
}
|
||||
|
||||
mAng dCamera_c::substruct_1::fn_8019E930() {
|
||||
return field_0x04;
|
||||
}
|
||||
|
||||
void dCamera_c::substruct_1::fn_8019E940() {
|
||||
if (mActive) {
|
||||
mAng angle = mFSStickAngle - dPad::getFSStickAngle();
|
||||
f32 distance = dPad::getFSStickDistance();
|
||||
if (distance < sHio.field_0x14 || mAng::abs(angle) > sHio.field_0x18) {
|
||||
mActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!mActive) {
|
||||
field_0x04 = mpCamera->fn_8019E3B0();
|
||||
mFSStickAngle = dPad::getFSStickAngle();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -476,7 +476,7 @@ bool dFlow_c::handleEventInternal(const MsbFlowInfo *element) {
|
||||
case EVENT_CAMERA_42: {
|
||||
s32 p1 = (params1n2 >> 16) & 0xFFFF;
|
||||
s32 p2 = params1n2 & 0xFFFF;
|
||||
dScGame_c::getCamera(0)->doFn_800918E0(p1, p2);
|
||||
dScGame_c::getCamera(0)->getEventCam()->fn_800918E0(p1, p2);
|
||||
break;
|
||||
}
|
||||
case EVENT_LYT_MINI_GAME: {
|
||||
|
||||
@@ -134,7 +134,7 @@ void dStageMgr_c::initializeState_ReadLayerObjectRes() {
|
||||
parseBzsStageRoom(roomId, bzs);
|
||||
}
|
||||
|
||||
if (dScGame_c::isStateLayerWithSeekerStoneHintMenu()) {
|
||||
if (dScGame_c::isSeekerStoneStageAndLayer()) {
|
||||
mLayoutArcCtrl2.set(sSeekerStoneLayoutArcs, ARRAY_LENGTH(sSeekerStoneLayoutArcs));
|
||||
mLayoutArcCtrl2.load(dHeap::work2Heap.heap);
|
||||
addActorId(fProfile::LYT_SEEKER_STONE);
|
||||
|
||||
@@ -3304,10 +3304,10 @@ void dLytMapMain_c::setupEvent(s32 event, s32 arg1, s32 arg2) {
|
||||
}
|
||||
|
||||
if (mDoCameraTransition) {
|
||||
dScGame_c::getCamera(0)->doFn_80093380();
|
||||
dScGame_c::getCamera(0)->getMapCam()->fn_80093380();
|
||||
} else {
|
||||
dScGame_c::getCamera(0)->doFn_80093360();
|
||||
dScGame_c::getCamera(0)->doFn_80093340();
|
||||
dScGame_c::getCamera(0)->getMapCam()->fn_80093360();
|
||||
dScGame_c::getCamera(0)->getMapCam()->fn_80093340();
|
||||
}
|
||||
dScGame_c::getCamera(0)->fn_8019E410();
|
||||
dLytMapMain_vt0x10();
|
||||
@@ -3357,7 +3357,7 @@ void dLytMapMain_c::close() {
|
||||
}
|
||||
} else if (mRoomType == ROOMTYPE_DUNGEON && !field_0x8CAE && !mMapUpDirection) {
|
||||
mDoCameraTransition = false;
|
||||
dScGame_c::getCamera(0)->doFn_80093340();
|
||||
dScGame_c::getCamera(0)->getMapCam()->fn_80093340();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3367,9 +3367,9 @@ void dLytMapMain_c::close() {
|
||||
}
|
||||
|
||||
if (mDoCameraTransition) {
|
||||
dScGame_c::getCamera(0)->doFn_80093380();
|
||||
dScGame_c::getCamera(0)->getMapCam()->fn_80093380();
|
||||
} else {
|
||||
dScGame_c::getCamera(0)->doFn_80093360();
|
||||
dScGame_c::getCamera(0)->getMapCam()->fn_80093360();
|
||||
}
|
||||
|
||||
if (mMapEvent == MAP_EVENT_NONE) {
|
||||
@@ -5047,7 +5047,7 @@ void dLytMapMain_c::forceOut() {
|
||||
mAnmGroups[MAP_MAIN_ANIM_OUT].unbind();
|
||||
dBase_c::s_NextExecuteControlFlags &= ~dBase_c::BASE_PROP_0x10;
|
||||
dBase_c::s_DrawControlFlags &= ~dBase_c::BASE_PROP_0x10;
|
||||
dScGame_c::getCamera(0)->doFn_80093360();
|
||||
dScGame_c::getCamera(0)->getMapCam()->fn_80093360();
|
||||
dScGame_c::getCamera(0)->fn_8019E430();
|
||||
mStateMgr.changeState(StateID_Invisible);
|
||||
}
|
||||
|
||||
@@ -268,9 +268,9 @@ bool dLytMeterABtn_c::execute() {
|
||||
field_0x1BC = LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_A);
|
||||
field_0x1C0 = LytDoButtonRelated::getHas(LytDoButtonRelated::DO_BUTTON_A);
|
||||
|
||||
if (field_0x1BC == 0x76) {
|
||||
if (field_0x1BC == LytDoButtonRelated::ACT_IE_ETC_REMOVE_BEACON) {
|
||||
state = true;
|
||||
} else if (field_0x1BC == 0x57) {
|
||||
} else if (field_0x1BC == LytDoButtonRelated::ACT_IE_INFO_GRAB_3) {
|
||||
state = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -372,7 +372,7 @@ void dLytMeterDowsing_c::executeState_Invisible() {
|
||||
}
|
||||
void dLytMeterDowsing_c::finalizeState_Invisible() {
|
||||
if (getSelectedDowsingSlot() != DowsingTarget::SLOT_NONE &&
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == 0x52) {
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == LytDoButtonRelated::ACT_IE_INFO_DOWSE) {
|
||||
mAnm[DOWSING_ANIM_DECIDE].setToEnd();
|
||||
mAnm[DOWSING_ANIM_DECIDE].setAnimEnable(true);
|
||||
mLyt.calc();
|
||||
@@ -404,7 +404,7 @@ void dLytMeterDowsing_c::executeState_Wait() {
|
||||
dLytMeter_c::GetMain()->fn_800D5380(0) && !dLytMeter_c::GetMain()->isInModeMap() &&
|
||||
!dLytMeter_c::GetMain()->isInModePause() && getSelectedDowsingSlot() != DowsingTarget::SLOT_LOOK &&
|
||||
getSelectedDowsingSlot() != DowsingTarget::SLOT_NONE &&
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == 0x52) {
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == LytDoButtonRelated::ACT_IE_INFO_DOWSE) {
|
||||
mAnm[DOWSING_ANIM_IN].setBackwardsOnce();
|
||||
mAnm[DOWSING_ANIM_IN].setToEnd2();
|
||||
mAnm[DOWSING_ANIM_IN].setAnimEnable(true);
|
||||
@@ -498,7 +498,7 @@ void dLytMeterDowsing_c::initializeState_MenuSelectingOut() {
|
||||
mAnm[DOWSING_ANIM_IN].setAnimEnable(true);
|
||||
field_0x550A = 0;
|
||||
if (getSelectedDowsingSlot() != DowsingTarget::SLOT_NONE &&
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == 0x52) {
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == LytDoButtonRelated::ACT_IE_INFO_DOWSE) {
|
||||
if (getSelectedDowsingSlot() != DowsingTarget::SLOT_LOOK) {
|
||||
field_0x550A = 1;
|
||||
}
|
||||
@@ -551,8 +551,9 @@ void dLytMeterDowsing_c::initializeState_ToUse() {
|
||||
mAnm[DOWSING_ANIM_INPUT_0].setAnimEnable(true);
|
||||
|
||||
if (FileManager::GetInstance()->getDowsingSlotIdx() != 8 &&
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == 0x52 && dLytMeter_c::GetMain()->fn_800D5380(0) &&
|
||||
!dLytMeter_c::GetMain()->isInModeMap() && !dLytMeter_c::GetMain()->isInModePause()) {
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == LytDoButtonRelated::ACT_IE_INFO_DOWSE &&
|
||||
dLytMeter_c::GetMain()->fn_800D5380(0) && !dLytMeter_c::GetMain()->isInModeMap() &&
|
||||
!dLytMeter_c::GetMain()->isInModePause()) {
|
||||
mAnm[DOWSING_ANIM_RESET].setAnimEnable(true);
|
||||
mAnm[DOWSING_ANIM_RESET].setBackwardsOnce();
|
||||
mAnm[DOWSING_ANIM_RESET].setToStart();
|
||||
@@ -560,8 +561,9 @@ void dLytMeterDowsing_c::initializeState_ToUse() {
|
||||
}
|
||||
void dLytMeterDowsing_c::executeState_ToUse() {
|
||||
if (FileManager::GetInstance()->getDowsingSlotIdx() != 8 &&
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == 0x52 && dLytMeter_c::GetMain()->fn_800D5380(0) &&
|
||||
!dLytMeter_c::GetMain()->isInModeMap() && !dLytMeter_c::GetMain()->isInModePause()) {
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == LytDoButtonRelated::ACT_IE_INFO_DOWSE &&
|
||||
dLytMeter_c::GetMain()->fn_800D5380(0) && !dLytMeter_c::GetMain()->isInModeMap() &&
|
||||
!dLytMeter_c::GetMain()->isInModePause()) {
|
||||
if (mAnm[DOWSING_ANIM_INPUT_0].isStop2()) {
|
||||
if (!mAnm[DOWSING_ANIM_RESET].isEnabled() || mAnm[DOWSING_ANIM_RESET].isStop2()) {
|
||||
mStateMgr.changeState(StateID_Wait);
|
||||
@@ -594,8 +596,9 @@ void dLytMeterDowsing_c::initializeState_ToUnuse() {
|
||||
mAnm[DOWSING_ANIM_INPUT_0].setAnimEnable(true);
|
||||
|
||||
if (FileManager::GetInstance()->getDowsingSlotIdx() != 8 &&
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == 0x52 && dLytMeter_c::GetMain()->fn_800D5380(0) &&
|
||||
!dLytMeter_c::GetMain()->isInModeMap() && !dLytMeter_c::GetMain()->isInModePause()) {
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == LytDoButtonRelated::ACT_IE_INFO_DOWSE &&
|
||||
dLytMeter_c::GetMain()->fn_800D5380(0) && !dLytMeter_c::GetMain()->isInModeMap() &&
|
||||
!dLytMeter_c::GetMain()->isInModePause()) {
|
||||
mAnm[DOWSING_ANIM_RESET].setAnimEnable(true);
|
||||
mAnm[DOWSING_ANIM_RESET].setForwardOnce();
|
||||
mAnm[DOWSING_ANIM_RESET].setToStart();
|
||||
|
||||
@@ -656,8 +656,8 @@ bool dLytMeterGanbariGauge_c::fn_80104760() const {
|
||||
}
|
||||
|
||||
bool dLytMeterGanbariGauge_c::fn_801047B0() const {
|
||||
if (fn_80081FE0(dScGame_c::getCamera(0)->getField_0xD98(), "mogu") ||
|
||||
fn_80081FE0(dScGame_c::getCamera(0)->getField_0xD98(), "mogu2")) {
|
||||
if (dScGame_c::getCamera(0)->getGameCam1()->isCurrentTrend("mogu") ||
|
||||
dScGame_c::getCamera(0)->getGameCam1()->isCurrentTrend("mogu2")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -186,9 +186,9 @@ bool dLytMeterZBtn_c::execute() {
|
||||
return true;
|
||||
}
|
||||
field_0x1C4 = true;
|
||||
if ((!fn_80081FE0(dScGame_c::getCamera(0)->getField_0xD98(), "mogu") ||
|
||||
if ((!dScGame_c::getCamera(0)->getGameCam1()->isCurrentTrend("mogu") ||
|
||||
AttentionManager::GetInstance()->checkLink2()) &&
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_Z) == 0x67) {
|
||||
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_Z) == LytDoButtonRelated::ACT_IE_ETC_VIEW_SURFACE) {
|
||||
field_0x1C4 = false;
|
||||
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_Z, LytDoButtonRelated::ACT_IE_NONE);
|
||||
}
|
||||
|
||||
@@ -416,11 +416,9 @@ void AttentionGroup::fn_800964B0() {
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" f32 lbl_8057CD9C;
|
||||
|
||||
f32 AttentionManager::targetScore(dAcObjBase_c *target, dAcObjBase_c *origin) {
|
||||
s16 angle = cLib::targetAngleY(target->mPosition, origin->mPosition) - origin->mRotation.y.mVal;
|
||||
f32 viewAngle = fabsf(angle * lbl_8057CD9C);
|
||||
f32 viewAngle = fabsf(mAng::s2n_c(angle));
|
||||
if (viewAngle > 0.5f) {
|
||||
return viewAngle;
|
||||
}
|
||||
@@ -429,9 +427,7 @@ f32 AttentionManager::targetScore(dAcObjBase_c *target, dAcObjBase_c *origin) {
|
||||
|
||||
// Maybe checks if actor is currently targeted
|
||||
bool AttentionManager::fn_80096B40(dAcObjBase_c *actor) {
|
||||
AttentionPool *refs = mGroups[1].getOtherPool();
|
||||
dAcObjBase_c *ac = refs->getActor(mModels.mCurrentTargetInfoIdx);
|
||||
if (ac == actor) {
|
||||
if (getTargetedActorUnchecked() == actor) {
|
||||
mHasTarget = 1;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
#include "toBeSorted/d_camera_base.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
// TODO: Weak function order (CamView dtor needs to appear after a bunch of weak functions)
|
||||
// TODO: I'm not sure why all those weak functions even got emitted here, there's nothing
|
||||
// that forces the compiler to put anything here so using this as a hack. I really believe the
|
||||
// text split is correct, and this file doesn't appear to have any other sections.
|
||||
void CreatedCameraBase_cHack() {
|
||||
dCameraBase_c *c = new dCameraBase_c();
|
||||
}
|
||||
|
||||
bool dCameraBase_c::doCreate(s32 index) {
|
||||
if (!mCreated) {
|
||||
if (!create()) {
|
||||
return false;
|
||||
}
|
||||
mCreated = true;
|
||||
mIndex = index;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dCameraBase_c::doRemove() {
|
||||
field_0x01 = false;
|
||||
return remove();
|
||||
}
|
||||
|
||||
bool dCameraBase_c::doExecute() {
|
||||
if (field_0x02 && !field_0x01) {
|
||||
vt_0x08();
|
||||
} else if (!field_0x02 && field_0x01) {
|
||||
vt_0x0C();
|
||||
}
|
||||
field_0x01 = field_0x02;
|
||||
if (!field_0x02) {
|
||||
return false;
|
||||
} else {
|
||||
return execute();
|
||||
}
|
||||
}
|
||||
|
||||
bool dCameraBase_c::doDraw() {
|
||||
if (field_0x01) {
|
||||
return draw();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#include "toBeSorted/d_camera_event.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
class dCameraEvent_HIO_c {
|
||||
public:
|
||||
dCameraEvent_HIO_c();
|
||||
virtual ~dCameraEvent_HIO_c();
|
||||
|
||||
/* 0x04 */ f32 field_0x04;
|
||||
/* 0x08 */ f32 field_0x08;
|
||||
/* 0x0A */ s16 field_0x0A;
|
||||
};
|
||||
|
||||
dCameraEvent_HIO_c::~dCameraEvent_HIO_c() {}
|
||||
dCameraEvent_HIO_c::dCameraEvent_HIO_c() : field_0x04(0.0f), field_0x08(180.0f), field_0x0A(0) {}
|
||||
|
||||
static dCameraEvent_HIO_c sHio;
|
||||
|
||||
dCameraEvent_c::dCameraEvent_c()
|
||||
: field_0x48(0), field_0x4A(-1), mEventRelated(1, nullptr), field_0xA0(0), field_0xA4(-1), field_0xAC(-1) {}
|
||||
@@ -0,0 +1,423 @@
|
||||
|
||||
|
||||
#include "toBeSorted/d_camera_game.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "d/a/d_a_player.h"
|
||||
#include "d/a/obj/d_a_obj_base.h"
|
||||
#include "d/col/bg/d_bg_s.h"
|
||||
#include "d/col/bg/d_bg_s_lin_chk.h"
|
||||
#include "d/col/bg/d_bg_s_roof_chk.h"
|
||||
#include "d/d_bzs_types.h"
|
||||
#include "d/d_player_act.h"
|
||||
#include "d/d_room.h"
|
||||
#include "d/d_sc_game.h"
|
||||
#include "d/d_stage.h"
|
||||
#include "m/m_angle.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "sized_string.h"
|
||||
#include "toBeSorted/arc_managers/oarc_manager.h"
|
||||
#include "toBeSorted/attention.h"
|
||||
|
||||
class dCameraGame_HIO_c {
|
||||
public:
|
||||
dCameraGame_HIO_c();
|
||||
virtual ~dCameraGame_HIO_c();
|
||||
|
||||
void create();
|
||||
void remove();
|
||||
|
||||
public:
|
||||
/* 0x004 */ u8 _0x004[0x0E8 - 0x004];
|
||||
|
||||
/* 0x0E8 */ f32 field_0x0E8;
|
||||
|
||||
/* 0x0EC */ u8 _0x0EC[0x138 - 0x0EC];
|
||||
};
|
||||
|
||||
static dCameraGame_HIO_c sHio;
|
||||
dCameraGame_HIO_c::~dCameraGame_HIO_c() {}
|
||||
|
||||
CamParamHeader *dCameraGame_c::sHeader;
|
||||
f32 *dCameraGame_c::sFloats;
|
||||
u16 *dCameraGame_c::sFlags;
|
||||
CamParamStyle *dCameraGame_c::sStyles;
|
||||
CamParamTrend *dCameraGame_c::sTrends;
|
||||
|
||||
s32 dCameraGame_c::sTrendIdxes[CAM_TREND_IDX_MAX];
|
||||
s32 dCameraGame_c::sStyleIdxes[CAM_STYLE_IDX_MAX];
|
||||
|
||||
void debugPrintf4(const char *fmt, ...) {
|
||||
// no-op
|
||||
}
|
||||
|
||||
static s32 getCurrentRoomId() {
|
||||
return dAcPy_c::GetLinkM()->mRoomID;
|
||||
}
|
||||
|
||||
const CAM *getCam(s32 camId, s32 roomId) {
|
||||
if (camId == -1) {
|
||||
return nullptr;
|
||||
}
|
||||
roomId = roomId >= 0 ? roomId : getCurrentRoomId();
|
||||
return dStage_c::GetInstance()->getRoom(roomId)->getCamForIndex(camId);
|
||||
}
|
||||
|
||||
const CAM *getCam(const CamId &id) {
|
||||
return getCam(id.roomCamId, id.roomId);
|
||||
}
|
||||
|
||||
s32 getCamTrend(const CamId &id) {
|
||||
return dCameraGame_c::getTrendIndex(getCam(id)->trendName);
|
||||
}
|
||||
|
||||
s32 dCameraGame_c::getTrendIndex(const char *name) {
|
||||
SizedString<32> lName(name);
|
||||
for (int i = 0; i < sHeader->numTrends; i++) {
|
||||
// MWCC doesn't complain about this one but clangd doesn't like it
|
||||
if (lName == sTrends[i].name) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 dCameraGame_c::getStyleIndex(u32 id) {
|
||||
for (int i = 0; i < sHeader->numStyles; i++) {
|
||||
// Temp needed... inline?
|
||||
s32 otherId = sStyles[i].id;
|
||||
if (otherId == id) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void dCameraGame_c::cacheIdxes() {
|
||||
sTrendIdxes[CAM_TREND_IDX_BalanceBall] = getTrendIndex("BalanceBall");
|
||||
sTrendIdxes[CAM_TREND_IDX_Swim] = getTrendIndex("Swim");
|
||||
sTrendIdxes[CAM_TREND_IDX_Surface] = getTrendIndex("Surface");
|
||||
sTrendIdxes[CAM_TREND_IDX_SkyDive] = getTrendIndex("SkyDive");
|
||||
sTrendIdxes[CAM_TREND_IDX_Dive] = getTrendIndex("Dive");
|
||||
sTrendIdxes[CAM_TREND_IDX_Lift] = getTrendIndex("Lift");
|
||||
sTrendIdxes[CAM_TREND_IDX_Crawl] = getTrendIndex("Crawl");
|
||||
sTrendIdxes[CAM_TREND_IDX_Field] = getTrendIndex("Field");
|
||||
sTrendIdxes[CAM_TREND_IDX_Dungeon] = getTrendIndex("Dungeon");
|
||||
sTrendIdxes[CAM_TREND_IDX_mogu] = getTrendIndex("mogu");
|
||||
sTrendIdxes[CAM_TREND_IDX_mogu2] = getTrendIndex("mogu2");
|
||||
sTrendIdxes[CAM_TREND_IDX_Tornade] = getTrendIndex("Tornade");
|
||||
sTrendIdxes[CAM_TREND_IDX_Rope] = getTrendIndex("Rope");
|
||||
sTrendIdxes[CAM_TREND_IDX_Tightrope] = getTrendIndex("Tightrope");
|
||||
sTrendIdxes[CAM_TREND_IDX_Parachute] = getTrendIndex("Parachute");
|
||||
sTrendIdxes[CAM_TREND_IDX_DialKey] = getTrendIndex("DialKey");
|
||||
sTrendIdxes[CAM_TREND_IDX_BirdRide] = getTrendIndex("BirdRide");
|
||||
sTrendIdxes[CAM_TREND_IDX_BirdRideLD] = getTrendIndex("BirdRideLD");
|
||||
sTrendIdxes[CAM_TREND_IDX_Trolley] = getTrendIndex("Trolley");
|
||||
sTrendIdxes[CAM_TREND_IDX_Boomerang] = getTrendIndex("Boomerang");
|
||||
sTrendIdxes[CAM_TREND_IDX_Room] = getTrendIndex("Room");
|
||||
sTrendIdxes[CAM_TREND_IDX_AfterCrawl] = getTrendIndex("AfterCrawl");
|
||||
if (dScGame_c::currentSpawnInfo.stageName == "F020") {
|
||||
sTrendIdxes[CAM_TREND_IDX_TerryShip_Island] = getTrendIndex("Island");
|
||||
} else {
|
||||
sTrendIdxes[CAM_TREND_IDX_TerryShip_Island] = getTrendIndex("TerryShip");
|
||||
}
|
||||
sTrendIdxes[CAM_TREND_IDX_Catapult] = getTrendIndex("Catapult");
|
||||
sTrendIdxes[CAM_TREND_IDX_TightropeHang] = getTrendIndex("TightropeHang");
|
||||
sTrendIdxes[CAM_TREND_IDX_BossKey] = getTrendIndex("BossKey");
|
||||
sTrendIdxes[CAM_TREND_IDX_SkyDiveNear] = getTrendIndex("SkyDiveNear");
|
||||
sTrendIdxes[CAM_TREND_IDX_ClawShot] = getTrendIndex("ClawShot");
|
||||
sTrendIdxes[CAM_TREND_IDX_Town] = getTrendIndex("Town");
|
||||
sTrendIdxes[CAM_TREND_IDX_Cannon] = getTrendIndex("Cannon");
|
||||
sTrendIdxes[CAM_TREND_IDX_Nushi] = getTrendIndex("Nushi");
|
||||
sTrendIdxes[CAM_TREND_IDX_Island] = getTrendIndex("Island");
|
||||
sTrendIdxes[CAM_TREND_IDX_Windmill] = getTrendIndex("Windmill");
|
||||
|
||||
sStyleIdxes[CAM_STYLE_IDX_TA22] = getStyleIndex('TA22');
|
||||
}
|
||||
|
||||
bool dCameraGame_c::initCamParamDat() {
|
||||
void *data = OarcManager::GetInstance()->getData("Camera", "arc/camparam.dat");
|
||||
|
||||
if (data == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
CamParamHeader *header = (CamParamHeader *)data;
|
||||
sHeader = header;
|
||||
sFloats = (f32 *)((u32)data + sizeof(CamParamHeader));
|
||||
sFlags = (u16 *)((u32)sFloats + sizeof(f32) * header->numFloats);
|
||||
sStyles = (CamParamStyle *)((u32)sFlags + sizeof(u16) * header->numFlags);
|
||||
sTrends = (CamParamTrend *)((u32)sStyles + sizeof(CamParamStyle) * header->numStyles);
|
||||
debugPrintf4("*** camera parameter data *** ", sTrends); // ??? - need this in r4...
|
||||
debugPrintf4(" %3d float numbers", sHeader->numFloats);
|
||||
debugPrintf4(" %3d (x16) flags", sHeader->numFlags);
|
||||
debugPrintf4(" %3d styles", sHeader->numStyles);
|
||||
debugPrintf4(" %3d trends", sHeader->numTrends);
|
||||
cacheIdxes();
|
||||
return true;
|
||||
}
|
||||
|
||||
dCameraGame_HIO_c::dCameraGame_HIO_c() {
|
||||
// TODO - ...
|
||||
}
|
||||
|
||||
void dCameraGame_HIO_c::create() {
|
||||
// no-op
|
||||
}
|
||||
|
||||
void dCameraGame_HIO_c::remove() {
|
||||
// no-op
|
||||
}
|
||||
|
||||
void UnkCamChecks::fn_8007E130(dCameraGame_c *system) {
|
||||
mChk2.field_0x000 = 0;
|
||||
mChk1.field_0x000 = 0;
|
||||
mRef.field_0x00 = false;
|
||||
mRef.mMoveBgActorRef.unlink();
|
||||
field_0x16A = 0;
|
||||
field_0x16B = 0;
|
||||
|
||||
field_0x164.roomCamId = -1;
|
||||
field_0x164.roomId = dAcPy_c::GetLinkM()->getRoomId();
|
||||
field_0x164.field_0x04 = 0;
|
||||
mpCamera = system;
|
||||
}
|
||||
|
||||
void UnkCamChecks::fn_8007E1B0(dAcObjBase_c *ac) {
|
||||
dAcPy_c *link = dAcPy_c::GetLinkM();
|
||||
|
||||
mVec3_c pos = ac->mPosition;
|
||||
if (ac == link && link->checkActionFlags(daPlayerActBase_c::FLG0_CRAWLING)) {
|
||||
pos = ac->mPositionCopy2;
|
||||
pos.y = ac->mPosition.y;
|
||||
}
|
||||
|
||||
mVec3_c pos2 = pos;
|
||||
pos.y += 20.0f;
|
||||
|
||||
dBgS_RoofChk roofChk;
|
||||
roofChk.SetUnderwaterRoof();
|
||||
roofChk.SetField_0x7C(1);
|
||||
roofChk.SetPos(&pos2);
|
||||
f32 rChk = dBgS::GetInstance()->RoofChk(&roofChk);
|
||||
if (pos2.y < rChk) {
|
||||
pos2.y = rChk;
|
||||
}
|
||||
|
||||
mChk2.chk.SetCam();
|
||||
mChk2.chk.ClrObj();
|
||||
mChk2.chk.SetPos(&pos);
|
||||
mChk2.field_0x094 = dBgS::GetInstance()->GroundCross(&mChk2.chk);
|
||||
mChk2.field_0x000 = mChk2.field_0x094 != -1e9f;
|
||||
field_0x16B = 0;
|
||||
|
||||
bool moveBg = dBgS::GetInstance()->ChkMoveBG(mChk2.chk, true);
|
||||
if (moveBg && mRef.field_0x00) {
|
||||
mRef.mMoveBgActorRef.link(const_cast<dAcObjBase_c *>(dBgS::GetInstance()->GetActorPointer(mChk2.chk)));
|
||||
mVec3_c v_c4 = ac->mPosition;
|
||||
dBgS::GetInstance()->MoveBgCrrPos(mChk2.chk, true, &v_c4, nullptr, nullptr, 0, 0);
|
||||
mRef.field_0x04 = v_c4 - ac->mPosition;
|
||||
} else {
|
||||
mRef.mMoveBgActorRef.unlink();
|
||||
}
|
||||
mRef.field_0x00 = moveBg;
|
||||
|
||||
mChk1.chk.SetPos(&pos2);
|
||||
mChk1.field_0x094 = dBgS::GetInstance()->GroundCross(&mChk1.chk);
|
||||
mChk1.field_0x000 = mChk1.field_0x094 != -1e9f;
|
||||
|
||||
if (link->checkActionFlags(daPlayerActBase_c::FLG0_IN_WATER) && mChk1.field_0x094 < ac->mPositionCopy3.y + 40.0f) {
|
||||
field_0x16A = 1;
|
||||
} else if (link->getRidingActorType() != daPlayerActBase_c::RIDING_NONE ||
|
||||
link->checkActionFlags(daPlayerActBase_c::FLG0_HANGING_LEDGE) ||
|
||||
link->checkActionFlags(daPlayerActBase_c::FLG0_ON_VINES)) {
|
||||
field_0x16A = 1;
|
||||
} else {
|
||||
if (ac->mPosition.y - mChk2.field_0x094 > sHio.field_0x0E8) {
|
||||
field_0x16A = 0;
|
||||
} else {
|
||||
field_0x16A = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (mChk1.field_0x000 && ac == link && link->checkActionFlags(daPlayerActBase_c::FLG0_IN_WATER)) {
|
||||
mChk1.camId.roomCamId = dBgS::GetInstance()->GetRoomCamId(mChk1.chk);
|
||||
mChk1.camId.roomId = dBgS::GetInstance()->GetRoomId(mChk1.chk);
|
||||
if (!mChk1.camId.someCheck()) {
|
||||
mChk1.camId.clear();
|
||||
}
|
||||
} else {
|
||||
mChk1.camId.clear();
|
||||
}
|
||||
|
||||
if (!field_0x16A) {
|
||||
mChk2.camId = mpCamera->getCamId0x60();
|
||||
} else if (mChk2.field_0x000) {
|
||||
mChk2.camId.roomCamId = dBgS::GetInstance()->GetRoomCamId(mChk2.chk);
|
||||
mChk2.camId.roomId = dBgS::GetInstance()->GetRoomId(mChk2.chk);
|
||||
if (!mChk2.camId.someCheck()) {
|
||||
mChk2.camId.clear();
|
||||
}
|
||||
} else {
|
||||
mChk2.camId.clear();
|
||||
}
|
||||
|
||||
s32 roomId = getCurrentRoomId();
|
||||
if (roomId >= 0) {
|
||||
dRoom_c *room = dStage_c::GetInstance()->getRoom(roomId);
|
||||
if (room->getFile() != nullptr && room->getFile()->field_0x00 != -1) {
|
||||
field_0x16C.roomCamId = room->getFile()->field_0x00;
|
||||
field_0x16C.roomId = roomId;
|
||||
field_0x16C.field_0x04 = 0;
|
||||
} else {
|
||||
field_0x16C.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dCameraGame_c::dCameraGame_c()
|
||||
: field_0x058(0),
|
||||
field_0x05C(0),
|
||||
mCurrentTrendIdx(-1),
|
||||
field_0x06C(0),
|
||||
field_0x070(0xFFFF),
|
||||
field_0x074(0),
|
||||
field_0x078(0),
|
||||
field_0x07C(0),
|
||||
field_0x08C(-1),
|
||||
field_0x090(-1),
|
||||
field_0x094(-1),
|
||||
field_0x096(0),
|
||||
field_0x098(0),
|
||||
field_0x0A8(0),
|
||||
field_0x0AC(0.0f),
|
||||
field_0x0B0(0.0f),
|
||||
field_0x22C(32),
|
||||
field_0x230(45),
|
||||
field_0x234(0.0f, 0.0f, 0.0f),
|
||||
field_0x240(0.0f, 0.0f, 0.0f) {}
|
||||
|
||||
extern "C" void *GROOSENATOR_REF;
|
||||
extern "C" void *lbl_80575364;
|
||||
|
||||
bool dCameraGame_c::create() {
|
||||
field_0x098 = dAcPy_c::GetLinkM();
|
||||
if (field_0x098 == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
field_0x240 = field_0x234 = field_0x098->mPositionCopy3;
|
||||
initCamParamDat();
|
||||
field_0x060.clear();
|
||||
mCurrentTrendIdx = -1;
|
||||
field_0x06C = 0;
|
||||
field_0x070 = 0xFFFF;
|
||||
sHio.create();
|
||||
field_0x086.clear();
|
||||
field_0x080.clear();
|
||||
field_0x08C = -1;
|
||||
field_0x094 = -1;
|
||||
field_0x090 = -1;
|
||||
|
||||
field_0x0AC = 0.0f;
|
||||
field_0x0B0 = 0.0f;
|
||||
field_0x058 = 0xA00;
|
||||
field_0x07C = 0;
|
||||
field_0x096 = 0;
|
||||
field_0x078 = 0;
|
||||
|
||||
mChk.fn_8007E130(this);
|
||||
mChk.fn_8007E1B0(field_0x098);
|
||||
|
||||
field_0x22C = 32;
|
||||
field_0x230 = 45;
|
||||
|
||||
mView.field_0x0C = field_0x098->mPosition;
|
||||
mView.field_0x0C.y += 150.0f;
|
||||
|
||||
field_0x02C.Set(320.0f, 15.0f, mAng::s2d_c(field_0x098->mRotation.y) + 180.0f);
|
||||
mView.field_0x00 = mView.field_0x0C + field_0x02C.toCartesian();
|
||||
mView.mFov = 60.0f;
|
||||
mView2 = mView;
|
||||
|
||||
field_0x264 = mView.field_0x00.y;
|
||||
field_0x268 = mView.field_0x00.y;
|
||||
|
||||
GROOSENATOR_REF = nullptr;
|
||||
lbl_80575364 = nullptr;
|
||||
field_0x079 = 0;
|
||||
field_0x07A = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dCameraGame_c::draw() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// TODO: make these static when they're actually used
|
||||
|
||||
inline bool linChkAttentionTarget_(const mVec3_c &from, const mVec3_c &to, dBgS_LinChk &chk) {
|
||||
dAcObjBase_c *ac = AttentionManager::GetInstance()->getTargetedActor();
|
||||
chk.Set(&from, &to, ac);
|
||||
return dBgS::GetInstance()->LineCross(&chk);
|
||||
}
|
||||
|
||||
bool linChkAttentionTarget(const mVec3_c &from, const mVec3_c &to, dBgS_LinChk &chk, UNKWORD _ignored) {
|
||||
return linChkAttentionTarget_(from, to, chk);
|
||||
}
|
||||
|
||||
bool linCross(dBgS_LinChk &chk, UNKWORD _ignored) {
|
||||
return dBgS::GetInstance()->LineCross(&chk);
|
||||
}
|
||||
|
||||
bool camLinChkAttentionTarget(const mVec3_c &from, const mVec3_c &to, UNKWORD _ignored) {
|
||||
dBgS_CamLinChk chk;
|
||||
return linChkAttentionTarget(from, to, chk, _ignored);
|
||||
}
|
||||
|
||||
bool linCrossAttentionTarget(const mVec3_c &from, const mVec3_c &to, mVec3_c &result) {
|
||||
dBgS_CamLinChk chk;
|
||||
bool ret = linChkAttentionTarget_(from, to, chk);
|
||||
if (ret) {
|
||||
result = chk.GetLinEnd();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool dCameraGame_c::execute() {
|
||||
// TODO - ...
|
||||
}
|
||||
|
||||
bool dCameraGame_c::remove() {
|
||||
sHeader = nullptr;
|
||||
sFloats = nullptr;
|
||||
sFlags = nullptr;
|
||||
sStyles = nullptr;
|
||||
sTrends = nullptr;
|
||||
sHio.remove();
|
||||
return true;
|
||||
}
|
||||
|
||||
void dCameraGame_c::clearCamIds() {
|
||||
field_0x086.clear();
|
||||
field_0x080.clear();
|
||||
mChk.field_0x164.clear();
|
||||
mChk.field_0x16C.clear();
|
||||
}
|
||||
|
||||
bool dCameraGame_c::isCurrentTrend(const char *name) const {
|
||||
return getTrendIndex(name) == mCurrentTrendIdx;
|
||||
}
|
||||
|
||||
void dCameraGame_c::setView(const CamView &view) {
|
||||
mView2 = view;
|
||||
mView = view;
|
||||
mVec3_c diff = view.field_0x00 - view.field_0x0C;
|
||||
field_0x02C.setCartesian(diff);
|
||||
field_0x078 = 0;
|
||||
}
|
||||
|
||||
void dCameraGame_c::vt_0x08() {
|
||||
// TODO - ...
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
#include "toBeSorted/d_camera_map.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "d/a/d_a_player.h"
|
||||
#include "d/a/obj/d_a_obj_base.h"
|
||||
#include "d/col/bg/d_bg_s.h"
|
||||
#include "d/col/bg/d_bg_s_lin_chk.h"
|
||||
#include "d/col/cc/d_cc_s.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "toBeSorted/d_camera_math.h"
|
||||
#include "toBeSorted/deg_angle_util.h"
|
||||
|
||||
class dCameraMap_HIO_c {
|
||||
public:
|
||||
dCameraMap_HIO_c();
|
||||
virtual ~dCameraMap_HIO_c();
|
||||
|
||||
/* 0x04 */ f32 field_0x04;
|
||||
/* 0x08 */ f32 field_0x08;
|
||||
/* 0x0C */ f32 field_0x0C;
|
||||
/* 0x10 */ f32 field_0x10;
|
||||
/* 0x14 */ f32 field_0x14;
|
||||
/* 0x18 */ f32 field_0x18;
|
||||
/* 0x1C */ f32 field_0x1C;
|
||||
/* 0x20 */ f32 field_0x20;
|
||||
/* 0x24 */ f32 field_0x24;
|
||||
/* 0x28 */ s16 field_0x28;
|
||||
/* 0x2C */ f32 field_0x2C;
|
||||
/* 0x30 */ f32 field_0x30;
|
||||
/* 0x34 */ f32 field_0x34;
|
||||
/* 0x38 */ u8 _0x38[0x3C - 0x38];
|
||||
/* 0x3C */ u16 field_0x3C;
|
||||
/* 0x3E */ u16 field_0x3E;
|
||||
};
|
||||
|
||||
dCameraMap_HIO_c::~dCameraMap_HIO_c() {}
|
||||
dCameraMap_HIO_c::dCameraMap_HIO_c() {
|
||||
field_0x04 = 2000.0f;
|
||||
field_0x08 = 1000.0f;
|
||||
field_0x0C = 0.6f;
|
||||
field_0x10 = 0.75f;
|
||||
field_0x18 = 10000.0f;
|
||||
field_0x14 = 2500.0f;
|
||||
field_0x20 = 89.0f;
|
||||
field_0x1C = 3.0f;
|
||||
field_0x24 = 90.0f;
|
||||
field_0x28 = 5;
|
||||
field_0x3E = 2;
|
||||
field_0x2C = 0.7f;
|
||||
field_0x30 = 0.2f;
|
||||
field_0x34 = 0.9f;
|
||||
field_0x3C = 0;
|
||||
}
|
||||
|
||||
static dCameraMap_HIO_c sHio;
|
||||
|
||||
mVec3_c fn_800929C0(const mVec3_c &p2, const mVec3_c &p3, dAcObjBase_c *obj) {
|
||||
mVec3_c ret;
|
||||
|
||||
mVec3_c v1 = p3;
|
||||
|
||||
dAcPy_c *link = dAcPy_c::LINK;
|
||||
|
||||
dAcObjBase_c *other = nullptr;
|
||||
if (obj != nullptr && obj != link) {
|
||||
other = obj;
|
||||
}
|
||||
|
||||
mVec3_c v2 = p3;
|
||||
|
||||
dAcObjBase_c *controllingActor = (dAcObjBase_c *)link->getLinkage().mControllingActor.p_owner;
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
ret = v1;
|
||||
if (!dCcS::GetInstance()->ChkCameraPoint(p2, v2, v1, link, other, controllingActor, 15.0f)) {
|
||||
break;
|
||||
}
|
||||
if (p2 == v1) {
|
||||
break;
|
||||
}
|
||||
mVec3_c tmp = p3 - v1;
|
||||
tmp.normalize();
|
||||
v2 = v1 - tmp * 2.0f;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool dCameraMap_c::execute() {
|
||||
s16 unk = sHio.field_0x28;
|
||||
|
||||
if ((sHio.field_0x3C & 0x200) && field_0xAC) {
|
||||
// TODO no-op
|
||||
unk = sHio.field_0x28;
|
||||
}
|
||||
field_0x40 = 1.0f;
|
||||
|
||||
if (sHio.field_0x3C & 0x8) {
|
||||
mView3 = mView2;
|
||||
}
|
||||
|
||||
dBgS_CamLinChk chk;
|
||||
chk.Set(&mView2.field_0x00, &mView3.field_0x00, (dAcObjBase_c *)nullptr);
|
||||
if (dBgS::GetInstance()->LineCross(&chk)) {
|
||||
mView3 = mView2;
|
||||
}
|
||||
|
||||
if (sHio.field_0x3C & 0x10) {
|
||||
if (sHio.field_0x3E == 1) {
|
||||
dPolar polar(mView2.field_0x00 - mView2.field_0x0C);
|
||||
polar.V.Set(0.0f);
|
||||
mView2.field_0x00 = mView2.field_0x0C + polar.toCartesian();
|
||||
}
|
||||
mView3 = mView2;
|
||||
field_0xB8 = 1;
|
||||
}
|
||||
|
||||
if (field_0xAC != 0) {
|
||||
if (field_0xB8 > 0) {
|
||||
field_0xB8--;
|
||||
if (field_0xB8 == 0) {
|
||||
field_0xB4 = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (field_0xB8 < unk) {
|
||||
field_0xB8++;
|
||||
}
|
||||
}
|
||||
|
||||
f32 f = (f32)field_0xB8 / (f32)unk;
|
||||
f32 f5 = camEaseInOut(f, sHio.field_0x2C);
|
||||
f32 f6 = camEaseInOut(f, sHio.field_0x30);
|
||||
f32 f8 = f5 * 0.99f;
|
||||
f32 f7 = camEaseInOut(f, sHio.field_0x34);
|
||||
|
||||
mView.field_0x0C = mView2.field_0x0C + (mView3.field_0x0C - mView2.field_0x0C) * f5;
|
||||
mView.field_0x00.x = mView2.field_0x00.x + (mView3.field_0x00.x - mView2.field_0x00.x) * f8;
|
||||
mView.field_0x00.y = mView2.field_0x00.y + (mView3.field_0x00.y - mView2.field_0x00.y) * f6;
|
||||
mView.field_0x00.z = mView2.field_0x00.z + (mView3.field_0x00.z - mView2.field_0x00.z) * f8;
|
||||
|
||||
mView.field_0x00 = fn_800929C0(mView.field_0x0C, mView.field_0x00, field_0x44);
|
||||
mView.mFov = mView2.mFov + (mView3.mFov - mView2.mFov) * f7;
|
||||
mView.field_0x1C = mView2.field_0x1C + (mView3.field_0x1C - mView2.field_0x1C) * f7;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void dCameraMap_c::setView(const CamView &view) {
|
||||
mView1 = view;
|
||||
mView = view;
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
#include "toBeSorted/d_camera_math.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "d/a/obj/d_a_obj_base.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "toBeSorted/deg_angle_util.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
void d_camera_math_float_order() {
|
||||
// Maybe more functions here
|
||||
0.5;
|
||||
1.0;
|
||||
0.0f;
|
||||
-1.0;
|
||||
2.0;
|
||||
4.0;
|
||||
-1e-7;
|
||||
}
|
||||
|
||||
f32 camEaseIn(f32 arg, f32 param) {
|
||||
// TODO - regswaps, maybe equivalent
|
||||
f64 factor;
|
||||
if (arg >= 0.0f) {
|
||||
factor = 1.0;
|
||||
} else {
|
||||
factor = -1.0;
|
||||
arg = -arg;
|
||||
}
|
||||
|
||||
f64 f1 = 2.0 * arg * param - 2.0 * arg - 2.0 * param;
|
||||
f64 tmp = (-f1 - 1.0);
|
||||
f64 f6 = f1 * f1 - tmp * 4.0 * arg;
|
||||
if (f6 > -1e-7) {
|
||||
f6 = sqrt(f6);
|
||||
} else {
|
||||
f6 = 0.0;
|
||||
}
|
||||
|
||||
f64 f2 = 2.0 * tmp;
|
||||
f64 f2_ = (-f1 - f6);
|
||||
if (f2 > 1e-7 || f2 < -1e-7) {
|
||||
f2 = f2_ / f2;
|
||||
f6 = 1.0 - f2;
|
||||
f6 = f2 * f2 + f6 * f6 + param * 2.0 * f6 * f2;
|
||||
// What
|
||||
if (f6 > 1.0000000116860974e-7) {
|
||||
f6 = (f2 * f2) / f6;
|
||||
} else {
|
||||
f6 = 0.0;
|
||||
}
|
||||
} else {
|
||||
f32 a = camEaseIn(arg - 1e-6f, param);
|
||||
f32 b = camEaseIn(arg + 1e-6f, param);
|
||||
f6 = (a + b) * 0.5;
|
||||
}
|
||||
return f6 * factor;
|
||||
}
|
||||
|
||||
f32 camEaseInOut(f32 arg, f32 param) {
|
||||
if (arg <= 0.0f) {
|
||||
return 0.0f;
|
||||
} else if (arg >= 1.0f) {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
f32 f1;
|
||||
f32 result;
|
||||
if (arg <= 0.5f) {
|
||||
f1 = arg * 2.0f;
|
||||
result = camEaseIn(f1, param) * 0.5f;
|
||||
} else {
|
||||
f1 = (1.0f - arg) * 2.0f;
|
||||
result = (1.0f - camEaseIn(f1, param)) * 0.5f + 0.5f;
|
||||
}
|
||||
return result * (1.0f - f1) + arg * f1;
|
||||
}
|
||||
|
||||
mVec3_c camGetPointOnLine(const mVec3_c &target, const mVec3_c &origin, const mVec3_c &point) {
|
||||
// NONMATCHING - stack swap between the two temporary vectors
|
||||
dPolar p(target - origin);
|
||||
p.R = (point - origin).mag();
|
||||
return origin + p.toCartesian();
|
||||
}
|
||||
|
||||
mVec3_c camOffsetPoint(dAcObjBase_c *ac, const mVec3_c &localOffset) {
|
||||
mVec3_c result = localOffset;
|
||||
if (ac != nullptr) {
|
||||
result.rotX(ac->mRotation.x);
|
||||
result.rotY(ac->mRotation.y);
|
||||
result += ac->mPosition;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
mVec3_c camOffsetPoint(dAcObjBase_c *ac, const mVec3_c &localOffset, const mAng3_c &rot) {
|
||||
mVec3_c result = localOffset;
|
||||
if (ac != nullptr) {
|
||||
result.rotX(rot.x);
|
||||
result.rotY(rot.y);
|
||||
result += ac->mPosition;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
mVec3_c camPointToLocal(dAcObjBase_c *ac, const mVec3_c &pos) {
|
||||
mVec3_c result = pos;
|
||||
if (ac != nullptr) {
|
||||
result -= ac->mPosition;
|
||||
// TODO: Shouldn't these be in the opposite order for a true inverse?
|
||||
result.rotX(-ac->mRotation.x);
|
||||
result.rotY(-ac->mRotation.y);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
mVec3_c camPointToLocal(dAcObjBase_c *ac, const mVec3_c &pos, const mAng3_c &rot) {
|
||||
mVec3_c result = pos;
|
||||
if (ac != nullptr) {
|
||||
result -= ac->mPosition;
|
||||
// TODO: Shouldn't these be in the opposite order for a true inverse?
|
||||
result.rotX(-rot.x);
|
||||
result.rotY(-rot.y);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user