This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-------------------------- | |
// setup geometry | |
const static u_int NDIV_PHI = 20; | |
const static u_int NDIV_THE = 20; | |
mPosBase.reserve( NDIV_PHI * NDIV_THE ); | |
auto &geom = *moBaseMesh->mpGeom; | |
geom.mNor.reserve( mPosBase.size() ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <class _T, size_t _SIZE> | |
class DArray | |
{ | |
U32 mBuff[ (sizeof(_T) * _SIZE + 3) / 4 ]; | |
size_t mSize = 0; | |
#if defined(_DEBUG) || defined(DEBUG) | |
_T *mpDbgPtr = (_T *)mBuff; | |
#endif | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sure cost | |
void GameMain::UIInputTouchBegan( void *id, float x, float y ) | |
{ | |
DASSERT( !mEventLock ); mEventLock = true; | |
mEventData.WriteValue<u_int>( EVT_TOUCH_BEGAN ); | |
mEventData.WriteValue<void *>( id ); | |
mEventData.WriteValue<float>( x ); | |
mEventData.WriteValue<float>( y ); | |
mEventLock = false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//================================================================== | |
/// VoxelList.cpp | |
/// | |
/// Created by Davide Pasca - 2012/7/4 | |
/// See the file "license.txt" that comes with this project for | |
/// copyright info. | |
//================================================================== | |
#include "stdafx.h" | |
#include "VoxelList.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//================================================================== | |
class DummyWin32OGLContext | |
{ | |
HWND mHWND; | |
HGLRC mHGLRC; | |
public: | |
PFNWGLCHOOSEPIXELFORMATARBPROC mpWglChoosePixelFormatARB; | |
PFNWGLCREATECONTEXTATTRIBSARBPROC mpWglCreateContextAttribsARB; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set runtimepath=$HOME/Dropbox/Settings/vimfiles,$VIM,$VIMRUNTIME | |
source $HOME/Dropbox/Settings/vimrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//==================================== | |
// with exception handling | |
//==================================== | |
BitMap *LoadBMP( const char *fname ) | |
{ | |
File file(fname); | |
U32 id = file.ReadVal(); | |
int w = file.ReadVal(); | |
int h = file.ReadVal(); | |
int bpp = file.ReadVal(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//================================================================== | |
#if defined(DE3_NORMAL_SHORT) | |
//================================================================== | |
typedef Vec4<short> Normal; | |
static const u_int GL_NOR_TYPE = GL_SHORT; | |
static const u_int GL_NOR_NORMALIZED = GL_TRUE; | |
static const u_int GL_NOR_STRIDE = sizeof(short) * 4; | |
DFORCEINLINE Normal MakeNormal( float xf, float yf, float zf ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// are we waiting for the introduction to go away ? | |
if ( mStater[STATE_IN_COMM_INTRODUCTION].IsActive() ) | |
{ | |
if NOT( moCharDlgWin->IsActive() ) // is finally the dialog gone ? | |
{ | |
mStater[STATE_IN_COMM_INTRODUCTION].Deactivate(); // the wait has ended | |
updateHomeButtonsState(); // set the fighters button on hover | |
} | |
} | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//================================================================== | |
template <class _T> | |
class VecOwn | |
{ | |
DVec<_T> mVec; | |
public: | |
~VecOwn() | |
{ | |
clear_free(); |
OlderNewer