Quote Originally Posted by ZoriaRPG View Post
I did them the same way that the other interface getters work:

Spoiler: show

Code:
case GAMETHROTTLE:
        ret=Throttlefps?10000:0;
        break;

case GAMEPAUSED:
        ret=Paused?10000:0;
        break;

case GAMEPLAYING:
        ret=Playing?10000:0;
        break;

case GAMEHEARTBEEP:
	ret=heart_beep?10000:0;
        break;

case ONCONVEY:
        ret=is_on_conveyor?10000:0;
        break;

case ACTTIMEDWARP:
        ret=activated_timed_warp?10000:0;
        break;

case GOFAST:
        ret=gofast?10000:0;
        break;

case GETZCVERSION:
        ret=zcversion*10000;
        break;

 { "getVersion",               ScriptParser::TYPE_FLOAT,         GETTER,       GETZCVERSION,            1,      {  ScriptParser::TYPE_GAME,         -1,                               -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1                           } },
	{ "getGoFast",           ScriptParser::TYPE_BOOL,          GETTER,       GOFAST,        1,      {  ScriptParser::TYPE_GAME,         -1,                               -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1                           } },
	{ "getActTimedWarp",           ScriptParser::TYPE_BOOL,          GETTER,       ACTTIMEDWARP,        1,      {  ScriptParser::TYPE_GAME,         -1,                               -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1                           } },
	{ "getHeartbeep",           ScriptParser::TYPE_BOOL,          GETTER,       GAMEHEARTBEEP,        1,      {  ScriptParser::TYPE_GAME,         -1,                               -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1                           } },
	{ "getCapFPS",           ScriptParser::TYPE_BOOL,          GETTER,       GAMETHROTTLE,        1,      {  ScriptParser::TYPE_GAME,         -1,                               -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1                           } },
	{ "setCapFPS",               ScriptParser::TYPE_VOID,          SETTER,       GAMETHROTTLE,            1,      {  ScriptParser::TYPE_GAME,          ScriptParser::TYPE_BOOL,        -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1                           } },
	{ "getPaused",           ScriptParser::TYPE_BOOL,          GETTER,       GAMEPAUSED,        1,      {  ScriptParser::TYPE_GAME,         -1,                               -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1                           } },
	{ "getShowFPS",           ScriptParser::TYPE_BOOL,          GETTER,       GAMESHOWFPS,        1,      {  ScriptParser::TYPE_GAME,         -1,                               -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1                           } },	
	
	{ "setHasPlayed",               ScriptParser::TYPE_VOID,          SETTER,       GAMEHASPLAYED,            1,      {  ScriptParser::TYPE_GAME,          ScriptParser::TYPE_BOOL,        -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1,                           -1                           } },


I had to cut out some to get that to fit, such as GetPressF4.

Most of those that I cut are probably useless, but I just shoved all the interface vars in there when I did a few of them, so that I would never have to do them again. If for some reason anyone wants to add an intermediate register, that's fine, but in these cases, I think it's pretty pointless.

I may have lost the file with Set/GetDMapScreenDoor, Set/GetScreenDoor, Set/getScreenState, Set/etDMapScreenState, and a lot of other general purpose getters and setters for that sort of thing, that otherwise work exactly as GetScreenD, SetScreenD, GetDMapScreenD, SetDMapScreenD, and so forth; that would take all of an hour to write up again. I should have it archived, but I don't know where... It was on the drive that fried, and it'd be faster to rewrite it, than to find it on the servers.

Ah yes, The programmers version of TMI. Many an API has been over-engineered since the dawn of interface design, and it's always hard to get right (I still mess it up). I agree with Saffith here. That is just much /too much.

Especially this one:
Code:
case GAMEPAUSED: // INVALID CODE PATH
        ret=Paused?10000:0;  // This will never actually run because the scripts are paused...
        break;
I mentioned this before but a simple int Game->EngineProperty[] and int Game->QuestRule[] would take care of all of these things. I hadn't put them in because 2.5 was supposed version compatible (Although soon it probably won't matter anyway).