Author Topic: Adding key protocol  (Read 1657 times)

0 Members and 1 Guest are viewing this topic.

Offline RandomTiger

  • Senior Member
  • 211
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.

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
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:

Code: [Select]

bool noFunc(void)
{
     return true;
}
« Last Edit: October 17, 2002, 03:42:43 pm by 440 »
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline RandomTiger

  • Senior Member
  • 211
It doesnt really work that way mikhael

  

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
[edit]
Evidently deleting your own dumb questions is bad. so I'll just ***** about it instead.
[/edit]
« Last Edit: October 17, 2002, 03:58:46 pm by 440 »
[I am not really here. This post is entirely a figment of your imagination.]