diff options
author | Chris Xiong <chirs241097@gmail.com> | 2015-10-26 22:52:36 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2015-10-26 22:52:36 +0800 |
commit | 3bd383baf6a17e734329e1fc677c7e86283db772 (patch) | |
tree | 69a9148087577f797624ceb9c71323a2563d6bb4 /archive/hge/demo.cpp | |
parent | 543e4f570be9b279ba558ca61cc02cda251af384 (diff) | |
download | bullet-lab-remix-3bd383baf6a17e734329e1fc677c7e86283db772.tar.xz |
Added support for relative line numbers.
Added instructions for, brk and cont. (They are still untested...)
Parser code cleanup. Removed garbage output to stderr.
Reorganize the repository structure.
Updated BLR2 code move it into archive.
Added BLR1 files.
Diffstat (limited to 'archive/hge/demo.cpp')
-rw-r--r-- | archive/hge/demo.cpp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/archive/hge/demo.cpp b/archive/hge/demo.cpp new file mode 100644 index 0000000..a8a2ce3 --- /dev/null +++ b/archive/hge/demo.cpp @@ -0,0 +1,51 @@ +/* +** Haaf's Game Engine 1.8 +** Copyright (C) 2003-2007, Relish Games +** hge.relishgames.com +** +** Core functions implementation: HGE splash screen +*/ + + +#include "hge_impl.h" +#include "../loading.h" +#include "hgesprite.h" +//#ifdef DEMO +hgeSprite *SprLoad,*SprRot; +HTEXTURE TLoad,TRot; +int px,py; +float dtime,rot; +void DInit() +{ + px=pHGE->System_GetState(HGE_SCREENWIDTH)/2; + py=pHGE->System_GetState(HGE_SCREENHEIGHT)/2; + TLoad=pHGE->Texture_Load((char *)Loading,sizeof(Loading)); + TRot=pHGE->Texture_Load((char *)LoadCircle,sizeof(LoadCircle)); + SprLoad=new hgeSprite(TLoad,0,0,96,32); + SprRot=new hgeSprite(TRot,0,0,48,46); + SprLoad->SetHotSpot(48,16);SprRot->SetHotSpot(24,23); + dtime=0.0f;rot=0.0f; +} +void DDone() +{ + delete SprLoad;delete SprRot; + pHGE->Texture_Free(TLoad);pHGE->Texture_Free(TRot); +} +bool DFrame() +{ + BYTE alpha; + DWORD col=0x00FFFFFF; + dtime+=pHGE->Timer_GetDelta(); + if (dtime<=0.5)alpha=(BYTE)(dtime/0.5f*255.0f);else alpha=255; + if (dtime<=1.5)rot+=((pHGE->Timer_GetDelta())/0.1f)*M_PI*0.3f; + else rot+=((pHGE->Timer_GetDelta())/0.1f)*M_PI*0.3f*((2.0f-dtime)/0.5f); + SprRot->SetColor(SETA(col,alpha)); + if (dtime>=2)return true; + pHGE->Gfx_BeginScene(); + pHGE->Gfx_Clear(0); + SprLoad->Render(px,py); + SprRot->RenderEx(px-75,py,rot); + pHGE->Gfx_EndScene(); + return false; +} +//#endif |