-
Notifications
You must be signed in to change notification settings - Fork 428
DSDA Lua script #4464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
DSDA Lua script #4464
Conversation
Misc domain may have to wait until I gather feedback from Doom people. |
96725d2
to
5cc4472
Compare
cleanup
Also reorder code to minimize reads for mobjs that aren't displayed
Lua doesn't have unsigned longs, but the signedness doesn't matter for flags and pointers anyway
7a7f2aa
to
56267ec
Compare
I think center zoom is done. Not 100% perfect but combined with mouse drag feels sufficient. |
local COUNTITEM_COLOR = false -- 0xA0FFFFFF | ||
local ITEM_COLOR = false -- 0xA0FFFFFF | ||
local MISC_COLOR = false -- 0xFFFFFFFF | ||
local INERT_COLOR = false -- 0x80808080 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend a Colors
table.
dsda.LINE_SIZE = 256 -- sizeof(line_t) is 232, but we padded it for niceness | ||
dsda.MOBJ_SIZE = 512 -- sizeof(mobj_t) is 464, but we padded it for niceness | ||
dsda.PLAYER_SIZE = 1024 -- sizeof(player_t) is 729, but we padded it for niceness | ||
dsda.SECTOR_SIZE = 512 -- sizeof(sector_t) is 344, but we padded it for niceness |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a Sizes
table for these too?
local read_u8 = memory.read_u8 | ||
local read_u24 = memory.read_u24_le | ||
local read_u32 = memory.read_u32_le | ||
local readfloat = memory.readfloat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar shortcuts exist in the main script, looks like it makes sense to declare them once and then use everywhere?
(continued from #4458)
TODO:
Ideally you can write code like
for mobj in pairs(dsda.mobjs) do print(mobj.type) end
and all the memory reading is abstracted awayObjects
cache inthings-lines.lua
(doesn't work with spawned objects)Seems to be a big performance cost on fancy Hexen maps
If time permits:
gui.text
workscc @vadosnaprimer
Check if completed: