s/null/nil/ in all included Lua scripts
This commit is contained in:
parent
6f04ff6252
commit
d524da3530
|
@ -23,7 +23,7 @@ while true do
|
|||
if (hours > 0) then
|
||||
time = "0" .. hours .. ":" .. time;
|
||||
end
|
||||
gui.text(0, 0, time, null, 1);
|
||||
gui.text(0, 0, time, nil, 1);
|
||||
end
|
||||
emu.frameadvance();
|
||||
end
|
|
@ -61,10 +61,10 @@ end
|
|||
while true do
|
||||
--*****************************************************************************
|
||||
EnemyHP = mainmemory.read_u8(EHP)
|
||||
gui.text(0,0,"Opponent: " .. EnemyHP, null, null, "topright")
|
||||
gui.text(0,0,"Opponent: " .. EnemyHP, nil, nil, "topright")
|
||||
|
||||
MacHP = mainmemory.read_u8(MHP)
|
||||
gui.text(0,12,"Mac: " .. MacHP, null, null, "topright")
|
||||
gui.text(0,12,"Mac: " .. MacHP, nil, nil, "topright")
|
||||
|
||||
if IsOppDown() then
|
||||
OppWillGet = mainmemory.read_u8(OppWillGetUpWith)
|
||||
|
@ -72,8 +72,8 @@ while true do
|
|||
if OppGetUpCount == -153 then
|
||||
OppGetUpCount = "never!"
|
||||
end
|
||||
gui.text(0, 12, "Next health: " .. OppWillGet, null, null, "bottomright")
|
||||
gui.text(OppGetUpX, OppGetUpY, "Will get up on: " .. OppGetUpCount, null, null, "bottomright")
|
||||
gui.text(0, 12, "Next health: " .. OppWillGet, nil, nil, "bottomright")
|
||||
gui.text(OppGetUpX, OppGetUpY, "Will get up on: " .. OppGetUpCount, nil, nil, "bottomright")
|
||||
end
|
||||
|
||||
if OppIsHit() then
|
||||
|
@ -83,7 +83,7 @@ while true do
|
|||
end
|
||||
|
||||
if OppHitTimer > 0 then
|
||||
gui.text(0, 0, "Damage: " .. OppHitToDisplay, null, null, "bottomright")
|
||||
gui.text(0, 0, "Damage: " .. OppHitToDisplay, nil, nil, "bottomright")
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -177,49 +177,49 @@ pitchtype = mainmemory.read_u8(pitchtypeAddr);
|
|||
|
||||
--What the pitcher will pitch
|
||||
if (pitchtype == 0) then
|
||||
gui.text(0,0,"Sinker!!", null, null, "bottomright");
|
||||
gui.text(0,0,"Sinker!!", nil, nil, "bottomright");
|
||||
end
|
||||
if (pitchtype == 2) then
|
||||
gui.text(0,0, "Fast Ball", null, null, "bottomright")
|
||||
gui.text(0,0, "Fast Ball", nil, nil, "bottomright")
|
||||
end
|
||||
if (pitchtype == 1) then
|
||||
gui.text(0,0,"Regular Pitch", null, null, "bottomright")
|
||||
gui.text(0,0,"Regular Pitch", nil, nil, "bottomright")
|
||||
end
|
||||
|
||||
--Top of Inning
|
||||
if (inningtb == 0) then
|
||||
gui.text(0,0, "Health " .. mainmemory.read_u8(0x061D), null, null, "topright")
|
||||
gui.text(0,12,"Drop " .. mainmemory.read_u8(0x0617) % 16, null, null, "topright")
|
||||
gui.text(0,24,"CurveL " .. mainmemory.read_u8(0x061C) / 16, null, null, "topright")
|
||||
gui.text(0,36,"CurveR " .. mainmemory.read_u8(0x061C) % 16, null, null, "topright")
|
||||
gui.text(0,48,"Fast SP " .. mainmemory.read_u8(0x061B), null, null, "topright")
|
||||
gui.text(0,60,"Reg SP " .. mainmemory.read_u8(0x061A), null, null, "topright")
|
||||
gui.text(0,72,"Sink SP " .. mainmemory.read_u8(0x0619), null, null, "topright")
|
||||
gui.text(0,0, "Health " .. mainmemory.read_u8(0x061D), nil, nil, "topright")
|
||||
gui.text(0,12,"Drop " .. mainmemory.read_u8(0x0617) % 16, nil, nil, "topright")
|
||||
gui.text(0,24,"CurveL " .. mainmemory.read_u8(0x061C) / 16, nil, nil, "topright")
|
||||
gui.text(0,36,"CurveR " .. mainmemory.read_u8(0x061C) % 16, nil, nil, "topright")
|
||||
gui.text(0,48,"Fast SP " .. mainmemory.read_u8(0x061B), nil, nil, "topright")
|
||||
gui.text(0,60,"Reg SP " .. mainmemory.read_u8(0x061A), nil, nil, "topright")
|
||||
gui.text(0,72,"Sink SP " .. mainmemory.read_u8(0x0619), nil, nil, "topright")
|
||||
|
||||
P1currPower = mainmemory.read_u8(P1currHitterPowerAddr) + (mainmemory.read_u8(P1currHitterPowerAddr+1) * 256);
|
||||
gui.text(0,108, "Power: " .. P1currPower, null, null, "topright");
|
||||
gui.text(0,108, "Power: " .. P1currPower, nil, nil, "topright");
|
||||
P1currSpeed = mainmemory.read_u8(P1currSpeedAddr);
|
||||
gui.text(0,120, "Speed: " .. P1currSpeed, null, null, "topright");
|
||||
gui.text(0,120, "Speed: " .. P1currSpeed, nil, nil, "topright");
|
||||
P1currCt = mainmemory.read_u8(P1currContactAddr);
|
||||
gui.text(0,132, "Contact: " .. P1currCt, null, null, "topright");
|
||||
gui.text(0,132, "Contact: " .. P1currCt, nil, nil, "topright");
|
||||
end
|
||||
|
||||
--Bottom of Inning
|
||||
if (inningtb == 0x10) then
|
||||
gui.text(0,0,"Health " .. mainmemory.read_u8(0x060D), null, null, "topright")
|
||||
gui.text(0,12,"Drop " .. mainmemory.read_u8(0x0607) % 16, null, null, "topright")
|
||||
gui.text(0,24,"CurveL " .. mainmemory.read_u8(0x060C) / 16, null, null, "topright")
|
||||
gui.text(0,36,"CurveR " .. mainmemory.read_u8(0x060C) % 16, null, null, "topright")
|
||||
gui.text(0,48,"Fast SP " .. mainmemory.read_u8(0x060B), null, null, "topright")
|
||||
gui.text(0,60,"Reg SP " .. mainmemory.read_u8(0x060A), null, null, "topright")
|
||||
gui.text(0,72,"Sink SP " .. mainmemory.read_u8(0x0609), null, null, "topright")
|
||||
gui.text(0,0,"Health " .. mainmemory.read_u8(0x060D), nil, nil, "topright")
|
||||
gui.text(0,12,"Drop " .. mainmemory.read_u8(0x0607) % 16, nil, nil, "topright")
|
||||
gui.text(0,24,"CurveL " .. mainmemory.read_u8(0x060C) / 16, nil, nil, "topright")
|
||||
gui.text(0,36,"CurveR " .. mainmemory.read_u8(0x060C) % 16, nil, nil, "topright")
|
||||
gui.text(0,48,"Fast SP " .. mainmemory.read_u8(0x060B), nil, nil, "topright")
|
||||
gui.text(0,60,"Reg SP " .. mainmemory.read_u8(0x060A), nil, nil, "topright")
|
||||
gui.text(0,72,"Sink SP " .. mainmemory.read_u8(0x0609), nil, nil, "topright")
|
||||
|
||||
P2currPower = mainmemory.read_u8(P2currHitterPowerAddr) + (mainmemory.read_u8(P2currHitterPowerAddr+1) * 256);
|
||||
gui.text(0,108, "Power: " .. P2currPower, null, null, "topright");
|
||||
gui.text(0,108, "Power: " .. P2currPower, nil, nil, "topright");
|
||||
P2currSpeed = mainmemory.read_u8(P2currSpeedAddr);
|
||||
gui.text(0,120, "Speed: " .. P2currSpeed, null, null, "topright");
|
||||
gui.text(0,120, "Speed: " .. P2currSpeed, nil, nil, "topright");
|
||||
P2currCt = mainmemory.read_u8(P2currContactAddr);
|
||||
gui.text(0,132, "Contact: " .. P2currCt, null, null, "topright");
|
||||
gui.text(0,132, "Contact: " .. P2currCt, nil, nil, "topright");
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -228,7 +228,7 @@ end
|
|||
if (PitchingScreen == 0x0036) then
|
||||
|
||||
p1Outs = mainmemory.read_u8(p1OutsAddr);
|
||||
gui.text(0,0, "Outs " .. p1Outs, null, null, "topright");
|
||||
gui.text(0,0, "Outs " .. p1Outs, nil, nil, "topright");
|
||||
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
|
|
@ -13,7 +13,7 @@ buttons = { };
|
|||
buttons["Up"] = false;
|
||||
buttons["Down"] = true;
|
||||
buttons["Left"] = "invert";
|
||||
buttons["Right"] = null;
|
||||
buttons["Right"] = nil;
|
||||
joypad.set(buttons, 1);
|
||||
|
||||
pushThings = true;
|
||||
|
@ -24,17 +24,17 @@ while true do
|
|||
buttons["A"] = false;
|
||||
buttons["B"] = true;
|
||||
buttons["Select"] = "invert";
|
||||
buttons["Start"] = null;
|
||||
buttons["Start"] = nil;
|
||||
joypad.set(buttons, 1);
|
||||
end
|
||||
|
||||
if (emu.framecount() == 600) then
|
||||
pushThings = false;
|
||||
turnoff = { };
|
||||
turnoff["A"] = null;
|
||||
turnoff["B"] = null;
|
||||
turnoff["Select"] = null;
|
||||
turnoff["Start"] = null;
|
||||
turnoff["A"] = nil;
|
||||
turnoff["B"] = nil;
|
||||
turnoff["Select"] = nil;
|
||||
turnoff["Start"] = nil;
|
||||
|
||||
joypad.set(turnoff, 1);
|
||||
console.writeline("cleared")
|
||||
|
|
|
@ -13,7 +13,7 @@ buttons = { };
|
|||
buttons["Up"] = false;
|
||||
buttons["Down"] = true;
|
||||
buttons["Left"] = "invert";
|
||||
buttons["Right"] = null;
|
||||
buttons["Right"] = nil;
|
||||
joypad.set(buttons, 1);
|
||||
|
||||
pushThings = true;
|
||||
|
@ -24,17 +24,17 @@ while true do
|
|||
buttons["A"] = false;
|
||||
buttons["B"] = true;
|
||||
buttons["Select"] = "invert";
|
||||
buttons["Start"] = null;
|
||||
buttons["Start"] = nil;
|
||||
joypad.set(buttons, 1);
|
||||
end
|
||||
|
||||
if (emu.framecount() == 600) then
|
||||
pushThings = false;
|
||||
turnoff = { };
|
||||
turnoff["A"] = null;
|
||||
turnoff["B"] = null;
|
||||
turnoff["Select"] = null;
|
||||
turnoff["Start"] = null;
|
||||
turnoff["A"] = nil;
|
||||
turnoff["B"] = nil;
|
||||
turnoff["Select"] = nil;
|
||||
turnoff["Start"] = nil;
|
||||
|
||||
joypad.set(turnoff, 1);
|
||||
console.writeline("cleared")
|
||||
|
|
Loading…
Reference in New Issue