bmap_blit (BMAP* bmDest,BMAP* bmSrc, VECTOR* vDestPos, VECTOR* vDestSize);

bmap_blit (BMAP* bmDest,BMAP* bmSrc, VECTOR* vDestPos, VECTOR* vDestSize);

bmap_blitpart (BMAP* bmDest,BMAP* bmSrc, VECTOR* vDestPos, VECTOR* vDestSize, VECTOR* vSrcPos, VECTOR* vSrcSize);

Kopiert den Inhalt einer bmap skaliert auf eine bestimmte Position einer Ziel-Bitmap.

Parameter:

bmDest Ziel-bmap.
bmSrc Quell-bmap.
vDestPos XY-Zielposition in Pixeln in Relation zur oberen linken Ecke oder NULL zum Blitten des Bitmap-Anfangs.
vDestSize XY-Zielgröße in Pixeln zum Skalieren der Bitmap oder NULL, bei Nicht-Skalieren.
vSrcPos

XY-Quellposition in Pixeln in Relation zur oberen linken Ecke oder NULL zum Blitting des Bitmap-Anfangs.

vSrcSize XY-Quellgröße in Pixeln zum Blitten nur eines Teils der Bitmap oder NULL zum Blitten der gesamten Bitmap.

Geschwindigkeit:

Langsam (hängt von der Skalierung ab und ob die Bitmap sichtbar ist oder als Renderziel verwendet wird. )

Bemerkungen:

Beispiel:

// create a scaled-down cubemap from the level sky cube
BMAP* bmap_skycube;

function get_skycube() 
{
	if (NULL == sky_cube_level) {
bmap_skycube = bmap_create("skycube+6.tga"); // create a dummy sky cube when there's none in the level
} else {
bmap_skycube = bmap_createblack(1536,256,24); // create an empty bmap
bmap_blit(bmap_skycube,bmap_for_entity(sky_cube_level,1),vector(0,0,0),vector(256,256,0)); // get the west
bmap_blit(bmap_skycube,bmap_for_entity(sky_cube_level,2),vector(256,0,0),vector(256,256,0)); // get the north
bmap_blit(bmap_skycube,bmap_for_entity(sky_cube_level,3),vector(512,0,0),vector(256,256,0)); // get the east
bmap_blit(bmap_skycube,bmap_for_entity(sky_cube_level,4),vector(768,0,0),vector(256,256,0)); // get the south
bmap_blit(bmap_skycube,bmap_for_entity(sky_cube_level,5),vector(1024,0,0),vector(256,256,0)); // get the ground
bmap_blit(bmap_skycube,bmap_for_entity(sky_cube_level,6),vector(1280,0,0),vector(256,256,0)); // get the sky
}
bmap_to_cubemap(bmap_skycube); // convert to cubemap }

Siehe auch:

bmap_unlock, bmap_lock, bmap_to_cubemap, pixel_for_bmap, pixel_for_vec

► Aktuelle Version Online