Changeset 692 for Daodan


Ignore:
Timestamp:
Mar 7, 2013, 6:26:13 PM (12 years ago)
Author:
alloc
Message:

Daodan: Lots of cleanups (mostly unnecessary includes removed, empty files deleted, case of filenames corrected)

Location:
Daodan
Files:
5 deleted
27 edited
6 moved

Legend:

Unmodified
Added
Removed
  • Daodan/makefile

    r689 r692  
    1717OUT = build/binkw32.dll
    1818
    19 SRC = src/Daodan.c src/Daodan_BSL.c src/Daodan_Character.c src/Daodan_Cheater.c src/Daodan_Console.c src/daodan_gl.c src/Daodan_Patch.c src/Daodan_Persistence.c src/Daodan_Utility.c src/Daodan_Win32.c src/Daodan_WindowHack.c src/inifile_reader.c src/_DLLInfo.rc
     19SRC = src/Daodan.c src/Daodan_BSL.c src/Daodan_Character.c src/Daodan_Cheater.c src/Daodan_Console.c src/Daodan_GL.c src/Daodan_Patch.c src/Daodan_Persistence.c src/Daodan_Utility.c src/Daodan_Win32.c src/Daodan_WindowHack.c src/Inifile_Reader.c src/_DLLInfo.rc
    2020DEST = $(patsubst src/%.rc,build/%.o,$(patsubst src/%.c,build/%.o,$(SRC)))
    2121
  • Daodan/src/BFW_Motoko_Draw.h

    r689 r692  
    1 #pragma once
    21#ifndef BFW_MOTOKO_DRAW_H
    32#define BFW_MOTOKO_DRAW_H
    4 
    5 #include "Daodan.h"
    63
    74typedef struct
  • Daodan/src/BFW_ScriptLang.h

    r688 r692  
    1 #pragma once
    21#ifndef BFW_SCRIPTLANG_H
    32#define BFW_SCRIPTLANG_H
    43
    5 #include "Daodan.h"
    6 
    7 //#include <stdint.h>
    8 #include "bool.h"
     4#include "stdint.h"
    95
    106typedef enum {
     
    3329} sl_callinfo;
    3430
    35 
    36 
    37 
    38 
    3931#endif
  • Daodan/src/BFW_Utility.h

    r690 r692  
    1 #pragma once
    21#ifndef BFW_UTILITY_H
    32#define BFW_UTILITY_H
    43
    5 #include <stdio.h>
    6 //#include <stdint.h>
    7 #include "Daodan.h"
    8 
    9 //void __cdecl UUrStartupMessage(const char* fmt, ...);
     4#include "stdint.h"
    105
    116typedef struct {
     
    1611} OniRectangle;
    1712
    18 
    19 void* TestContext;
    20 //void ONICALL COrTextArea_Print(uint32_t area, uint32_t priority, uint32_t textshade, uint32_t textshadowshade, const char* text, uint32_t unk_alwaws_0, uint32_t fadetime);
    21 
    22 void ONICALL COrMessage_Remove(char* Key);
    23 //int16_t ONICALL TMrInstance_GetDataPtr(int, char*, void*);    //int TMrInstance_GetDataPtr( Type 'TSFF', char* "Tahoma", ptr);
    24 
    25 //int __cdecl AUrMessageBox(int Buttons, char *Message, ...);
    26 
    2713#endif
  • Daodan/src/Daodan.c

    r690 r692  
     1#include <windows.h>
    12#include <string.h>
    23
     
    1213
    1314#include "Oni.h"
    14 #include "Oni_Persistence.h"
    15 
    16 #include "BFW_Utility.h"
    17 
    18 #include "oni_gl.h"
    19 #include "daodan_gl.h"
    20 
    21 #include "inifile.h"
     15
     16#include "Oni_GL.h"
     17#include "Daodan_GL.h"
     18
     19#include "Inifile_Reader.h"
    2220
    2321HMODULE DDrDLLModule;
     
    329327                        else if (!_stricmp(name, "switch"))
    330328                                M3gResolutionSwitch = !_stricmp(inifile_cleanstr(value), "true");
    331                         //else if (!_stricmp(name, "devmode"))
    332                                 //turn_dev_mode_on = !_stricmp(inifile_cleanstr(value), "true");
    333329                        else
    334330                                DDrStartupMessage("unrecognised option \"%s\"", name);
     
    681677        }
    682678
    683         //DDrPatch_MakeJump((void*)(OniExe + 0x000378c0, (void*)DDrException);
    684679        DDrPatch_MakeJump((void*)(OniExe + 0x000245A0), (void*)DDrPrintWarning);
    685         //init_daodan_gl();
    686680       
    687681        ONiMain(argc, argv);
  • Daodan/src/Daodan.h

    r690 r692  
    1 #pragma once
    21#ifndef DAODAN_H
    32#define DAODAN_H
    43
    54#include <windows.h>
    6 #include "bool.h"
     5#include "stdint.h"
    76
    87#define ONICALL __fastcall
     
    1413extern bool opt_topmost;
    1514
    16 
    17 
    18 
    1915#endif
  • Daodan/src/Daodan_BSL.c

    r689 r692  
    11#include <stdio.h>
    2 #include "bool.h"
     2#include "stdint.h"
    33#include <time.h>
    4 //#include <ffi.h>
    54#include <math.h>
    6 #include "inifile.h"
     5#include "Inifile_Reader.h"
    76#include "Daodan_BSL.h"
    87#include "Daodan_Utility.h"
     
    1211#include "Oni.h"
    1312#include "Oni_Character.h"
    14 #include "oni_gl.h"
     13#include "Oni_GL.h"
    1514#include "Daodan_Character.h"
    16 #include "BFW_Utility.h"
    1715
    1816
  • Daodan/src/Daodan_BSL.h

    r447 r692  
    1 #pragma once
    21#ifndef DAODAN_BSL_H
    32#define DAODAN_BSL_H
    4 
    5 #include "Daodan.h"
    63
    74void SLrDaodan_Initalize();
  • Daodan/src/Daodan_Character.c

    r677 r692  
    22#include "Daodan_Character.h"
    33#include "Oni_Character.h"
    4 #include "BFW_Utility.h"
    54#include "Oni.h"
    65
     
    2827                        }
    2928        }
    30 return -1;                                                                                                      //not found :(
     29        return -1;                                                                                                      //not found :(
    3130}
    32 /*
    33 OniRectangle TestRect;
    34 void CHARTest()
    35 {
    36        
    37         CharacterObject* TestCHAR = malloc(sizeof(CharacterObject));
    38         memset(TestCHAR, 0, sizeof(CharacterObject));
    39        
    40         int type = 0x43484152;
    41         TestCHAR->Header.Type = type;
    42         memcpy(TestCHAR->OSD.Name, "Gumby", 6);
    43         memcpy(TestCHAR->OSD.Class, "striker_easy_1", 15);
    44         memcpy(TestCHAR->OSD.ScriptSpawn, "dmsg", 20); 
    45         //TestCHAR->OSD.Options = chr_unkillable;
    46         TestCHAR->OSD.TeamID = team_syndicate;
    47         //int* ptr = 0x005ECE70;
    48         TestRect.Top = 10;
    49         TestRect.Left = 10;
    50         TestRect.Right = 100;
    51         TestRect.Bottom = 100;
    52        
    53         char str[5] = "hi";
    54         str[2] = '\0';
    55         AUrMessageBox(0, "%8x", &TestRect);
    56         int16_t a = TSrContext_DrawText(TestContext, str, 0xFF, &TestRect, &TestRect);
    57         //ONrGameState_NewCharacter(TestCHAR, NULL, NULL, NULL);
    58         return;
    59 }
    60 */
     31
  • Daodan/src/Daodan_Character.h

    r677 r692  
    1 #pragma once
    21#ifndef DAODAN_CHARACTER_H
    32#define DAODAN_CHARACTER_H
    43
    5 #include "Daodan.h"
    6 //#include <stdint.h>
     4#include "stdint.h"
    75
    86int DDr_TeamToTeamID(const char* team_string);
    9 void CHARTest();
    107uint32_t DDrGetCharacterIndexFromName(char* );
     8
    119#endif
  • Daodan/src/Daodan_Cheater.c

    r690 r692  
    11#include <string.h>
    2 #include "bool.h"
     2#include "stdint.h"
    33#include <math.h>
    44#include "Oni.h"
  • Daodan/src/Daodan_Cheater.h

    r677 r692  
    1 #pragma once
    21#ifndef DAODAN_CHEATER_H
    32#define DAODAN_CHEATER_H
    43
    5 //#include <stdint.h>
     4#include "Daodan.h"
    65
    76typedef struct {
     
    1211} oniCheatCode;
    1312
    14 enum {  cheat_shapeshifter,
     13enum {
     14                cheat_shapeshifter,
    1515                cheat_liveforever,
    1616                cheat_touchofdeath,
     
    4646
    4747extern oniCheatCode DDr_CheatTable[];
    48 extern int turn_dev_mode_on;
    4948uint8_t ONICALL DDrCheater(uint32_t cheat);
    5049void __stdcall FallingFrames(void* Ebp);
  • Daodan/src/Daodan_Console.c

    r689 r692  
    11#include <stdlib.h>
    22#include <stdarg.h>
    3 //#include <stdint.h>
    43
    54#include "Daodan_Console.h"
    6 #include "BFW_Utility.h"
    75#include "Oni_Symbols.h"
    86
  • Daodan/src/Daodan_Console.h

    r677 r692  
    1 #pragma once
    21#ifndef DAODAN_CONSOLE_H
    32#define DAODAN_CONSOLE_H
    4 
    5 //#include <stdint.h>
    63
    74#include "Daodan.h"
    85
    96typedef struct {
    10 char B;
    11 char G;
    12 char R;
    13 char A;
     7        char B;
     8        char G;
     9        char R;
     10        char A;
    1411} RGBA;
    1512
    1613
    1714typedef struct {
    18 char A;
    19 char R;
    20 char G;
    21 char B;
     15        char A;
     16        char R;
     17        char G;
     18        char B;
    2219} ARGB;
    2320
     
    3128extern TStColorFormattingCharacter DDrDSayColors[];
    3229
    33 #ifdef __cplusplus
    34 extern "C"
    35 #endif
    3630void DDrConsole_Print(const char* text);
    3731
    38 #ifdef __cplusplus
    39 extern "C"
    40 #endif
    4132void DDrConsole_PrintColored(const char* text, int priority, RGBA color, RGBA shade);
    4233
    43 #ifdef __cplusplus
    44 extern "C"
    45 #endif
    4634void DDrConsole_PrintF(const char* fmt, ...);
    4735
  • Daodan/src/Daodan_GL.c

    r691 r692  
    33
    44#include "Oni.h"
    5 #include "Oni_Persistence.h"
    65#include "Daodan_Utility.h"
    76#include <GL/gl.h>
    87#include <GL/glu.h>
    98#include "Daodan_Win32.h"
    10 #include "BFW_Utility.h"
    11 
    12 #include "daodan_gl.h"
    13 #include "oni_gl.h"
     9
     10#include "Daodan_GL.h"
     11#include "Oni_GL.h"
    1412
    1513#define max_modes (104) // Dirty hack to add more resolutions, it really should only be 16 ^_^
    1614#define builtin_modes  (sizeof(daodan_reslist) / sizeof(M3tDisplayMode))
    1715#define builtin_depths (sizeof(daodan_resdepths) / sizeof(short))
     16
     17bool daodan_testmode(M3tDisplayMode mode);
    1818
    1919const M3tDisplayMode daodan_reslist[] = {
     
    5252DEVMODE orig_devmode, cur_devmode, new_devmode;
    5353
     54/* Never called
    5455void init_daodan_gl()
    5556{
     
    7071        memcpy(&new_devmode, &orig_devmode, sizeof(orig_devmode));
    7172}
     73*/
    7274
    7375void update_cdmode()
     
    239241        }
    240242       
    241         if (gl_gamma_ramp_valid)
     243        /*if (gl_gamma_ramp_valid)
    242244                daodan_set_gamma(ONrPersist_GetGamma()); 
    243         else
     245        else*/
    244246                DDrStartupMessage("gamma adjustment not supported");
    245247       
  • Daodan/src/Daodan_GL.h

    r689 r692  
    1 #pragma once
    21#ifndef DAODAN_GL_H
    32#define DAODAN_GL_H
     
    65#include "BFW_Motoko_Draw.h"
    76
    8 #include "oni_gl.h"
     7unsigned int ONICALL daodan_enumerate_valid_display_modes(M3tDisplayMode modes[16]);
     8int ONICALL daodangl_platform_initialize();
    99
    10 void init_daodan_gl();
    11 void update_cdmode();
    12 unsigned int ONICALL daodan_enumerate_valid_display_modes(M3tDisplayMode modes[16]);
    13 bool daodan_testmode(M3tDisplayMode mode);
    14 int daodan_set_display_mode(short width, short height, short depth);
    15 void daodan_set_gamma(float gamma);
    16 int ONICALL daodangl_platform_initialize();
    1710#endif
  • Daodan/src/Daodan_Patch.h

    r689 r692  
    1 #pragma once
    21#ifndef DAODAN_PATCH_H
    32#define DAODAN_PATCH_H
    43
    5 #include "bool.h"
     4#include "stdint.h"
    65
    76#define DDrPatch_Const(d, c) DDrPatch_String(d, c, sizeof(c))
  • Daodan/src/Daodan_Persistence.c

    r339 r692  
    66        return 1;
    77}
     8
  • Daodan/src/Daodan_Persistence.h

    r677 r692  
    1 #pragma once
    21#ifndef DAODAN_PERSISTENCE_H
    32#define DAODAN_PERSISTENCE_H
    4 
    5 //#include <stdint.h>
    63
    74#include "Daodan.h"
  • Daodan/src/Daodan_Utility.c

    r682 r692  
    22#include <stdlib.h>
    33#include <stdarg.h>
    4 //#include <stdint.h>
    5 #include "oni_stdio.h"
    64
    75#include "Daodan_Utility.h"
    8 #include "BFW_Utility.h"
    96#include "Oni.h"
    107
     
    3330        return;
    3431}
    35 
    36 /*
    37 int64_t ONICALL DDrMachineTime_Sixtieths()
    38 {
    39         static int64_t LastTime, Time;
    40         int64_t Current;
    41 
    42         Current = LastTime + GetTickCount();
    43 
    44         if (Current > Time)
    45         {
    46                 LastTime += 1;
    47                 Current += 1;
    48         }
    49 
    50         Time = Current;
    51 
    52         return (Time * 3) / 50;
    53 }
    54 */
    5532
    5633int64_t ONICALL DDrMachineTime_Sixtieths()
  • Daodan/src/Daodan_Utility.h

    r677 r692  
    1 #pragma once
    21#ifndef DAODAN_UTILITY_H
    32#define DAODAN_UTILITY_H
    43
    5 //#include <stdint.h>
    64#include "Daodan.h"
    75
    8 #ifdef __cplusplus
    9 extern "C"
    10 #endif
    116void __cdecl DDrStartupMessage(const char* fmt, ...);
    127int64_t ONICALL DDrMachineTime_High();
  • Daodan/src/Daodan_Win32.c

    r677 r692  
    44#include "Daodan_Win32.h"
    55
    6 #include "BFW_Utility.h"
     6#include "Oni.h"
    77
    8 #include "Oni.h"
    98extern HWND onihwnd;
     9
    1010short ONICALL DDrPlatform_Initialize(ONtPlatformData *PlatformData)
    1111{
     
    5050        return 0;
    5151}
     52
  • Daodan/src/Daodan_Win32.h

    r323 r692  
    1 #pragma once
    21#ifndef DAODAN_WIN32_H
    32#define DAODAN_WIN32_H
  • Daodan/src/Daodan_WindowHack.c

    r690 r692  
    22#include "Daodan_WindowHack.h"
    33#include "Daodan_Patch.h"
    4 #include "Daodan_Character.h"
    54
    65#include "Oni.h"
    7 #include "BFW_Motoko_Draw.h"
    8 #include "oni_gl.h"
     6#include "Oni_GL.h"
    97
    108volatile HWND onihwnd, boxhwnd = NULL;
  • Daodan/src/Daodan_WindowHack.h

    r677 r692  
    1 #pragma once
    21#ifndef DAODAN_WINDOWHACK_H
    32#define DAODAN_WINDOWHACK_H
     3
     4#include <windows.h>
    45
    56void DDrWindowHack_Install();
  • Daodan/src/Inifile_Reader.c

    r689 r692  
    11#include <stdio.h>
    22#include <stdlib.h>
    3 #include "bool.h"
     3#include "stdint.h"
    44#include <string.h>
    55#include <ctype.h>
    66
    7 #include "inifile.h"
     7#include "Inifile_Reader.h"
    88
    99char* inifile_cleanstr(char* str)
  • Daodan/src/Inifile_Reader.h

    r689 r692  
    1 #pragma once
    21#ifndef INIFILE_H
    32#define INIFILE_H
    43
    5 #include "bool.h"
    6 //#include <stdint.h>
     4#include "stdint.h"
    75
    8 enum {inifile_cantread = -20};
     6enum {
     7        inifile_cantread = -20
     8};
    99
    1010typedef bool (*inifile_callback)(char* section, bool newsection, char* name, char* value);
  • Daodan/src/Oni.h

    r690 r692  
    1 #pragma once
    21#ifndef ONI_H
    32#define ONI_H
    43
    54#include "Daodan.h"
    6 #include "oni_gl.h"
    7 //#include <stdint.h>
     5#include "Oni_GL.h"
    86#include <windows.h>
    97#include "Oni_GameState.h"
     8
    109typedef unsigned char onibool;
    1110
    12 typedef struct
    13 {
     11typedef struct {
    1412        HINSTANCE Instance;
    1513        HWND Window;
     
    2220        void** PointerList, //Where the found pointers go
    2321        int* FoundCount         //Where the number of pointers found go.
    24         );
     22);
    2523
    2624#include "Oni_Symbols.h"
  • Daodan/src/Oni_Character.h

    r677 r692  
    1 #pragma once
    21#ifndef ONI_CHARACTER_H
    32#define ONI_CHARACTER_H
    43
    5 //#include <stdint.h>
    6 #include "bool.h"
     4#include "stdint.h"
    75
    86enum {
     
    1614        team_syndicateaccessory,
    1715};
    18 /*
    19 int16_t ONICALL ONrGameState_NewCharacter(CharacterObject* CHAR, void* AISA, void* flag, uint32_t* list_location);
    20 int32_t* ONICALL ONrGetActiveCharacter(void* CharacterPtr);
    21 //int16_t ONICALL ONrGameState_GetPlayerCharacter();
    22 */
    23 //probably need to name these better.
    24 /*
    25 #define char_unkillable        (1 <<  5)
    26 #define char_superammo         (1 <<  6)
    27 #define char_unstoppable       (1 <<  8)
    28 #define char_deathlock         (1 << 10)
    29 #define char_dontaim           (1 << 13)
    30 #define char_nocollision       (1 << 17)
    31 #define char_noshadow          (1 << 24)
    32 #define char_invincible        (1 << 25)
    33 #define char_bossshield        (1 << 30)
    34 #define char_weaponimmune      (1 << 31)
    35 */
     16
    3617
    3718//We need a Oni_Structs #include file.
  • Daodan/src/Oni_GL.h

    r689 r692  
    1 #pragma once
    21#ifndef ONI_GL_H
    32#define ONI_GL_H
    43
     4#include <windows.h>
    55#include <GL/gl.h>
    66
    7 #include "Daodan.h"
    87#include "BFW_Motoko_Draw.h"
    98
     
    441440
    442441
    443 
    444 
    445442#endif
  • Daodan/src/Oni_GameState.h

    r677 r692  
    11#ifndef ONI_GAMESTATE_H
    22#define ONI_GAMESTATE_H
     3
    34#include "Oni_Character.h"
    4 
    55
    66typedef struct {
     
    420420        chr_weaponimmune      = 1 << 31,
    421421} chr_flags;
    422 /*
    423 enum {
    424 chr_isplayer                    =               0x00000001,     //is player character
    425 chr_randomskin                  =               0x00000002,     //gets random skin from ONCV
    426 chr_notprespawned               =               0x00000004,     //isn't spawned at level creation
    427 chr_noncombatant                =               0x00000008,     //doesn't fight
    428 chr_multispawnable              =               0x00000010,     //can spawn up to 5 without forcing
    429 chr_unknown                             =               0x00000020,     //
    430 chr_unkillable                  =               0x00000040,     //can only be brought to 1 hp
    431 chr_superammo                   =               0x00000080,     //infinite ammo
    432 chr_omniscient                  =               0x00000100,     //touchofdeath
    433 chr_haslsi                              =               0x00000200,     //drops an lsi
    434 chr_boss                                =               0x00000400,     //is a boss character
    435 chr_upgradedifficulty   =               0x00000800,     //upgrade the difficulty if you play on med\hard
    436 chr_noautodrop                  =               0x00001000,     //uses drop fields instead of has fields on death
    437 }; //
    438 */
     422
    439423
    440424typedef struct {
     
    14741458                        int blah3;
    14751459} COtTextArea;
     1460
    14761461#endif
     1462
  • Daodan/src/Oni_Symbols.h

    r691 r692  
    11#ifndef ONI_SYMBOLS_H
    22#define ONI_SYMBOLS_H
    3 #include "bool.h"
     3#include "stdint.h"
    44#include <stdio.h>
    55#include "Oni.h"
    6 #include "oni_gl.h"
     6#include "Oni_GL.h"
    77#include "Oni_Character.h"
    88#include "BFW_ScriptLang.h"
     
    4141#define gl_gamma_ramp_valid     (*((int*)0x005603fc))
    4242
    43 // OpenGL whatev?
     43// OpenGL: list of pointers to opengl32.dll functions (and a few functions from GL extensions)
    4444#define gl_api                          (*((gl_api_t**)0x00560604))
    4545
    46 // OpenGL whatev?
     46// OpenGL render engine descriptor (resolutions, flags, context methods)
    4747#define gl_eng                          (*((gl_engine_t**)0x00560600))
    4848
     
    107107DefFunc(int, gl_platform_initialize, ONICALL, (), 0x00407da0);
    108108
     109// Retrieve gamma value from settings
    109110DefFunc(float, ONrPersist_GetGamma, ONICALL, (), 0x0050f450);
     111
     112// Retrieve if the game was completed
    110113DefFunc(uint8_t, ONrPersist_GetWonGame, ONICALL, (), 0x0050f660);
    111114
     115// Print a message to the startup.txt log
    112116DefFunc(void, UUrStartupMessage, __cdecl, (const char* fmt, ...), 0x00424860);
     117
     118// Probably to spawn a new character
    113119DefFunc(int16_t, ONrGameState_NewCharacter, ONICALL, (void* CHAR, void* AISA, void* flag, uint32_t* list_location), 0x004dac50);
     120
     121// Remove character
     122DefFunc(void, ONrGameState_DeleteCharacter, ONICALL, (Character *inCharacter), 0x004DC480);
     123
     124DefFunc(void, ONrGameState_Timer_Start, ONICALL, (char* function, int time), 0x004FD370);
     125
     126// Get active (player?) character
    114127DefFunc(ActiveCharacter*, ONrGetActiveCharacter, ONICALL, (void* CharacterPtr), 0x004f1180);
     128
     129DefFunc(uint32_t, ONrCharacter_GetHealthShade, ONICALL, (uint32_t health, uint32_t maxhealth), 0x004EF450);
    115130DefFunc(void, ONrCharacter_NewAnimationHook, ONICALL, (Character *ioCharacter, ActiveCharacter *ioActiveCharacter), 0x004E97A0);
    116131DefFunc(void, ONrCharacter_SetAnimationExternal, ONICALL, (Character *ioCharacter, short state, void* animation, int interpolation), 0x004EB340);
    117 
     132DefFunc(void, ONrCharacter_SetHitPoints, ONICALL, (Character *ioCharacter, uint32_t inHitPoints), 0x004EB220);
     133DefFunc(void, ONrCharacter_SetCharacterClass, ONICALL, (Character* Char, ONCC* Class), 0x004D7C30);
     134DefFunc(void, ONrCorpse_Create, ONICALL, (Character* Character), 0x004EF340);
     135
     136
     137// Print message to console
    118138DefFunc(void, COrTextArea_Print, ONICALL, (uint32_t area, uint32_t priority, uint32_t textshade, uint32_t textshadowshade, const char* text, uint32_t unk_alwaws_0, uint32_t fadetime), 0x00431340);
     139
     140// Original cheat function
    119141DefFunc(uint8_t, ONrCheater, ONICALL, (uint32_t cheat), 0x004f5c30);
     142
     143// ?
    120144DefFunc(int, AUrMessageBox, __cdecl, (int Buttons, char *Message, ...), 0x004378c0);
    121145DefFunc(char*, SSrMessage_Find, ONICALL, (char* message_key), 0x0047F550);
    122146DefFunc(void, ONiGameState_FindAutoPromptMessage, ONICALL, (char* Note, void* ptr), 0x004FDBE0);
    123147
     148// Register a BSL function with a return type
    124149DefFunc(uint16_t, SLrScript_Command_Register_ReturnType, ONICALL, (char* name, char* desc, char* argfmt, sl_type type, sl_func callback), 0x00477b20);
     150
     151// Register a BSL function without a return value
    125152DefFunc(uint16_t, SLrScript_Command_Register_Void, ONICALL, (char* name, char* desc, char* argfmt, sl_func callback), 0x00477b40);
     153
     154// Register a global BSL variable
    126155DefFunc(uint16_t, SLrGlobalVariable_Register_Int32, ONICALL, (char* name, char* desc, int32_t* data), 0x00477e30);
    127156DefFunc(uint16_t, SLrGlobalVariable_Register_Float, ONICALL, (char* name, char* desc, float* data), 0x00477ec0);
    128157DefFunc(uint16_t, SLrGlobalVariable_Register_String, ONICALL, (char* name, char* desc, char* data), 0x00477fe0);
    129158
     159// Print message to console ?
    130160DefFunc(int, COrMessage_Print, ONICALL, (char* Message, char* Key, void* noidea), 0x004304B0);
     161
    131162DefFunc(void, COrConsole_StatusLine_Display, ONICALL, (), 0x00431E70);
     163
     164// Get pointer to specified data instance
    132165DefFunc(int16_t, TMrInstance_GetDataPtr, ONICALL, (int tag, char* name, void* pointer), 0x004232E0);
     166
     167// Get name of data instance pointed to
    133168DefFunc(char*, TMrInstance_GetInstanceName, ONICALL, (void* InstancePointer), 0x00423D90);
    134169
     170DefFunc(short, TMrInstance_GetDataPtr_ByNumber, ONICALL, (int tag, int number, void** out), 0x00423680);
     171DefFunc(uint32_t, TMrInstance_GetTagCount, ONICALL, (int tag), 0x004236F0);
     172
     173// Draw text on the screen
    135174DefFunc(int16_t, TSrContext_DrawText, ONICALL, (uint32_t TSrContext, char* Text, char alpha, uint32_t usuallyzero, void* pRect), 0x0042DF00);
    136175DefFunc(int16_t, TSrContext_New, ONICALL, (void* FontInstance, int size, int hthsik1,int hthsik2,int hthsik3, void* TSrContext), 0x0042EA30);
    137176
    138177DefFunc(int16_t, TSrContext_SetShade, ONICALL, (void *ioTextContext, uint32_t inShade), 0x0042EE50);
    139 DefFunc(void, ONrGameState_Timer_Start, ONICALL, (char* function, int time), 0x004FD370);
     178
    140179DefFunc(uint16_t, TRrAnimation_GetDuration, ONICALL, (void* Animation), 0x00428740);
    141180DefFunc(uint16_t, TRrAnimation_GetTo, ONICALL, (void* Animation), 0x00428730);
    142181DefFunc(uint16_t, TRrAnimation_GetFrom, ONICALL, (void* Animation), 0x00428720);
    143 
    144 DefFunc(void, ONrCharacter_SetHitPoints, ONICALL, (Character *ioCharacter, uint32_t inHitPoints), 0x004EB220);
    145 DefFunc(void, ONrCorpse_Create, ONICALL, (Character* Character), 0x004EF340);
    146182
    147183DefFunc(uint16_t, iSetCharacterClass, ONICALL, (sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret), 0x004D99D0);
     
    150186//NOT USED: DefFunc(int, OBJiObjectGroup_GetNumObjects, ONICALL, (void *inObjectGroup), );
    151187
    152 DefFunc(void, ONrGameState_DeleteCharacter, ONICALL, (Character *inCharacter), 0x004DC480);
    153 
    154188DefFunc(int, OBJrObjectType_EnumerateObjects, ONICALL, (int inObjectType, OBJtEnumCallback_Object inEnumCallback, int inUserData), 0x004D0080);
    155189
     
    160194
    161195
    162 DefFunc(void, ONrCharacter_SetCharacterClass, ONICALL, (Character* Char, ONCC* Class), 0x004D7C30);
    163 DefFunc(short, TMrInstance_GetDataPtr_ByNumber, ONICALL, (int tag, int number, void** out), 0x00423680);
    164 DefFunc(uint32_t, TMrInstance_GetTagCount, ONICALL, (int tag), 0x004236F0);
    165 DefFunc(uint32_t, ONrCharacter_GetHealthShade, ONICALL, (uint32_t health, uint32_t maxhealth), 0x004EF450);
    166196DefFunc(void, ONiDrawWeaponSight, ONICALL, (Character* Char), 0x004E1900);
    167197DefFunc(void, AI2rDisplayDebuggingInfo, ONICALL, (Character* Char), 0x0048C5F0);
Note: See TracChangeset for help on using the changeset viewer.