Vincehood Posted January 8, 2021 Share Posted January 8, 2021 Hello, this might be a stupid question but I will ask it anyway I am learning how to scroll levels based on the compact data representation. To quote nanoness' book, DATA 0,0,0,0,0,0,0,0,1,1,1,1 for a column can be represented instead as: 1,$8041,$0000 This means repeat this column one time with eight 0 tiles and four 1 tiles, and then finish. If I understand correctly this is relying on DATA PACKED representation. Is is possible to use this representation for tiles with 2 digits? For example, how to represent "repeat this column one time with eight 0 tiles and four 17 tiles, and then finish" Cheers Quote Link to comment Share on other sites More sharing options...
+nanochess Posted January 8, 2021 Share Posted January 8, 2021 In my book I didn't use DATA PACKED, but you got the idea, instead of putting two counts by word, you can put only one count per word. The upper byte being the count, and the lower byte being the tile used. leveldata: DATA $0800,$0411 count = leveldata(#offset) / 256 tile_no = leveldata(#offset) AND 255 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.