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:
Diffstat (limited to 'source/gameengine/GamePlayer')
-rw-r--r--source/gameengine/GamePlayer/common/GPC_Canvas.cpp6
-rw-r--r--source/gameengine/GamePlayer/common/GPC_Canvas.h20
-rw-r--r--source/gameengine/GamePlayer/common/GPC_KeyboardDevice.cpp6
-rw-r--r--source/gameengine/GamePlayer/common/GPC_KeyboardDevice.h4
-rw-r--r--source/gameengine/GamePlayer/common/GPC_MouseDevice.cpp14
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Application.cpp78
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Application.h4
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp82
8 files changed, 107 insertions, 107 deletions
diff --git a/source/gameengine/GamePlayer/common/GPC_Canvas.cpp b/source/gameengine/GamePlayer/common/GPC_Canvas.cpp
index 2b355407d46..1ab64c592a4 100644
--- a/source/gameengine/GamePlayer/common/GPC_Canvas.cpp
+++ b/source/gameengine/GamePlayer/common/GPC_Canvas.cpp
@@ -43,7 +43,7 @@
GPC_Canvas::GPC_Canvas(
int width,
int height
-) :
+) :
m_width(width),
m_height(height)
{
@@ -88,13 +88,13 @@ void GPC_Canvas::SetViewPort(int x1, int y1, int x2, int y2)
the width,height is calculated including both pixels
therefore: max - min + 1
*/
-
+
/* XXX, nasty, this needs to go somewhere else,
* but where... definitely need to clean up this
* whole canvas/rendertools mess.
*/
glEnable(GL_SCISSOR_TEST);
-
+
m_viewport[0] = x1;
m_viewport[1] = y1;
m_viewport[2] = x2-x1 + 1;
diff --git a/source/gameengine/GamePlayer/common/GPC_Canvas.h b/source/gameengine/GamePlayer/common/GPC_Canvas.h
index 688ed8ac0f4..615e3eaaf9e 100644
--- a/source/gameengine/GamePlayer/common/GPC_Canvas.h
+++ b/source/gameengine/GamePlayer/common/GPC_Canvas.h
@@ -74,20 +74,20 @@ public:
/**
* \section Methods inherited from abstract base class RAS_ICanvas.
*/
-
- int
+
+ int
GetWidth(
) const {
return m_width;
}
-
- int
+
+ int
GetHeight(
) const {
return m_height;
}
- const
+ const
RAS_Rect &
GetDisplayArea(
) const {
@@ -100,24 +100,24 @@ public:
) {
m_displayarea= *rect;
};
-
+
RAS_Rect &
GetWindowArea(
) {
return m_displayarea;
}
- void
+ void
BeginFrame(
) {};
/**
* Draws overlay banners and progress bars.
*/
- void
+ void
EndFrame(
) {};
-
+
void SetViewPort(int x1, int y1, int x2, int y2);
void UpdateViewPort(int x1, int y1, int x2, int y2);
const int *GetViewPort();
@@ -128,7 +128,7 @@ public:
* \section Methods inherited from abstract base class RAS_ICanvas.
* Semantics are not yet honored.
*/
-
+
void SetMouseState(RAS_MouseState mousestate)
{
// not yet
diff --git a/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.cpp b/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.cpp
index 0821d1d3b23..a48540e2bdb 100644
--- a/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.cpp
+++ b/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.cpp
@@ -34,7 +34,7 @@
#include <cstdlib>
-/**
+/**
* NextFrame toggles currentTable with previousTable,
* and copies relevant event information from previous to current table
* (pressed keys need to be remembered).
@@ -60,7 +60,7 @@ void GPC_KeyboardDevice::NextFrame()
-/**
+/**
* ConvertBPEvent translates Windows keyboard events into ketsji kbd events.
* Extra event information is stored, like ramp-mode (just released/pressed)
*/
@@ -100,7 +100,7 @@ bool GPC_KeyboardDevice::ConvertEvent(int incode, int val, unsigned int unicode)
m_eventStatusTables[m_currentTable][kxevent].m_status = SCA_InputEvent::KX_JUSTACTIVATED;
}
}
-
+
} else
{
diff --git a/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.h b/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.h
index d9842a42e0a..dc517b6ec25 100644
--- a/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.h
+++ b/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.h
@@ -76,14 +76,14 @@ public:
}
virtual void NextFrame();
-
+
virtual KX_EnumInputs ToNative(int incode)
{
return m_reverseKeyTranslateTable[incode];
}
virtual bool ConvertEvent(int incode, int val, unsigned int unicode);
-
+
virtual void HookEscape();
};
diff --git a/source/gameengine/GamePlayer/common/GPC_MouseDevice.cpp b/source/gameengine/GamePlayer/common/GPC_MouseDevice.cpp
index 94045d532af..df388d4f5db 100644
--- a/source/gameengine/GamePlayer/common/GPC_MouseDevice.cpp
+++ b/source/gameengine/GamePlayer/common/GPC_MouseDevice.cpp
@@ -47,13 +47,13 @@ GPC_MouseDevice::~GPC_MouseDevice()
bool GPC_MouseDevice::IsPressed(SCA_IInputDevice::KX_EnumInputs inputcode)
{
const SCA_InputEvent & inevent = m_eventStatusTables[m_currentTable][inputcode];
- bool pressed = (inevent.m_status == SCA_InputEvent::KX_JUSTACTIVATED ||
+ bool pressed = (inevent.m_status == SCA_InputEvent::KX_JUSTACTIVATED ||
inevent.m_status == SCA_InputEvent::KX_ACTIVE);
return pressed;
}
-/**
+/**
* NextFrame toggles currentTable with previousTable,
* and copies relevant event information from previous to current table
* (pressed keys need to be remembered).
@@ -61,7 +61,7 @@ bool GPC_MouseDevice::IsPressed(SCA_IInputDevice::KX_EnumInputs inputcode)
void GPC_MouseDevice::NextFrame()
{
SCA_IInputDevice::NextFrame();
-
+
// Convert just pressed events into regular (active) events
int previousTable = 1-m_currentTable;
for (int mouseevent= KX_BEGINMOUSE; mouseevent< KX_ENDMOUSEBUTTONS; mouseevent++) {
@@ -156,7 +156,7 @@ bool GPC_MouseDevice::ConvertMoveEvent(int x, int y)
bool GPC_MouseDevice::ConvertEvent(KX_EnumInputs kxevent, int eventval, unsigned int unicode)
{
bool result = true;
-
+
// Only process it, if it's a mouse event
if (kxevent > KX_BEGINMOUSE && kxevent < KX_ENDMOUSE) {
int previousTable = 1-m_currentTable;
@@ -180,7 +180,7 @@ bool GPC_MouseDevice::ConvertEvent(KX_EnumInputs kxevent, int eventval, unsigned
} else
{
m_eventStatusTables[m_currentTable][kxevent].m_status = SCA_InputEvent::KX_ACTIVE;
-
+
}
break;
}
@@ -189,8 +189,8 @@ bool GPC_MouseDevice::ConvertEvent(KX_EnumInputs kxevent, int eventval, unsigned
m_eventStatusTables[m_currentTable][kxevent].m_status = SCA_InputEvent::KX_JUSTACTIVATED;
}
}
-
- }
+
+ }
else {
switch (m_eventStatusTables[previousTable][kxevent].m_status)
{
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index 50c34bbadaf..8cdeb0f2849 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -86,7 +86,7 @@ extern "C"
#include "NG_LoopBackNetworkDeviceInterface.h"
#include "GPC_MouseDevice.h"
-#include "GPG_Canvas.h"
+#include "GPG_Canvas.h"
#include "GPG_KeyboardDevice.h"
#include "GPG_System.h"
@@ -108,24 +108,24 @@ static GHOST_ISystem* fSystem = 0;
static const int kTimerFreq = 10;
GPG_Application::GPG_Application(GHOST_ISystem* system)
- : m_startSceneName(""),
+ : m_startSceneName(""),
m_startScene(0),
m_maggie(0),
m_kxStartScene(NULL),
m_exitRequested(0),
- m_system(system),
- m_mainWindow(0),
- m_frameTimer(0),
+ m_system(system),
+ m_mainWindow(0),
+ m_frameTimer(0),
m_cursor(GHOST_kStandardCursorFirstCursor),
- m_engineInitialized(0),
- m_engineRunning(0),
+ m_engineInitialized(0),
+ m_engineRunning(0),
m_isEmbedded(false),
m_ketsjiengine(0),
- m_kxsystem(0),
- m_keyboard(0),
- m_mouse(0),
+ m_kxsystem(0),
+ m_keyboard(0),
+ m_mouse(0),
m_canvas(0),
- m_rasterizer(0),
+ m_rasterizer(0),
m_sceneconverter(0),
m_networkdevice(0),
m_blendermat(0),
@@ -164,7 +164,7 @@ bool GPG_Application::SetGameEngineData(struct Main* maggie, Scene *scene, Globa
m_startScene = scene;
result = true;
}
-
+
/* Python needs these */
m_argc= argc;
m_argv= argv;
@@ -190,8 +190,8 @@ static LRESULT CALLBACK screenSaverWindowProc(HWND hwnd, UINT uMsg, WPARAM wPara
switch (uMsg)
{
case WM_MOUSEMOVE:
- {
- POINT pt;
+ {
+ POINT pt;
GetCursorPos(&pt);
LONG dx = scr_save_mouse_pos.x - pt.x;
LONG dy = scr_save_mouse_pos.y - pt.y;
@@ -203,9 +203,9 @@ static LRESULT CALLBACK screenSaverWindowProc(HWND hwnd, UINT uMsg, WPARAM wPara
scr_save_mouse_pos = pt;
break;
}
- case WM_LBUTTONDOWN:
- case WM_MBUTTONDOWN:
- case WM_RBUTTONDOWN:
+ case WM_LBUTTONDOWN:
+ case WM_MBUTTONDOWN:
+ case WM_RBUTTONDOWN:
case WM_KEYDOWN:
close = true;
}
@@ -432,7 +432,7 @@ bool GPG_Application::startFullScreen(
bool GPG_Application::StartGameEngine(int stereoMode)
{
bool success = initEngine(m_mainWindow, stereoMode);
-
+
if (success)
success = startEngine();
@@ -464,7 +464,7 @@ bool GPG_Application::processEvent(GHOST_IEvent* event)
case GHOST_kEventButtonUp:
handled = handleButton(event, false);
break;
-
+
case GHOST_kEventWheel:
handled = handleWheel(event);
break;
@@ -534,7 +534,7 @@ bool GPG_Application::processEvent(GHOST_IEvent* event)
}
}
break;
-
+
default:
handled = false;
break;
@@ -574,7 +574,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
SYS_SystemHandle syshandle = SYS_GetSystem();
if (!syshandle)
return false;
-
+
// SYS_WriteCommandLineInt(syshandle, "fixedtime", 0);
// SYS_WriteCommandLineInt(syshandle, "vertexarrays",1);
GameData *gm= &m_startScene->gm;
@@ -606,7 +606,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
m_canvas->Init();
if (gm->flag & GAME_SHOW_MOUSE)
m_canvas->SetMouseState(RAS_ICanvas::MOUSE_NORMAL);
-
+
RAS_STORAGE_TYPE raster_storage = RAS_AUTO_STORAGE;
if (gm->raster_storage == RAS_STORE_VBO) {
@@ -625,7 +625,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
/* Stereo parameters - Eye Separation from the UI - stereomode from the command-line/UI */
m_rasterizer->SetStereoMode((RAS_IRasterizer::StereoMode) stereoMode);
m_rasterizer->SetEyeSeparation(m_startScene->gm.eyeseparation);
-
+
if (!m_rasterizer)
goto initFailed;
@@ -635,26 +635,26 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
m_keyboard = new GPG_KeyboardDevice();
if (!m_keyboard)
goto initFailed;
-
+
m_mouse = new GPC_MouseDevice();
if (!m_mouse)
goto initFailed;
-
+
// create a networkdevice
m_networkdevice = new NG_LoopBackNetworkDeviceInterface();
if (!m_networkdevice)
goto initFailed;
-
+
BKE_sound_init(m_maggie);
// create a ketsjisystem (only needed for timing and stuff)
m_kxsystem = new GPG_System (m_system);
if (!m_kxsystem)
goto initFailed;
-
+
// create the ketsjiengine
m_ketsjiengine = new KX_KetsjiEngine(m_kxsystem);
-
+
// set the devices
m_ketsjiengine->SetKeyboardDevice(m_keyboard);
m_ketsjiengine->SetMouseDevice(m_mouse);
@@ -705,7 +705,7 @@ bool GPG_Application::startEngine(void)
if (m_engineRunning) {
return false;
}
-
+
// Temporary hack to disable banner display for NaN approved content.
/*
m_canvas->SetBannerDisplayEnabled(true);
@@ -721,7 +721,7 @@ bool GPG_Application::startEngine(void)
return false;
}
*/
-
+
// create a scene converter, create and convert the stratingscene
m_sceneconverter = new KX_BlenderSceneConverter(m_maggie, m_ketsjiengine);
if (m_sceneconverter)
@@ -744,7 +744,7 @@ bool GPG_Application::startEngine(void)
m_kxStartScenename,
m_startScene,
m_canvas);
-
+
#ifdef WITH_PYTHON
// some python things
PyObject *gameLogic, *gameLogic_keys;
@@ -771,7 +771,7 @@ bool GPG_Application::startEngine(void)
m_rasterizer,
m_canvas);
m_ketsjiengine->AddScene(m_kxStartScene);
-
+
// Create a timer that is used to kick the engine
if (!m_frameTimer) {
m_frameTimer = m_system->installTimer(0, kTimerFreq, frameTimerProc, m_mainWindow);
@@ -779,19 +779,19 @@ bool GPG_Application::startEngine(void)
m_rasterizer->Init();
m_ketsjiengine->StartEngine(true);
m_engineRunning = true;
-
+
// Set the animation playback rate for ipo's and actions
// the framerate below should patch with FPS macro defined in blendef.h
// Could be in StartEngine set the framerate, we need the scene to do this
Scene *scene= m_kxStartScene->GetBlenderScene(); // needed for macro
m_ketsjiengine->SetAnimFrameRate(FPS);
}
-
+
if (!m_engineRunning)
{
stopEngine();
}
-
+
return m_engineRunning;
}
@@ -809,7 +809,7 @@ void GPG_Application::stopEngine()
m_pyGlobalDictString_Length = saveGamePythonConfig(&m_pyGlobalDictString);
#endif
-
+
m_ketsjiengine->StopEngine();
m_networkdevice->Disconnect();
@@ -836,7 +836,7 @@ void GPG_Application::EngineNextFrame()
// first check if we want to exit
m_exitRequested = m_ketsjiengine->GetExitCode();
-
+
// kick the engine
bool renderFrame = m_ketsjiengine->NextFrame();
if (renderFrame && m_mainWindow)
@@ -907,7 +907,7 @@ bool GPG_Application::handleWheel(GHOST_IEvent* event)
{
bool handled = false;
MT_assert(event);
- if (m_mouse)
+ if (m_mouse)
{
GHOST_TEventDataPtr eventData = ((GHOST_IEvent*)event)->getData();
GHOST_TEventWheelData* wheelData = static_cast<GHOST_TEventWheelData*>(eventData);
@@ -926,7 +926,7 @@ bool GPG_Application::handleButton(GHOST_IEvent* event, bool isDown)
{
bool handled = false;
MT_assert(event);
- if (m_mouse)
+ if (m_mouse)
{
GHOST_TEventDataPtr eventData = ((GHOST_IEvent*)event)->getData();
GHOST_TEventButtonData* buttonData = static_cast<GHOST_TEventButtonData*>(eventData);
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.h b/source/gameengine/GamePlayer/ghost/GPG_Application.h
index e757cc10e32..37e3ea15f8a 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.h
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.h
@@ -167,14 +167,14 @@ protected:
bool m_blendermat;
bool m_blenderglslmat;
-
+
/*
* GameLogic.globalDict as a string so that loading new blend files can use the same dict.
* Do this because python starts/stops when loading blend files.
*/
char* m_pyGlobalDictString;
int m_pyGlobalDictString_Length;
-
+
/* argc and argv need to be passed on to python */
int m_argc;
char** m_argv;
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index 906e9d9a821..6c541758cb4 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -83,11 +83,11 @@ extern "C"
#include "IMB_imbuf.h"
#include "IMB_moviecache.h"
-
+
#ifdef __APPLE__
int GHOST_HACK_getFirstFile(char buf[]);
#endif
-
+
// For BLF
#include "BLF_api.h"
#include "BLT_translation.h"
@@ -161,7 +161,7 @@ typedef enum {
static ScreenSaverMode scr_saver_mode = SCREEN_SAVER_MODE_NONE;
static HWND scr_saver_hwnd = NULL;
-static BOOL scr_saver_init(int argc, char **argv)
+static BOOL scr_saver_init(int argc, char **argv)
{
scr_saver_mode = SCREEN_SAVER_MODE_NONE;
scr_saver_hwnd = NULL;
@@ -232,7 +232,7 @@ static void usage(const char* program, bool isBlenderPlayer)
printf("Default values are set in the blend file.\n\n");
printf(" -h: Prints this command summary\n\n");
printf(" -w: display in a window\n");
- printf(" --Optional parameters--\n");
+ printf(" --Optional parameters--\n");
printf(" w = window width\n");
printf(" h = window height\n");
printf(" l = window left coordinate\n");
@@ -303,7 +303,7 @@ static void get_filename(int argc, char **argv, char *filename)
int srclen = ::strlen(argv[0]);
int len = 0;
char *gamefile = NULL;
-
+
filename[0] = '\0';
if (argc > 1) {
@@ -317,21 +317,21 @@ static void get_filename(int argc, char **argv, char *filename)
}
}
}
-
+
srclen -= ::strlen("MacOS/blenderplayer");
if (srclen > 0) {
- len = srclen + ::strlen("Resources/game.blend");
+ len = srclen + ::strlen("Resources/game.blend");
gamefile = new char [len + 1];
::strcpy(gamefile, argv[0]);
::strcpy(gamefile + srclen, "Resources/game.blend");
//::printf("looking for file: %s\n", filename);
-
+
if (BLI_exists(gamefile))
BLI_strncpy(filename, gamefile, FILE_MAX);
delete [] gamefile;
}
-
+
#else
filename[0] = '\0';
@@ -346,7 +346,7 @@ static BlendFileData *load_game_data(const char *progname, char *filename = NULL
BlendFileData *bfd = NULL;
BKE_reports_init(&reports, RPT_STORE);
-
+
/* try to load ourself, will only work if we are a runtime */
if (BLO_is_a_runtime(progname)) {
bfd= BLO_read_runtime(progname, &reports);
@@ -357,7 +357,7 @@ static BlendFileData *load_game_data(const char *progname, char *filename = NULL
} else {
bfd= BLO_read_from_file(progname, &reports, BLO_READ_SKIP_NONE);
}
-
+
if (!bfd && filename) {
bfd = load_game_data(filename);
if (!bfd) {
@@ -367,7 +367,7 @@ static BlendFileData *load_game_data(const char *progname, char *filename = NULL
}
BKE_reports_clear(&reports);
-
+
return bfd;
}
@@ -397,9 +397,9 @@ static int GPG_PyNextFrame(void *state0)
int exitcode;
STR_String exitstring;
bool run = GPG_NextFrame(state->system, state->app, exitcode, exitstring, state->gs);
- if (run) return 0;
+ if (run) return 0;
else {
- if (exitcode)
+ if (exitcode)
fprintf(stderr, "Exit code %d: %s\n", exitcode, exitstring.ReadPtr());
return 1;
}
@@ -447,7 +447,7 @@ int main(
bool samplesParFound = false;
GHOST_TUns16 aasamples = 0;
int alphaBackground = 0;
-
+
#ifdef WIN32
char **argv;
int argv_num;
@@ -488,7 +488,7 @@ int main(
BKE_appdir_program_path_init(argv[0]);
BKE_tempdir_init(NULL);
-
+
// We don't use threads directly in the BGE, but we need to call this so things like
// freeing up GPU_Textures works correctly.
BLI_threadapi_init();
@@ -498,7 +498,7 @@ int main(
RNA_init();
init_nodesystem();
-
+
BKE_blender_globals_init();
// We load our own G.main, so free the one that BKE_blender_globals_init() gives us
@@ -584,7 +584,7 @@ int main(
printf("Num of arguments is: %i\n", validArguments-1); //-1 because i starts at 1
#endif
- for (i = 1; (i < validArguments) && !error
+ for (i = 1; (i < validArguments) && !error
#ifdef WIN32
&& scr_saver_mode == SCREEN_SAVER_MODE_NONE
#endif
@@ -601,7 +601,7 @@ int main(
argc_py_clamped= i;
break;
}
-
+
switch (argv[i][1])
{
case 'g': //game engine options (show_framerate, fixedtime, etc)
@@ -823,16 +823,16 @@ int main(
i++;
if (!strcmp(argv[i], "fisheye"))
domeMode = DOME_FISHEYE;
-
+
else if (!strcmp(argv[i], "truncatedfront"))
domeMode = DOME_TRUNCATED_FRONT;
-
+
else if (!strcmp(argv[i], "truncatedrear"))
domeMode = DOME_TRUNCATED_REAR;
-
+
else if (!strcmp(argv[i], "cubemap"))
domeMode = DOME_ENVMAP;
-
+
else if (!strcmp(argv[i], "sphericalpanoramic"))
domeMode = DOME_PANORAM_SPH;
@@ -867,7 +867,7 @@ int main(
error = true;
printf("error: window size too small.\n");
}
-
+
if (error )
{
usage(argv[0], isBlenderPlayer);
@@ -882,15 +882,15 @@ int main(
if (GHOST_ISystem::createSystem() == GHOST_kSuccess) {
GHOST_ISystem* system = GHOST_ISystem::getSystem();
assertd(system);
-
+
if (!fullScreenWidth || !fullScreenHeight)
system->getMainDisplayDimensions(fullScreenWidth, fullScreenHeight);
// process first batch of events. If the user
// drops a file on top off the blenderplayer icon, we
// receive an event with the filename
-
+
system->processEvents(0);
-
+
// this bracket is needed for app (see below) to get out
// of scope before GHOST_ISystem::disposeSystem() is called.
{
@@ -905,7 +905,7 @@ int main(
get_filename(argc_py_clamped, argv, filename);
if (filename[0])
BLI_path_cwd(filename, sizeof(filename));
-
+
// fill the GlobalSettings with the first scene files
// those may change during the game and persist after using Game Actuator
@@ -914,16 +914,16 @@ int main(
do {
// Read the Blender file
BlendFileData *bfd;
-
+
// if we got an exitcode 3 (KX_EXIT_REQUEST_START_OTHER_GAME) load a different file
if (exitcode == KX_EXIT_REQUEST_START_OTHER_GAME)
{
char basedpath[FILE_MAX];
-
+
// base the actuator filename relative to the last file
BLI_strncpy(basedpath, exitstring.Ptr(), sizeof(basedpath));
BLI_path_abs(basedpath, pathname);
-
+
bfd = load_game_data(basedpath);
if (!bfd) {
@@ -942,7 +942,7 @@ int main(
#if defined(DEBUG)
printf("Game data loaded from %s\n", filename);
#endif
-
+
if (!bfd) {
usage(argv[0], isBlenderPlayer);
error = true;
@@ -970,9 +970,9 @@ int main(
//Seg Fault; icon.c gIcons == 0
BKE_icons_init(1);
-
+
titlename = maggie->name;
-
+
// Check whether the game should be displayed full-screen
if ((!fullScreenParFound) && (!windowParFound)) {
// Only use file settings when command line did not override
@@ -991,8 +991,8 @@ int main(
windowHeight = scene->gm.yplay;
}
}
-
-
+
+
// Check whether the game should be displayed in stereo (dome included)
if (!stereoParFound) {
// Only use file settings when command line did not override
@@ -1028,7 +1028,7 @@ int main(
scene->gm.dome.warptext = domeText;
}
}
-
+
// GPG_Application app (system, maggie, startscenename);
app.SetGameEngineData(maggie, scene, &gs, argc, argv); /* this argc cant be argc_py_clamped, since python uses it */
BLI_strncpy(pathname, maggie->name, sizeof(pathname));
@@ -1061,7 +1061,7 @@ int main(
// on Mac's we'll show the executable name instead of the 'game.blend' name
char tempname[1024], *appstring;
::strcpy(tempname, titlename);
-
+
appstring = strstr(tempname, ".app/");
if (appstring) {
appstring[2] = 0;
@@ -1074,7 +1074,7 @@ int main(
vector<STR_String> parts = path.Explode('/');
#else // WIN32
vector<STR_String> parts = path.Explode('\\');
-#endif // WIN32
+#endif // WIN32
STR_String title;
if (parts.size()) {
title = parts[parts.size()-1];
@@ -1114,10 +1114,10 @@ int main(
app.StartGameEngine(stereomode);
exitcode = KX_EXIT_REQUEST_NO_REQUEST;
}
-
+
// Add the application as event consumer
system->addEventConsumer(&app);
-
+
// Enter main loop
bool run = true;
char *python_main = NULL;