Man this is some sweet ass coding!
Very complex stuff and really impressive!
But it's broken :(
class BaseInput : ConfigurableInterface
{
.
.
.
// Variables
Int _connectedJoypad; // stores the index of connected Joypad
Map<Str,Str> _actionBinding(PlayerInput::MapABCreate, PlayerInput::MapABCompare); // successfully read command bindings
Map<Str,UInt> _functionKeys(PlayerInput::MapFKCreate, PlayerInput::MapFKCompare); // default map for command => KB conversions
};
// Description: Constructor, initalizes the _functionsKeys map with all KB_BUTTON
BaseInput.BaseInput()
{ //throws error here line 43
*_functionKeys("0") = KB_0;
*_functionKeys("1") = KB_1;
.
.
}
Code:
1>------ Build started: Project: Bloody Massacre, Configuration: Debug Win32 ------
1>Compiling...
1>BaseInput.cpp
1>c:\esenthel 2.0\projects\_build_\bloody massacre\source\input\baseinput.cpp(43) : error C2664: 'EE::Map<KEY,DATA>::Map(Int (__cdecl *)(const KEY &,const KEY &),Bool (__cdecl *)(DATA &,const KEY &,Ptr),Ptr,Int)' : cannot convert parameter 1 from 'Bool (__cdecl *)(EE::Str &,EE::Str &,Ptr)' to 'Int (__cdecl *)(const KEY &,const KEY &)'
1> with
1> [
1> KEY=EE::Str,
1> DATA=EE::Str
1> ]
1> and
1> [
1> KEY=EE::Str
1> ]
1> None of the functions with this name in scope match the target type
1>c:\esenthel 2.0\projects\_build_\bloody massacre\source\input\baseinput.cpp(43) : error C2664: 'EE::Map<KEY,DATA>::Map(Int (__cdecl *)(const KEY &,const KEY &),Bool (__cdecl *)(DATA &,const KEY &,Ptr),Ptr,Int)' : cannot convert parameter 1 from 'Bool (__cdecl *)(UInt &,EE::Str &,Ptr)' to 'Int (__cdecl *)(const KEY &,const KEY &)'
1> with
1> [
1> KEY=EE::Str,
1> DATA=UInt
1> ]
1> and
1> [
1> KEY=EE::Str
1> ]
1> None of the functions with this name in scope match the target type
1>c:\esenthel 2.0\projects\_build_\bloody massacre\source\input\baseinput.cpp(281) : error C2228: left of '.x' must have class/struct/union
1> type is 'EE::Vec2 [2]'
1>c:\esenthel 2.0\projects\_build_\bloody massacre\source\input\baseinput.cpp(281) : error C2228: left of '.y' must have class/struct/union
1> type is 'EE::Vec2 [2]'
1>Build log was saved at "file://c:\Esenthel 2.0\Projects\_Build_\Bloody Massacre\Debug\BuildLog.htm"
1>Bloody Massacre - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I'm going to try and debug it because it's very flexible, but I doubt I can.. my C++ is on the week side.
Edit: I just noticed your footer, the IRC link is wrong, it should be:
http://webchat.freenode.net/?channels=#Esenthel
Oh I see it's an esenthel update issue:
http://www.esenthel.com/community/showth...p?tid=4730
http://www.esenthel.com/community/showth...6#pid27896
-all custom Compare functions that want to be passed to memory containers search methods, and Map constructors now need to accept parameters in const mode "Compare(C TYPE &a, C TYPE &b)"
BaseInput file:
Added C to all inputs, but still fails
// Map related functions
static Bool MapABCreate(C Str &data, C Str &key, Ptr user) { return true; }
static Int MapABCompare(C Str &a, C Str &b) { return Compare(a, b); }
static Bool MapFKCreate(C UInt &data, C Str &key, Ptr user){ return true; }
static Int MapFKCompare(C Str &a, C Str &b) { return Compare(a, b); }