Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
Question about rtg displaying graphics
#1
Heydraw t
I saw a tutorial about displaying rtg graphics like an example down below:

XINCLUDE "dbl_display.include.ab3"

succ.l = image_load {2, gfxpath.s+"glass_big", $FF00FF,20}: imagemidhandle{2}

and so on.


I understand there is no video tutorial or excellent book I can read to get me to understand the dbl_display.include.ab3 and I am in my own to learn from these example source codes. Which I am ok with. The reason i am posting here is this. If I want to draw a picture of a hero animated in four direction, a wall of four different sides and a gem and that is that, can I just draw them in normal png with 32 x 32 as each side and that is about it or can I draw them in a sheet and just extract them from a sheet? If I can get it from a single sheet is there a tutorial to show me how to do this in rtg mode (not custom chipset) or is there a tutorial in how to load single sprite by sprite of size 32 x 32 from separate file? thanks.
Zitieren
#2
Hey A500
Great that you do something with AmiBlitz³.
Unfortunately, I can not help you with your question, because I understand too little of AmiBlitz.
Unfortunately it is also the case that Thilo (The Wanderer), (Blackbird) and also all those who took care of the further development, do not report any more here. Also write on multiple direct, no one reports more of those. Too bad that nobody thinks it necessary to write here exactly what is going on. I see the AmiBlitz project as death, so I can only advise you to look for another programming language to continue building your project. A good would be there Hollywood, with which you can create versions for all operating systems.

AmigaOS 3 (m68k)
AmigaOS 4 (ppc)
Android (arm)
AROS (x86)
iOS (arm)
Linux (x86)
Linux (x64)
Linux (arm)
Linux (ppc)
Mac OS X (x86)
Mac OS X (x64)
Mac OS X (ppc)
MorphOS (ppc)
WarpOS (m68k/ppc)
Windows (x86)
Windows (x64)
Gruß Helmut
Zitieren
#3
Or just use BlitzBasic.

There is a forum section at eab where you might still get help as there are still a lot of BlitzBasic/AmiBlitz developers out there:
<!-- m --><a class="postlink" href="http://eab.abime.net/forumdisplay.php?f=126">http://eab.abime.net/forumdisplay.php?f=126</a><!-- m -->



Cheers,
Manfred
Zitieren
#4
Yeah, unfortunately there doesn't seem to be much appetite for further development of AmiBlitz, though in its current state it is very useful.

As for the question, the dbl_display include doesn't really deal with images in that way, you really need to be using the image.include as well. This contains functions for manipulating images, including the image_cut{} function. This can be used to create a new image from part of an existing image, so if you have a single bitmap with all your images in blocks, simply use For...Next loops and the image_cut{} function to create individual 32x32 bitmaps of your shapes.
Zitieren
#5
Please don't promote anybody here to Hollywood.

I'll try to relocate some code to give an example, but, normally, coding requires reading. the given task is no problem at all if someone is familar with the language.
Zitieren
#6
Here it is.
I simply cut this from AmegaOne src. I hope you see how this works.

(code)
Select enemyID
Case #ENEMY_TANK1
EnemyL()\img = #IMG_TANK1
EnemyL()\frame = 0
EnemyL()\width = image_GetWidth {imgA(EnemyL()\img)} / 16 ;16 is the number of animframes
EnemyL()\height = image_GetHeight{imgA(EnemyL()\img)}

...


ResetList EnemyL()
While NextItem(EnemyL())
...
x.l = Int(EnemyL()\x)-\mapPosX-EnemyL()\width/2
y.l = Int(EnemyL()\y)-\mapPosY-EnemyL()\height/2
image_SetBlitDims{imgA(EnemyL()\img),EnemyL()\width*Int(EnemyL()\frame),0,EnemyL()\width,EnemyL()\height}
dbl_QBlit{imgA(EnemyL()\img),x,y}
EndIf
Wend
(/code)

what it does is:
the gfx of an enemy in this case is one wide spritesheet with all frames after each other.
the width of each frame is Getwidth{...} / numframes.
later, when blitting, the actual frame gets picked with
SetBlitDims{imageid, framewidth * frame,...}
so that the frame is a multiplier to set the x-offset inside the wide spritesheet.

Is that easy to understand? i hope it is. Wink
Zitieren
#7
No comments on this? Any success?
Zitieren


Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 2 Gast/Gäste