TASLabz / dolphin-lua-core

do not use - obsolete
GNU General Public License v2.0
8 stars 2 forks source link

TASToolKit Frame 1 DPad Loading Error #23

Open LordDraXula opened 2 years ago

LordDraXula commented 2 years ago

On Frame 1 the DPad value assigned for the player does not come out due to it's buffering.

This can be avoid by using the track load as a frame medium for example.

PAL
809bd730 -> 0xC -> 0x0 -> 0x2C
malleoz commented 2 years ago

Adding the following code to the beginning of onScriptUpdate in MKW_TAS_Toolkit.lua works.

local loadTime = ReadValue32(GetPointerNormal(0x9bd730, 0xc, 0x0, 0x2c))
if loadTime < 172 then return end
malleoz commented 2 years ago

This issue will be on hold pending the finalization of vabold's lua script cleanup branch.

vabold commented 2 years ago

Instead of calculating loadTime from the intro camera, let's instead check against the stage in Raceinfo. This is better because we can still use the original frame of input address, while not allowing inputs in the race camera.

PAL
809BD730 -> 0x28

Here is some quick pseudocode for the race stage.


enum RaceStage {
    INTRO_CAMERA = 0;
    COUNTDOWN = 1;
    NORMAL = 2;
    RACE_FINISH = 4;
};