Jump to content

Photo

Bankswitching, if-then length, and pfpixel/pfhline/pfvline


2 replies to this topic

#1 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 25,120 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Mon Oct 13, 2008 3:45 PM

I've been trying to stay within 4k, but my bloated code demands more, so I started playing around with bankswitching. I found out that an if-then can have more pfpixel/pfhline/pfvline code on the same line when using 4k. Once you move up to bankswitching, you're suddenly limited to 4 pfpixels after an if-then and only 3 pfhlines or pfvlines after an if-then. I was using up to 6 pfhlines after an if-then in 4k, but now I'll have to use the ENDIF solution to make the code work with bankswitching or just use 2 if-then statements.

Does anyone know if there are any other little surprises when moving up to bankswitching?

Edited by Random Terrain, Mon Oct 13, 2008 3:58 PM.


#2 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • Topic Starter
  • 25,120 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Wed Oct 29, 2008 8:35 AM

Found a little surprise related to bankswitching. I added set smartbranching on and did a quick replace all that changed every 'then goto' to 'then', but that caused an error. It seems if you jump from one bank to another, you need the goto.

#3 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • 5,455 posts
  • Location:Georgia, USA

Posted Wed Oct 29, 2008 11:18 AM

Found a little surprise related to bankswitching. I added set smartbranching on and did a quick replace all that changed every 'then goto' to 'then', but that caused an error. It seems if you jump from one bank to another, you need the goto.

Yes, that's correct, because there's no way to simply branch to code in another bank-- and you also need to tell it which bank you're going to. You could think of it as not just "too far away" or "not in this neighborhood," but as "not even on this planet"! ;)

Michael




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users