1 registered members (TipmyPip),
18,619
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
create bitmap sprite
#438192
03/09/14 20:06
03/09/14 20:06
|
Joined: Feb 2014
Posts: 35
Simon_Schwitzky
OP
Newbie
|
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:
#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
Expert
|
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
OP
Newbie
|
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
Expert
|
Expert
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
|
the string contains just the path of the file (or just the filename):
#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
OP
Newbie
|
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
|
|
|
|