AmiBlitz³
LoadBitmap / LoadShapes and BLITZ mode - Druckversion

+- AmiBlitz³ (https://www.amiblitz.de/community)
+-- Forum: AmiBlitz³ (https://www.amiblitz.de/community/forum-3.html)
+--- Forum: Questions & Answers (https://www.amiblitz.de/community/forum-7.html)
+--- Thema: LoadBitmap / LoadShapes and BLITZ mode (/thread-283.html)



LoadBitmap / LoadShapes and BLITZ mode - Noob - 02.04.2024

Hello,

This is my first post on your lovely community forum. I am a good C/C++ programmer, but new to this language.
I started with AmiBlitz3 a few weeks ago. Since then, I've read a lot of topics, you do really cool things.

I finally took the step to register, if only out of respect for being present, but also because I am encountering a difficulty and I cannot find an answer to it.

I would like to make a game in AGA, and the Display Library seems not to allow the use of LoadBitmap and LoadShapes once you are in BLITZ mode. Which is rather surprising, since it is possible to load other things, but not images.

The documentation does not indicate that it is only in AMIGA mode, and yet the compiling does not work because of that. I dare to hope for misuse on my part, at worst a "bug" which will be fixed, because this currently calls into question the use of this language for my part and I will be very disappointed.

Hoping for a warm welcome from you and even better, an answer to my concerns. Smile

Thank you all.


RE: LoadBitmap / LoadShapes and BLITZ mode - hackball - 03.04.2024

hello and welcome!

you cannot load in Blitz mode, this is correct.

you can use Amiga mode or QAmiga mode.

the latter keeps the Blitz display as it is. after loading you need to switch back to Blitz mode.


RE: LoadBitmap / LoadShapes and BLITZ mode - hackball - 03.04.2024

Usually you would setup your files and bitmaps before starting the Blitz mode:

init arrays,

allocate the bitmaps,

load the shapes, palettes etc.

createdisplay ......
vwait50   ;wait a second to let the hard drive come to rest
BLITZ
displaybitmap .....


RE: LoadBitmap / LoadShapes and BLITZ mode - hackball - 03.04.2024

Was vielleicht verwirrend ist, ist, daß die

BLITZ, AMIGA, QAMIGA Anweisungen Compiler-Direktiven sind. D.h. sie gehorchen nicht dem Programmfluß.

Wenn also vor einem Codeblock "BLITZ" steht, dann sind alle Zeilen darunter im Blitzmodus, ungeachtet dessen, ob da ein Gosub rein- oder rausgeht!

Oder ein Statement{} oder eine Function{} ganz oben im Source (wo üblicherweise noch AMIGA-Mode gilt), ist eben auch im AMIGA Modus.


RE: LoadBitmap / LoadShapes and BLITZ mode - Noob - 03.04.2024

Thank you hackball for taking the time to answer.

It looked strange to be not able to use loadBitmap and displayBitmap with the same mode set. But, I understand what you mean.
I have tried to switch with the AMIGA directive (show the Workbench), but not with the QAMIGA one. So I will retry with that! Smile

Thank you!


RE: LoadBitmap / LoadShapes and BLITZ mode - hackball - 03.04.2024

damn, i switched back to german the last post, sorry!


RE: LoadBitmap / LoadShapes and BLITZ mode - Noob - 03.04.2024

(03.04.2024, 21:06)hackball schrieb: damn, i switched back to german the last post, sorry!

Hehe. No worry, I have used a translator to got the precious informations. Smile