-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from ThornyFFXI/spriterenderer
Spriterenderer
- Loading branch information
Showing
1,492 changed files
with
3,179 additions
and
3,648 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "gdifonts"] | ||
path = addons/tCrossBar/gdifonts | ||
url = https://github.com/ThornyFFXI/gdifonts |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
local renderTarget; | ||
local player = require('state.player'); | ||
local pGameMenu = ashita.memory.find('FFXiMain.dll', 0, "8B480C85C974??8B510885D274??3B05", 16, 0); | ||
local pEventSystem = ashita.memory.find('FFXiMain.dll', 0, "A0????????84C0741AA1????????85C0741166A1????????663B05????????0F94C0C3", 0, 0); | ||
local pInterfaceHidden = ashita.memory.find('FFXiMain.dll', 0, "8B4424046A016A0050B9????????E8????????F6D81BC040C3", 0, 0); | ||
|
||
local function GetMenuName() | ||
local subPointer = ashita.memory.read_uint32(pGameMenu); | ||
local subValue = ashita.memory.read_uint32(subPointer); | ||
if (subValue == 0) then | ||
return ''; | ||
end | ||
local menuHeader = ashita.memory.read_uint32(subValue + 4); | ||
local menuName = ashita.memory.read_string(menuHeader + 0x46, 16); | ||
return string.gsub(menuName, '\x00', ''); | ||
end | ||
|
||
local function GetEventSystemActive() | ||
if (pEventSystem == 0) then | ||
return false; | ||
end | ||
local ptr = ashita.memory.read_uint32(pEventSystem + 1); | ||
if (ptr == 0) then | ||
return false; | ||
end | ||
|
||
return (ashita.memory.read_uint8(ptr) == 1); | ||
|
||
end | ||
|
||
local function GetInterfaceHidden() | ||
if (pEventSystem == 0) then | ||
return false; | ||
end | ||
local ptr = ashita.memory.read_uint32(pInterfaceHidden + 10); | ||
if (ptr == 0) then | ||
return false; | ||
end | ||
|
||
return (ashita.memory.read_uint8(ptr + 0xB4) == 1); | ||
end | ||
|
||
local function ShouldHide() | ||
if (gSettings.HideWhileZoning) then | ||
if (player:GetLoggedIn() == false) then | ||
return true; | ||
end | ||
end | ||
|
||
if (gSettings.HideWhileCutscene) then | ||
if (GetEventSystemActive()) then | ||
return true; | ||
end | ||
end | ||
|
||
if (gSettings.HideWhileMap) then | ||
if (string.match(GetMenuName(), 'map')) then | ||
return true; | ||
end | ||
end | ||
|
||
if (GetInterfaceHidden()) then | ||
return true; | ||
end | ||
|
||
return false; | ||
end | ||
|
||
ashita.events.register('d3d_present', 'd3d_present_cb', function () | ||
player:UpdateBLUSpells(); | ||
gController:Tick(); | ||
gConfigGUI:Render(); | ||
gBindingGUI:Render(); | ||
|
||
renderTarget = nil; | ||
if (gConfigGUI.ForceDisplay) then | ||
gConfigGUI.ForceDisplay:Render(1); | ||
renderTarget = gConfigGUI.ForceDisplay; | ||
return; | ||
end | ||
|
||
if (gBindingGUI.ForceDisplay) then | ||
gBindingGUI.ForceDisplay:Render(gBindingGUI.ForceState); | ||
renderTarget = gBindingGUI.ForceDisplay; | ||
return; | ||
end | ||
|
||
if (ShouldHide()) then | ||
return; | ||
end | ||
|
||
renderTarget = gSingleDisplay; | ||
local macroState = gController:GetMacroState(); | ||
if (macroState == 0) then | ||
if (gSettings.ShowDoubleDisplay) then | ||
renderTarget = gDoubleDisplay; | ||
end | ||
elseif (macroState < 3) then | ||
if (gSettings.SwapToSingleDisplay == false) then | ||
renderTarget = gDoubleDisplay; | ||
end | ||
end | ||
|
||
renderTarget:Render(macroState); | ||
end); | ||
|
||
local mouseDown; | ||
ashita.events.register('mouse', 'mouse_cb', function (e) | ||
if (renderTarget ~= nil) then | ||
renderTarget:HandleMouse(e); | ||
end | ||
|
||
if (e.message == 513) then | ||
if (e.blocked == true) then | ||
mouseDown = true; | ||
end | ||
end | ||
|
||
if (e.message == 514) then | ||
if mouseDown then | ||
e.blocked = true; | ||
mouseDown = false; | ||
end | ||
end | ||
end); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
ashita.events.register('command', 'command_cb', function (e) | ||
local args = e.command:args(); | ||
if (#args == 0 or string.lower(args[1]) ~= '/tc') then | ||
return; | ||
end | ||
e.blocked = true; | ||
|
||
if (#args == 1) then | ||
gConfigGUI:Show(); | ||
return; | ||
end | ||
|
||
if (#args > 1) and (string.lower(args[2]) == 'palette') then | ||
gBindings:HandleCommand(args); | ||
return; | ||
end | ||
end); |
Oops, something went wrong.