Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

logo.c File Reference

#include <windows.h>
#include <mmsystem.h>
#include <math.h>
#include "genesis.h"
#include "engine.h"
#include "bitmap.h"
#include "PixelFormat.h"
#include "errorlog.h"
#include "electric.h"

Go to the source code of this file.

Defines

#define WIN32_LEAN_AND_MEAN
#define BRIGHTNESS   (1.7f)
#define BRIGHTEN(XX)   ((((XX)*BRIGHTNESS)>255.0f)?255.0f:((XX)*BRIGHTNESS) )
#define FILL_LIGHT_RED   (10.0f + 20.0f)
#define FILL_LIGHT_GREEN   (10.0f + 20.0f)
#define FILL_LIGHT_BLUE   (10.0f + 20.0f)
#define AMB_LIGHT_RED   (5.0f + 0.0f)
#define AMB_LIGHT_GREEN   (5.0f + 0.0f)
#define AMB_LIGHT_BLUE   (5.0f + 0.0f)
#define GEAR_R   BRIGHTEN(251.0f)
#define GEAR_G   BRIGHTEN(155.0f)
#define GEAR_B   BRIGHTEN(110.0f)
#define PISTON_R   BRIGHTEN(150.0f)
#define PISTON_G   BRIGHTEN(80.0f)
#define PISTON_B   BRIGHTEN(4.0f)
#define GENESISB_R   BRIGHTEN(255.0f)
#define GENESISB_G   BRIGHTEN(255.0f)
#define GENESISB_B   BRIGHTEN(255.0f)
#define BONE01_R   BRIGHTEN(75.0f)
#define BONE01_G   BRIGHTEN(56.0f)
#define BONE01_B   BRIGHTEN(2.0f)
#define LINKTO_R   BRIGHTEN(75.0f)
#define LINKTO_G   BRIGHTEN(40.0f)
#define LINKTO_B   BRIGHTEN(2.0f)
#define CORONALIGHT1_R   (100.0f)
#define CORONALIGHT1_G   (100.0f)
#define CORONALIGHT1_B   (255.0f)
#define CORONALIGHT2_R   (255.0f)
#define CORONALIGHT2_G   (255.0f)
#define CORONALIGHT2_B   (255.0f)
#define CORONALIGHT_RADIUS   (1600.0f)

Functions

void SubLarge (LARGE_INTEGER *start, LARGE_INTEGER *end, LARGE_INTEGER *delta)
geBoolean GetBonePosition (geActor *Actor, const char *BoneName, geVec3d *Pos)
geLightAddBoneLight (geWorld *World, geActor *Actor, const char *BoneName, geFloat R, geFloat G, geFloat B, int Intensity)
geBitmapGetABitmap (void *BmpData, int BmpLength, void *AlphaData, int AlphaLength)
geBoolean DoSplashScreen (geEngine *Engine, geDriver_Mode *DriverMode)

Variables

unsigned char LogoActor_act []
int LogoActor_act_Length
unsigned char Corona_bmp []
int Corona_bmp_Length
unsigned char Streak_bmp []
int Streak_bmp_Length
unsigned char WebUrl_bmp []
int WebUrl_bmp_Length
unsigned char A_Corona_bmp []
int A_Corona_bmp_Length
unsigned char A_Streak_bmp []
int A_Streak_bmp_Length


Define Documentation

#define AMB_LIGHT_BLUE   (5.0f + 0.0f)
 

#define AMB_LIGHT_GREEN   (5.0f + 0.0f)
 

#define AMB_LIGHT_RED   (5.0f + 0.0f)
 

#define BONE01_B   BRIGHTEN(2.0f)
 

#define BONE01_G   BRIGHTEN(56.0f)
 

#define BONE01_R   BRIGHTEN(75.0f)
 

#define BRIGHTEN XX   )     ((((XX)*BRIGHTNESS)>255.0f)?255.0f:((XX)*BRIGHTNESS) )
 

#define BRIGHTNESS   (1.7f)
 

#define CORONALIGHT1_B   (255.0f)
 

#define CORONALIGHT1_G   (100.0f)
 

#define CORONALIGHT1_R   (100.0f)
 

#define CORONALIGHT2_B   (255.0f)
 

#define CORONALIGHT2_G   (255.0f)
 

#define CORONALIGHT2_R   (255.0f)
 

#define CORONALIGHT_RADIUS   (1600.0f)
 

#define FILL_LIGHT_BLUE   (10.0f + 20.0f)
 

#define FILL_LIGHT_GREEN   (10.0f + 20.0f)
 

#define FILL_LIGHT_RED   (10.0f + 20.0f)
 

#define GEAR_B   BRIGHTEN(110.0f)
 

#define GEAR_G   BRIGHTEN(155.0f)
 

#define GEAR_R   BRIGHTEN(251.0f)
 

#define GENESISB_B   BRIGHTEN(255.0f)
 

#define GENESISB_G   BRIGHTEN(255.0f)
 

#define GENESISB_R   BRIGHTEN(255.0f)
 

#define LINKTO_B   BRIGHTEN(2.0f)
 

#define LINKTO_G   BRIGHTEN(40.0f)
 

#define LINKTO_R   BRIGHTEN(75.0f)
 

#define PISTON_B   BRIGHTEN(4.0f)
 

#define PISTON_G   BRIGHTEN(80.0f)
 

#define PISTON_R   BRIGHTEN(150.0f)
 

#define WIN32_LEAN_AND_MEAN
 

Definition at line 22 of file logo.c.


Function Documentation

geLight* AddBoneLight geWorld World,
geActor Actor,
const char *  BoneName,
geFloat  R,
geFloat  G,
geFloat  B,
int  Intensity
[static]
 

Definition at line 80 of file logo.c.

References GE_RGBA::a, B, GE_RGBA::b, G, GE_RGBA::g, GE_FALSE, geActor_GetBoneTransform(), geFloat, geLight, geWorld_AddLight(), geWorld_SetLightAttributes(), R, GE_RGBA::r, geXForm3d::Translation, and geVec3d::Z.

Referenced by DoSplashScreen().

00082 {
00083         geXForm3d       BoneXForm;
00084         geLight *       Light;
00085         GE_RGBA         Color;
00086 
00087         geActor_GetBoneTransform(Actor, BoneName, &BoneXForm);
00088         BoneXForm.Translation.Z += 50;
00089         Color.r = R;
00090         Color.g = G;
00091         Color.b = B;
00092         Color.a = 255.0f;
00093         Light = geWorld_AddLight(World);
00094         if (Light)
00095                 geWorld_SetLightAttributes(World, Light, &BoneXForm.Translation, &Color, (geFloat)Intensity, GE_FALSE);
00096         return Light;
00097 }

geBoolean DoSplashScreen geEngine Engine,
geDriver_Mode DriverMode
 

Definition at line 148 of file logo.c.

References _Electric_BoltEffectAnimate(), _Electric_BoltEffectCreate(), _Electric_BoltEffectDestroy(), _Electric_BoltEffectRender(), GE_RGBA::a, GE_LVertex::a, A_Corona_bmp, A_Corona_bmp_Length, A_Streak_bmp, A_Streak_bmp_Length, AddBoneLight(), GE_RGBA::b, GE_LVertex::b, GE_Rect::Bottom, geEngine::Changed, Corona, Corona_bmp, Corona_bmp_Length, geEngine::CPUInfo, geVFile_MemoryContext::Data, geVFile_MemoryContext::DataLength, Engine, Sys_CPUInfo::Freq, GE_RGBA::g, GE_LVertex::g, GE_ACTOR_RENDER_ALWAYS, GE_FALSE, GE_RENDER_DO_NOT_OCCLUDE_OTHERS, GE_RENDER_DO_NOT_OCCLUDE_SELF, GE_TEXTURED_POINT, GE_TRUE, GE_VFILE_OPEN_READONLY, GE_VFILE_TYPE_MEMORY, geActor_Create(), geActor_DefCreateFromFile(), geActor_DefDestroy(), geActor_Destroy(), geActor_DestroyDirect(), geActor_GetMotionByIndex(), geActor_SetLightingOptions(), geActor_SetPose(), geBitmap_Destroy(), geBoolean, geCamera_Create(), geCamera_Destroy(), geCamera_SetWorldSpaceXForm(), geDriver_ModeGetWidthHeight(), geEngine_AddWorld(), geEngine_BeginFrame(), geEngine_EndFrame(), geEngine_RemoveWorld(), geEngine_RenderWorld(), geErrorLog_AddString, geFloat, geLight, geMotion_GetTimeExtents(), GetABitmap(), GetBonePosition(), geVec3d_Normalize(), geVec3d_Set(), geVFile_Close(), geVFile_OpenNewSystem(), geWorld_AddActor(), geWorld_AddBitmap(), geWorld_AddPolyOnce(), geWorld_Create(), geWorld_Free(), geWorld_RemoveActor(), geWorld_RemoveBitmap(), geWorld_SetLightAttributes(), geXForm3d_SetTranslation(), geXForm3d_SetXRotation(), geEngine::hWnd, int32, GE_Rect::Left, LogoActor_act, LogoActor_act_Length, NULL, GE_RGBA::r, GE_LVertex::r, R, GE_Rect::Right, Streak_bmp, Streak_bmp_Length, SubLarge(), GE_Rect::Top, GE_LVertex::u, GE_LVertex::v, WebUrl_bmp, WebUrl_bmp_Length, geVec3d::X, GE_LVertex::X, GE_LVertex::Y, GE_LVertex::Z, and geVec3d::Z.

Referenced by geEngine_SetDriverAndMode().

00149 {
00150         geActor_Def *           ActorDef;
00151         geCamera *                      Camera;
00152         geVFile *                       MemFile;
00153         geVFile_MemoryContext   Context;
00154         geBoolean                       Result;
00155         geActor *                       Actor;
00156         geWorld *                       World;
00157         geFloat                         StartTime;
00158         geFloat                         CurrentTime;
00159         geFloat                         EndTime;
00160         geMotion *                      Motion;
00161         geXForm3d                       CameraXForm;
00162         geRect                          Rect;
00163         geXForm3d                       ActorXForm;
00164         geBoolean                       KeepGoing;
00165         int32                           Width, Height;
00166 
00167         geVec3d                         LightingNormal;
00168         LARGE_INTEGER           CurrentTic;
00169 
00170         _Electric_BoltEffect *Bolt=NULL;
00171         geVec3d                         BoltStart;
00172         geVec3d                         BoltEnd;
00173 
00174         geBitmap *                      Corona;
00175         geBitmap *                      Streak;
00176         geBitmap *                      WebUrl;
00177         GE_LVertex                      CoronaVert;
00178         GE_LVertex                      StreakVert;
00179         geVec3d                         CoronaVertex;
00180         geLight *                       CoronaLight;
00181 
00182 static  geBoolean               DisplayedOnceAlready = GE_FALSE;
00183 
00184         if      (DisplayedOnceAlready == GE_TRUE)
00185                 return GE_TRUE;
00186                 
00187         DisplayedOnceAlready = GE_TRUE;
00188 
00189         Actor = NULL;
00190         Camera = NULL;
00191         World = NULL;
00192 
00193         geDriver_ModeGetWidthHeight(DriverMode, &Width, &Height);
00194 
00195         if (Width == -1)
00196         {
00197                 RECT    R;
00198         
00199                 GetClientRect(Engine->hWnd, &R);
00200                 
00201                 Rect.Left = R.left;
00202                 Rect.Right = R.right;
00203                 Rect.Top = R.top;
00204                 Rect.Bottom = R.bottom;
00205         }
00206         else
00207         {
00208                 Rect.Left = 0;
00209                 Rect.Right = Width-1;
00210                 Rect.Top = 0;
00211                 Rect.Bottom = Height-1;
00212         }
00213 
00214         World = geWorld_Create(NULL);
00215 
00216         if      (!World)
00217                 goto fail;
00218 
00219         // Add the world to the engine, so we can render it
00220         if (!geEngine_AddWorld(Engine, World))
00221         {
00222                 geErrorLog_AddString(-1, "DoSplashScreen:  geEngine_AddWorld failed.", NULL);
00223                 goto fail;
00224         }
00225 
00226         // Open the actor def file
00227         Context.Data = LogoActor_act;
00228         Context.DataLength = LogoActor_act_Length;
00229         MemFile = geVFile_OpenNewSystem(NULL, GE_VFILE_TYPE_MEMORY, NULL, &Context, GE_VFILE_OPEN_READONLY);
00230         if      (!MemFile)
00231                 return GE_FALSE;
00232         
00233         // Create the actor def
00234         ActorDef = geActor_DefCreateFromFile(MemFile);
00235         geVFile_Close(MemFile);
00236         if      (!ActorDef)
00237                 return GE_FALSE;
00238         
00239         // Create the actor form the actor def
00240         Actor = geActor_Create(ActorDef);
00241         // Remove the ref count that was just added by geACtor_Create
00242         geActor_DefDestroy(&ActorDef);
00243         if      (!Actor)
00244                 goto fail;      // Oops
00245         
00246         // Add the actor to the NULL world
00247         Result = geWorld_AddActor(World, Actor, GE_ACTOR_RENDER_ALWAYS, 0xffffffff);
00248         if      (Result == GE_FALSE)
00249                 goto fail;
00250         
00251         Motion = geActor_GetMotionByIndex(ActorDef, 0);
00252         if      (!Motion)
00253                 goto fail;
00254 
00255         if      (geMotion_GetTimeExtents(Motion, &StartTime, &EndTime) == GE_FALSE)
00256                 goto fail;
00257         CurrentTime = StartTime;
00258 
00259         Camera = geCamera_Create(2.0f, &Rect);
00260         if      (!Camera)
00261                 goto fail;
00262 
00263         geXForm3d_SetTranslation(&CameraXForm, 0.0f, 40.0f, 800.0f);
00264         geCamera_SetWorldSpaceXForm(Camera, &CameraXForm);
00265         geXForm3d_SetXRotation(&ActorXForm, -3.1415926f / 2.0f);
00266         geActor_SetPose(Actor, Motion, 0.0f, &ActorXForm);
00267 
00268 #define BRIGHTNESS (1.7f)
00269 #define BRIGHTEN(XX)  ((((XX)*BRIGHTNESS)>255.0f)?255.0f:((XX)*BRIGHTNESS) )
00270 
00271 #define FILL_LIGHT_RED   (10.0f + 20.0f)
00272 #define FILL_LIGHT_GREEN (10.0f + 20.0f)
00273 #define FILL_LIGHT_BLUE  (10.0f + 20.0f)
00274 
00275 #define AMB_LIGHT_RED    (5.0f + 0.0f)
00276 #define AMB_LIGHT_GREEN  (5.0f + 0.0f)
00277 #define AMB_LIGHT_BLUE   (5.0f + 0.0f)
00278 
00279 #define GEAR_R                   BRIGHTEN(251.0f)
00280 #define GEAR_G                   BRIGHTEN(155.0f)
00281 #define GEAR_B                   BRIGHTEN(110.0f)
00282 
00283 #define PISTON_R                 BRIGHTEN(150.0f)
00284 #define PISTON_G                 BRIGHTEN(80.0f)
00285 #define PISTON_B                 BRIGHTEN(4.0f)
00286 
00287 #define GENESISB_R               BRIGHTEN(255.0f)
00288 #define GENESISB_G               BRIGHTEN(255.0f)
00289 #define GENESISB_B               BRIGHTEN(255.0f)
00290 
00291 #define BONE01_R                 BRIGHTEN(75.0f)
00292 #define BONE01_G                 BRIGHTEN(56.0f)
00293 #define BONE01_B                 BRIGHTEN(2.0f)
00294 
00295 #define LINKTO_R                 BRIGHTEN(75.0f)
00296 #define LINKTO_G                 BRIGHTEN(40.0f)
00297 #define LINKTO_B                 BRIGHTEN(2.0f)
00298 
00299 #define CORONALIGHT1_R  (100.0f)
00300 #define CORONALIGHT1_G  (100.0f)
00301 #define CORONALIGHT1_B  (255.0f)
00302 
00303 #define CORONALIGHT2_R  (255.0f)
00304 #define CORONALIGHT2_G  (255.0f)
00305 #define CORONALIGHT2_B  (255.0f)
00306 
00307 #define CORONALIGHT_RADIUS (1600.0f)
00308 
00309         geVec3d_Set(&LightingNormal, -0.3f, /*1.0f*/0.5f, 0.4f);
00310         geVec3d_Normalize(&LightingNormal);
00311         geActor_SetLightingOptions(Actor,
00312                                                            GE_TRUE,
00313                                                            &LightingNormal,
00314                                                            FILL_LIGHT_RED,FILL_LIGHT_GREEN,FILL_LIGHT_BLUE,
00315                                                            AMB_LIGHT_RED,AMB_LIGHT_GREEN,AMB_LIGHT_BLUE,
00316                                                            GE_FALSE,
00317                                                            20,
00318                                                            NULL,
00319                                                            GE_TRUE);
00320 
00321 
00322         AddBoneLight(World, Actor, "GEAR01B", GEAR_R, GEAR_G, GEAR_B, 200);
00323         AddBoneLight(World, Actor, "GEAR02B", GEAR_R, GEAR_G, GEAR_B, 200);
00324         AddBoneLight(World, Actor, "GEAR03B", GEAR_R, GEAR_G, GEAR_B, 200);
00325         AddBoneLight(World, Actor, "GEAR04B", GEAR_R, GEAR_G, GEAR_B, 200);
00326         AddBoneLight(World, Actor, "GEAR05B", GEAR_R, GEAR_G, GEAR_B, 200);
00327         AddBoneLight(World, Actor, "GEAR06B", GEAR_R, GEAR_G, GEAR_B, 200);
00328         AddBoneLight(World, Actor, "GEAR07B", GEAR_R, GEAR_G, GEAR_B, 200);
00329         AddBoneLight(World, Actor, "GEAR08B", GEAR_R, GEAR_G, GEAR_B, 200);
00330 
00331         AddBoneLight(World, Actor, "GENESISB", 255, 255, 255, 200);
00332         AddBoneLight(World, Actor, "BONE01", 75, 56, 2, 60);
00333         AddBoneLight(World, Actor, "LINKTO", 75, 40, 2, 200);
00334 
00335         AddBoneLight(World, Actor, "R_CYL01", PISTON_R, PISTON_G, PISTON_B, 150);
00336         AddBoneLight(World, Actor, "R_CYL02", PISTON_R, PISTON_G, PISTON_B, 150);
00337         AddBoneLight(World, Actor, "L_CYL01", PISTON_R, PISTON_G, PISTON_B, 150);
00338         AddBoneLight(World, Actor, "L_CYL02", PISTON_R, PISTON_G, PISTON_B, 150);
00339 
00340         CoronaLight = AddBoneLight(World, Actor, "CORONA", 0,0,0, (int)CORONALIGHT_RADIUS);
00341 
00342         Bolt = _Electric_BoltEffectCreate(32, 4, 0.5f);
00343 
00344         if      (!Bolt)
00345                 goto fail;
00346 
00347         Corona = GetABitmap(Corona_bmp, Corona_bmp_Length, A_Corona_bmp, A_Corona_bmp_Length);
00348         if      (!Corona)
00349                 goto fail;
00350         Streak = GetABitmap(Streak_bmp, Streak_bmp_Length, A_Streak_bmp, A_Streak_bmp_Length);
00351         if      (!Streak)
00352                 goto fail;
00353         WebUrl = GetABitmap(WebUrl_bmp, WebUrl_bmp_Length, WebUrl_bmp, WebUrl_bmp_Length );
00354         if      (!WebUrl)
00355                 goto fail;
00356 
00357         geWorld_AddBitmap(World, Corona);
00358         geWorld_AddBitmap(World, Streak);
00359         geWorld_AddBitmap(World, WebUrl);
00360 
00361         GetBonePosition(Actor, "CORONA", (geVec3d *)&CoronaVert.X);
00362         CoronaVert.u = CoronaVert.v = 0.0f;
00363         CoronaVert.r = CoronaVert.g = CoronaVert.b = CoronaVert.a = 255.0f;
00364         CoronaVert.X += 30.0f;
00365         StreakVert = CoronaVert;
00366 
00367         GetBonePosition(Actor, "CORONA", &CoronaVertex);
00368         CoronaVertex.Z += 100.0f;
00369         CoronaVertex.X += 30.0f;
00370 
00371         QueryPerformanceCounter(&CurrentTic);
00372 
00373         KeepGoing = GE_TRUE;
00374 
00375         while   (KeepGoing)             // Play the entire animation
00376         {
00377                 LARGE_INTEGER           NowTic, DeltaTic;
00378                 geFloat                         CoronaScale;
00379                 geFloat                         StreakScale;
00380                                          
00381                 if      (CurrentTime >= EndTime)
00382                 {
00383                         CurrentTime = EndTime;
00384                         KeepGoing = GE_FALSE;
00385                 }
00386 
00387                 geActor_SetPose(Actor, Motion, CurrentTime, &ActorXForm);
00388                 
00389                 if      (!geEngine_BeginFrame(Engine, Camera, GE_TRUE))
00390                         goto fail;
00391 
00392                 GetBonePosition(Actor, "BONE22", &BoltStart);
00393                 GetBonePosition(Actor, "BONE28", &BoltEnd);
00394 
00395                 if (CoronaLight)
00396                         {
00397                                 static geFloat Random = 0.76324f;
00398                                 GE_RGBA Color;
00399                                 geFloat Attenuation = 0.97f * CurrentTime;
00400                                 Attenuation += (Random*0.15f)*(CurrentTime>1.0f?0:(1.0f-CurrentTime));
00401                                 Random = 1.0f - Random*Random;
00402                                 Color.r = CORONALIGHT1_R * Attenuation;
00403                                 Color.g = CORONALIGHT1_G * Attenuation;
00404                                 Color.b = CORONALIGHT1_B * Attenuation;
00405                                 if (Color.r>200.0f) Color.r = 200.0f;
00406                                 if (Color.g>200.0f) Color.g = 200.0f;
00407                                 if (Color.b>255.0f) Color.b = 255.0f;
00408                                 Color.a = 255.0f;
00409                                 geWorld_SetLightAttributes(     World,CoronaLight,&CoronaVertex,
00410                                                         &Color, CORONALIGHT_RADIUS,GE_FALSE);
00411                         }
00412 
00413                 
00414                 if (CurrentTime < 1.0f)
00415                         {
00416                                 _Electric_BoltEffectAnimate(Bolt, &BoltStart, &BoltEnd);
00417                                 _Electric_BoltEffectRender(World, Bolt, &CameraXForm);
00418                         }
00419                 if      (CurrentTime > 1.0f)
00420                 {
00421                         CoronaScale = (CurrentTime - 1.0f) * 1.75f;
00422                         if      (CoronaScale > 1.0f)
00423                                 CoronaScale = 1.0f;
00424                         CoronaVert.a = 255.0f * CoronaScale;
00425                         StreakScale = CurrentTime * 5.0f;
00426                         if      (StreakScale > 10.0f)
00427                                 StreakScale = 10.0f;
00428                         geWorld_AddPolyOnce(World, &CoronaVert, 1, Corona, GE_TEXTURED_POINT, GE_RENDER_DO_NOT_OCCLUDE_OTHERS | GE_RENDER_DO_NOT_OCCLUDE_SELF, 3.0f);
00429                         geWorld_AddPolyOnce(World, &StreakVert, 1, Streak, GE_TEXTURED_POINT, GE_RENDER_DO_NOT_OCCLUDE_OTHERS | GE_RENDER_DO_NOT_OCCLUDE_SELF, StreakScale);
00430                 }
00431 
00432                 // add web url poly
00433                 {
00434                         GE_LVertex              WebVert;
00435 
00436                         WebVert.r = 255.0f;
00437                         WebVert.g = 255.0f;
00438                         WebVert.b = 255.0f;
00439                         WebVert.a = 255.0f;
00440                         WebVert.u = 0.0f;
00441                         WebVert.v = 0.0f;
00442                         WebVert.X = 0.0f;
00443                         WebVert.Y = 0.0f;
00444                         WebVert.Z = 350.0f;
00445 
00446                         geWorld_AddPolyOnce( World, &WebVert, 1, WebUrl, GE_TEXTURED_POINT, GE_RENDER_DO_NOT_OCCLUDE_OTHERS | GE_RENDER_DO_NOT_OCCLUDE_SELF, 1.0 );
00447                 }
00448 
00449                 if      (!geEngine_RenderWorld(Engine, World, Camera, 0.0f))
00450                         goto fail;
00451 
00452                 if      (!geEngine_EndFrame(Engine))
00453                         goto fail;
00454 
00455                 QueryPerformanceCounter(&NowTic);
00456 
00457                 SubLarge(&CurrentTic, &NowTic, &DeltaTic);
00458 
00459 //              CurrentTime += ((geFloat)DeltaTic.LowPart / (geFloat)Engine->CPUInfo.Freq) / 10.0f;
00460 //              CurrentTime += ((geFloat)DeltaTic.LowPart / (geFloat)Engine->CPUInfo.Freq) / 45.0f;
00461                 CurrentTime += ((geFloat)DeltaTic.LowPart / (geFloat)Engine->CPUInfo.Freq) / 75.0f;
00462         }
00463 
00464         Sleep(500);
00465 
00466         // Remove Bolt and Bitmaps that were causing leak
00467         if (Bolt)
00468                 _Electric_BoltEffectDestroy(Bolt);
00469 
00470         geWorld_RemoveBitmap(World, Corona);
00471         geWorld_RemoveBitmap(World, Streak);
00472         geWorld_RemoveBitmap(World, WebUrl);
00473         
00474         // Destroy Bmps
00475         geBitmap_Destroy(&Corona);
00476         geBitmap_Destroy(&Streak);
00477         geBitmap_Destroy(&WebUrl);
00478 
00479         // Remove the actor from the world
00480         geWorld_RemoveActor(World,Actor);
00481 
00482         // Utterly Destroy the actor
00483         geActor_DestroyDirect(&Actor);
00484 
00485         // Rmeove the world from the engine
00486         if (!geEngine_RemoveWorld(Engine, World))
00487         {
00488                 geErrorLog_AddString(-1, "DoSplashScreen:  geEngine_RemoveWorld failed.", NULL);
00489                 goto fail;
00490         }
00491 
00492         // Destroy the world
00493         geWorld_Free(World);
00494         // Destroy the camera
00495         geCamera_Destroy(&Camera);
00496         
00497         return GE_TRUE;
00498 
00499 fail:
00500         if (Bolt)
00501                 _Electric_BoltEffectDestroy(Bolt);
00502         if      (Actor)
00503                 geActor_Destroy(&Actor);
00504         if      (World)
00505                 geWorld_Free(World);
00506         if      (Camera)
00507                 geCamera_Destroy(&Camera);
00508 
00509         Engine->Changed = GE_TRUE;
00510         
00511         return GE_FALSE;
00512 }

geBitmap* GetABitmap void *  BmpData,
int  BmpLength,
void *  AlphaData,
int  AlphaLength
[static]
 

Definition at line 99 of file logo.c.

References geVFile_MemoryContext::Data, geVFile_MemoryContext::DataLength, GE_PIXELFORMAT_16BIT_4444_ARGB, GE_VFILE_OPEN_READONLY, GE_VFILE_TYPE_MEMORY, geBitmap_CreateFromFile(), geBitmap_Destroy(), geBitmap_SetAlpha(), geBitmap_SetPreferredFormat(), geVFile_Close(), geVFile_OpenNewSystem(), and NULL.

Referenced by DoSplashScreen().

00100 {
00101         geBitmap *                              Bitmap;
00102         geBitmap *                              Alpha;
00103         geVFile *                               MemFile;
00104         geVFile_MemoryContext   Context;
00105 
00106         Context.Data       = BmpData;
00107         Context.DataLength = BmpLength;
00108         
00109         MemFile = geVFile_OpenNewSystem(NULL, GE_VFILE_TYPE_MEMORY, NULL, &Context, GE_VFILE_OPEN_READONLY);
00110         if      (!MemFile)
00111                 return NULL;
00112         Bitmap = geBitmap_CreateFromFile(MemFile);
00113         geVFile_Close(MemFile);
00114         if      (!Bitmap)
00115                 return NULL;
00116 
00117         Context.Data       = AlphaData;
00118         Context.DataLength = AlphaLength;
00119         
00120         MemFile = geVFile_OpenNewSystem(NULL, GE_VFILE_TYPE_MEMORY, NULL, &Context, GE_VFILE_OPEN_READONLY);
00121         if      (!MemFile)
00122         {
00123                 geBitmap_Destroy(&Bitmap);
00124                 return NULL;
00125         }
00126         Alpha = geBitmap_CreateFromFile(MemFile);
00127         geVFile_Close(MemFile);
00128         if      (!Alpha)
00129         {
00130                 geBitmap_Destroy(&Bitmap);
00131                 return NULL;
00132         }
00133 
00134         if      (!geBitmap_SetAlpha(Bitmap, Alpha))
00135         {
00136                 geBitmap_Destroy(&Bitmap);
00137                 geBitmap_Destroy(&Alpha);
00138                 return NULL;
00139         }
00140 
00141         geBitmap_Destroy(&Alpha);
00142 
00143         geBitmap_SetPreferredFormat(Bitmap, GE_PIXELFORMAT_16BIT_4444_ARGB);
00144 
00145         return Bitmap;
00146 }

geBoolean GetBonePosition geActor Actor,
const char *  BoneName,
geVec3d Pos
[static]
 

Definition at line 70 of file logo.c.

References geActor_GetBoneTransform(), geBoolean, and geXForm3d::Translation.

Referenced by DoSplashScreen().

00071 {
00072         geXForm3d       BoneXForm;
00073         geBoolean       Result;
00074 
00075         Result = geActor_GetBoneTransform(Actor, BoneName, &BoneXForm);
00076         *Pos = BoneXForm.Translation;
00077         return Result;
00078 }

void SubLarge LARGE_INTEGER *  start,
LARGE_INTEGER *  end,
LARGE_INTEGER *  delta
[static]
 

Definition at line 52 of file logo.c.

Referenced by DoSplashScreen(), geEngine_EndFrame(), and WinMain().

00053 {
00054         _asm {
00055                 mov ebx,dword ptr [start]
00056                 mov esi,dword ptr [end]
00057 
00058                 mov eax,dword ptr [esi+0]
00059                 sub eax,dword ptr [ebx+0]
00060 
00061                 mov edx,dword ptr [esi+4]
00062                 sbb edx,dword ptr [ebx+4]
00063 
00064                 mov ebx,dword ptr [delta]
00065                 mov dword ptr [ebx+0],eax
00066                 mov dword ptr [ebx+4],edx
00067         }
00068 }


Variable Documentation

unsigned char A_Corona_bmp[]
 

Definition at line 45 of file logo.c.

Referenced by DoSplashScreen().

int A_Corona_bmp_Length
 

Definition at line 46 of file logo.c.

Referenced by DoSplashScreen().

unsigned char A_Streak_bmp[]
 

Definition at line 47 of file logo.c.

Referenced by DoSplashScreen().

int A_Streak_bmp_Length
 

Definition at line 48 of file logo.c.

Referenced by DoSplashScreen().

unsigned char Corona_bmp[]
 

Definition at line 39 of file logo.c.

Referenced by DoSplashScreen().

int Corona_bmp_Length
 

Definition at line 40 of file logo.c.

Referenced by DoSplashScreen().

unsigned char LogoActor_act[]
 

Definition at line 37 of file logo.c.

Referenced by DoSplashScreen().

int LogoActor_act_Length
 

Definition at line 38 of file logo.c.

Referenced by DoSplashScreen().

unsigned char Streak_bmp[]
 

Definition at line 41 of file logo.c.

Referenced by DoSplashScreen().

int Streak_bmp_Length
 

Definition at line 42 of file logo.c.

Referenced by DoSplashScreen().

unsigned char WebUrl_bmp[]
 

Definition at line 43 of file logo.c.

Referenced by DoSplashScreen().

int WebUrl_bmp_Length
 

Definition at line 44 of file logo.c.

Referenced by DoSplashScreen().


Generated on Tue Sep 30 12:37:46 2003 for GTestAndEngine by doxygen 1.3.2