Blitz2 blit and block statements inside procedures
Hi!
As i keep on learning Blitz2 and try different things out, i have the following code Code:
; init code and img loading & shape adquiring... I managed to get the above example working replacing the procedure paintmap with a subroutine: .paintmap: all the same code as in the procedure return And now it runs ok... but i would preffer to use procedures instead of subroutines... Any ideas? :-) |
Just a shot in the dark, but is that a compile time error? Is it simply because blitz expects a Blit command after a BLITZ call in the program listing - even though it's in a statement?
|
It's a runtime error, I had the same thing recently. Basically though you're right - you'll need to ensure that the BLITZ command is before your statement code. It's a bit strange it works like that but that solved the problem for me.
|
I see... the thing is that i was choosing to use procedures instead of subroutines to have a clear code, in a more organized way, but this way i would have procedures all over my code, before and after mode changes... this is ridiculous :-D
I'll keep using subroutines then |
Not necessarily. What might work is if you have certain routines that you use in Blitz mode, and some in Amiga mode, precede all the Blitz mode statements with the BLITZ command and then put all your Amiga mode statements under the AMIGA command. Preferably put them right at the top of your code.
I agree it is ridiculous, it surely must be a bug in Blitz. |
All times are GMT +2. The time now is 17:34. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.