Open linkthehylian opened 1 year ago
This was brought up in #423 but it's interesting to see this in an actual video.
Maybe they thought the binoculars were redundant though, since rifles exist? What available buttons are there that can be allocated to this function?
I personally don't use L2 for anything, for example.
This was brought up in #423 but it's interesting to see this in an actual video.
Huh, I even searched it up just to be sure it wasn't already an existing issue but it apparently is?
Well, here it is again lmao
Yeah it would be pretty neat feature to have.
There's some leftover code in a cPlayer::beginBinocular
that never gets called, which sets the m_BinoRno_56F
routine for cPlayer::moveBinocular
, but neither of these actually initialize the binocular HUD. It looks like we need to replicate the middle of r101_Event00
, without the fixed campos/target parameters.
Something else I noticed is that the sensitivity for the binocular controls is doubled at 60fps. CameraBinocular::move
needs a bunch of deltaTime fixes, like CameraScope::move
already has. E: fixed
I'd personally bind this to R3.
EDIT: Tried something with this, ~two problems~one problem:
HoldBinocular
causes the camera to invert for some reason.~ Fixed this, just had to nop the -1.0 multiplier on camData_4.Up_C4.y
@0x75A7CC. Not sure why that's there, isn't in the GC code either.Evt_R10BS00_Func
), maybe something to be learned there. E: Looks like they're stored at different indexes in GlobalPtr()->pRoom_40 . That gets initialized in ReadAreaData
on stage load... No idea how to get the game to load these outside r101 and r10b. :\Or the select button
Proof of concept:
Will need to figure out how to get the HUD textures to load outside r101.
E: Looks like they're stored at different indexes in GlobalPtr()->pRoom_40 . That gets initialized in ReadAreaData on stage load... No idea how to get the game to load these outside r101 and r10b. :\
Maybe could extract the texture data from the stage file and just embed it in the DLL directly? Seems like they're just passing pointers to the data to IdBinocular::init
.
That init func does pass the pointers to IdTexDataLoad
& IDSystem::set
though, not sure if those might try using some value in the data to lookup more data inside pRoom maybe.
Using a tool like RE4UHD_UDAS_Tool.exe
should give you a bunch of files from the room udas, the ones for r10b should be XX_34 & XX_35 (for r101 it looks like XX_35 & XX_36)
If it does work with embedded textures maybe can set something up to read them from r101/r10b stage file later on, LFS crap might be a little annoying though, but maybe we can use the games reading funcs themselves for it...
Hmm, I tried adding r101_35.EFF and r101_36.UWF to dllmain.rc, but I can't seem to get FindResource to find them. I should be using g_module_handle
as the HMODULE, yes? Does this look right?
HRSRC HRsrc1 = FindResource(g_module_handle, MAKEINTRESOURCE(IDR_EFF1), RT_RCDATA);
if (HRsrc1)
// not happening
Looks fine to me, does GetLastError() tell you anything? If the files aren't too big you might be able to just include it in a C file, like we do inside roomInfo.cpp, might be some kind of file size limit with that though. (010 editor can let you copy the file contents as a C array)
0265-0294 are the binocular UI textures inside 44000101.pack (in case the info is helpful)
Describe the feature you'd like to see added
In the Biohazard 4 Famitsu demo for Gamecube, you can press Z to allow Leon to bring out his binoculars anywhere rather than in the scripted cutscenes in the final game.
https://user-images.githubusercontent.com/20933012/210902398-578c218a-cb64-460f-855e-c8e6d0c27f33.mp4
I'm not sure whether there would be leftover existing code for this feature. But if there is, it would be really cool to see it be brought back. 😄