mirror of https://github.com/zeldaret/oot.git
add comment on the tex_len calculation
This commit is contained in:
parent
8186416170
commit
18b0ec6739
|
@ -6,6 +6,8 @@
|
|||
* `type` is the array's element type
|
||||
* `width`, `height` are the texture dimensions
|
||||
* `bpp` is the texture's format's bits-per-pixels
|
||||
* The calculation computes the size of the texture in bits `width * height * bpp`,
|
||||
* then divides by 8 to get the size in bytes, then divides by the element type size.
|
||||
*/
|
||||
#define TEX_LEN(type, width, height, bpp) ((width) * (height) * (bpp) / 8 / sizeof(type))
|
||||
|
||||
|
|
Loading…
Reference in New Issue