Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,561 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
create bitmap sprite #438192
03/09/14 20:06
03/09/14 20:06
Joined: Feb 2014
Posts: 35
Simon_Schwitzky Offline OP
Newbie
Simon_Schwitzky  Offline OP
Newbie

Joined: Feb 2014
Posts: 35
hello guys,

today i tried to create an sprite from an pre-defined Bitmap, code Looks like this:
Code:
#include ...

BMAP* bmap = "bmap.tga"; //TGA - is this the Problem?

void main(){
    
    load_level("");
    init_basicStuff();
    
    ent_create(bmap, nullvector, NULL);
}



however, the engine starts and says "can't find Bitmap"
i'm sure, this Bitmap exists!


Die Menschen, die verrückt genug sind zu sagen, dass sie die Welt verändern werden, sind diejenigen, die es tuen!
-Steve Jobs
Re: create bitmap sprite [Re: Simon_Schwitzky] #438193
03/09/14 20:14
03/09/14 20:14
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
the filename has to be a string, and also I'd use a different name than 'bmap' (It's used for example by the panel struct)


POTATO-MAN saves the day! - Random
Re: create bitmap sprite [Re: Kartoffel] #438194
03/09/14 20:17
03/09/14 20:17
Joined: Feb 2014
Posts: 35
Simon_Schwitzky Offline OP
Newbie
Simon_Schwitzky  Offline OP
Newbie

Joined: Feb 2014
Posts: 35
thank you for the fast reply, how can i get the string from the Bitmap?
eg the string from the mouse_map Bitmap?

sure i use a different Name, it's just for example ;-)


Die Menschen, die verrückt genug sind zu sagen, dass sie die Welt verändern werden, sind diejenigen, die es tuen!
-Steve Jobs
Re: create bitmap sprite [Re: Simon_Schwitzky] #438195
03/09/14 21:12
03/09/14 21:12
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
the string contains just the path of the file (or just the filename):

Code:
#include ...

STRING * test_sprite_bmap = "bmap.tga";

void main()
{
    load_level("");
    init_basicStuff();
    
    ent_create(test_sprite_bmap, nullvector, NULL);
}



POTATO-MAN saves the day! - Random
Re: create bitmap sprite [Re: Kartoffel] #438234
03/10/14 16:03
03/10/14 16:03
Joined: Feb 2014
Posts: 35
Simon_Schwitzky Offline OP
Newbie
Simon_Schwitzky  Offline OP
Newbie

Joined: Feb 2014
Posts: 35
okay, thank but this is what i already know..

i want to load it from eg the mouse_map Bitmap.
how to cast the Bitmap to it's Name?


Die Menschen, die verrückt genug sind zu sagen, dass sie die Welt verändern werden, sind diejenigen, die es tuen!
-Steve Jobs

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1