From: Matthijs Kooijman Date: Mon, 11 Jun 2007 21:15:01 +0000 (+0200) Subject: * Remove most unused WIN32 stuff. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=75d4212e8548f64904bad6d7f8978c077e6687d0;p=matthijs%2FABM2.git * Remove most unused WIN32 stuff. --- diff --git a/ABM2/Engine/Kernel.cpp b/ABM2/Engine/Kernel.cpp index 35d4afc..581b963 100755 --- a/ABM2/Engine/Kernel.cpp +++ b/ABM2/Engine/Kernel.cpp @@ -25,9 +25,6 @@ CKernel::~CKernel() int CKernel::Execute() { -#ifdef WIN32 - MSG msg; -#endif // WIN32 while(taskList.size()) { @@ -36,15 +33,6 @@ int CKernel::Execute() DWORD starting_point = GetTickCount(); -#ifdef WIN32 - if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } -#endif // WIN32 - - std::list< CMMPointer >::iterator it, thisIt; for(it=taskList.begin();it!=taskList.end();) { @@ -68,8 +56,8 @@ int CKernel::Execute() IMMObject::CollectGarbage(); DWORD end_point = GetTickCount(); /* Sleep if we didn't use up too much time already */ - if (starting_point + 50 > end_point) - Sleep(50 - (end_point-starting_point)); + if (starting_point + 250 > end_point) + Sleep(250 - (end_point-starting_point)); } #ifdef _DEBUG CProfileSample::Output(); diff --git a/ABM2/Engine/VideoUpdate.cpp b/ABM2/Engine/VideoUpdate.cpp index bdbe563..e3f36c5 100755 --- a/ABM2/Engine/VideoUpdate.cpp +++ b/ABM2/Engine/VideoUpdate.cpp @@ -7,16 +7,6 @@ #include "VideoUpdate.h" -// include the Direct3D Library file -#ifdef WIN32 -#pragma comment (lib, "d3d9.lib") -#pragma comment (lib, "d3dx9.lib") - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// -LPDIRECT3DDEVICE9 d3ddev; // the pointer to the device class -#endif //WIN32 CMMPointer > CVideoUpdate::screenWidth=0; CMMPointer > CVideoUpdate::screenHeight=0; CMMPointer > CVideoUpdate::screenBPP=0; diff --git a/ABM2/Engine/engine.h b/ABM2/Engine/engine.h index 73b7016..79660d2 100755 --- a/ABM2/Engine/engine.h +++ b/ABM2/Engine/engine.h @@ -20,9 +20,6 @@ #include #include -#ifdef WIN32 -#include -#endif #include "porting.h" //even though resource.h is technically a Win32-resource file, it's just a bunch of defines, so it's ok (and necessary) diff --git a/ABM2/Engine/misc.h b/ABM2/Engine/misc.h index 55b3f99..ea260d5 100755 --- a/ABM2/Engine/misc.h +++ b/ABM2/Engine/misc.h @@ -1,11 +1,6 @@ #ifndef MISC_H_INCLUDED #define MISC_H_INCLUDED -#ifndef WIN32 -/* HACK to get this to compile */ -#define max(a,b) (a>b?a:b) -#define min(a,b) (aRelease(); - if (foreground != NULL) foreground->Release(); - if (d3dspt != NULL) d3dspt->Release(); - if (font != NULL) font->Release(); - #endif // WIN32 } void Playground::move_down() @@ -507,11 +440,5 @@ void Tile::Draw() PLAYGROUND_BORDER_TOP + this->row * FIELD_UNIT_HEIGHT, 1.0, 1.0, this->subsprite, 0, COLOUR_RGBA(255, 255, 255, 255) ); -#ifdef WIN32 - D3DXVECTOR3 center(0.0f, 0.0f, 0.0f); // center at the upper-left corner - D3DXVECTOR3 position((FLOAT)PLAYGROUND_BORDER_LEFT+subitem_width*col, (FLOAT)PLAYGROUND_BORDER_TOP+subitem_height*row, 0.0f); // position at 50, 50 with no depth - RECT rect = {tex_num*subitem_width,0,(tex_num+1)*subitem_width,subitem_height}; - d3dspt->Draw(texture, &rect, ¢er, &position, D3DCOLOR_ARGB(255, 255,255,255)); -#endif // WIN32 } diff --git a/ABM2/Playground.h b/ABM2/Playground.h index 9cb5e22..879b4b0 100755 --- a/ABM2/Playground.h +++ b/ABM2/Playground.h @@ -59,10 +59,6 @@ public: void Stop(); AUTO_SIZE; private: -#ifdef WIN32 - LPDIRECT3DTEXTURE9 background; - LPDIRECT3DTEXTURE9 foreground; -#endif // WIN32 Bomberman *bomberman; Tile *field[PLAYGROUND_COLS][PLAYGROUND_ROWS]; diff --git a/ABM2/porting.h b/ABM2/porting.h index ef28a0d..dfa9a33 100644 --- a/ABM2/porting.h +++ b/ABM2/porting.h @@ -9,6 +9,8 @@ #define BYTE unsigned char #define DWORD unsigned int + #define max(a,b) (a>b?a:b) + #define min(a,b) (a