Changeset 693


Ignore:
Timestamp:
Mar 7, 2013, 11:38:21 PM (7 years ago)
Author:
alloc
Message:

Daodan: Added options-button-fix

Location:
Daodan/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Daodan/src/Daodan.c

    r692 r693  
    4040bool patch_getcmdline = true;
    4141bool patch_disablecmdline = true;
     42bool patch_optionsvisible = true;
    4243
    4344bool patch_safeprintf = true;
     
    5758typedef int (__cdecl *CHINESEPROC)(DWORD WINAPI);
    5859bool patch_chinese = false;
     60
     61
     62
     63void ONICALL DDrShowResumeButton(int window, int visibility)
     64{
     65        if (visibility)
     66                WMrWindow_SetLocation(window, 150, 350);
     67        WMrWindow_SetVisible(window, visibility);
     68}
     69
     70
     71/* Options always visible patch */
     72void ONICALL DDrShowOptionsButton(int window, int visibility)
     73{
     74        WMrWindow_SetVisible(window, 1);
     75}
     76
     77
     78
    5979bool DDrPatch_Init()
    6080{
     
    280300//FLATLINE?     DDrPatch_MakeCall((void*)(OniExe + 0x000C26CB), FLrHook_DoorOpen);
    281301//FLATLINE?     DDrPatch_MakeCall((void*)(OniExe + 0x000EE3CF), FLrHook_ConsoleActivate);
     302
     303
     304        // Fix options not visible in main menu when a game was started
     305        if(patch_optionsvisible)
     306        {
     307                DDrPatch_MakeCall((void*)(OniExe + 0x000d2d2d), DDrShowOptionsButton);
     308                DDrPatch_MakeCall((void*)(OniExe + 0x000d2d43), DDrShowResumeButton);
     309        }
     310
    282311        return true;
    283312}
     313
    284314
    285315enum {s_unknown, s_options, s_patch, s_bsl, s_language} ini_section;
     
    387417                        else if (!_stricmp(name, "newweap"))
    388418                                patch_newweapon = !_stricmp(inifile_cleanstr(value), "true");
     419                        else if (!_stricmp(name, "optionsvisible"))
     420                                patch_optionsvisible = !_stricmp(inifile_cleanstr(value), "true");
    389421                        else
    390422                                DDrStartupMessage("unrecognised patch \"%s\"", name);
  • Daodan/src/Oni_Symbols.h

    r692 r693  
    197197DefFunc(void, AI2rDisplayDebuggingInfo, ONICALL, (Character* Char), 0x0048C5F0);
    198198DefFunc(uint32_t, M3rTextureMap_New, ONICALL, (short width, short height, int type, int allocated, int flags, char* name, void** output), 0x041EB00);
     199
     200// Make a dialog element (in)visible and change its position
     201DefFunc(void, WMrWindow_SetVisible, ONICALL, (int window, int visibility), 0x00475a10);
     202DefFunc(void, WMrWindow_SetLocation, ONICALL, (int window, int x, int y), 0x004756d0);
     203
    199204#undef DefFunc
    200205
  • Daodan/src/_Version.h

    r685 r693  
    66
    77#define DAODAN_VERSION_MAJOR 3
    8 #define DAODAN_VERSION_MINOR 1
     8#define DAODAN_VERSION_MINOR 2
    99#define DAODAN_VERSION_STRING STRINGIZE(DAODAN_VERSION_MAJOR) "." STRINGIZE(DAODAN_VERSION_MINOR)
    1010
Note: See TracChangeset for help on using the changeset viewer.