foxygit / fake-08-xbox360 Log in
commit b85ff906ff49fa7fc6d1c46e68c547e293d1d576
Author:     jtothebell <j.to.the.bell@gmail.com>
AuthorDate: Sat Aug 28 15:57:18 2021 -0600
Commit:     jtothebell <j.to.the.bell@gmail.com>
CommitDate: Sat Aug 28 15:57:18 2021 -0600

    record possible idea in comments
---
 source/nibblehelpers.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/source/nibblehelpers.h b/source/nibblehelpers.h
index bf37ff2..b5a5d25 100644
--- a/source/nibblehelpers.h
+++ b/source/nibblehelpers.h
@@ -2,8 +2,16 @@

 #include <string>

+//for 1 byte (8 bit) indexes, 128x64
 //should be the equivalent of return y * 64 + (x / 2);
 #define COMBINED_IDX(x, y) ((y) << 6) | ((x) >> 1)
+//I think this should work if you cast the buffer to a uint32_t* pointer, but not tested
+//for 4 byte (32 bit) inexes, 16x8
+//should be the equivalent of return y * 16 + (x / 8);
+//#define COMBINED_32_BIT_IDX(x, y) ((y) << 3) | ((x) >> 3)
+//this may be hlpeful to optimize sprite blitting
+//idea: get uint32_t from sprite buffer- should be 8 pixels
+//split it up by bit shifting, and write to screen buffer as necessary

 int getCombinedIdx(int x, int y);