ewinding on two keys in Rewinder.lua and disabling unnecessary output
This commit is contained in:
parent
2b8f6e7627
commit
6458081582
|
@ -11,7 +11,8 @@
|
||||||
|
|
||||||
--Which key you would like to function as the "rewind key"
|
--Which key you would like to function as the "rewind key"
|
||||||
|
|
||||||
local rewindKey = 'select'
|
local firstRewindKey = 'left'
|
||||||
|
local secondRewindKey = 'start'
|
||||||
|
|
||||||
|
|
||||||
--How much rewind power would you like? (The higher the number the further back in time you can go, but more computer memory is used up)
|
--How much rewind power would you like? (The higher the number the further back in time you can go, but more computer memory is used up)
|
||||||
|
@ -37,7 +38,7 @@ while (true) do
|
||||||
savePreventBuffer = 1;
|
savePreventBuffer = 1;
|
||||||
end;
|
end;
|
||||||
joyput = joypad.read(1);
|
joyput = joypad.read(1);
|
||||||
if joyput[rewindKey] then
|
if (joyput[firstRewindKey] and joyput[secondRewindKey]) then
|
||||||
savePreventBuffer = 5;
|
savePreventBuffer = 5;
|
||||||
if rewindCount==0 then
|
if rewindCount==0 then
|
||||||
--makes sure you can't go back too far could also include other things in here, left empty for now.
|
--makes sure you can't go back too far could also include other things in here, left empty for now.
|
||||||
|
@ -51,7 +52,7 @@ while (true) do
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if savePreventBuffer==1 then
|
if savePreventBuffer==1 then
|
||||||
gui.text(80,15,"");
|
--gui.text(80,15,"");
|
||||||
saveCount=saveCount+1;
|
saveCount=saveCount+1;
|
||||||
if saveCount==saveMax then
|
if saveCount==saveMax then
|
||||||
saveCount = 1;
|
saveCount = 1;
|
||||||
|
@ -64,8 +65,8 @@ while (true) do
|
||||||
savestate.save(save);
|
savestate.save(save);
|
||||||
saveArray[saveCount] = save;
|
saveArray[saveCount] = save;
|
||||||
end;
|
end;
|
||||||
local HUDMATH = (math.ceil((100/saveMax)*rewindCount));--Making the rewind time a percentage.
|
--local HUDMATH = (math.ceil((100/saveMax)*rewindCount));--Making the rewind time a percentage.
|
||||||
local HUDTEXT = "REWIND POWER: ".. HUDMATH .."%";
|
--local HUDTEXT = "REWIND POWER: ".. HUDMATH .."%";
|
||||||
gui.text(80,5,HUDTEXT);--Displaying the time onscreen.
|
--gui.text(80,5,HUDTEXT);--Displaying the time onscreen.
|
||||||
FCEU.frameadvance();
|
FCEU.frameadvance();
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in New Issue