Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: RandomTiger on October 17, 2002, 08:09:45 am
-
I have added a new functionality to the O KEY.
But Im wondering about how to code it properly so the key reassigns and everything.
Is there anything I should be aware of?
-
As near as I can tell:
Add a #define to controlsconfig.h with a unique value:
#define MULTI_SELF_DESTRUCT 106
Increment the MAX controls define (Index used above +1):
#define CCFG_MAX 107
Add you default key and text to the end of the following table in ControlsConfigCommon.cpp:
config_item Control_config[CCFG_MAX + 1] = {
// ALT? | Shift? | KB Key, j/s button, Menu, Function description
I think thats it. I think Bobboau is adding 4 new key mappings as well so those will have to be merged.
-
Just out of curiosity, is there any reason NOT to write in dummys for unbound keys in advance? That way people could look at the CVS version, see what keys were already being used and use something else. Is there going to be a performance loss from hitting an 'unbound' key that calls:
bool noFunc(void)
{
return true;
}
-
It doesnt really work that way mikhael
-
[edit]
Evidently deleting your own dumb questions is bad. so I'll just ***** about it instead.
[/edit]