iesposta Posted November 18, 2012 Share Posted November 18, 2012 Man this replay editor is giving problems... I was trying to add: Also, to draw another playfield, it won't clear what already has been drawn (in DPC+) so I have to add "pfpixel current_col print_row off" before the "... print_row on" Quote Link to comment Share on other sites More sharing options...
bogax Posted November 19, 2012 Share Posted November 19, 2012 (edited) The code is a big counter. It counts by bits, bytes and data statements It maintains a counter in parallel that counts by columns and rows. The columns advance for every bit and the rows for every fourth byte. The bytes go 0,1,2,3... Three is the fourth byte so the code masks the lower two bits (ands byte_ptr with a mask that happens to equal three, ie byte_ptr & 3) and increments the row if they equal three. To do 28 bits the easiest would be to check the column and if it's 27 reset it to 0, increment the row and skip the rest of this byte and go to the next byte. dim print_row = a dim current_col = b dim current_bit = c dim current_byte = d dim ds_index = e dim byte_ptr = f WritePFChunk print_row = 0 current_col = 0 for ds_index = 0 to 3 for byte_ptr = 0 to 175 current_bit = $80 on ds_index goto DCASE0 DCASE1 DCASE2 DCASE3 NEXT_BYTE next next return DCASE0 current_byte = L4_0[byte_ptr] : goto BIT_LOOP DCASE1 current_byte = L4_1[byte_ptr] : goto BIT_LOOP DCASE2 current_byte = L4_2[byte_ptr] : goto BIT_LOOP DCASE3 current_byte = L4_3[byte_ptr] BIT_LOOP if current_byte & current_bit then pfpixel current_col print_row on else pfpixel current_col print_row off if current_col = 27 then current_col = 0 : print_row = print_row + 1 : goto NEXT_BYTE current_col = current_col + 1 current_bit = current_bit / 2 if current_bit then goto BIT_LOOP goto NEXT_BYTE Edited November 20, 2012 by bogax Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted November 19, 2012 Share Posted November 19, 2012 Don't know if it will help DPC+ users, but this should help everybody else: http://www.atariage.com/forums/blog/302/entry-9759-small-update-for-visualbb/ Visual batari Basic now has the ability to convert normal playfield data to data that looks like this: data _Maze_01 $7F,$FF,$FF,$7F,$60,$06,$60,$60,$66,$66,$66,$66,$60,$00,$00,$66, $67,$67,$7E,$66,$60,$60,$00,$60,$66,$66,$66,$7E,$60,$06,$06,$60, $66,$66,$66,$66,$60,$60,$00,$60,$7F,$FF,$FF,$7F end It displays just as fast as this would: playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X........X............X........X X........X............X........X X..XXXX..X..XXXXXXXX..X..XXXX..X X..............................X X..............................X X..XXXX..XXX..X..X..XXX..XXXX..X X.....X.......X..X.......X.....X X.....X.......X..X.......X.....X X..X..X..XXXXXX..XXXXXX..X..X..X X..X........................X..X X..X........................X..X X..XXXX..XXXXXX..XXXXXX..XXXX..X X..............................X X..............................X XXXX..X..XXXXXXXXXXXXXX..X..XXXX X.....X..................X.....X X.....X..................X.....X X..XXXXXXX..XXXXXXXX..XXXXXXX..X X..............................X X..............................X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ................................ end And don't worry, VbB automatically reverses the appropriate numbers so they can be used directly with playfield variables. Check out my reply in jwierer's blog for more information. Update: I found out from RevEng that this will definitely NOT work for DPC+ users. But it will help regular kernel bB users who want to instantly change parts of the screen. 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.