Silent Debuggers Is A WIP

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
programming:c:huc:tips [2020/08/15 02:13] – created cabbageprogramming:c:huc:tips [2020/08/15 02:15] (current) cabbage
Line 1: Line 1:
 ===== BAT Collision ===== ===== BAT Collision =====
-HuC's map_get_tile() seems maybe broken, but you can use vram[] instead.+HuC'''map_get_tile()'' function seems broken, but you can use ''vram[]'' instead.
  
 e.g., ''tile = vram[y * BAT_width + x] & 0x0FFF;''  e.g., ''tile = vram[y * BAT_width + x] & 0x0FFF;'' 
  
 The above code would get the tile at ''x,y'' (8x8 tile coordinates). ''BAT_width'' is the width of the virtual screen (32, 64, 128). The ''& 0x0FFF'' part strips out the palette data so you are left with just the tile number. The above code would get the tile at ''x,y'' (8x8 tile coordinates). ''BAT_width'' is the width of the virtual screen (32, 64, 128). The ''& 0x0FFF'' part strips out the palette data so you are left with just the tile number.
Print/export
QR Code
QR Code programming:c:huc:tips (generated for current page)