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
#include <C4Include.h>
#include <C4PlayerControl.h>
#include "C4Include.h"
#include "C4PlayerControl.h"
#ifndef BIG_C4INCLUDE
#include <C4LangStringTable.h>
#include <C4Player.h>
#include <C4PlayerList.h>
#include <C4Control.h>
#include <C4Game.h>
#include <C4Log.h>
#include <C4GraphicsResource.h>
#include <C4MouseControl.h>
#endif
#include "C4LangStringTable.h"
#include "C4Player.h"
#include "C4PlayerList.h"
#include "C4Control.h"
#include "C4Game.h"
#include "C4Log.h"
#include "C4GraphicsResource.h"
#include "C4MouseControl.h"
#include <algorithm>
/* C4PlayerControlDef */

View File

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

View File

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

View File

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