Browse Source

Removed old d3dmenu functions.

master
4 years ago
parent
commit
cd7656eefd
1 changed files with 0 additions and 104 deletions
  1. 0
    104
      luas/d3dmenu.lua

+ 0
- 104
luas/d3dmenu.lua View File

@@ -127,110 +127,6 @@ end
Mostly old and to be replaced.
---------------------------------]]--
function d3dmenu.init_options(hook) --default if no file is found
--A bit obtuse, but less so
--Menu options are manually chosen
--Right now adding in stuff from the addreslist by i.d makes a menu I don't really want.
Options = {} --text containers
Options.size = 8
OLabels = {} --for text container - shorter version of label
OStates = {} --booleans
OStrings = {} --identifying memory record descriptions
selected_option = 1 --used as index
addresses = getAddressList()
local txtheight = fmap.Height
OStrings[1] = 'Disable Camera Events (No "Screen Blink", but Some Issues in Missions)'
OLabels[1] = "Disable Camera Events: "
OStates[1] = addresses.getMemoryRecordByDescription(OStrings[1]).Active
Options[1] = hook.createTextContainer(fmap, 0, 50,
OLabels[1]..status_txt(OStates[1]))
OStrings[2] = 'Auto-Skip Cutscenes (Checking This Enables Everything Under This Section)'
OLabels[2] = "Auto-Skip Cutscenes: "
OStates[2] = addresses.getMemoryRecordByDescription(OStrings[2]).Active
Options[2] = hook.createTextContainer(fmap, 0, 50+txtheight,
OLabels[2]..status_txt(OStates[2]))
OStrings[3] = 'Disable Bloody Palace Timer'
OLabels[3] = "Disable Bloody Palace Timer: "
OStates[3] = addresses.getMemoryRecordByDescription(OStrings[3]).Active
Options[3] = hook.createTextContainer(fmap, 0, 50+txtheight*2,
OLabels[3]..status_txt(OStates[3]))
OStrings[4] = 'No One Dies (Effect Takes Precedence Over Damage Modifiers)'
OLabels[4] = "No One Dies: "
OStates[4] = addresses.getMemoryRecordByDescription(OStrings[4]).Active
Options[4] = hook.createTextContainer(fmap, 0, 50+txtheight*3,
OLabels[4]..status_txt(OStates[4]))
OStrings[5] = 'No One Takes Damage'
OLabels[5] = "No One Takes Damage: "
OStates[5] = addresses.getMemoryRecordByDescription(OStrings[5]).Active
Options[5] = hook.createTextContainer(fmap, 0, 50+txtheight*4,
OLabels[5]..status_txt(OStates[5]))
OStrings[6] = 'Enemy 1-Hit Kill'
OLabels[6] = "Enemy 1-Hit Kill: "
OStates[6] = addresses.getMemoryRecordByDescription(OStrings[6]).Active
Options[6] = hook.createTextContainer(fmap, 0, 50+txtheight*5,
OLabels[6]..status_txt(OStates[6]))
OStrings[7] = 'Allow Trick Down (Air) without DT'
OLabels[7] = "Vergil, No DT - Allow Trick Down: "
OStates[7] = addresses.getMemoryRecordByDescription(OStrings[7]).Active
Options[7] = hook.createTextContainer(fmap, 0, 50+txtheight*6,
OLabels[7]..status_txt(OStates[7]))
OStrings[8] = '"Berial Fire Lost" (Checking this Enables Everything Under This Section)'
OLabels[8] = "Berial Fire Lost: "
OStates[8] = addresses.getMemoryRecordByDescription(OStrings[8]).Active
Options[8] = hook.createTextContainer(fmap, 0, 50+txtheight*7,
OLabels[8]..status_txt(OStates[8]))
end
function d3dmenu.finit_options(separator, hook) --from file if found
local filename = TrainerOrigin.."d3dmenu-ops.txt"
local file = io.open(filename, "r")
if file == nil then
return false
end
Options = {} --text containers
Options.size = 0 --how many elements in list
OLabels = {} --for text container - shorter version of label
OStates = {} --booleans
OStrings = {} --identifying memory record descriptions
selected_option = 1 --used as index
addresses = getAddressList()
local text_height_base = fmap.Height
local text_height_factor = 0
local text_offset = 50
local hit_separator = false
local index = 1
local mrecord = nil --result from CE's get MemoryRecordByDescription
--File Format: Memory Record descriptions first half, labels on the second half.
-- IF the separator has not been hit, and neither is current like the separator mark
for line in io.lines(filename) do
if (not hit_separator) and (line ~= separator) then --read in memory record strings
mrecord = addresses.getMemoryRecordByDescription(line)
if mrecord then --must be valid result
Options.size = Options.size + 1
OStrings[Options.size] = line
OStates[Options.size] = mrecord.Active
end
elseif (not hit_separator) and line == separator then
hit_separator = true --mark status for reading displayed labels
else --read in displayed labels
OLabels[index] = line
Options[index] = hook.createTextContainer(fmap, 0,
text_offset + (text_height_base * text_height_factor),
OLabels[index]..d3dmenu.status_txt(OStates[index]))
index = index + 1 --next iteration; next index
text_height_factor = text_height_factor + 1 --next Option is displayed 1 line down
end --end check hit separator status
end --end for loop
return true
end --end function
function d3dmenu.createD3Dmenu(CE_hook)
background = createPicture()
bitmap = background.getBitmap()

Loading…
Cancel
Save