Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2004-03-23 01:02:18 +0300
committerNathan Letwory <nathan@letworyinteractive.com>2004-03-23 01:02:18 +0300
commit00291b5cf4a0f16ddca425b74ed30e8ac35d40e2 (patch)
tree952bb1c2f6fd8c2f34b950597ed0fa73a4ea7594 /source/gameengine/GamePlayer/ghost
parent5b90aafbd6815e29343f8e9aba9e3e20f85b3cc0 (diff)
[GameEngine] Commit all Kester's changes made to the gameengine to restore 2.25 like physics.
[SCons] Build with Solid as default when enabling the gameengine in the build process [SCons] Build solid and qhull from the extern directory and link statically against them That was about it. There are a few things that needs double checking: * Makefiles * Projectfiles * All the other systems than Linux and Windows on which the build (with scons) has been successfully tested.
Diffstat (limited to 'source/gameengine/GamePlayer/ghost')
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Application.cpp2
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp40
2 files changed, 19 insertions, 23 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index 17e9e77b5d3..8aedb666c87 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -153,6 +153,7 @@ bool GPG_Application::startWindow(STR_String& title,
* so that the client rectangle has the size requested.
*/
m_mainWindow->setClientSize(windowWidth, windowHeight);
+ m_mainWindow->setCursorVisibility(false);
success = initEngine(m_mainWindow, stereoMode);
if (success) {
@@ -179,6 +180,7 @@ bool GPG_Application::startFullScreen(
setting.frequency = frequency;
fSystem->beginFullScreen(setting, &m_mainWindow, stereoVisual);
+ m_mainWindow->setCursorVisibility(false);
success = initEngine(m_mainWindow, stereoMode);
if (success) {
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index 1d631a6f740..253a7e47b2d 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -81,6 +81,7 @@ extern "C"
#include "RAS_IRasterizer.h"
#include "BKE_main.h"
+#include "BKE_utildefines.h"
#ifdef WIN32
#ifdef NDEBUG
@@ -92,6 +93,8 @@ extern "C"
const int kMinWindowWidth = 100;
const int kMinWindowHeight = 100;
+char bprogname[FILE_MAXDIR+FILE_MAXFILE];
+
void usage(char* program)
{
char * consoleoption;
@@ -101,18 +104,19 @@ void usage(char* program)
consoleoption = "";
#endif
- printf("usage: %s [-p l t w h] [-f fw fh fb ff] %s[-g gamengineoptions] "
+ printf("usage: %s -w [-p l t w h] %s[-g gamengineoptions] "
"-s stereomode filename.blend\n", program, consoleoption);
+ printf(" -w: display in a window\n");
printf(" -p: specify window position\n");
printf(" l = window left coordinate\n");
printf(" t = window top coordinate\n");
printf(" w = window width\n");
printf(" h = window height\n");
- printf(" -f: start game in full screen mode\n");
+/* printf(" -f: start game in full screen mode\n");
printf(" fw = full screen mode pixel width\n");
printf(" fh = full screen mode pixel height\n");
printf(" fb = full screen mode bits per pixel\n");
- printf(" ff = full screen mode frequency\n");
+ printf(" ff = full screen mode frequency\n"); */
printf(" -s: start player in stereo\n");
printf(" stereomode = hwpageflip or syncdoubling depending on the type of stereo you want\n");
#ifdef _WIN32
@@ -204,8 +208,8 @@ int main(int argc, char** argv)
int i;
bool error = false;
SYS_SystemHandle syshandle = SYS_GetSystem();
- bool fullScreen = false;
- bool fullScreenParFound = false;
+ bool fullScreen = true;
+ bool fullScreenParFound = true;
bool windowParFound = false;
bool closeConsole = true;
int stereomode = RAS_IRasterizer::RAS_STEREO_NOSTEREO;
@@ -215,8 +219,8 @@ int main(int argc, char** argv)
int windowTop = 100;
int windowWidth = 640;
int windowHeight = 480;
- int fullScreenWidth = 640;
- int fullScreenHeight= 480;
+ GHOST_TUns32 fullScreenWidth = 0;
+ GHOST_TUns32 fullScreenHeight= 0;
int fullScreenBpp = 16;
int fullScreenFrequency = 60;
@@ -225,6 +229,7 @@ int main(int argc, char** argv)
signal (SIGFPE, SIG_IGN);
#endif /* __alpha__ */
#endif /* __linux__ */
+ BLI_where_am_i(bprogname, argv[0]);
#ifdef __APPLE__
// Can't use Carbon right now because of double defined type ID (In Carbon.h and DNA_ID.h, sigh)
@@ -315,24 +320,12 @@ int main(int argc, char** argv)
}
break;
- case 'f':
+ case 'w':
// Parse window position and size options
{
- fullScreen = true;
- i++;
- if ((i + 4) < argc)
- {
- fullScreenWidth = atoi(argv[i++]);
- fullScreenHeight = atoi(argv[i++]);
- fullScreenBpp = atoi(argv[i++]);
- fullScreenFrequency = atoi(argv[i]);
+ fullScreen = false;
fullScreenParFound = true;
- }
- else
- {
- error = true;
- printf("error: too few options for fullscreen argument.\n");
- }
+ i++;
}
break;
case 'c':
@@ -403,6 +396,7 @@ int main(int argc, char** argv)
GHOST_ISystem* system = GHOST_ISystem::getSystem();
assertd(system);
+ system->getMainDisplayDimensions(fullScreenWidth, fullScreenHeight);
// process first batch of events. If the user
// drops a file on top off the blenderplayer icon, we
// recieve an event with the filename
@@ -570,7 +564,7 @@ int main(int argc, char** argv)
bool run = true;
while (run)
{
- system->processEvents(true);
+ system->processEvents(false);
system->dispatchEvents();
if (exitcode = app.getExitRequested())
{