Merged PlrCtrl into default

Nicolas Hake 2009-12-17 14:06:24 +01:00
commit 1c11c4dd34
4 changed files with 27 additions and 31 deletions

View File

@ -16,19 +16,19 @@
*/ */
// Input to player control mapping // Input to player control mapping
#include <C4Include.h> #include "C4Include.h"
#include <C4PlayerControl.h> #include "C4PlayerControl.h"
#ifndef BIG_C4INCLUDE #include "C4LangStringTable.h"
#include <C4LangStringTable.h> #include "C4Player.h"
#include <C4Player.h> #include "C4PlayerList.h"
#include <C4PlayerList.h> #include "C4Control.h"
#include <C4Control.h> #include "C4Game.h"
#include <C4Game.h> #include "C4Log.h"
#include <C4Log.h> #include "C4GraphicsResource.h"
#include <C4GraphicsResource.h> #include "C4MouseControl.h"
#include <C4MouseControl.h>
#endif #include <algorithm>
/* C4PlayerControlDef */ /* C4PlayerControlDef */

View File

@ -19,10 +19,11 @@
#ifndef INC_C4PlayerControl #ifndef INC_C4PlayerControl
#define INC_C4PlayerControl #define INC_C4PlayerControl
#ifndef BIG_C4INCLUDE #include "C4KeyboardInput.h"
#include <C4KeyboardInput.h> #include "C4LangStringTable.h"
#include <C4LangStringTable.h> #include "C4Id.h"
#endif
#include <list>
// one control definition, e.g. "Left", "Throw", etc. // one control definition, e.g. "Left", "Throw", etc.
class C4PlayerControlDef class C4PlayerControlDef

View File

@ -586,7 +586,7 @@ void C4KeyCodeEx::CompileFunc(StdCompiler *pComp, StdStrBuf *pOutBufIfUndefined)
if (pOutBufIfUndefined) if (pOutBufIfUndefined)
{ {
// unknown key, but an output buffer for unknown keys was provided. Use it. // unknown key, but an output buffer for unknown keys was provided. Use it.
pOutBufIfUndefined->Take(sCode); pOutBufIfUndefined->Take(std::move(sCode));
eCode = KEY_Default; eCode = KEY_Default;
} }
else else

View File

@ -268,20 +268,15 @@ void C4AulScriptEngine::Link(C4DefList *rDefs)
::MaterialMap.UpdateScriptPointers(); ::MaterialMap.UpdateScriptPointers();
// FIXME: move this to script // FIXME: move this to script
C4PropList * Action = new C4PropList; if (GlobalNamed.GetItem("Action"))
Action->SetProperty(Strings.P[P_Length], C4VInt(1)); {
Action->SetProperty(Strings.P[P_Directions], C4VInt(1)); C4PropList * Action = new C4PropList;
Action->SetProperty(Strings.P[P_Step], C4VInt(1)); Action->SetProperty(Strings.P[P_Length], C4VInt(1));
Action->SetProperty(Strings.P[P_Procedure], C4VInt(DFA_NONE)); Action->SetProperty(Strings.P[P_Directions], C4VInt(1));
C4Value *pActionValDef = GlobalNamed.GetItem("Action"); Action->SetProperty(Strings.P[P_Step], C4VInt(1));
if (!pActionValDef) Action->SetProperty(Strings.P[P_Procedure], C4VInt(DFA_NONE));
{ GlobalNamed.GetItem("Action")->SetPropList(Action);
Log("WARNING: static Action not defined. Wrong System.c4g?"); }
}
else
{
pActionValDef->SetPropList(Action);
}
rDefs->CallEveryDefinition(); rDefs->CallEveryDefinition();
// display state // display state