|
If the return is NULL then no bitmap is associated with the polygon.
The return value is the name of the bitmap without the extention.
The bitmap's name is the name+path relative to the path given in STATE_engine_load_world()
If a bitmap exists in the world file but the engine couldnt find the bitmap file than it will still return its name.
This is used when loading a world from the Internet, at first only the world is loaded
and then we start streaming the bitmaps. We use this function to get the bitmap file name.
If you want to check if the bitmap is in used then use STATE_polygon_get_bitmap_handle()
Examples:
A)
char *name;
name=STATE_polygon_get_bitmap_name();
B)
The following example is relevent only when the world is saved without the SAVE_FLAT_BITMAP_PATH (not very common ...)
In this case the bitmaps are not nessecerally in one directory.
the executable path is d:\projects\test
the bitmap path == d:\projects\test\bitmaps\animal\dog\boxer.bmp
the bitmap path given in STATE_engine_load_world() == "bitmaps"
the return string here will be == "animal\dog\boxer"
See also STATE_bitmap_get_name()
|