Changeset 893 for Daodan/src


Ignore:
Timestamp:
Jul 26, 2013, 12:42:31 PM (11 years ago)
Author:
alloc
Message:

Daodan 3.4:

  • Fixes #66 by only allowing landscape resolutions
  • Fixes #64, adds patch "showalllasersights" defaulting to false
  • Fixes #67, also printing Daodan version
Location:
Daodan/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • Daodan/src/Daodan.c

    r839 r893  
    22#include <string.h>
    33#include <stdio.h>
     4#include <time.h>
    45
    56#include "Daodan.h"
     
    1112#include "Daodan_Config.h"
    1213#include "patches/Patches.h"
     14#include "_Version.h"
    1315
    1416#include "Oni.h"
     
    2224void __cdecl DDrMain(int argc, char* argv[])
    2325{
    24         DDrStartupMessage("Daodan: Daodan attached!");
     26        time_t rawtime;
     27        struct tm* timeinfo;
     28        char buffer[80];
     29        time(&rawtime);
     30        timeinfo = localtime(&rawtime);
     31        strftime(buffer, 80, "Daodan: %Y-%m-%d %H:%M:%S", timeinfo);
     32
     33        DDrStartupMessage("Daodan: Daodan v."DAODAN_VERSION_STRING" attached!");
     34        DDrStartupMessage(buffer);
    2535       
    2636        DDrConfig(argc, argv);
  • Daodan/src/Daodan_Config.c

    r877 r893  
    3737bool patch_projaware = true;
    3838bool patch_safeprintf = true;
     39bool patch_showalllasersights = false;
    3940bool patch_throwtest = false;
    4041bool patch_usedaodangl = true;
     
    152153                        else if (!_stricmp(name, "safeprintf"))
    153154                                patch_safeprintf = !_stricmp(inifile_cleanstr(value), "true");
     155                        else if (!_stricmp(name, "showalllasersights"))
     156                                patch_showalllasersights = !_stricmp(inifile_cleanstr(value), "true");
    154157                        else if (!_stricmp(name, "throwtest"))
    155158                                patch_throwtest = !_stricmp(inifile_cleanstr(value), "true");
  • Daodan/src/Daodan_Config.h

    r877 r893  
    3232extern bool patch_projaware;
    3333extern bool patch_safeprintf;
     34extern bool patch_showalllasersights;
    3435extern bool patch_throwtest;
    3536extern bool patch_usedaodangl;
  • Daodan/src/Daodan_GL.c

    r838 r893  
    8585                        if (dm.dmBitsPerPel < DD_MIN_DEPTH || dm.dmPelsWidth < 640 || dm.dmPelsHeight < 480)
    8686                                continue;
     87                        if (dm.dmPelsWidth < dm.dmPelsHeight)
     88                                continue;
    8789
    8890                        // Already exists? Search backwards as modes are sorted most of the times
  • Daodan/src/Oni_Symbols.h

    r882 r893  
    8282#define OBJgTriggerVolume_Visible       (*((bool*)0x005ec6c4))
    8383
     84//#define OBJgFlag_DrawFlags    (*((void*)0x005ec624))
     85//#define OBJgFlag_ViewPrefix   (*((void*)0x005ec650))
     86//#define OBJgFlag_DrawNameDistance     (*((void*)0x005ec634))
    8487
    8588// Method signature for script (BSL) functions
     
    206209
    207210DefFunc(int, OBJrObjectType_EnumerateObjects, ONICALL, (int inObjectType, OBJtEnumCallback_Object inEnumCallback, int inUserData), 0x004D0080);
     211//DefFunc(void, OBJrTriggerVolume_IntersectsCharacter, ONICALL, (), 0x004cc680);
    208212
    209213DefFunc(void, OBJrDoor_Open, ONICALL, (DoorObject *inObject, Character *inCharacter), 0x004C26C0);
     
    215219DefFunc(void, ONiDrawWeaponSight, ONICALL, (Character* Char), 0x004E1900);
    216220DefFunc(void, AI2rDisplayDebuggingInfo, ONICALL, (Character* Char), 0x0048C5F0);
    217 DefFunc(uint32_t, M3rTextureMap_New, ONICALL, (short width, short height, int type, int allocated, int flags, char* name, void** output), 0x041EB00);
     221DefFunc(uint32_t, M3rTextureMap_New, ONICALL, (short width, short height, int type, int allocated, int flags, char* name, void** output), 0x0041EB00);
     222/*
     223DefFunc(void, M3rGeom_Line_Light, ONICALL, (), 0x0041f440);
     224DefFunc(void, M3rMatrixStack_Push, ONICALL, (), 0x0041baa0);
     225DefFunc(void, M3rMatrixStack_Get, ONICALL, (), 0x0041bb20);
     226DefFunc(void, M3rMatrixStack_Pop, ONICALL, (), 0x0041bb30);
     227DefFunc(void, M3rMatrixStack_Identity, ONICALL, (), 0x0041bba0);
     228DefFunc(void, M3rMatrixStack_Rotate, ONICALL, (), 0x0041bbe0);
     229DefFunc(void, M3rMatrixStack_UniformScale, ONICALL, (), 0x0041bc20);
     230DefFunc(void, M3rMatrixStack_Translate, ONICALL, (), 0x0041bc40);
     231DefFunc(void, M3rMatrixStack_Multiply, ONICALL, (), 0x0041bc70);
     232DefFunc(void, M3rGeom_State_Commit, ONICALL, (), 0x0041e870);
     233
     234DefFunc(void, MUrPoint_Distance, ONICALL, (), 0x00433270);
     235*/
    218236
    219237// Make a dialog element (in)visible and change its position
  • Daodan/src/_Version.h

    r837 r893  
    66
    77#define DAODAN_VERSION_MAJOR 3
    8 #define DAODAN_VERSION_MINOR 3
     8#define DAODAN_VERSION_MINOR 4
    99#define DAODAN_VERSION_STRING STRINGIZE(DAODAN_VERSION_MAJOR) "." STRINGIZE(DAODAN_VERSION_MINOR)
    1010
  • Daodan/src/patches/Patches.c

    r878 r893  
    1313#include "../flatline/Flatline_Hooks.h"
    1414#include "../Oni.h"
     15//#include "Objt.h"
    1516
    1617typedef int (__cdecl *CHINESEPROC)(DWORD ThreadId);
     
    247248void DD_Patch_Flatline()
    248249{
    249         DDrPatch_NOOP((char*)(OniExe + 0x000E1957), 6 );
    250250        DDrPatch_MakeCall((void*)(OniExe + 0x000E17F6), FLrHook_Lasers );
    251251       
     
    379379}
    380380
     381// Show all (also enemies') lasersights
     382void DD_Patch_ShowAllLasersights()
     383{
     384        DDrPatch_NOOP((char*)(OniExe + 0x000E1957), 6 );
     385}
     386
    381387// Experiment with allowing enemies to be thrown over railings
    382388void DD_Patch_Throwtest()
     
    479485}
    480486
     487/*
     488void DD_Patch_ShowTriggerVolumes()
     489{
     490        DDrPatch_Int32((int*)(OniExe + 0x000cc9bb+4), (uint32_t)DD_OBJiTriggerVolume_Draw);
     491}
     492
     493void DD_Patch_ShowFlags()
     494{
     495        DDrPatch_Int32((int*)(OniExe + 0x000c4ed4+4), (uint32_t)DD_OBJiFlag_Draw);
     496}
     497*/
     498
    481499bool DD_Patch_Init()
    482500{
     
    560578        if (patch_safeprintf)
    561579                DD_Patch_SafePrintf();
     580
     581        if (patch_showalllasersights)
     582                DD_Patch_ShowAllLasersights();
    562583       
    563584        if (patch_throwtest)
     
    582603
    583604        DD_Patch_ShowNames();
    584 
     605/*
     606        DD_Patch_ShowTriggerVolumes();
     607        DD_Patch_ShowFlags();
     608*/
    585609        if (patch_flatline)
    586610                DD_Patch_Flatline();
Note: See TracChangeset for help on using the changeset viewer.