n64-fast3d-engine icon indicating copy to clipboard operation
n64-fast3d-engine copied to clipboard

Avoid using texture_tile offset in calculating size

Open aglab2 opened this issue 5 years ago • 5 comments

aglab2 avatar Jun 18 '20 17:06 aglab2

Hi. Could you explain a bit why this change is needed?

Emill avatar Jun 18 '20 17:06 Emill

unknown1 unknown2 Here are the 2 images of scrolling done using F2 command. Without this fix, texture size is set wrong which is causing weird clamping

aglab2 avatar Jun 18 '20 17:06 aglab2

F2 command?

Emill avatar Jun 18 '20 17:06 Emill

https://hack64.net/wiki/doku.php?id=super_mario_64:fast3d_display_list_commands#f2g_settilesize I am referring to G_SETTILESIZE, its "SSS" and "TTT" are used to specify only the position of the texture, not the size. In hacks it is commonly used to perform texture scrolling.

aglab2 avatar Jun 18 '20 17:06 aglab2

In this very example, the lava fountain is getting scrolled by changing G_SETTILESIZE. Here is an example of such scroll: https://github.com/aglab2/sm64/blob/303a49ea17b301e628985cce02a96f65d0938e32/src/mill/color_pads.cpp#L62 (do not mind the name)

aglab2 avatar Jun 18 '20 17:06 aglab2