Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Pulling multiple images from one bitmap

Author
Message
Retro Addict
20
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Georgia, USA
Posted: 1st Oct 2004 22:42
This is dealing with a 256x256 bitmap with 4 rows of 4 explosion shots in different stages. I'd like to learn how to pull each image from the bitmap so I can simulate an animated explosion in my game. I assume I'd use the get image commmand unless there's a more efficient way. Can someone point me in the right direction? I looked in the code base and searched the forums before posting this, but didn't run across anything. Maybe I missed it as I'm sure this has been discussed in the past. This is for DBC.

PC Specs: AMD 1800+ 512M DDR, Radeon 128meg DDR - DB v1.13

To DB or not to DB............duh DB!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 1st Oct 2004 23:46
As it's an explosion that could happen at any time, this would be prebuilt, I imagine. So yes, GET IMAGE should be fine.

If you were trying to do this in real time, GET IMAGE would be too slow.

There are some clever bods around here that would do some fancy memblock stuff, but I think you're on track for a first pass.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Retro Addict
20
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Georgia, USA
Posted: 2nd Oct 2004 05:06
Yeah, I'm just going to paste the images as I need them like I'm doing now with some exgen made images. It uses multiple files for an image instead of having them all on one. I'm not sure I get what to do as far as pulling each of the 4 images off of each row. The GET IMAGE image number,top,left,bottom,right. For a 256x256 bitmap with 4 rows of images with 4 images on each row, how do I determine what top,left,bottom, and right are? I know I'm going to shoot myself when I see the solution as I'm sure I'm making this ALOT harder than it actually is.

PC Specs: AMD 1800+ 512M DDR, Radeon 128meg DDR - DB v1.13

To DB or not to DB............duh DB!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 2nd Oct 2004 05:24
This is my function for extracting 10 number images from one image. I know it's one image high, by 10 wide, and that's all the function needs. Everything else is worked out by "teh codes"

The first bit simply finds an empty bitmap to work with.



BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Retro Addict
20
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Georgia, USA
Posted: 2nd Oct 2004 05:35
So in my case, (bitmap with 4 images across and 4 images down) I'd have a routine to pull 16 images total and "the codes" would do the rest? Of course changing the for next loop with the value of m going from 0 to 15 instead of what you have?

PC Specs: AMD 1800+ 512M DDR, Radeon 128meg DDR - DB v1.13

To DB or not to DB............duh DB!

Login to post a reply

Server time is: 2024-11-27 10:52:46
Your offset time is: 2024-11-27 10:52:46