Thank you Amaraticando. I was reading through your utility code and found many interesting things as I am still learning LUA. I will prob go off topic so please direct me to the correct forum as these are mostly programming questions.
1) why do you use a make_set function? You use it for ABNORMAL_HITBOX_SPRITES where you make a table with 4 entries of RAM addresses like so:
local ABNORMAL_HITBOX_SPRITES = make_set{0x62, 0x63, 0x6b, 0x6c}
This table is used once in line 1038 here:
if SHOW_SPRITE_HITBOX and not ABNORMAL_HITBOX_SPRITES[number] then
Is it not simpler to just construct the table in the first place like so:
ABNORMAL_HITBOX_SPRITES = {[1]=0x62, [2]=0x63, [3]=0x6b,[4] = 0x6b,}
instead of first making a list then an iterator to create an array?
2) Why are variables declared as local in the top level? for example , local ABNORMAL_HITBOX_SPRITES
and functions too for example
local Isloaded, Movie_mode, Readonly, Currentframe, Framecount, Lagcount, Rerecords, Islagged
These are at the 'top level' and not within any other function so I do not see how making them local changes their scope.
3) in the MAIN loop, why do you call bizhawk_screen_info()? This is just a setup function that gets screen boundaries. Should it not be called just once before the loop?
4) Why is the client.paint() function OUTSIDE the main loop? What does it do?
5) functions defined but not used - test_draw_pixels ?
6) thanks again