I'm not sure if this is the appropriate forum to ask questions like this. But I have made this code to load a level onto the screen :
:alias row v0 :alias col v1 :alias bx v2 :alias by v3 :alias temp ve : block 0x00 0x70 0x70 0x70 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 : level1 0b11111111 0b11111110 0b10000000 0b00000010 0b10000000 0b00000010 0b10000000 0b00000010 0b10000000 0b00000010 0b10000000 0b00000010 0b11111111 0b11111110 : main bx := 0 by := 0 loop i := level1 #increment i temp >>= by i += temp load row #reset bx and col bx := 0 col := 0b10000000 i := block loop #read each bit of row and draw block if bit == 1 temp := row temp &= col if temp != 0 then sprite bx by 4 bx += 4 col >>= col #after 8 bit, reset if col == 0 begin i := level1 temp >>= by temp += 1 i += temp load row col := 0b10000000 i := block end #if bx > 56, do next row if bx <= 56 then again by += 4 #finish if b > 24 if by <= 24 then again
How can I load a different level without rewriting the entire thing? I would appreciate it if someone could point me in the right direction.