Genesis3D Programming - Genesis3D University is your resource for Genesis3D Game development



mainpage_menu.gif (4453 bytes)
2dart_menu.gif (3990 bytes)
3dmodeling_menu.gif (4513 bytes)
leveldesign_menu.gif (4781 bytes)
prog_menu.gif (4927 bytes)
yools_menu.gif (3923 bytes)
ref_menu.gif (4496 bytes)
links_meu.gif (4796 bytes)
forum_menu.gif (4089 bytes)
contact_menu.gif (4546 bytes)

Download 
Genesis3D v1.1

G3DU Forum

Official Forum


Free web hosting


Programmings
http://Welcome.to/Genesis3D-University 

Level Bitmap Intro Screen

For GTest 1.1


By: David Bonolo

Welcome to my second GTest tutorial. In this tutorial, I will show you have to add a bitmap intro screen to each of your levels. It sounds confusing, so you have to really try it to understand it. When you select “The Mine,” or what ever your level is named, it will come up with a picture, specified for that
level. Wow. This tutorial is based off Josef Jahns’ loading screen tutorial, which is based off Tom Morris' intro screen tutorial. OK. Chnages made are shown in RED.

yellow.

// Genesis Objects

geEngine *Engine = NULL;

geBitmap *Bitmap; 

geCamera *Camera; 

int Width,Height; // Needed for Pic Height/Width

int LevelPic1Width=0; // Specifies size of pic

int LevelPic1Height=0; // This also


Something is wrong here. The int LevelPic1Width/Height should be the size of your picture, but if you leave it at zero, it’s center. Change the
numbers, and the picture gets messed up. Not right, but it works.

Hey look, it’s the last step already! WooHoo!

At around line1177, you should have something like this:

case GMenu_SinglePlayerGame1:

{

strcpy(HostInit.LevelHack, "Levels\\GenVS.BSP");

HostInit.Mode = HOST_MODE_SINGLE_PLAYER;

break;

}

Just make it look like this:

case GMenu_SinglePlayerGame1:

{

// My code starts here

//Get the camera.
Camera = GameMgr_GetCamera(GMgr); 

//Tell genesis to open your bitmap file and where to find it.
Bitmap = geBitmap_CreateFromFileName(MainFS,"bmp\\levels\\level1.bmp");

//Load the bitmap into memory and get ready to render.
geEngine_AddBitmap(Engine,Bitmap); 

//Establish some screen real estate for your bitmap image.
geEngine_BeginFrame(Engine, Camera, GE_TRUE); 

//Draw the bitmap to the screen.
geEngine_DrawBitmap(Engine,Bitmap,NULL,
(Width/2)-(LevelPic1Width/2),
(Height/2)-(LevelPic1Height/2));

//Done. leave it there.
geEngine_EndFrame(Engine);

}

Sleep(3000); // Sleep timer to keep up the pic.

// My code ends here


strcpy(HostInit.LevelHack, "Levels\\GenVS.BSP");

HostInit.Mode = HOST_MODE_SINGLE_PLAYER;

break;

}

That’s all. Just change the file name to your pic, and that’s all. Real easy. I don’t think I missed anything neither. There is much room for improvement,
so lets see what you can do. If you have problems, e-mail me, David Bonolo. All credit goes where credit is due. Thank you

 

 


 

Get Genesis3D University on CD !

The Genesis3d UNIVERSITY [G3DU] CD 
Many tutorials, file downloads and more, all on one CD, imagine that! 
Over 530 megs of files!  Just look over all of this website, to  get an idea of the CD contents. 

To review the CD content and to Find out how to get yours.  HERE

******

 

 

 

To report "errors" and to post comments e-mail us at KenDeel@mail.com

This Website Created and Hosted by OtherWorlds InterActive.
Copyright (c)1999-2001 OtherWorlds InterActive 
All rights reserved.