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 / could someone check this?

Author
Message
RebirthAnime
21
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 14th Feb 2004 02:53
Could someone check this code and tell me if they see anything wrong? It looks likd it should work to me, but when I initialize I get a "cannot load bitmap at line 3" error, but the image is in the right folder, it's named right, the size is 30x30 and it's a .bmp. Thanks for any help you can provide
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 14th Feb 2004 04:27
First off, you need to specify if the code is for DBC or DBP.

In DBP, you just need to use the LOAD IMAGE (it works with bitmaps, too) and the SPRITE commands. The bitmap creation and get image commands are too much effort and too slow to boot.

Since you're using a relative filename, you need to make sure your exec and media are in the same directory. By default, the exe is built in a temp directory, you probably need to change that.
--
TAZ

RebirthAnime
21
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 14th Feb 2004 04:47
ah, ok..now I've got it working fairly well, except for a few problems..one..my bitmaps aren't centering right..they're like..on the edges of the bitmap instead of in the center so they rotate in the center, and 2 my turrent image isn't facing the reticle right..instead of the right side of the image facing the reticle the top is...have fooled with it a while and can't seem to figure out why. And I'm using DB Pro..sorry..thought I'd mentioned that, my code is below. Hey..you live in OK, City...I live in Grove.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Feb 2004 13:23
You can use the OFFSET SPRITE command to set the rotation point on your sprite.

This sets it to the centre



For free Plug-ins, source and the DBPro Interface library for Visual C++ 6 and .NET
http://www.matrix1.demon.co.uk

Login to post a reply

Server time is: 2024-09-21 20:45:57
Your offset time is: 2024-09-21 20:45:57