diff options
author | neonloop | 2021-10-20 14:54:27 +0000 |
---|---|---|
committer | neonloop | 2021-10-20 14:54:27 +0000 |
commit | ea1947ffcc606d757357398b24e74a3f4ecefa07 (patch) | |
tree | 2031b8d4fc4c61063c710a7148378f57e662efbd /core/include | |
download | bennugd-main.tar.gz bennugd-main.tar.bz2 bennugd-main.zip |
Initial commit from steward-fu releasemain
Diffstat (limited to 'core/include')
-rw-r--r-- | core/include/arrange.h | 86 | ||||
-rw-r--r-- | core/include/b_crypt.h | 73 | ||||
-rw-r--r-- | core/include/bgdcore.h | 37 | ||||
-rw-r--r-- | core/include/bgddl.h | 95 | ||||
-rw-r--r-- | core/include/commons_defs.h | 62 | ||||
-rw-r--r-- | core/include/dcb.h | 285 | ||||
-rw-r--r-- | core/include/dirs.h | 115 | ||||
-rw-r--r-- | core/include/dlvaracc.h | 98 | ||||
-rw-r--r-- | core/include/fake_dl.h | 2171 | ||||
-rw-r--r-- | core/include/files.h | 104 | ||||
-rw-r--r-- | core/include/files_st.h | 94 | ||||
-rw-r--r-- | core/include/fmath.h | 62 | ||||
-rw-r--r-- | core/include/i_procdef.h | 47 | ||||
-rw-r--r-- | core/include/i_procdef_st.h | 87 | ||||
-rw-r--r-- | core/include/instance.h | 73 | ||||
-rw-r--r-- | core/include/instance_st.h | 158 | ||||
-rw-r--r-- | core/include/loadlib.h | 336 | ||||
-rw-r--r-- | core/include/offsets.h | 51 | ||||
-rw-r--r-- | core/include/pslang.h | 241 | ||||
-rw-r--r-- | core/include/sysprocs.h | 63 | ||||
-rw-r--r-- | core/include/sysprocs_st.h | 51 | ||||
-rw-r--r-- | core/include/typedef.h | 51 | ||||
-rw-r--r-- | core/include/typedef_st.h | 83 | ||||
-rw-r--r-- | core/include/varspace_file.h | 42 | ||||
-rw-r--r-- | core/include/xctype.h | 45 | ||||
-rw-r--r-- | core/include/xctype_st.h | 48 | ||||
-rw-r--r-- | core/include/xstrings.h | 70 |
27 files changed, 4728 insertions, 0 deletions
diff --git a/core/include/arrange.h b/core/include/arrange.h new file mode 100644 index 0000000..d3eac98 --- /dev/null +++ b/core/include/arrange.h @@ -0,0 +1,86 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __ARRANGE_ST_H + #define __ARRANGE_ST_H + + #include <stdint.h> + + #define __LIL_ENDIAN 1234 + #define __BIG_ENDIAN 4321 + + #if defined(__hppa__) || \ + defined(__m68k__) || \ + defined(mc68000) || \ + defined(_M_M68K) || \ + (defined(__MIPS__) && defined(__MISPEB__)) || \ + defined(__ppc__) || \ + defined(__POWERPC__) || \ + defined(_M_PPC) || \ + defined(__sparc__) + #define __BYTEORDER __BIG_ENDIAN + #else + #define __BYTEORDER __LIL_ENDIAN + #endif + + /* ---------------------------------------------------------------------- */ + /* Trucos de portabilidad */ + /* ---------------------------------------------------------------------- */ + + #if __BYTEORDER == __LIL_ENDIAN + #define ARRANGE_DWORD(x) + #define ARRANGE_WORD(x) + + #define ARRANGE_DWORDS(x,c) + #define ARRANGE_WORDS(x,c) + #else + static __inline__ void DO_Swap16(uint16_t * D) { + *D = ((*D<<8)|(*D>>8)); + } + + static __inline__ void DO_Swap32(uint32_t * D) { + *D = ((*D<<24)|((*D<<8)&0x00FF0000)|((*D>>8)&0x0000FF00)|(*D>>24)); + } + + #define ARRANGE_DWORD(x) DO_Swap32(x) + #define ARRANGE_WORD(x) DO_Swap16(x) + + #define ARRANGE_DWORDS(x,c) { \ + int __n; \ + uint32_t * __p = (uint32_t *)(x); \ + for (__n = 0 ; __n < (int)(c) ; __n++) \ + ARRANGE_DWORD(&__p[__n]); \ + } + #define ARRANGE_WORDS(x,c) { \ + int __n; \ + uint16_t * __p = (uint16_t *)(x); \ + for (__n = 0 ; __n < (int)(c) ; __n++) \ + ARRANGE_WORD(&__p[__n]); \ + } + #endif +#endif diff --git a/core/include/b_crypt.h b/core/include/b_crypt.h new file mode 100644 index 0000000..3fa69b1 --- /dev/null +++ b/core/include/b_crypt.h @@ -0,0 +1,73 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __B_CRYPT_H +#define __B_CRYPT_H + +/* ------------------------------------------------------------------------- */ + +#ifdef USE_LIBDES +#include <des.h> +#define DES_key_schedule des_key_schedule +#define DES_key_sched key_sched +#define DES_ecb_encrypt des_ecb_encrypt +#define DES_cblock des_cblock +#else +#include <openssl/des.h> +#endif + +/* ------------------------------------------------------------------------- */ + +enum { + CRYPT_NONE = 0, + CRYPT_DES, + CRYPT_3DES +}; + +enum { + KEY0 = 0, + KEY1, + KEY2, + MAX_KEYS +}; + +/* ------------------------------------------------------------------------- */ + +typedef struct +{ + int method; + DES_key_schedule ks[MAX_KEYS]; +} crypt_handle; + +/* ------------------------------------------------------------------------- */ + +extern crypt_handle * crypt_create( int method, char * key ); +extern void crypt_destroy( crypt_handle * ch ); +extern int crypt_data( crypt_handle * ch, char * in, char * out, int size, int enc ); + +/* ------------------------------------------------------------------------- */ + +#endif diff --git a/core/include/bgdcore.h b/core/include/bgdcore.h new file mode 100644 index 0000000..d10c3fb --- /dev/null +++ b/core/include/bgdcore.h @@ -0,0 +1,37 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __BGDCORE_H +#define __BGDCORE_H + +#ifndef MIN +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#endif +#ifndef MAX +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) +#endif + +#endif diff --git a/core/include/bgddl.h b/core/include/bgddl.h new file mode 100644 index 0000000..a87cdc5 --- /dev/null +++ b/core/include/bgddl.h @@ -0,0 +1,95 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __BGDDL_H +#define __BGDDL_H + +/* --------------------------------------------------------------------------- */ + +#ifndef __BGDC__ + #if defined(WIN32) && !defined( __STATIC__ ) + #define DLLEXPORT __declspec(dllexport) + #define DLLIMPORT __declspec(dllimport) + #else + #define DLLEXPORT + #define DLLIMPORT + #endif +#endif + +/* --------------------------------------------------------------------------- */ + +#ifdef __BGDC__ +#define FUNC(a,b,c,d) { a, b, c, NULL } +#else +#define FUNC(a,b,c,d) { a, b, c, d } +#endif + +/* --------------------------------------------------------------------------- */ + +#define __bgdexport(m,a) m##_##a + +/* --------------------------------------------------------------------------- */ + +/* + * ENDIANESS TRICKS + */ + +#include "arrange.h" + +#include <typedef_st.h> +#include <instance_st.h> +#include <sysprocs_st.h> + +#include <commons_defs.h> + +/* --------------------------------------------------------------------------- */ + +typedef struct +{ + char * var; + void * data_offset; + int size; + int elements; +} DLVARFIXUP; + +typedef struct +{ + char * name; + char * paramtypes; + int type; + void * func; +} DLSYSFUNCS; + +typedef struct +{ + char * name; + BASETYPE type; + int code; +} DLCONSTANT; + +/* --------------------------------------------------------------------------- */ + +#endif diff --git a/core/include/commons_defs.h b/core/include/commons_defs.h new file mode 100644 index 0000000..0685ab8 --- /dev/null +++ b/core/include/commons_defs.h @@ -0,0 +1,62 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +/* --------------------------------------------------------------------------- */ + +#ifndef __COMMONS_DEFS_H +#define __COMMONS_DEFS_H + +/* Instances Status, used in local STATUS var */ + +#define STATUS_DEAD 0 +#define STATUS_KILLED 1 +#define STATUS_RUNNING 2 +#define STATUS_SLEEPING 3 +#define STATUS_FROZEN 4 +#define STATUS_WAITING_MASK 0x8000 + +/* New OS_* must be updated in bgdc/src/main_core.c and bgdrtm/src/misc.c */ + +#define OS_WIN32 0 +#define OS_LINUX 1 +#define OS_BEOS 2 +#define OS_MACOS 3 +#define OS_GP32 4 +#define OS_DC 5 +#define OS_BSD 6 +#define OS_GP2X 7 +#define OS_GP2X_WIZ 8 +#define OS_CAANOO 9 +#define OS_DINGUX_A320 10 +#define OS_WII 1000 +#define OS_IOS 1002 +#define OS_ANDROID 1003 + +#endif + +/* --------------------------------------------------------------------------- */ diff --git a/core/include/dcb.h b/core/include/dcb.h new file mode 100644 index 0000000..bf0b858 --- /dev/null +++ b/core/include/dcb.h @@ -0,0 +1,285 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +/* + * FILE : dcb.h + * DESCRIPTION : Data compiled block information + * + */ + +#ifndef __DCB_H +#define __DCB_H + +#include <stdint.h> + +#include "typedef.h" + +#define DCB_DEBUG 1 + +#ifdef _MSC_VER +#pragma pack(push, 1) +#endif + +/* Opción del GNU C para que la estructura ocupe el mínimo de memoria */ + +#ifdef __GNUC__ +#define __PACKED __attribute__ ((packed)) +#else +#define __PACKED +#endif + +/* Estructura del fichero .dcb */ + +/* Please update the version's high-number between versions */ +#define DCB_VERSION 0x0710 + +#define DCL_MAGIC "dcl\x0d\x0a\x1f\x00\x00" +#define DCB_MAGIC "dcb\x0d\x0a\x1f\x00\x00" + +#define DCB_STUB_MAGIC "DCB Stub\x1a\x0d\x0a" + +typedef struct +{ + uint8_t Name[60] ; + uint32_t Code ; +} +__PACKED +DCB_ID ; + +#define DCB_FILE_COMPRESSED 1 + +typedef struct +{ + union { + uint8_t * Name ; + uint32_t SName ; + }; + uint8_t Flags ; + uint32_t SFile ; + uint32_t OFile ; +} +__PACKED +DCB_FILE ; + +typedef struct +{ + uint32_t NFile ; + uint32_t NLine ; + uint32_t NCol ; + uint32_t OCode ; +} +__PACKED +DCB_SENTENCE ; + +#define NO_MEMBERS 0xFFFFFFFF + +typedef struct +{ + uint8_t BaseType [MAX_TYPECHUNKS] ; + uint32_t Count [MAX_TYPECHUNKS] ; + uint32_t Members ; +} +__PACKED +DCB_TYPEDEF ; + +typedef struct +{ + DCB_TYPEDEF Type ; /* 40 bytes */ + uint32_t ID ; + uint32_t Offset ; + uint32_t Varspace ; +} +__PACKED +DCB_VAR ; + +typedef struct +{ + uint32_t NVars ; + uint32_t OVars ; +} +__PACKED +DCB_VARSPACE ; + +typedef struct +{ + uint32_t Id ; /* Identifier of Name, Segment Key 1 */ + BASETYPE Type ; /* Segment Key 2 */ + uint32_t Params ; /* Segment Key 3 */ + uint32_t Code ; +} +__PACKED +DCB_SYSPROC_CODE ; + +/* Internal Use, see also DCB_SYSPROC_CODE */ +typedef struct +{ + uint32_t Id ; + BASETYPE Type ; + uint32_t Params ; + uint32_t Code ; + uint8_t * ParamTypes; +} +__PACKED +DCB_SYSPROC_CODE2 ; + +typedef struct /* Cabecera de cada proceso */ +{ + uint32_t ID ; + + uint32_t Flags ; + + uint32_t NParams ; + uint32_t NPriVars ; + uint32_t NPriStrings ; + uint32_t NPubVars ; + uint32_t NPubStrings ; + uint32_t NSentences ; + + uint32_t SPrivate ; + uint32_t SPublic ; + uint32_t SCode ; + + uint32_t OPrivate ; + uint32_t OPriVars ; + uint32_t OPriStrings ; + + uint32_t OPublic ; + uint32_t OPubVars ; + uint32_t OPubStrings ; + + uint32_t OCode ; + uint32_t OSentences ; + + uint32_t OExitCode ; + uint32_t OErrorCode ; +} +__PACKED +DCB_PROC_DATA ; + +typedef struct /* Cabecera de cada proceso */ +{ + DCB_PROC_DATA data; /* Estructura que se carga desde el fichero */ + + DCB_SENTENCE * sentence ; + + DCB_VAR * privar ; + DCB_VAR * pubvar ; +} +__PACKED +DCB_PROC ; + +/* +typedef struct +{ + uint32_t ProcId ; + uint32_t Identifier ; + uint32_t Code ; +} +__PACKED +DCB_LABEL ; +*/ + +typedef struct /* Cabecera general del fichero */ +{ + uint8_t Header[8] ; /* "DCB" */ + uint32_t Version ; /* 0x0100 para versión 1.0 */ + + uint32_t NProcs ; + uint32_t NFiles ; + uint32_t NID ; + uint32_t NStrings ; + uint32_t NLocStrings ; + uint32_t NLocVars ; + uint32_t NGloVars ; + uint32_t NVarSpaces ; + + uint32_t SGlobal ; + uint32_t SLocal ; + uint32_t SText ; + + uint32_t NImports ; + uint32_t NSourceFiles ; + uint32_t NSysProcsCodes ; /* Para el fixup de los SYSPROCS */ + uint32_t __reserved1[2] ; + + uint32_t OProcsTab ; + uint32_t OID ; + uint32_t OStrings ; + uint32_t OText ; + uint32_t OGlobal ; + uint32_t OGloVars ; + uint32_t OLocal ; + uint32_t OLocVars ; + uint32_t OLocStrings ; + uint32_t OVarSpaces ; + uint32_t OFilesTab ; + uint32_t OImports ; + uint32_t OSourceFiles ; + uint32_t OSysProcsCodes ; /* Para el fixup de los SYSPROCS */ + uint32_t __reserved2[2] ; +} +__PACKED +DCB_HEADER_DATA ; + +typedef struct /* Cabecera general del fichero */ +{ + DCB_HEADER_DATA data; /* Estructura que se carga desde el fichero */ + + DCB_ID * id ; + DCB_VAR * glovar ; + DCB_VAR * locvar ; + DCB_PROC * proc ; + DCB_FILE * file ; + DCB_VARSPACE * varspace ; + DCB_VAR ** varspace_vars ; + uint32_t * imports ; + uint8_t *** sourcelines ; + uint32_t * sourcecount ; + uint8_t ** sourcefiles ; +} +__PACKED +DCB_HEADER ; + +typedef struct +{ + char magic[12]; + int dcb_offset; +} +__PACKED +dcb_signature; + +#ifdef _MSC_VER +#pragma pack(pop) +#endif + +extern DCB_HEADER dcb ; + +extern void sysprocs_fixup( void ); +extern int getid( char * name ); + +#endif diff --git a/core/include/dirs.h b/core/include/dirs.h new file mode 100644 index 0000000..2e84c87 --- /dev/null +++ b/core/include/dirs.h @@ -0,0 +1,115 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +/* + * FILE : dirs.h + * DESCRIPTION : Base include for directory functions + * + * HISTORY: + * + */ + +#ifndef __DIRS_H +#define __DIRS_H + +#ifdef WIN32 +#include <windows.h> +#include <winbase.h> +#include <windef.h> +#include <direct.h> +#else +#ifdef TARGET_ANDROID +#include <diet-glob.h> +#include <sys/stat.h> +#include <unistd.h> +#else +#include <glob.h> +#include <sys/stat.h> +#include <unistd.h> +#endif +#endif + +#include <errno.h> +#include <time.h> + +#include "files_st.h" + +/* ------------------------------------------------------------------------------------ */ + +enum +{ + DIR_FI_ATTR_NORMAL = 0x00000000, + DIR_FI_ATTR_DIRECTORY = 0x00000001, + DIR_FI_ATTR_HIDDEN = 0x00000002, + DIR_FI_ATTR_READONLY = 0x00000004 +}; + +/* ------------------------------------------------------------------------------------ */ + +typedef struct __DIR_FILEINFO_ST +{ + char fullpath[__MAX_PATH]; + char filename[__MAX_PATH]; + long attributes; + long size; + struct tm crtime; /* creation time (unix not available) */ + struct tm mtime; /* last modification time */ + struct tm atime; /* last access time */ + struct tm ctime; /* last status change time (windows not available) */ +} __DIR_FILEINFO_ST; + +typedef struct __DIR_ST +{ + char * path; +#ifdef _WIN32 + WIN32_FIND_DATA data; + HANDLE handle; + int eod; +#else + glob_t globd; + int currFile; + char *pattern; +#endif + __DIR_FILEINFO_ST info; +} __DIR_ST; + +/* ------------------------------------------------------------------------------------ */ + +extern char * dir_path_convert(const char *path) ; + +extern char * dir_current(void) ; +extern int dir_change(const char *dir) ; +extern int dir_create(const char *dir) ; +extern int dir_delete(const char *dir) ; +extern int dir_deletefile(const char *filename) ; + +extern __DIR_ST * dir_open( const char * path ); +extern void dir_close ( __DIR_ST * hDir ); +extern __DIR_FILEINFO_ST * dir_read( __DIR_ST * hDir ); + +#endif diff --git a/core/include/dlvaracc.h b/core/include/dlvaracc.h new file mode 100644 index 0000000..983ce24 --- /dev/null +++ b/core/include/dlvaracc.h @@ -0,0 +1,98 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +/* --------------------------------------------------------------------------- */ + +#ifndef _DLVARACC_H +#define _DLVARACC_H + +/* --------------------------------------------------------------------------- */ + +#include <stdint.h> + +/* --------------------------------------------------------------------------- */ + +#undef LOCDWORD +#undef LOCWORD +#undef LOCBYTE + +#undef LOCINT32 +#undef LOCINT16 +#undef LOCINT8 + +#undef LOCUINT32 +#undef LOCUINT16 +#undef LOCUINT8 + + +#undef GLODWORD +#undef GLOWORD +#undef GLOBYTE + +#undef GLOINT32 +#undef GLOINT16 +#undef GLOINT8 + +#undef GLOUINT32 +#undef GLOUINT16 +#undef GLOUINT8 + +/* --------------------------------------------------------------------------- */ +/* Macros para acceder a datos locales de una instancia */ + +#define LOCEXISTS(m,a) (m##_locals_fixup[a].size != -1) +#define GLOEXISTS(m,a) (m##_globals_fixup[a].data_offset) + +#define LOCADDR(m,a,b) ((uint8_t *)((a)->locdata) + (uint32_t)m##_locals_fixup[b].data_offset) +#define GLOADDR(m,a) (m##_globals_fixup[a].data_offset) + +#define LOCDWORD(m,a,b) (*(uint32_t *)LOCADDR(m,a,b)) +#define LOCWORD(m,a,b) (*(uint16_t *)LOCADDR(m,a,b)) +#define LOCBYTE(m,a,b) (*(uint8_t *)LOCADDR(m,a,b)) + +#define LOCINT32(m,a,b) (*(int32_t *)LOCADDR(m,a,b)) +#define LOCINT16(m,a,b) (*(int16_t *)LOCADDR(m,a,b)) +#define LOCINT8(m,a,b) (*(int8_t *)LOCADDR(m,a,b)) + +#define LOCUINT32(m,a,b) (*(uint32_t *)LOCADDR(m,a,b)) +#define LOCUINT16(m,a,b) (*(uint16_t *)LOCADDR(m,a,b)) +#define LOCUINT8(m,a,b) (*(uint8_t *)LOCADDR(m,a,b)) + + +#define GLODWORD(m,a) (*(uint32_t *)GLOADDR(m,a)) +#define GLOWORD(m,a) (*(uint16_t *)GLOADDR(m,a)) +#define GLOBYTE(m,a) (*(uint8_t *)GLOADDR(m,a)) + +#define GLOINT32(m,a) (*(int32_t *)GLOADDR(m,a)) +#define GLOINT16(m,a) (*(int16_t *)GLOADDR(m,a)) +#define GLOINT8(m,a) (*(int8_t *)GLOADDR(m,a)) + +#define GLOUINT32(m,b) (*(uint32_t *)GLOADDR(m,b)) +#define GLOUINT16(m,b) (*(uint16_t *)GLOADDR(m,b)) +#define GLOUINT8(m,b) (*(uint8_t *)GLOADDR(m,b)) + +/* --------------------------------------------------------------------------- */ +#endif diff --git a/core/include/fake_dl.h b/core/include/fake_dl.h new file mode 100644 index 0000000..8db37dd --- /dev/null +++ b/core/include/fake_dl.h @@ -0,0 +1,2171 @@ +/* + * + * include/fake_dl.h generated by bgd-monolith.sh + * + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __FAKE_DL_H +#define __FAKE_DL_H + +#include <bgddl.h> + +#ifdef __BGDC__ +#include "libgrbase_exports.h" +#include "libvideo_exports.h" +#include "libblit_exports.h" +#include "librender_exports.h" +#include "libfont_exports.h" +#include "libtext_exports.h" +#include "libwm_exports.h" +#include "libkey_exports.h" +#include "libmouse_exports.h" +#include "libjoy_exports.h" +#include "libscroll_exports.h" +#include "mod_scroll_exports.h" +#include "mod_mouse_exports.h" +#include "mod_map_exports.h" +#include "mod_video_exports.h" +#include "mod_screen_exports.h" +#include "mod_blendop_exports.h" +#include "mod_text_exports.h" +#include "mod_draw_exports.h" +#include "mod_grproc_exports.h" +#include "mod_effects_exports.h" +#include "mod_key_exports.h" +#include "mod_cd_exports.h" +#include "mod_dir_exports.h" +#include "mod_file_exports.h" +#include "mod_crypt_exports.h" +#include "mod_joy_exports.h" +#include "mod_math_exports.h" +#include "mod_mem_exports.h" +#include "mod_proc_exports.h" +#include "mod_rand_exports.h" +#include "mod_regex_exports.h" +#include "mod_say_exports.h" +#include "mod_sort_exports.h" +#include "mod_sound_exports.h" +#include "mod_string_exports.h" +#include "mod_sys_exports.h" +#include "mod_time_exports.h" +#include "mod_timers_exports.h" +#include "mod_path_exports.h" +#include "mod_wm_exports.h" +#include "mod_debug_exports.h" +#include "mod_flic_exports.h" +#include "mod_m7_exports.h" +#endif + +#ifndef __BGDC__ +/* ---------- globals_fixup ---------- */ + +extern DLVARFIXUP libgrbase_globals_fixup[]; +extern DLVARFIXUP libvideo_globals_fixup[]; +extern DLVARFIXUP librender_globals_fixup[]; +extern DLVARFIXUP libtext_globals_fixup[]; +extern DLVARFIXUP libwm_globals_fixup[]; +extern DLVARFIXUP libkey_globals_fixup[]; +extern DLVARFIXUP libmouse_globals_fixup[]; +extern DLVARFIXUP libscroll_globals_fixup[]; +extern DLVARFIXUP mod_video_globals_fixup[]; +extern DLVARFIXUP mod_screen_globals_fixup[]; +extern DLVARFIXUP mod_grproc_globals_fixup[]; +extern DLVARFIXUP mod_cd_globals_fixup[]; +extern DLVARFIXUP mod_dir_globals_fixup[]; +extern DLVARFIXUP mod_regex_globals_fixup[]; +extern DLVARFIXUP mod_sound_globals_fixup[]; +extern DLVARFIXUP mod_timers_globals_fixup[]; +extern DLVARFIXUP mod_debug_globals_fixup[]; +extern DLVARFIXUP mod_m7_globals_fixup[]; + +/* ---------- locals_fixup ---------- */ + +extern DLVARFIXUP librender_locals_fixup[]; +extern DLVARFIXUP libscroll_locals_fixup[]; +extern DLVARFIXUP mod_screen_locals_fixup[]; +extern DLVARFIXUP mod_grproc_locals_fixup[]; +extern DLVARFIXUP mod_proc_locals_fixup[]; +extern DLVARFIXUP mod_debug_locals_fixup[]; +extern DLVARFIXUP mod_m7_locals_fixup[]; + +/* ---------- functions_exports ---------- */ + +extern DLSYSFUNCS mod_scroll_functions_exports[]; +extern DLSYSFUNCS mod_map_functions_exports[]; +extern DLSYSFUNCS mod_video_functions_exports[]; +extern DLSYSFUNCS mod_screen_functions_exports[]; +extern DLSYSFUNCS mod_blendop_functions_exports[]; +extern DLSYSFUNCS mod_text_functions_exports[]; +extern DLSYSFUNCS mod_draw_functions_exports[]; +extern DLSYSFUNCS mod_grproc_functions_exports[]; +extern DLSYSFUNCS mod_effects_functions_exports[]; +extern DLSYSFUNCS mod_key_functions_exports[]; +extern DLSYSFUNCS mod_cd_functions_exports[]; +extern DLSYSFUNCS mod_dir_functions_exports[]; +extern DLSYSFUNCS mod_file_functions_exports[]; +extern DLSYSFUNCS mod_crypt_functions_exports[]; +extern DLSYSFUNCS mod_joy_functions_exports[]; +extern DLSYSFUNCS mod_math_functions_exports[]; +extern DLSYSFUNCS mod_mem_functions_exports[]; +extern DLSYSFUNCS mod_proc_functions_exports[]; +extern DLSYSFUNCS mod_rand_functions_exports[]; +extern DLSYSFUNCS mod_regex_functions_exports[]; +extern DLSYSFUNCS mod_say_functions_exports[]; +extern DLSYSFUNCS mod_sort_functions_exports[]; +extern DLSYSFUNCS mod_sound_functions_exports[]; +extern DLSYSFUNCS mod_string_functions_exports[]; +extern DLSYSFUNCS mod_sys_functions_exports[]; +extern DLSYSFUNCS mod_time_functions_exports[]; +extern DLSYSFUNCS mod_path_functions_exports[]; +extern DLSYSFUNCS mod_wm_functions_exports[]; +extern DLSYSFUNCS mod_flic_functions_exports[]; +extern DLSYSFUNCS mod_m7_functions_exports[]; + +/* ---------- module_initialize ---------- */ + +extern void libgrbase_module_initialize(); +extern void libvideo_module_initialize(); +extern void librender_module_initialize(); +extern void libfont_module_initialize(); +extern void libsdlhandler_module_initialize(); +extern void libkey_module_initialize(); +extern void libmouse_module_initialize(); +extern void libjoy_module_initialize(); +extern void mod_grproc_module_initialize(); +extern void mod_cd_module_initialize(); +extern void mod_sound_module_initialize(); +extern void mod_time_module_initialize(); +extern void mod_debug_module_initialize(); +extern void mod_m7_module_initialize(); + +/* ---------- module_finalize ---------- */ + +extern void libvideo_module_finalize(); +extern void librender_module_finalize(); +extern void libsdlhandler_module_finalize(); +extern void libkey_module_finalize(); +extern void libjoy_module_finalize(); +extern void mod_cd_module_finalize(); +extern void mod_sound_module_finalize(); +extern void mod_time_module_finalize(); +extern void mod_debug_module_finalize(); + +/* ---------- instance_create_hook ---------- */ + +extern void librender_instance_create_hook( INSTANCE * ); + +/* ---------- instance_destroy_hook ---------- */ + +extern void librender_instance_destroy_hook( INSTANCE * ); + +/* ---------- instance_pre_execute_hook ---------- */ + + +/* ---------- instance_pos_execute_hook ---------- */ + + +/* ---------- process_exec_hook ---------- */ + +extern void mod_grproc_process_exec_hook( INSTANCE * ); +extern void mod_proc_process_exec_hook( INSTANCE * ); +extern void mod_debug_process_exec_hook( INSTANCE * ); + +/* ---------- handler_hooks ---------- */ + +extern HOOK librender_handler_hooks[]; +extern HOOK libsdlhandler_handler_hooks[]; +extern HOOK libwm_handler_hooks[]; +extern HOOK libkey_handler_hooks[]; +extern HOOK libmouse_handler_hooks[]; +extern HOOK mod_timers_handler_hooks[]; + +/* ---------- modules_dependency ---------- */ + +extern char * libvideo_modules_dependency[]; +extern char * librender_modules_dependency[]; +extern char * libfont_modules_dependency[]; +extern char * libtext_modules_dependency[]; +extern char * libwm_modules_dependency[]; +extern char * libkey_modules_dependency[]; +extern char * libmouse_modules_dependency[]; +extern char * libjoy_modules_dependency[]; +extern char * libscroll_modules_dependency[]; +extern char * mod_scroll_modules_dependency[]; +extern char * mod_mouse_modules_dependency[]; +extern char * mod_map_modules_dependency[]; +extern char * mod_video_modules_dependency[]; +extern char * mod_screen_modules_dependency[]; +extern char * mod_blendop_modules_dependency[]; +extern char * mod_text_modules_dependency[]; +extern char * mod_draw_modules_dependency[]; +extern char * mod_grproc_modules_dependency[]; +extern char * mod_effects_modules_dependency[]; +extern char * mod_key_modules_dependency[]; +extern char * mod_joy_modules_dependency[]; +extern char * mod_path_modules_dependency[]; +extern char * mod_wm_modules_dependency[]; +extern char * mod_debug_modules_dependency[]; +extern char * mod_m7_modules_dependency[]; + +#endif + +/* ---------- structs ---------- */ + +typedef struct __FAKE_DL +{ + char * dlname; + DLCONSTANT * constants_def; + char ** types_def; + char ** globals_def; + char ** locals_def; + DLVARFIXUP * globals_fixup; + DLVARFIXUP * locals_fixup; + DLSYSFUNCS * functions_exports; + void (* module_initialize)(); + void (* module_finalize)(); + void (* instance_create_hook)(INSTANCE *); + void (* instance_destroy_hook)(INSTANCE *); + void (* instance_pre_execute_hook)(INSTANCE *); + void (* instance_pos_execute_hook)(INSTANCE *); + void (* process_exec_hook)(INSTANCE *); + HOOK * handler_hooks; + char ** modules_dependency; +} __FAKE_DL; + +/* ---------- FAKE DYNAMIC LIBRARY ---------- */ + +__FAKE_DL __fake_dl[48]; + +/* ------------------------------------------ */ + +void fake_dl_init() +{ + + /* -------------------- libgrbase -------------------- */ + + __fake_dl[0].dlname = "libgrbase"; +#ifdef __BGDC__ + __fake_dl[0].constants_def = NULL; + __fake_dl[0].types_def = NULL; + __fake_dl[0].globals_def = &libgrbase_globals_def; + __fake_dl[0].locals_def = NULL; + __fake_dl[0].globals_fixup = NULL; + __fake_dl[0].locals_fixup = NULL; +#else + __fake_dl[0].constants_def = NULL; + __fake_dl[0].types_def = NULL; + __fake_dl[0].globals_def = NULL; + __fake_dl[0].locals_def = NULL; + __fake_dl[0].globals_fixup = libgrbase_globals_fixup; + __fake_dl[0].locals_fixup = NULL; +#endif + __fake_dl[0].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[0].module_initialize = NULL; + __fake_dl[0].module_finalize = NULL; + __fake_dl[0].instance_create_hook = NULL; + __fake_dl[0].instance_destroy_hook = NULL; + __fake_dl[0].instance_pre_execute_hook = NULL; + __fake_dl[0].instance_pos_execute_hook = NULL; + __fake_dl[0].process_exec_hook = NULL; + __fake_dl[0].handler_hooks = NULL; +#else + __fake_dl[0].module_initialize = libgrbase_module_initialize; + __fake_dl[0].module_finalize = NULL; + __fake_dl[0].instance_create_hook = NULL; + __fake_dl[0].instance_destroy_hook = NULL; + __fake_dl[0].instance_pre_execute_hook = NULL; + __fake_dl[0].instance_pos_execute_hook = NULL; + __fake_dl[0].process_exec_hook = NULL; + __fake_dl[0].handler_hooks = NULL; +#endif + __fake_dl[0].modules_dependency = NULL; + + /* -------------------- libvideo -------------------- */ + + __fake_dl[1].dlname = "libvideo"; +#ifdef __BGDC__ + __fake_dl[1].constants_def = libvideo_constants_def; + __fake_dl[1].types_def = NULL; + __fake_dl[1].globals_def = &libvideo_globals_def; + __fake_dl[1].locals_def = NULL; + __fake_dl[1].globals_fixup = NULL; + __fake_dl[1].locals_fixup = NULL; +#else + __fake_dl[1].constants_def = NULL; + __fake_dl[1].types_def = NULL; + __fake_dl[1].globals_def = NULL; + __fake_dl[1].locals_def = NULL; + __fake_dl[1].globals_fixup = libvideo_globals_fixup; + __fake_dl[1].locals_fixup = NULL; +#endif + __fake_dl[1].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[1].module_initialize = NULL; + __fake_dl[1].module_finalize = NULL; + __fake_dl[1].instance_create_hook = NULL; + __fake_dl[1].instance_destroy_hook = NULL; + __fake_dl[1].instance_pre_execute_hook = NULL; + __fake_dl[1].instance_pos_execute_hook = NULL; + __fake_dl[1].process_exec_hook = NULL; + __fake_dl[1].handler_hooks = NULL; +#else + __fake_dl[1].module_initialize = libvideo_module_initialize; + __fake_dl[1].module_finalize = libvideo_module_finalize; + __fake_dl[1].instance_create_hook = NULL; + __fake_dl[1].instance_destroy_hook = NULL; + __fake_dl[1].instance_pre_execute_hook = NULL; + __fake_dl[1].instance_pos_execute_hook = NULL; + __fake_dl[1].process_exec_hook = NULL; + __fake_dl[1].handler_hooks = NULL; +#endif + __fake_dl[1].modules_dependency = libvideo_modules_dependency; + + /* -------------------- libblit -------------------- */ + + __fake_dl[2].dlname = "libblit"; +#ifdef __BGDC__ + __fake_dl[2].constants_def = libblit_constants_def; + __fake_dl[2].types_def = NULL; + __fake_dl[2].globals_def = NULL; + __fake_dl[2].locals_def = NULL; + __fake_dl[2].globals_fixup = NULL; + __fake_dl[2].locals_fixup = NULL; +#else + __fake_dl[2].constants_def = NULL; + __fake_dl[2].types_def = NULL; + __fake_dl[2].globals_def = NULL; + __fake_dl[2].locals_def = NULL; + __fake_dl[2].globals_fixup = NULL; + __fake_dl[2].locals_fixup = NULL; +#endif + __fake_dl[2].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[2].module_initialize = NULL; + __fake_dl[2].module_finalize = NULL; + __fake_dl[2].instance_create_hook = NULL; + __fake_dl[2].instance_destroy_hook = NULL; + __fake_dl[2].instance_pre_execute_hook = NULL; + __fake_dl[2].instance_pos_execute_hook = NULL; + __fake_dl[2].process_exec_hook = NULL; + __fake_dl[2].handler_hooks = NULL; +#else + __fake_dl[2].module_initialize = NULL; + __fake_dl[2].module_finalize = NULL; + __fake_dl[2].instance_create_hook = NULL; + __fake_dl[2].instance_destroy_hook = NULL; + __fake_dl[2].instance_pre_execute_hook = NULL; + __fake_dl[2].instance_pos_execute_hook = NULL; + __fake_dl[2].process_exec_hook = NULL; + __fake_dl[2].handler_hooks = NULL; +#endif + __fake_dl[2].modules_dependency = NULL; + + /* -------------------- librender -------------------- */ + + __fake_dl[3].dlname = "librender"; +#ifdef __BGDC__ + __fake_dl[3].constants_def = librender_constants_def; + __fake_dl[3].types_def = NULL; + __fake_dl[3].globals_def = &librender_globals_def; + __fake_dl[3].locals_def = &librender_locals_def; + __fake_dl[3].globals_fixup = NULL; + __fake_dl[3].locals_fixup = NULL; +#else + __fake_dl[3].constants_def = NULL; + __fake_dl[3].types_def = NULL; + __fake_dl[3].globals_def = NULL; + __fake_dl[3].locals_def = NULL; + __fake_dl[3].globals_fixup = librender_globals_fixup; + __fake_dl[3].locals_fixup = librender_locals_fixup; +#endif + __fake_dl[3].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[3].module_initialize = NULL; + __fake_dl[3].module_finalize = NULL; + __fake_dl[3].instance_create_hook = NULL; + __fake_dl[3].instance_destroy_hook = NULL; + __fake_dl[3].instance_pre_execute_hook = NULL; + __fake_dl[3].instance_pos_execute_hook = NULL; + __fake_dl[3].process_exec_hook = NULL; + __fake_dl[3].handler_hooks = NULL; +#else + __fake_dl[3].module_initialize = librender_module_initialize; + __fake_dl[3].module_finalize = librender_module_finalize; + __fake_dl[3].instance_create_hook = librender_instance_create_hook; + __fake_dl[3].instance_destroy_hook = librender_instance_destroy_hook; + __fake_dl[3].instance_pre_execute_hook = NULL; + __fake_dl[3].instance_pos_execute_hook = NULL; + __fake_dl[3].process_exec_hook = NULL; + __fake_dl[3].handler_hooks = librender_handler_hooks; +#endif + __fake_dl[3].modules_dependency = librender_modules_dependency; + + /* -------------------- libdraw -------------------- */ + + __fake_dl[4].dlname = "libdraw"; +#ifdef __BGDC__ + __fake_dl[4].constants_def = NULL; + __fake_dl[4].types_def = NULL; + __fake_dl[4].globals_def = NULL; + __fake_dl[4].locals_def = NULL; + __fake_dl[4].globals_fixup = NULL; + __fake_dl[4].locals_fixup = NULL; +#else + __fake_dl[4].constants_def = NULL; + __fake_dl[4].types_def = NULL; + __fake_dl[4].globals_def = NULL; + __fake_dl[4].locals_def = NULL; + __fake_dl[4].globals_fixup = NULL; + __fake_dl[4].locals_fixup = NULL; +#endif + __fake_dl[4].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[4].module_initialize = NULL; + __fake_dl[4].module_finalize = NULL; + __fake_dl[4].instance_create_hook = NULL; + __fake_dl[4].instance_destroy_hook = NULL; + __fake_dl[4].instance_pre_execute_hook = NULL; + __fake_dl[4].instance_pos_execute_hook = NULL; + __fake_dl[4].process_exec_hook = NULL; + __fake_dl[4].handler_hooks = NULL; +#else + __fake_dl[4].module_initialize = NULL; + __fake_dl[4].module_finalize = NULL; + __fake_dl[4].instance_create_hook = NULL; + __fake_dl[4].instance_destroy_hook = NULL; + __fake_dl[4].instance_pre_execute_hook = NULL; + __fake_dl[4].instance_pos_execute_hook = NULL; + __fake_dl[4].process_exec_hook = NULL; + __fake_dl[4].handler_hooks = NULL; +#endif + __fake_dl[4].modules_dependency = NULL; + + /* -------------------- libfont -------------------- */ + + __fake_dl[5].dlname = "libfont"; +#ifdef __BGDC__ + __fake_dl[5].constants_def = NULL; + __fake_dl[5].types_def = NULL; + __fake_dl[5].globals_def = NULL; + __fake_dl[5].locals_def = NULL; + __fake_dl[5].globals_fixup = NULL; + __fake_dl[5].locals_fixup = NULL; +#else + __fake_dl[5].constants_def = NULL; + __fake_dl[5].types_def = NULL; + __fake_dl[5].globals_def = NULL; + __fake_dl[5].locals_def = NULL; + __fake_dl[5].globals_fixup = NULL; + __fake_dl[5].locals_fixup = NULL; +#endif + __fake_dl[5].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[5].module_initialize = NULL; + __fake_dl[5].module_finalize = NULL; + __fake_dl[5].instance_create_hook = NULL; + __fake_dl[5].instance_destroy_hook = NULL; + __fake_dl[5].instance_pre_execute_hook = NULL; + __fake_dl[5].instance_pos_execute_hook = NULL; + __fake_dl[5].process_exec_hook = NULL; + __fake_dl[5].handler_hooks = NULL; +#else + __fake_dl[5].module_initialize = libfont_module_initialize; + __fake_dl[5].module_finalize = NULL; + __fake_dl[5].instance_create_hook = NULL; + __fake_dl[5].instance_destroy_hook = NULL; + __fake_dl[5].instance_pre_execute_hook = NULL; + __fake_dl[5].instance_pos_execute_hook = NULL; + __fake_dl[5].process_exec_hook = NULL; + __fake_dl[5].handler_hooks = NULL; +#endif + __fake_dl[5].modules_dependency = libfont_modules_dependency; + + /* -------------------- libtext -------------------- */ + + __fake_dl[6].dlname = "libtext"; +#ifdef __BGDC__ + __fake_dl[6].constants_def = NULL; + __fake_dl[6].types_def = NULL; + __fake_dl[6].globals_def = &libtext_globals_def; + __fake_dl[6].locals_def = NULL; + __fake_dl[6].globals_fixup = NULL; + __fake_dl[6].locals_fixup = NULL; +#else + __fake_dl[6].constants_def = NULL; + __fake_dl[6].types_def = NULL; + __fake_dl[6].globals_def = NULL; + __fake_dl[6].locals_def = NULL; + __fake_dl[6].globals_fixup = libtext_globals_fixup; + __fake_dl[6].locals_fixup = NULL; +#endif + __fake_dl[6].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[6].module_initialize = NULL; + __fake_dl[6].module_finalize = NULL; + __fake_dl[6].instance_create_hook = NULL; + __fake_dl[6].instance_destroy_hook = NULL; + __fake_dl[6].instance_pre_execute_hook = NULL; + __fake_dl[6].instance_pos_execute_hook = NULL; + __fake_dl[6].process_exec_hook = NULL; + __fake_dl[6].handler_hooks = NULL; +#else + __fake_dl[6].module_initialize = NULL; + __fake_dl[6].module_finalize = NULL; + __fake_dl[6].instance_create_hook = NULL; + __fake_dl[6].instance_destroy_hook = NULL; + __fake_dl[6].instance_pre_execute_hook = NULL; + __fake_dl[6].instance_pos_execute_hook = NULL; + __fake_dl[6].process_exec_hook = NULL; + __fake_dl[6].handler_hooks = NULL; +#endif + __fake_dl[6].modules_dependency = libtext_modules_dependency; + + /* -------------------- libsdlhandler -------------------- */ + + __fake_dl[7].dlname = "libsdlhandler"; +#ifdef __BGDC__ + __fake_dl[7].constants_def = NULL; + __fake_dl[7].types_def = NULL; + __fake_dl[7].globals_def = NULL; + __fake_dl[7].locals_def = NULL; + __fake_dl[7].globals_fixup = NULL; + __fake_dl[7].locals_fixup = NULL; +#else + __fake_dl[7].constants_def = NULL; + __fake_dl[7].types_def = NULL; + __fake_dl[7].globals_def = NULL; + __fake_dl[7].locals_def = NULL; + __fake_dl[7].globals_fixup = NULL; + __fake_dl[7].locals_fixup = NULL; +#endif + __fake_dl[7].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[7].module_initialize = NULL; + __fake_dl[7].module_finalize = NULL; + __fake_dl[7].instance_create_hook = NULL; + __fake_dl[7].instance_destroy_hook = NULL; + __fake_dl[7].instance_pre_execute_hook = NULL; + __fake_dl[7].instance_pos_execute_hook = NULL; + __fake_dl[7].process_exec_hook = NULL; + __fake_dl[7].handler_hooks = NULL; +#else + __fake_dl[7].module_initialize = libsdlhandler_module_initialize; + __fake_dl[7].module_finalize = libsdlhandler_module_finalize; + __fake_dl[7].instance_create_hook = NULL; + __fake_dl[7].instance_destroy_hook = NULL; + __fake_dl[7].instance_pre_execute_hook = NULL; + __fake_dl[7].instance_pos_execute_hook = NULL; + __fake_dl[7].process_exec_hook = NULL; + __fake_dl[7].handler_hooks = libsdlhandler_handler_hooks; +#endif + __fake_dl[7].modules_dependency = NULL; + + /* -------------------- libwm -------------------- */ + + __fake_dl[8].dlname = "libwm"; +#ifdef __BGDC__ + __fake_dl[8].constants_def = NULL; + __fake_dl[8].types_def = NULL; + __fake_dl[8].globals_def = &libwm_globals_def; + __fake_dl[8].locals_def = NULL; + __fake_dl[8].globals_fixup = NULL; + __fake_dl[8].locals_fixup = NULL; +#else + __fake_dl[8].constants_def = NULL; + __fake_dl[8].types_def = NULL; + __fake_dl[8].globals_def = NULL; + __fake_dl[8].locals_def = NULL; + __fake_dl[8].globals_fixup = libwm_globals_fixup; + __fake_dl[8].locals_fixup = NULL; +#endif + __fake_dl[8].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[8].module_initialize = NULL; + __fake_dl[8].module_finalize = NULL; + __fake_dl[8].instance_create_hook = NULL; + __fake_dl[8].instance_destroy_hook = NULL; + __fake_dl[8].instance_pre_execute_hook = NULL; + __fake_dl[8].instance_pos_execute_hook = NULL; + __fake_dl[8].process_exec_hook = NULL; + __fake_dl[8].handler_hooks = NULL; +#else + __fake_dl[8].module_initialize = NULL; + __fake_dl[8].module_finalize = NULL; + __fake_dl[8].instance_create_hook = NULL; + __fake_dl[8].instance_destroy_hook = NULL; + __fake_dl[8].instance_pre_execute_hook = NULL; + __fake_dl[8].instance_pos_execute_hook = NULL; + __fake_dl[8].process_exec_hook = NULL; + __fake_dl[8].handler_hooks = libwm_handler_hooks; +#endif + __fake_dl[8].modules_dependency = libwm_modules_dependency; + + /* -------------------- libkey -------------------- */ + + __fake_dl[9].dlname = "libkey"; +#ifdef __BGDC__ + __fake_dl[9].constants_def = libkey_constants_def; + __fake_dl[9].types_def = NULL; + __fake_dl[9].globals_def = &libkey_globals_def; + __fake_dl[9].locals_def = NULL; + __fake_dl[9].globals_fixup = NULL; + __fake_dl[9].locals_fixup = NULL; +#else + __fake_dl[9].constants_def = NULL; + __fake_dl[9].types_def = NULL; + __fake_dl[9].globals_def = NULL; + __fake_dl[9].locals_def = NULL; + __fake_dl[9].globals_fixup = libkey_globals_fixup; + __fake_dl[9].locals_fixup = NULL; +#endif + __fake_dl[9].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[9].module_initialize = NULL; + __fake_dl[9].module_finalize = NULL; + __fake_dl[9].instance_create_hook = NULL; + __fake_dl[9].instance_destroy_hook = NULL; + __fake_dl[9].instance_pre_execute_hook = NULL; + __fake_dl[9].instance_pos_execute_hook = NULL; + __fake_dl[9].process_exec_hook = NULL; + __fake_dl[9].handler_hooks = NULL; +#else + __fake_dl[9].module_initialize = libkey_module_initialize; + __fake_dl[9].module_finalize = libkey_module_finalize; + __fake_dl[9].instance_create_hook = NULL; + __fake_dl[9].instance_destroy_hook = NULL; + __fake_dl[9].instance_pre_execute_hook = NULL; + __fake_dl[9].instance_pos_execute_hook = NULL; + __fake_dl[9].process_exec_hook = NULL; + __fake_dl[9].handler_hooks = libkey_handler_hooks; +#endif + __fake_dl[9].modules_dependency = libkey_modules_dependency; + + /* -------------------- libmouse -------------------- */ + + __fake_dl[10].dlname = "libmouse"; +#ifdef __BGDC__ + __fake_dl[10].constants_def = NULL; + __fake_dl[10].types_def = NULL; + __fake_dl[10].globals_def = &libmouse_globals_def; + __fake_dl[10].locals_def = NULL; + __fake_dl[10].globals_fixup = NULL; + __fake_dl[10].locals_fixup = NULL; +#else + __fake_dl[10].constants_def = NULL; + __fake_dl[10].types_def = NULL; + __fake_dl[10].globals_def = NULL; + __fake_dl[10].locals_def = NULL; + __fake_dl[10].globals_fixup = libmouse_globals_fixup; + __fake_dl[10].locals_fixup = NULL; +#endif + __fake_dl[10].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[10].module_initialize = NULL; + __fake_dl[10].module_finalize = NULL; + __fake_dl[10].instance_create_hook = NULL; + __fake_dl[10].instance_destroy_hook = NULL; + __fake_dl[10].instance_pre_execute_hook = NULL; + __fake_dl[10].instance_pos_execute_hook = NULL; + __fake_dl[10].process_exec_hook = NULL; + __fake_dl[10].handler_hooks = NULL; +#else + __fake_dl[10].module_initialize = libmouse_module_initialize; + __fake_dl[10].module_finalize = NULL; + __fake_dl[10].instance_create_hook = NULL; + __fake_dl[10].instance_destroy_hook = NULL; + __fake_dl[10].instance_pre_execute_hook = NULL; + __fake_dl[10].instance_pos_execute_hook = NULL; + __fake_dl[10].process_exec_hook = NULL; + __fake_dl[10].handler_hooks = libmouse_handler_hooks; +#endif + __fake_dl[10].modules_dependency = libmouse_modules_dependency; + + /* -------------------- libjoy -------------------- */ + + __fake_dl[11].dlname = "libjoy"; +#ifdef __BGDC__ + __fake_dl[11].constants_def = libjoy_constants_def; + __fake_dl[11].types_def = NULL; + __fake_dl[11].globals_def = NULL; + __fake_dl[11].locals_def = NULL; + __fake_dl[11].globals_fixup = NULL; + __fake_dl[11].locals_fixup = NULL; +#else + __fake_dl[11].constants_def = NULL; + __fake_dl[11].types_def = NULL; + __fake_dl[11].globals_def = NULL; + __fake_dl[11].locals_def = NULL; + __fake_dl[11].globals_fixup = NULL; + __fake_dl[11].locals_fixup = NULL; +#endif + __fake_dl[11].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[11].module_initialize = NULL; + __fake_dl[11].module_finalize = NULL; + __fake_dl[11].instance_create_hook = NULL; + __fake_dl[11].instance_destroy_hook = NULL; + __fake_dl[11].instance_pre_execute_hook = NULL; + __fake_dl[11].instance_pos_execute_hook = NULL; + __fake_dl[11].process_exec_hook = NULL; + __fake_dl[11].handler_hooks = NULL; +#else + __fake_dl[11].module_initialize = libjoy_module_initialize; + __fake_dl[11].module_finalize = libjoy_module_finalize; + __fake_dl[11].instance_create_hook = NULL; + __fake_dl[11].instance_destroy_hook = NULL; + __fake_dl[11].instance_pre_execute_hook = NULL; + __fake_dl[11].instance_pos_execute_hook = NULL; + __fake_dl[11].process_exec_hook = NULL; + __fake_dl[11].handler_hooks = NULL; +#endif + __fake_dl[11].modules_dependency = libjoy_modules_dependency; + + /* -------------------- libscroll -------------------- */ + + __fake_dl[12].dlname = "libscroll"; +#ifdef __BGDC__ + __fake_dl[12].constants_def = libscroll_constants_def; + __fake_dl[12].types_def = NULL; + __fake_dl[12].globals_def = &libscroll_globals_def; + __fake_dl[12].locals_def = &libscroll_locals_def; + __fake_dl[12].globals_fixup = NULL; + __fake_dl[12].locals_fixup = NULL; +#else + __fake_dl[12].constants_def = NULL; + __fake_dl[12].types_def = NULL; + __fake_dl[12].globals_def = NULL; + __fake_dl[12].locals_def = NULL; + __fake_dl[12].globals_fixup = libscroll_globals_fixup; + __fake_dl[12].locals_fixup = libscroll_locals_fixup; +#endif + __fake_dl[12].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[12].module_initialize = NULL; + __fake_dl[12].module_finalize = NULL; + __fake_dl[12].instance_create_hook = NULL; + __fake_dl[12].instance_destroy_hook = NULL; + __fake_dl[12].instance_pre_execute_hook = NULL; + __fake_dl[12].instance_pos_execute_hook = NULL; + __fake_dl[12].process_exec_hook = NULL; + __fake_dl[12].handler_hooks = NULL; +#else + __fake_dl[12].module_initialize = NULL; + __fake_dl[12].module_finalize = NULL; + __fake_dl[12].instance_create_hook = NULL; + __fake_dl[12].instance_destroy_hook = NULL; + __fake_dl[12].instance_pre_execute_hook = NULL; + __fake_dl[12].instance_pos_execute_hook = NULL; + __fake_dl[12].process_exec_hook = NULL; + __fake_dl[12].handler_hooks = NULL; +#endif + __fake_dl[12].modules_dependency = libscroll_modules_dependency; + + /* -------------------- libbgload -------------------- */ + + __fake_dl[13].dlname = "libbgload"; +#ifdef __BGDC__ + __fake_dl[13].constants_def = NULL; + __fake_dl[13].types_def = NULL; + __fake_dl[13].globals_def = NULL; + __fake_dl[13].locals_def = NULL; + __fake_dl[13].globals_fixup = NULL; + __fake_dl[13].locals_fixup = NULL; +#else + __fake_dl[13].constants_def = NULL; + __fake_dl[13].types_def = NULL; + __fake_dl[13].globals_def = NULL; + __fake_dl[13].locals_def = NULL; + __fake_dl[13].globals_fixup = NULL; + __fake_dl[13].locals_fixup = NULL; +#endif + __fake_dl[13].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[13].module_initialize = NULL; + __fake_dl[13].module_finalize = NULL; + __fake_dl[13].instance_create_hook = NULL; + __fake_dl[13].instance_destroy_hook = NULL; + __fake_dl[13].instance_pre_execute_hook = NULL; + __fake_dl[13].instance_pos_execute_hook = NULL; + __fake_dl[13].process_exec_hook = NULL; + __fake_dl[13].handler_hooks = NULL; +#else + __fake_dl[13].module_initialize = NULL; + __fake_dl[13].module_finalize = NULL; + __fake_dl[13].instance_create_hook = NULL; + __fake_dl[13].instance_destroy_hook = NULL; + __fake_dl[13].instance_pre_execute_hook = NULL; + __fake_dl[13].instance_pos_execute_hook = NULL; + __fake_dl[13].process_exec_hook = NULL; + __fake_dl[13].handler_hooks = NULL; +#endif + __fake_dl[13].modules_dependency = NULL; + + /* -------------------- mod_scroll -------------------- */ + + __fake_dl[14].dlname = "mod_scroll"; +#ifdef __BGDC__ + __fake_dl[14].constants_def = NULL; + __fake_dl[14].types_def = NULL; + __fake_dl[14].globals_def = NULL; + __fake_dl[14].locals_def = NULL; + __fake_dl[14].globals_fixup = NULL; + __fake_dl[14].locals_fixup = NULL; +#else + __fake_dl[14].constants_def = NULL; + __fake_dl[14].types_def = NULL; + __fake_dl[14].globals_def = NULL; + __fake_dl[14].locals_def = NULL; + __fake_dl[14].globals_fixup = NULL; + __fake_dl[14].locals_fixup = NULL; +#endif + __fake_dl[14].functions_exports = mod_scroll_functions_exports; +#ifdef __BGDC__ + __fake_dl[14].module_initialize = NULL; + __fake_dl[14].module_finalize = NULL; + __fake_dl[14].instance_create_hook = NULL; + __fake_dl[14].instance_destroy_hook = NULL; + __fake_dl[14].instance_pre_execute_hook = NULL; + __fake_dl[14].instance_pos_execute_hook = NULL; + __fake_dl[14].process_exec_hook = NULL; + __fake_dl[14].handler_hooks = NULL; +#else + __fake_dl[14].module_initialize = NULL; + __fake_dl[14].module_finalize = NULL; + __fake_dl[14].instance_create_hook = NULL; + __fake_dl[14].instance_destroy_hook = NULL; + __fake_dl[14].instance_pre_execute_hook = NULL; + __fake_dl[14].instance_pos_execute_hook = NULL; + __fake_dl[14].process_exec_hook = NULL; + __fake_dl[14].handler_hooks = NULL; +#endif + __fake_dl[14].modules_dependency = mod_scroll_modules_dependency; + + /* -------------------- mod_mouse -------------------- */ + + __fake_dl[15].dlname = "mod_mouse"; +#ifdef __BGDC__ + __fake_dl[15].constants_def = NULL; + __fake_dl[15].types_def = NULL; + __fake_dl[15].globals_def = NULL; + __fake_dl[15].locals_def = NULL; + __fake_dl[15].globals_fixup = NULL; + __fake_dl[15].locals_fixup = NULL; +#else + __fake_dl[15].constants_def = NULL; + __fake_dl[15].types_def = NULL; + __fake_dl[15].globals_def = NULL; + __fake_dl[15].locals_def = NULL; + __fake_dl[15].globals_fixup = NULL; + __fake_dl[15].locals_fixup = NULL; +#endif + __fake_dl[15].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[15].module_initialize = NULL; + __fake_dl[15].module_finalize = NULL; + __fake_dl[15].instance_create_hook = NULL; + __fake_dl[15].instance_destroy_hook = NULL; + __fake_dl[15].instance_pre_execute_hook = NULL; + __fake_dl[15].instance_pos_execute_hook = NULL; + __fake_dl[15].process_exec_hook = NULL; + __fake_dl[15].handler_hooks = NULL; +#else + __fake_dl[15].module_initialize = NULL; + __fake_dl[15].module_finalize = NULL; + __fake_dl[15].instance_create_hook = NULL; + __fake_dl[15].instance_destroy_hook = NULL; + __fake_dl[15].instance_pre_execute_hook = NULL; + __fake_dl[15].instance_pos_execute_hook = NULL; + __fake_dl[15].process_exec_hook = NULL; + __fake_dl[15].handler_hooks = NULL; +#endif + __fake_dl[15].modules_dependency = mod_mouse_modules_dependency; + + /* -------------------- mod_map -------------------- */ + + __fake_dl[16].dlname = "mod_map"; +#ifdef __BGDC__ + __fake_dl[16].constants_def = mod_map_constants_def; + __fake_dl[16].types_def = NULL; + __fake_dl[16].globals_def = NULL; + __fake_dl[16].locals_def = NULL; + __fake_dl[16].globals_fixup = NULL; + __fake_dl[16].locals_fixup = NULL; +#else + __fake_dl[16].constants_def = NULL; + __fake_dl[16].types_def = NULL; + __fake_dl[16].globals_def = NULL; + __fake_dl[16].locals_def = NULL; + __fake_dl[16].globals_fixup = NULL; + __fake_dl[16].locals_fixup = NULL; +#endif + __fake_dl[16].functions_exports = mod_map_functions_exports; +#ifdef __BGDC__ + __fake_dl[16].module_initialize = NULL; + __fake_dl[16].module_finalize = NULL; + __fake_dl[16].instance_create_hook = NULL; + __fake_dl[16].instance_destroy_hook = NULL; + __fake_dl[16].instance_pre_execute_hook = NULL; + __fake_dl[16].instance_pos_execute_hook = NULL; + __fake_dl[16].process_exec_hook = NULL; + __fake_dl[16].handler_hooks = NULL; +#else + __fake_dl[16].module_initialize = NULL; + __fake_dl[16].module_finalize = NULL; + __fake_dl[16].instance_create_hook = NULL; + __fake_dl[16].instance_destroy_hook = NULL; + __fake_dl[16].instance_pre_execute_hook = NULL; + __fake_dl[16].instance_pos_execute_hook = NULL; + __fake_dl[16].process_exec_hook = NULL; + __fake_dl[16].handler_hooks = NULL; +#endif + __fake_dl[16].modules_dependency = mod_map_modules_dependency; + + /* -------------------- mod_video -------------------- */ + + __fake_dl[17].dlname = "mod_video"; +#ifdef __BGDC__ + __fake_dl[17].constants_def = NULL; + __fake_dl[17].types_def = NULL; + __fake_dl[17].globals_def = NULL; + __fake_dl[17].locals_def = NULL; + __fake_dl[17].globals_fixup = NULL; + __fake_dl[17].locals_fixup = NULL; +#else + __fake_dl[17].constants_def = NULL; + __fake_dl[17].types_def = NULL; + __fake_dl[17].globals_def = NULL; + __fake_dl[17].locals_def = NULL; + __fake_dl[17].globals_fixup = mod_video_globals_fixup; + __fake_dl[17].locals_fixup = NULL; +#endif + __fake_dl[17].functions_exports = mod_video_functions_exports; +#ifdef __BGDC__ + __fake_dl[17].module_initialize = NULL; + __fake_dl[17].module_finalize = NULL; + __fake_dl[17].instance_create_hook = NULL; + __fake_dl[17].instance_destroy_hook = NULL; + __fake_dl[17].instance_pre_execute_hook = NULL; + __fake_dl[17].instance_pos_execute_hook = NULL; + __fake_dl[17].process_exec_hook = NULL; + __fake_dl[17].handler_hooks = NULL; +#else + __fake_dl[17].module_initialize = NULL; + __fake_dl[17].module_finalize = NULL; + __fake_dl[17].instance_create_hook = NULL; + __fake_dl[17].instance_destroy_hook = NULL; + __fake_dl[17].instance_pre_execute_hook = NULL; + __fake_dl[17].instance_pos_execute_hook = NULL; + __fake_dl[17].process_exec_hook = NULL; + __fake_dl[17].handler_hooks = NULL; +#endif + __fake_dl[17].modules_dependency = mod_video_modules_dependency; + + /* -------------------- mod_screen -------------------- */ + + __fake_dl[18].dlname = "mod_screen"; +#ifdef __BGDC__ + __fake_dl[18].constants_def = NULL; + __fake_dl[18].types_def = NULL; + __fake_dl[18].globals_def = NULL; + __fake_dl[18].locals_def = NULL; + __fake_dl[18].globals_fixup = NULL; + __fake_dl[18].locals_fixup = NULL; +#else + __fake_dl[18].constants_def = NULL; + __fake_dl[18].types_def = NULL; + __fake_dl[18].globals_def = NULL; + __fake_dl[18].locals_def = NULL; + __fake_dl[18].globals_fixup = mod_screen_globals_fixup; + __fake_dl[18].locals_fixup = mod_screen_locals_fixup; +#endif + __fake_dl[18].functions_exports = mod_screen_functions_exports; +#ifdef __BGDC__ + __fake_dl[18].module_initialize = NULL; + __fake_dl[18].module_finalize = NULL; + __fake_dl[18].instance_create_hook = NULL; + __fake_dl[18].instance_destroy_hook = NULL; + __fake_dl[18].instance_pre_execute_hook = NULL; + __fake_dl[18].instance_pos_execute_hook = NULL; + __fake_dl[18].process_exec_hook = NULL; + __fake_dl[18].handler_hooks = NULL; +#else + __fake_dl[18].module_initialize = NULL; + __fake_dl[18].module_finalize = NULL; + __fake_dl[18].instance_create_hook = NULL; + __fake_dl[18].instance_destroy_hook = NULL; + __fake_dl[18].instance_pre_execute_hook = NULL; + __fake_dl[18].instance_pos_execute_hook = NULL; + __fake_dl[18].process_exec_hook = NULL; + __fake_dl[18].handler_hooks = NULL; +#endif + __fake_dl[18].modules_dependency = mod_screen_modules_dependency; + + /* -------------------- mod_blendop -------------------- */ + + __fake_dl[19].dlname = "mod_blendop"; +#ifdef __BGDC__ + __fake_dl[19].constants_def = NULL; + __fake_dl[19].types_def = NULL; + __fake_dl[19].globals_def = NULL; + __fake_dl[19].locals_def = NULL; + __fake_dl[19].globals_fixup = NULL; + __fake_dl[19].locals_fixup = NULL; +#else + __fake_dl[19].constants_def = NULL; + __fake_dl[19].types_def = NULL; + __fake_dl[19].globals_def = NULL; + __fake_dl[19].locals_def = NULL; + __fake_dl[19].globals_fixup = NULL; + __fake_dl[19].locals_fixup = NULL; +#endif + __fake_dl[19].functions_exports = mod_blendop_functions_exports; +#ifdef __BGDC__ + __fake_dl[19].module_initialize = NULL; + __fake_dl[19].module_finalize = NULL; + __fake_dl[19].instance_create_hook = NULL; + __fake_dl[19].instance_destroy_hook = NULL; + __fake_dl[19].instance_pre_execute_hook = NULL; + __fake_dl[19].instance_pos_execute_hook = NULL; + __fake_dl[19].process_exec_hook = NULL; + __fake_dl[19].handler_hooks = NULL; +#else + __fake_dl[19].module_initialize = NULL; + __fake_dl[19].module_finalize = NULL; + __fake_dl[19].instance_create_hook = NULL; + __fake_dl[19].instance_destroy_hook = NULL; + __fake_dl[19].instance_pre_execute_hook = NULL; + __fake_dl[19].instance_pos_execute_hook = NULL; + __fake_dl[19].process_exec_hook = NULL; + __fake_dl[19].handler_hooks = NULL; +#endif + __fake_dl[19].modules_dependency = mod_blendop_modules_dependency; + + /* -------------------- mod_text -------------------- */ + + __fake_dl[20].dlname = "mod_text"; +#ifdef __BGDC__ + __fake_dl[20].constants_def = mod_text_constants_def; + __fake_dl[20].types_def = NULL; + __fake_dl[20].globals_def = NULL; + __fake_dl[20].locals_def = NULL; + __fake_dl[20].globals_fixup = NULL; + __fake_dl[20].locals_fixup = NULL; +#else + __fake_dl[20].constants_def = NULL; + __fake_dl[20].types_def = NULL; + __fake_dl[20].globals_def = NULL; + __fake_dl[20].locals_def = NULL; + __fake_dl[20].globals_fixup = NULL; + __fake_dl[20].locals_fixup = NULL; +#endif + __fake_dl[20].functions_exports = mod_text_functions_exports; +#ifdef __BGDC__ + __fake_dl[20].module_initialize = NULL; + __fake_dl[20].module_finalize = NULL; + __fake_dl[20].instance_create_hook = NULL; + __fake_dl[20].instance_destroy_hook = NULL; + __fake_dl[20].instance_pre_execute_hook = NULL; + __fake_dl[20].instance_pos_execute_hook = NULL; + __fake_dl[20].process_exec_hook = NULL; + __fake_dl[20].handler_hooks = NULL; +#else + __fake_dl[20].module_initialize = NULL; + __fake_dl[20].module_finalize = NULL; + __fake_dl[20].instance_create_hook = NULL; + __fake_dl[20].instance_destroy_hook = NULL; + __fake_dl[20].instance_pre_execute_hook = NULL; + __fake_dl[20].instance_pos_execute_hook = NULL; + __fake_dl[20].process_exec_hook = NULL; + __fake_dl[20].handler_hooks = NULL; +#endif + __fake_dl[20].modules_dependency = mod_text_modules_dependency; + + /* -------------------- mod_draw -------------------- */ + + __fake_dl[21].dlname = "mod_draw"; +#ifdef __BGDC__ + __fake_dl[21].constants_def = NULL; + __fake_dl[21].types_def = NULL; + __fake_dl[21].globals_def = NULL; + __fake_dl[21].locals_def = NULL; + __fake_dl[21].globals_fixup = NULL; + __fake_dl[21].locals_fixup = NULL; +#else + __fake_dl[21].constants_def = NULL; + __fake_dl[21].types_def = NULL; + __fake_dl[21].globals_def = NULL; + __fake_dl[21].locals_def = NULL; + __fake_dl[21].globals_fixup = NULL; + __fake_dl[21].locals_fixup = NULL; +#endif + __fake_dl[21].functions_exports = mod_draw_functions_exports; +#ifdef __BGDC__ + __fake_dl[21].module_initialize = NULL; + __fake_dl[21].module_finalize = NULL; + __fake_dl[21].instance_create_hook = NULL; + __fake_dl[21].instance_destroy_hook = NULL; + __fake_dl[21].instance_pre_execute_hook = NULL; + __fake_dl[21].instance_pos_execute_hook = NULL; + __fake_dl[21].process_exec_hook = NULL; + __fake_dl[21].handler_hooks = NULL; +#else + __fake_dl[21].module_initialize = NULL; + __fake_dl[21].module_finalize = NULL; + __fake_dl[21].instance_create_hook = NULL; + __fake_dl[21].instance_destroy_hook = NULL; + __fake_dl[21].instance_pre_execute_hook = NULL; + __fake_dl[21].instance_pos_execute_hook = NULL; + __fake_dl[21].process_exec_hook = NULL; + __fake_dl[21].handler_hooks = NULL; +#endif + __fake_dl[21].modules_dependency = mod_draw_modules_dependency; + + /* -------------------- mod_grproc -------------------- */ + + __fake_dl[22].dlname = "mod_grproc"; +#ifdef __BGDC__ + __fake_dl[22].constants_def = NULL; + __fake_dl[22].types_def = NULL; + __fake_dl[22].globals_def = NULL; + __fake_dl[22].locals_def = &mod_grproc_locals_def; + __fake_dl[22].globals_fixup = NULL; + __fake_dl[22].locals_fixup = NULL; +#else + __fake_dl[22].constants_def = NULL; + __fake_dl[22].types_def = NULL; + __fake_dl[22].globals_def = NULL; + __fake_dl[22].locals_def = NULL; + __fake_dl[22].globals_fixup = mod_grproc_globals_fixup; + __fake_dl[22].locals_fixup = mod_grproc_locals_fixup; +#endif + __fake_dl[22].functions_exports = mod_grproc_functions_exports; +#ifdef __BGDC__ + __fake_dl[22].module_initialize = NULL; + __fake_dl[22].module_finalize = NULL; + __fake_dl[22].instance_create_hook = NULL; + __fake_dl[22].instance_destroy_hook = NULL; + __fake_dl[22].instance_pre_execute_hook = NULL; + __fake_dl[22].instance_pos_execute_hook = NULL; + __fake_dl[22].process_exec_hook = NULL; + __fake_dl[22].handler_hooks = NULL; +#else + __fake_dl[22].module_initialize = mod_grproc_module_initialize; + __fake_dl[22].module_finalize = NULL; + __fake_dl[22].instance_create_hook = NULL; + __fake_dl[22].instance_destroy_hook = NULL; + __fake_dl[22].instance_pre_execute_hook = NULL; + __fake_dl[22].instance_pos_execute_hook = NULL; + __fake_dl[22].process_exec_hook = mod_grproc_process_exec_hook; + __fake_dl[22].handler_hooks = NULL; +#endif + __fake_dl[22].modules_dependency = mod_grproc_modules_dependency; + + /* -------------------- mod_effects -------------------- */ + + __fake_dl[23].dlname = "mod_effects"; +#ifdef __BGDC__ + __fake_dl[23].constants_def = mod_effects_constants_def; + __fake_dl[23].types_def = NULL; + __fake_dl[23].globals_def = NULL; + __fake_dl[23].locals_def = NULL; + __fake_dl[23].globals_fixup = NULL; + __fake_dl[23].locals_fixup = NULL; +#else + __fake_dl[23].constants_def = NULL; + __fake_dl[23].types_def = NULL; + __fake_dl[23].globals_def = NULL; + __fake_dl[23].locals_def = NULL; + __fake_dl[23].globals_fixup = NULL; + __fake_dl[23].locals_fixup = NULL; +#endif + __fake_dl[23].functions_exports = mod_effects_functions_exports; +#ifdef __BGDC__ + __fake_dl[23].module_initialize = NULL; + __fake_dl[23].module_finalize = NULL; + __fake_dl[23].instance_create_hook = NULL; + __fake_dl[23].instance_destroy_hook = NULL; + __fake_dl[23].instance_pre_execute_hook = NULL; + __fake_dl[23].instance_pos_execute_hook = NULL; + __fake_dl[23].process_exec_hook = NULL; + __fake_dl[23].handler_hooks = NULL; +#else + __fake_dl[23].module_initialize = NULL; + __fake_dl[23].module_finalize = NULL; + __fake_dl[23].instance_create_hook = NULL; + __fake_dl[23].instance_destroy_hook = NULL; + __fake_dl[23].instance_pre_execute_hook = NULL; + __fake_dl[23].instance_pos_execute_hook = NULL; + __fake_dl[23].process_exec_hook = NULL; + __fake_dl[23].handler_hooks = NULL; +#endif + __fake_dl[23].modules_dependency = mod_effects_modules_dependency; + + /* -------------------- mod_key -------------------- */ + + __fake_dl[24].dlname = "mod_key"; +#ifdef __BGDC__ + __fake_dl[24].constants_def = NULL; + __fake_dl[24].types_def = NULL; + __fake_dl[24].globals_def = NULL; + __fake_dl[24].locals_def = NULL; + __fake_dl[24].globals_fixup = NULL; + __fake_dl[24].locals_fixup = NULL; +#else + __fake_dl[24].constants_def = NULL; + __fake_dl[24].types_def = NULL; + __fake_dl[24].globals_def = NULL; + __fake_dl[24].locals_def = NULL; + __fake_dl[24].globals_fixup = NULL; + __fake_dl[24].locals_fixup = NULL; +#endif + __fake_dl[24].functions_exports = mod_key_functions_exports; +#ifdef __BGDC__ + __fake_dl[24].module_initialize = NULL; + __fake_dl[24].module_finalize = NULL; + __fake_dl[24].instance_create_hook = NULL; + __fake_dl[24].instance_destroy_hook = NULL; + __fake_dl[24].instance_pre_execute_hook = NULL; + __fake_dl[24].instance_pos_execute_hook = NULL; + __fake_dl[24].process_exec_hook = NULL; + __fake_dl[24].handler_hooks = NULL; +#else + __fake_dl[24].module_initialize = NULL; + __fake_dl[24].module_finalize = NULL; + __fake_dl[24].instance_create_hook = NULL; + __fake_dl[24].instance_destroy_hook = NULL; + __fake_dl[24].instance_pre_execute_hook = NULL; + __fake_dl[24].instance_pos_execute_hook = NULL; + __fake_dl[24].process_exec_hook = NULL; + __fake_dl[24].handler_hooks = NULL; +#endif + __fake_dl[24].modules_dependency = mod_key_modules_dependency; + + /* -------------------- mod_cd -------------------- */ + + __fake_dl[25].dlname = "mod_cd"; +#ifdef __BGDC__ + __fake_dl[25].constants_def = mod_cd_constants_def; + __fake_dl[25].types_def = NULL; + __fake_dl[25].globals_def = &mod_cd_globals_def; + __fake_dl[25].locals_def = NULL; + __fake_dl[25].globals_fixup = NULL; + __fake_dl[25].locals_fixup = NULL; +#else + __fake_dl[25].constants_def = NULL; + __fake_dl[25].types_def = NULL; + __fake_dl[25].globals_def = NULL; + __fake_dl[25].locals_def = NULL; + __fake_dl[25].globals_fixup = mod_cd_globals_fixup; + __fake_dl[25].locals_fixup = NULL; +#endif + __fake_dl[25].functions_exports = mod_cd_functions_exports; +#ifdef __BGDC__ + __fake_dl[25].module_initialize = NULL; + __fake_dl[25].module_finalize = NULL; + __fake_dl[25].instance_create_hook = NULL; + __fake_dl[25].instance_destroy_hook = NULL; + __fake_dl[25].instance_pre_execute_hook = NULL; + __fake_dl[25].instance_pos_execute_hook = NULL; + __fake_dl[25].process_exec_hook = NULL; + __fake_dl[25].handler_hooks = NULL; +#else + __fake_dl[25].module_initialize = mod_cd_module_initialize; + __fake_dl[25].module_finalize = mod_cd_module_finalize; + __fake_dl[25].instance_create_hook = NULL; + __fake_dl[25].instance_destroy_hook = NULL; + __fake_dl[25].instance_pre_execute_hook = NULL; + __fake_dl[25].instance_pos_execute_hook = NULL; + __fake_dl[25].process_exec_hook = NULL; + __fake_dl[25].handler_hooks = NULL; +#endif + __fake_dl[25].modules_dependency = NULL; + + /* -------------------- mod_dir -------------------- */ + + __fake_dl[26].dlname = "mod_dir"; +#ifdef __BGDC__ + __fake_dl[26].constants_def = NULL; + __fake_dl[26].types_def = NULL; + __fake_dl[26].globals_def = &mod_dir_globals_def; + __fake_dl[26].locals_def = NULL; + __fake_dl[26].globals_fixup = NULL; + __fake_dl[26].locals_fixup = NULL; +#else + __fake_dl[26].constants_def = NULL; + __fake_dl[26].types_def = NULL; + __fake_dl[26].globals_def = NULL; + __fake_dl[26].locals_def = NULL; + __fake_dl[26].globals_fixup = mod_dir_globals_fixup; + __fake_dl[26].locals_fixup = NULL; +#endif + __fake_dl[26].functions_exports = mod_dir_functions_exports; +#ifdef __BGDC__ + __fake_dl[26].module_initialize = NULL; + __fake_dl[26].module_finalize = NULL; + __fake_dl[26].instance_create_hook = NULL; + __fake_dl[26].instance_destroy_hook = NULL; + __fake_dl[26].instance_pre_execute_hook = NULL; + __fake_dl[26].instance_pos_execute_hook = NULL; + __fake_dl[26].process_exec_hook = NULL; + __fake_dl[26].handler_hooks = NULL; +#else + __fake_dl[26].module_initialize = NULL; + __fake_dl[26].module_finalize = NULL; + __fake_dl[26].instance_create_hook = NULL; + __fake_dl[26].instance_destroy_hook = NULL; + __fake_dl[26].instance_pre_execute_hook = NULL; + __fake_dl[26].instance_pos_execute_hook = NULL; + __fake_dl[26].process_exec_hook = NULL; + __fake_dl[26].handler_hooks = NULL; +#endif + __fake_dl[26].modules_dependency = NULL; + + /* -------------------- mod_file -------------------- */ + + __fake_dl[27].dlname = "mod_file"; +#ifdef __BGDC__ + __fake_dl[27].constants_def = mod_file_constants_def; + __fake_dl[27].types_def = NULL; + __fake_dl[27].globals_def = NULL; + __fake_dl[27].locals_def = NULL; + __fake_dl[27].globals_fixup = NULL; + __fake_dl[27].locals_fixup = NULL; +#else + __fake_dl[27].constants_def = NULL; + __fake_dl[27].types_def = NULL; + __fake_dl[27].globals_def = NULL; + __fake_dl[27].locals_def = NULL; + __fake_dl[27].globals_fixup = NULL; + __fake_dl[27].locals_fixup = NULL; +#endif + __fake_dl[27].functions_exports = mod_file_functions_exports; +#ifdef __BGDC__ + __fake_dl[27].module_initialize = NULL; + __fake_dl[27].module_finalize = NULL; + __fake_dl[27].instance_create_hook = NULL; + __fake_dl[27].instance_destroy_hook = NULL; + __fake_dl[27].instance_pre_execute_hook = NULL; + __fake_dl[27].instance_pos_execute_hook = NULL; + __fake_dl[27].process_exec_hook = NULL; + __fake_dl[27].handler_hooks = NULL; +#else + __fake_dl[27].module_initialize = NULL; + __fake_dl[27].module_finalize = NULL; + __fake_dl[27].instance_create_hook = NULL; + __fake_dl[27].instance_destroy_hook = NULL; + __fake_dl[27].instance_pre_execute_hook = NULL; + __fake_dl[27].instance_pos_execute_hook = NULL; + __fake_dl[27].process_exec_hook = NULL; + __fake_dl[27].handler_hooks = NULL; +#endif + __fake_dl[27].modules_dependency = NULL; + + /* -------------------- mod_crypt -------------------- */ + + __fake_dl[28].dlname = "mod_crypt"; +#ifdef __BGDC__ + __fake_dl[28].constants_def = mod_crypt_constants_def; + __fake_dl[28].types_def = NULL; + __fake_dl[28].globals_def = NULL; + __fake_dl[28].locals_def = NULL; + __fake_dl[28].globals_fixup = NULL; + __fake_dl[28].locals_fixup = NULL; +#else + __fake_dl[28].constants_def = NULL; + __fake_dl[28].types_def = NULL; + __fake_dl[28].globals_def = NULL; + __fake_dl[28].locals_def = NULL; + __fake_dl[28].globals_fixup = NULL; + __fake_dl[28].locals_fixup = NULL; +#endif + __fake_dl[28].functions_exports = mod_crypt_functions_exports; +#ifdef __BGDC__ + __fake_dl[28].module_initialize = NULL; + __fake_dl[28].module_finalize = NULL; + __fake_dl[28].instance_create_hook = NULL; + __fake_dl[28].instance_destroy_hook = NULL; + __fake_dl[28].instance_pre_execute_hook = NULL; + __fake_dl[28].instance_pos_execute_hook = NULL; + __fake_dl[28].process_exec_hook = NULL; + __fake_dl[28].handler_hooks = NULL; +#else + __fake_dl[28].module_initialize = NULL; + __fake_dl[28].module_finalize = NULL; + __fake_dl[28].instance_create_hook = NULL; + __fake_dl[28].instance_destroy_hook = NULL; + __fake_dl[28].instance_pre_execute_hook = NULL; + __fake_dl[28].instance_pos_execute_hook = NULL; + __fake_dl[28].process_exec_hook = NULL; + __fake_dl[28].handler_hooks = NULL; +#endif + __fake_dl[28].modules_dependency = NULL; + + /* -------------------- mod_joy -------------------- */ + + __fake_dl[29].dlname = "mod_joy"; +#ifdef __BGDC__ + __fake_dl[29].constants_def = NULL; + __fake_dl[29].types_def = NULL; + __fake_dl[29].globals_def = NULL; + __fake_dl[29].locals_def = NULL; + __fake_dl[29].globals_fixup = NULL; + __fake_dl[29].locals_fixup = NULL; +#else + __fake_dl[29].constants_def = NULL; + __fake_dl[29].types_def = NULL; + __fake_dl[29].globals_def = NULL; + __fake_dl[29].locals_def = NULL; + __fake_dl[29].globals_fixup = NULL; + __fake_dl[29].locals_fixup = NULL; +#endif + __fake_dl[29].functions_exports = mod_joy_functions_exports; +#ifdef __BGDC__ + __fake_dl[29].module_initialize = NULL; + __fake_dl[29].module_finalize = NULL; + __fake_dl[29].instance_create_hook = NULL; + __fake_dl[29].instance_destroy_hook = NULL; + __fake_dl[29].instance_pre_execute_hook = NULL; + __fake_dl[29].instance_pos_execute_hook = NULL; + __fake_dl[29].process_exec_hook = NULL; + __fake_dl[29].handler_hooks = NULL; +#else + __fake_dl[29].module_initialize = NULL; + __fake_dl[29].module_finalize = NULL; + __fake_dl[29].instance_create_hook = NULL; + __fake_dl[29].instance_destroy_hook = NULL; + __fake_dl[29].instance_pre_execute_hook = NULL; + __fake_dl[29].instance_pos_execute_hook = NULL; + __fake_dl[29].process_exec_hook = NULL; + __fake_dl[29].handler_hooks = NULL; +#endif + __fake_dl[29].modules_dependency = mod_joy_modules_dependency; + + /* -------------------- mod_math -------------------- */ + + __fake_dl[30].dlname = "mod_math"; +#ifdef __BGDC__ + __fake_dl[30].constants_def = mod_math_constants_def; + __fake_dl[30].types_def = NULL; + __fake_dl[30].globals_def = NULL; + __fake_dl[30].locals_def = NULL; + __fake_dl[30].globals_fixup = NULL; + __fake_dl[30].locals_fixup = NULL; +#else + __fake_dl[30].constants_def = NULL; + __fake_dl[30].types_def = NULL; + __fake_dl[30].globals_def = NULL; + __fake_dl[30].locals_def = NULL; + __fake_dl[30].globals_fixup = NULL; + __fake_dl[30].locals_fixup = NULL; +#endif + __fake_dl[30].functions_exports = mod_math_functions_exports; +#ifdef __BGDC__ + __fake_dl[30].module_initialize = NULL; + __fake_dl[30].module_finalize = NULL; + __fake_dl[30].instance_create_hook = NULL; + __fake_dl[30].instance_destroy_hook = NULL; + __fake_dl[30].instance_pre_execute_hook = NULL; + __fake_dl[30].instance_pos_execute_hook = NULL; + __fake_dl[30].process_exec_hook = NULL; + __fake_dl[30].handler_hooks = NULL; +#else + __fake_dl[30].module_initialize = NULL; + __fake_dl[30].module_finalize = NULL; + __fake_dl[30].instance_create_hook = NULL; + __fake_dl[30].instance_destroy_hook = NULL; + __fake_dl[30].instance_pre_execute_hook = NULL; + __fake_dl[30].instance_pos_execute_hook = NULL; + __fake_dl[30].process_exec_hook = NULL; + __fake_dl[30].handler_hooks = NULL; +#endif + __fake_dl[30].modules_dependency = NULL; + + /* -------------------- mod_mem -------------------- */ + + __fake_dl[31].dlname = "mod_mem"; +#ifdef __BGDC__ + __fake_dl[31].constants_def = NULL; + __fake_dl[31].types_def = NULL; + __fake_dl[31].globals_def = NULL; + __fake_dl[31].locals_def = NULL; + __fake_dl[31].globals_fixup = NULL; + __fake_dl[31].locals_fixup = NULL; +#else + __fake_dl[31].constants_def = NULL; + __fake_dl[31].types_def = NULL; + __fake_dl[31].globals_def = NULL; + __fake_dl[31].locals_def = NULL; + __fake_dl[31].globals_fixup = NULL; + __fake_dl[31].locals_fixup = NULL; +#endif + __fake_dl[31].functions_exports = mod_mem_functions_exports; +#ifdef __BGDC__ + __fake_dl[31].module_initialize = NULL; + __fake_dl[31].module_finalize = NULL; + __fake_dl[31].instance_create_hook = NULL; + __fake_dl[31].instance_destroy_hook = NULL; + __fake_dl[31].instance_pre_execute_hook = NULL; + __fake_dl[31].instance_pos_execute_hook = NULL; + __fake_dl[31].process_exec_hook = NULL; + __fake_dl[31].handler_hooks = NULL; +#else + __fake_dl[31].module_initialize = NULL; + __fake_dl[31].module_finalize = NULL; + __fake_dl[31].instance_create_hook = NULL; + __fake_dl[31].instance_destroy_hook = NULL; + __fake_dl[31].instance_pre_execute_hook = NULL; + __fake_dl[31].instance_pos_execute_hook = NULL; + __fake_dl[31].process_exec_hook = NULL; + __fake_dl[31].handler_hooks = NULL; +#endif + __fake_dl[31].modules_dependency = NULL; + + /* -------------------- mod_proc -------------------- */ + + __fake_dl[32].dlname = "mod_proc"; +#ifdef __BGDC__ + __fake_dl[32].constants_def = mod_proc_constants_def; + __fake_dl[32].types_def = NULL; + __fake_dl[32].globals_def = NULL; + __fake_dl[32].locals_def = &mod_proc_locals_def; + __fake_dl[32].globals_fixup = NULL; + __fake_dl[32].locals_fixup = NULL; +#else + __fake_dl[32].constants_def = NULL; + __fake_dl[32].types_def = NULL; + __fake_dl[32].globals_def = NULL; + __fake_dl[32].locals_def = NULL; + __fake_dl[32].globals_fixup = NULL; + __fake_dl[32].locals_fixup = mod_proc_locals_fixup; +#endif + __fake_dl[32].functions_exports = mod_proc_functions_exports; +#ifdef __BGDC__ + __fake_dl[32].module_initialize = NULL; + __fake_dl[32].module_finalize = NULL; + __fake_dl[32].instance_create_hook = NULL; + __fake_dl[32].instance_destroy_hook = NULL; + __fake_dl[32].instance_pre_execute_hook = NULL; + __fake_dl[32].instance_pos_execute_hook = NULL; + __fake_dl[32].process_exec_hook = NULL; + __fake_dl[32].handler_hooks = NULL; +#else + __fake_dl[32].module_initialize = NULL; + __fake_dl[32].module_finalize = NULL; + __fake_dl[32].instance_create_hook = NULL; + __fake_dl[32].instance_destroy_hook = NULL; + __fake_dl[32].instance_pre_execute_hook = NULL; + __fake_dl[32].instance_pos_execute_hook = NULL; + __fake_dl[32].process_exec_hook = mod_proc_process_exec_hook; + __fake_dl[32].handler_hooks = NULL; +#endif + __fake_dl[32].modules_dependency = NULL; + + /* -------------------- mod_rand -------------------- */ + + __fake_dl[33].dlname = "mod_rand"; +#ifdef __BGDC__ + __fake_dl[33].constants_def = NULL; + __fake_dl[33].types_def = NULL; + __fake_dl[33].globals_def = NULL; + __fake_dl[33].locals_def = NULL; + __fake_dl[33].globals_fixup = NULL; + __fake_dl[33].locals_fixup = NULL; +#else + __fake_dl[33].constants_def = NULL; + __fake_dl[33].types_def = NULL; + __fake_dl[33].globals_def = NULL; + __fake_dl[33].locals_def = NULL; + __fake_dl[33].globals_fixup = NULL; + __fake_dl[33].locals_fixup = NULL; +#endif + __fake_dl[33].functions_exports = mod_rand_functions_exports; +#ifdef __BGDC__ + __fake_dl[33].module_initialize = NULL; + __fake_dl[33].module_finalize = NULL; + __fake_dl[33].instance_create_hook = NULL; + __fake_dl[33].instance_destroy_hook = NULL; + __fake_dl[33].instance_pre_execute_hook = NULL; + __fake_dl[33].instance_pos_execute_hook = NULL; + __fake_dl[33].process_exec_hook = NULL; + __fake_dl[33].handler_hooks = NULL; +#else + __fake_dl[33].module_initialize = NULL; + __fake_dl[33].module_finalize = NULL; + __fake_dl[33].instance_create_hook = NULL; + __fake_dl[33].instance_destroy_hook = NULL; + __fake_dl[33].instance_pre_execute_hook = NULL; + __fake_dl[33].instance_pos_execute_hook = NULL; + __fake_dl[33].process_exec_hook = NULL; + __fake_dl[33].handler_hooks = NULL; +#endif + __fake_dl[33].modules_dependency = NULL; + + /* -------------------- mod_regex -------------------- */ + + __fake_dl[34].dlname = "mod_regex"; +#ifdef __BGDC__ + __fake_dl[34].constants_def = NULL; + __fake_dl[34].types_def = NULL; + __fake_dl[34].globals_def = &mod_regex_globals_def; + __fake_dl[34].locals_def = NULL; + __fake_dl[34].globals_fixup = NULL; + __fake_dl[34].locals_fixup = NULL; +#else + __fake_dl[34].constants_def = NULL; + __fake_dl[34].types_def = NULL; + __fake_dl[34].globals_def = NULL; + __fake_dl[34].locals_def = NULL; + __fake_dl[34].globals_fixup = mod_regex_globals_fixup; + __fake_dl[34].locals_fixup = NULL; +#endif + __fake_dl[34].functions_exports = mod_regex_functions_exports; +#ifdef __BGDC__ + __fake_dl[34].module_initialize = NULL; + __fake_dl[34].module_finalize = NULL; + __fake_dl[34].instance_create_hook = NULL; + __fake_dl[34].instance_destroy_hook = NULL; + __fake_dl[34].instance_pre_execute_hook = NULL; + __fake_dl[34].instance_pos_execute_hook = NULL; + __fake_dl[34].process_exec_hook = NULL; + __fake_dl[34].handler_hooks = NULL; +#else + __fake_dl[34].module_initialize = NULL; + __fake_dl[34].module_finalize = NULL; + __fake_dl[34].instance_create_hook = NULL; + __fake_dl[34].instance_destroy_hook = NULL; + __fake_dl[34].instance_pre_execute_hook = NULL; + __fake_dl[34].instance_pos_execute_hook = NULL; + __fake_dl[34].process_exec_hook = NULL; + __fake_dl[34].handler_hooks = NULL; +#endif + __fake_dl[34].modules_dependency = NULL; + + /* -------------------- mod_say -------------------- */ + + __fake_dl[35].dlname = "mod_say"; +#ifdef __BGDC__ + __fake_dl[35].constants_def = NULL; + __fake_dl[35].types_def = NULL; + __fake_dl[35].globals_def = NULL; + __fake_dl[35].locals_def = NULL; + __fake_dl[35].globals_fixup = NULL; + __fake_dl[35].locals_fixup = NULL; +#else + __fake_dl[35].constants_def = NULL; + __fake_dl[35].types_def = NULL; + __fake_dl[35].globals_def = NULL; + __fake_dl[35].locals_def = NULL; + __fake_dl[35].globals_fixup = NULL; + __fake_dl[35].locals_fixup = NULL; +#endif + __fake_dl[35].functions_exports = mod_say_functions_exports; +#ifdef __BGDC__ + __fake_dl[35].module_initialize = NULL; + __fake_dl[35].module_finalize = NULL; + __fake_dl[35].instance_create_hook = NULL; + __fake_dl[35].instance_destroy_hook = NULL; + __fake_dl[35].instance_pre_execute_hook = NULL; + __fake_dl[35].instance_pos_execute_hook = NULL; + __fake_dl[35].process_exec_hook = NULL; + __fake_dl[35].handler_hooks = NULL; +#else + __fake_dl[35].module_initialize = NULL; + __fake_dl[35].module_finalize = NULL; + __fake_dl[35].instance_create_hook = NULL; + __fake_dl[35].instance_destroy_hook = NULL; + __fake_dl[35].instance_pre_execute_hook = NULL; + __fake_dl[35].instance_pos_execute_hook = NULL; + __fake_dl[35].process_exec_hook = NULL; + __fake_dl[35].handler_hooks = NULL; +#endif + __fake_dl[35].modules_dependency = NULL; + + /* -------------------- mod_sort -------------------- */ + + __fake_dl[36].dlname = "mod_sort"; +#ifdef __BGDC__ + __fake_dl[36].constants_def = NULL; + __fake_dl[36].types_def = NULL; + __fake_dl[36].globals_def = NULL; + __fake_dl[36].locals_def = NULL; + __fake_dl[36].globals_fixup = NULL; + __fake_dl[36].locals_fixup = NULL; +#else + __fake_dl[36].constants_def = NULL; + __fake_dl[36].types_def = NULL; + __fake_dl[36].globals_def = NULL; + __fake_dl[36].locals_def = NULL; + __fake_dl[36].globals_fixup = NULL; + __fake_dl[36].locals_fixup = NULL; +#endif + __fake_dl[36].functions_exports = mod_sort_functions_exports; +#ifdef __BGDC__ + __fake_dl[36].module_initialize = NULL; + __fake_dl[36].module_finalize = NULL; + __fake_dl[36].instance_create_hook = NULL; + __fake_dl[36].instance_destroy_hook = NULL; + __fake_dl[36].instance_pre_execute_hook = NULL; + __fake_dl[36].instance_pos_execute_hook = NULL; + __fake_dl[36].process_exec_hook = NULL; + __fake_dl[36].handler_hooks = NULL; +#else + __fake_dl[36].module_initialize = NULL; + __fake_dl[36].module_finalize = NULL; + __fake_dl[36].instance_create_hook = NULL; + __fake_dl[36].instance_destroy_hook = NULL; + __fake_dl[36].instance_pre_execute_hook = NULL; + __fake_dl[36].instance_pos_execute_hook = NULL; + __fake_dl[36].process_exec_hook = NULL; + __fake_dl[36].handler_hooks = NULL; +#endif + __fake_dl[36].modules_dependency = NULL; + + /* -------------------- mod_sound -------------------- */ + + __fake_dl[37].dlname = "mod_sound"; +#ifdef __BGDC__ + __fake_dl[37].constants_def = mod_sound_constants_def; + __fake_dl[37].types_def = NULL; + __fake_dl[37].globals_def = &mod_sound_globals_def; + __fake_dl[37].locals_def = NULL; + __fake_dl[37].globals_fixup = NULL; + __fake_dl[37].locals_fixup = NULL; +#else + __fake_dl[37].constants_def = NULL; + __fake_dl[37].types_def = NULL; + __fake_dl[37].globals_def = NULL; + __fake_dl[37].locals_def = NULL; + __fake_dl[37].globals_fixup = mod_sound_globals_fixup; + __fake_dl[37].locals_fixup = NULL; +#endif + __fake_dl[37].functions_exports = mod_sound_functions_exports; +#ifdef __BGDC__ + __fake_dl[37].module_initialize = NULL; + __fake_dl[37].module_finalize = NULL; + __fake_dl[37].instance_create_hook = NULL; + __fake_dl[37].instance_destroy_hook = NULL; + __fake_dl[37].instance_pre_execute_hook = NULL; + __fake_dl[37].instance_pos_execute_hook = NULL; + __fake_dl[37].process_exec_hook = NULL; + __fake_dl[37].handler_hooks = NULL; +#else + __fake_dl[37].module_initialize = mod_sound_module_initialize; + __fake_dl[37].module_finalize = mod_sound_module_finalize; + __fake_dl[37].instance_create_hook = NULL; + __fake_dl[37].instance_destroy_hook = NULL; + __fake_dl[37].instance_pre_execute_hook = NULL; + __fake_dl[37].instance_pos_execute_hook = NULL; + __fake_dl[37].process_exec_hook = NULL; + __fake_dl[37].handler_hooks = NULL; +#endif + __fake_dl[37].modules_dependency = NULL; + + /* -------------------- mod_string -------------------- */ + + __fake_dl[38].dlname = "mod_string"; +#ifdef __BGDC__ + __fake_dl[38].constants_def = NULL; + __fake_dl[38].types_def = NULL; + __fake_dl[38].globals_def = NULL; + __fake_dl[38].locals_def = NULL; + __fake_dl[38].globals_fixup = NULL; + __fake_dl[38].locals_fixup = NULL; +#else + __fake_dl[38].constants_def = NULL; + __fake_dl[38].types_def = NULL; + __fake_dl[38].globals_def = NULL; + __fake_dl[38].locals_def = NULL; + __fake_dl[38].globals_fixup = NULL; + __fake_dl[38].locals_fixup = NULL; +#endif + __fake_dl[38].functions_exports = mod_string_functions_exports; +#ifdef __BGDC__ + __fake_dl[38].module_initialize = NULL; + __fake_dl[38].module_finalize = NULL; + __fake_dl[38].instance_create_hook = NULL; + __fake_dl[38].instance_destroy_hook = NULL; + __fake_dl[38].instance_pre_execute_hook = NULL; + __fake_dl[38].instance_pos_execute_hook = NULL; + __fake_dl[38].process_exec_hook = NULL; + __fake_dl[38].handler_hooks = NULL; +#else + __fake_dl[38].module_initialize = NULL; + __fake_dl[38].module_finalize = NULL; + __fake_dl[38].instance_create_hook = NULL; + __fake_dl[38].instance_destroy_hook = NULL; + __fake_dl[38].instance_pre_execute_hook = NULL; + __fake_dl[38].instance_pos_execute_hook = NULL; + __fake_dl[38].process_exec_hook = NULL; + __fake_dl[38].handler_hooks = NULL; +#endif + __fake_dl[38].modules_dependency = NULL; + + /* -------------------- mod_sys -------------------- */ + + __fake_dl[39].dlname = "mod_sys"; +#ifdef __BGDC__ + __fake_dl[39].constants_def = mod_sys_constants_def; + __fake_dl[39].types_def = NULL; + __fake_dl[39].globals_def = NULL; + __fake_dl[39].locals_def = NULL; + __fake_dl[39].globals_fixup = NULL; + __fake_dl[39].locals_fixup = NULL; +#else + __fake_dl[39].constants_def = NULL; + __fake_dl[39].types_def = NULL; + __fake_dl[39].globals_def = NULL; + __fake_dl[39].locals_def = NULL; + __fake_dl[39].globals_fixup = NULL; + __fake_dl[39].locals_fixup = NULL; +#endif + __fake_dl[39].functions_exports = mod_sys_functions_exports; +#ifdef __BGDC__ + __fake_dl[39].module_initialize = NULL; + __fake_dl[39].module_finalize = NULL; + __fake_dl[39].instance_create_hook = NULL; + __fake_dl[39].instance_destroy_hook = NULL; + __fake_dl[39].instance_pre_execute_hook = NULL; + __fake_dl[39].instance_pos_execute_hook = NULL; + __fake_dl[39].process_exec_hook = NULL; + __fake_dl[39].handler_hooks = NULL; +#else + __fake_dl[39].module_initialize = NULL; + __fake_dl[39].module_finalize = NULL; + __fake_dl[39].instance_create_hook = NULL; + __fake_dl[39].instance_destroy_hook = NULL; + __fake_dl[39].instance_pre_execute_hook = NULL; + __fake_dl[39].instance_pos_execute_hook = NULL; + __fake_dl[39].process_exec_hook = NULL; + __fake_dl[39].handler_hooks = NULL; +#endif + __fake_dl[39].modules_dependency = NULL; + + /* -------------------- mod_time -------------------- */ + + __fake_dl[40].dlname = "mod_time"; +#ifdef __BGDC__ + __fake_dl[40].constants_def = NULL; + __fake_dl[40].types_def = NULL; + __fake_dl[40].globals_def = NULL; + __fake_dl[40].locals_def = NULL; + __fake_dl[40].globals_fixup = NULL; + __fake_dl[40].locals_fixup = NULL; +#else + __fake_dl[40].constants_def = NULL; + __fake_dl[40].types_def = NULL; + __fake_dl[40].globals_def = NULL; + __fake_dl[40].locals_def = NULL; + __fake_dl[40].globals_fixup = NULL; + __fake_dl[40].locals_fixup = NULL; +#endif + __fake_dl[40].functions_exports = mod_time_functions_exports; +#ifdef __BGDC__ + __fake_dl[40].module_initialize = NULL; + __fake_dl[40].module_finalize = NULL; + __fake_dl[40].instance_create_hook = NULL; + __fake_dl[40].instance_destroy_hook = NULL; + __fake_dl[40].instance_pre_execute_hook = NULL; + __fake_dl[40].instance_pos_execute_hook = NULL; + __fake_dl[40].process_exec_hook = NULL; + __fake_dl[40].handler_hooks = NULL; +#else + __fake_dl[40].module_initialize = mod_time_module_initialize; + __fake_dl[40].module_finalize = mod_time_module_finalize; + __fake_dl[40].instance_create_hook = NULL; + __fake_dl[40].instance_destroy_hook = NULL; + __fake_dl[40].instance_pre_execute_hook = NULL; + __fake_dl[40].instance_pos_execute_hook = NULL; + __fake_dl[40].process_exec_hook = NULL; + __fake_dl[40].handler_hooks = NULL; +#endif + __fake_dl[40].modules_dependency = NULL; + + /* -------------------- mod_timers -------------------- */ + + __fake_dl[41].dlname = "mod_timers"; +#ifdef __BGDC__ + __fake_dl[41].constants_def = NULL; + __fake_dl[41].types_def = NULL; + __fake_dl[41].globals_def = &mod_timers_globals_def; + __fake_dl[41].locals_def = NULL; + __fake_dl[41].globals_fixup = NULL; + __fake_dl[41].locals_fixup = NULL; +#else + __fake_dl[41].constants_def = NULL; + __fake_dl[41].types_def = NULL; + __fake_dl[41].globals_def = NULL; + __fake_dl[41].locals_def = NULL; + __fake_dl[41].globals_fixup = mod_timers_globals_fixup; + __fake_dl[41].locals_fixup = NULL; +#endif + __fake_dl[41].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[41].module_initialize = NULL; + __fake_dl[41].module_finalize = NULL; + __fake_dl[41].instance_create_hook = NULL; + __fake_dl[41].instance_destroy_hook = NULL; + __fake_dl[41].instance_pre_execute_hook = NULL; + __fake_dl[41].instance_pos_execute_hook = NULL; + __fake_dl[41].process_exec_hook = NULL; + __fake_dl[41].handler_hooks = NULL; +#else + __fake_dl[41].module_initialize = NULL; + __fake_dl[41].module_finalize = NULL; + __fake_dl[41].instance_create_hook = NULL; + __fake_dl[41].instance_destroy_hook = NULL; + __fake_dl[41].instance_pre_execute_hook = NULL; + __fake_dl[41].instance_pos_execute_hook = NULL; + __fake_dl[41].process_exec_hook = NULL; + __fake_dl[41].handler_hooks = mod_timers_handler_hooks; +#endif + __fake_dl[41].modules_dependency = NULL; + + /* -------------------- mod_path -------------------- */ + + __fake_dl[42].dlname = "mod_path"; +#ifdef __BGDC__ + __fake_dl[42].constants_def = mod_path_constants_def; + __fake_dl[42].types_def = NULL; + __fake_dl[42].globals_def = NULL; + __fake_dl[42].locals_def = NULL; + __fake_dl[42].globals_fixup = NULL; + __fake_dl[42].locals_fixup = NULL; +#else + __fake_dl[42].constants_def = NULL; + __fake_dl[42].types_def = NULL; + __fake_dl[42].globals_def = NULL; + __fake_dl[42].locals_def = NULL; + __fake_dl[42].globals_fixup = NULL; + __fake_dl[42].locals_fixup = NULL; +#endif + __fake_dl[42].functions_exports = mod_path_functions_exports; +#ifdef __BGDC__ + __fake_dl[42].module_initialize = NULL; + __fake_dl[42].module_finalize = NULL; + __fake_dl[42].instance_create_hook = NULL; + __fake_dl[42].instance_destroy_hook = NULL; + __fake_dl[42].instance_pre_execute_hook = NULL; + __fake_dl[42].instance_pos_execute_hook = NULL; + __fake_dl[42].process_exec_hook = NULL; + __fake_dl[42].handler_hooks = NULL; +#else + __fake_dl[42].module_initialize = NULL; + __fake_dl[42].module_finalize = NULL; + __fake_dl[42].instance_create_hook = NULL; + __fake_dl[42].instance_destroy_hook = NULL; + __fake_dl[42].instance_pre_execute_hook = NULL; + __fake_dl[42].instance_pos_execute_hook = NULL; + __fake_dl[42].process_exec_hook = NULL; + __fake_dl[42].handler_hooks = NULL; +#endif + __fake_dl[42].modules_dependency = mod_path_modules_dependency; + + /* -------------------- mod_wm -------------------- */ + + __fake_dl[43].dlname = "mod_wm"; +#ifdef __BGDC__ + __fake_dl[43].constants_def = NULL; + __fake_dl[43].types_def = NULL; + __fake_dl[43].globals_def = NULL; + __fake_dl[43].locals_def = NULL; + __fake_dl[43].globals_fixup = NULL; + __fake_dl[43].locals_fixup = NULL; +#else + __fake_dl[43].constants_def = NULL; + __fake_dl[43].types_def = NULL; + __fake_dl[43].globals_def = NULL; + __fake_dl[43].locals_def = NULL; + __fake_dl[43].globals_fixup = NULL; + __fake_dl[43].locals_fixup = NULL; +#endif + __fake_dl[43].functions_exports = mod_wm_functions_exports; +#ifdef __BGDC__ + __fake_dl[43].module_initialize = NULL; + __fake_dl[43].module_finalize = NULL; + __fake_dl[43].instance_create_hook = NULL; + __fake_dl[43].instance_destroy_hook = NULL; + __fake_dl[43].instance_pre_execute_hook = NULL; + __fake_dl[43].instance_pos_execute_hook = NULL; + __fake_dl[43].process_exec_hook = NULL; + __fake_dl[43].handler_hooks = NULL; +#else + __fake_dl[43].module_initialize = NULL; + __fake_dl[43].module_finalize = NULL; + __fake_dl[43].instance_create_hook = NULL; + __fake_dl[43].instance_destroy_hook = NULL; + __fake_dl[43].instance_pre_execute_hook = NULL; + __fake_dl[43].instance_pos_execute_hook = NULL; + __fake_dl[43].process_exec_hook = NULL; + __fake_dl[43].handler_hooks = NULL; +#endif + __fake_dl[43].modules_dependency = mod_wm_modules_dependency; + + /* -------------------- mod_debug -------------------- */ + + __fake_dl[44].dlname = "mod_debug"; +#ifdef __BGDC__ + __fake_dl[44].constants_def = NULL; + __fake_dl[44].types_def = NULL; + __fake_dl[44].globals_def = NULL; + __fake_dl[44].locals_def = NULL; + __fake_dl[44].globals_fixup = NULL; + __fake_dl[44].locals_fixup = NULL; +#else + __fake_dl[44].constants_def = NULL; + __fake_dl[44].types_def = NULL; + __fake_dl[44].globals_def = NULL; + __fake_dl[44].locals_def = NULL; + __fake_dl[44].globals_fixup = mod_debug_globals_fixup; + __fake_dl[44].locals_fixup = mod_debug_locals_fixup; +#endif + __fake_dl[44].functions_exports = NULL; +#ifdef __BGDC__ + __fake_dl[44].module_initialize = NULL; + __fake_dl[44].module_finalize = NULL; + __fake_dl[44].instance_create_hook = NULL; + __fake_dl[44].instance_destroy_hook = NULL; + __fake_dl[44].instance_pre_execute_hook = NULL; + __fake_dl[44].instance_pos_execute_hook = NULL; + __fake_dl[44].process_exec_hook = NULL; + __fake_dl[44].handler_hooks = NULL; +#else + __fake_dl[44].module_initialize = mod_debug_module_initialize; + __fake_dl[44].module_finalize = mod_debug_module_finalize; + __fake_dl[44].instance_create_hook = NULL; + __fake_dl[44].instance_destroy_hook = NULL; + __fake_dl[44].instance_pre_execute_hook = NULL; + __fake_dl[44].instance_pos_execute_hook = NULL; + __fake_dl[44].process_exec_hook = mod_debug_process_exec_hook; + __fake_dl[44].handler_hooks = NULL; +#endif + __fake_dl[44].modules_dependency = mod_debug_modules_dependency; + + /* -------------------- mod_flic -------------------- */ + + __fake_dl[45].dlname = "mod_flic"; +#ifdef __BGDC__ + __fake_dl[45].constants_def = NULL; + __fake_dl[45].types_def = NULL; + __fake_dl[45].globals_def = NULL; + __fake_dl[45].locals_def = NULL; + __fake_dl[45].globals_fixup = NULL; + __fake_dl[45].locals_fixup = NULL; +#else + __fake_dl[45].constants_def = NULL; + __fake_dl[45].types_def = NULL; + __fake_dl[45].globals_def = NULL; + __fake_dl[45].locals_def = NULL; + __fake_dl[45].globals_fixup = NULL; + __fake_dl[45].locals_fixup = NULL; +#endif + __fake_dl[45].functions_exports = mod_flic_functions_exports; +#ifdef __BGDC__ + __fake_dl[45].module_initialize = NULL; + __fake_dl[45].module_finalize = NULL; + __fake_dl[45].instance_create_hook = NULL; + __fake_dl[45].instance_destroy_hook = NULL; + __fake_dl[45].instance_pre_execute_hook = NULL; + __fake_dl[45].instance_pos_execute_hook = NULL; + __fake_dl[45].process_exec_hook = NULL; + __fake_dl[45].handler_hooks = NULL; +#else + __fake_dl[45].module_initialize = NULL; + __fake_dl[45].module_finalize = NULL; + __fake_dl[45].instance_create_hook = NULL; + __fake_dl[45].instance_destroy_hook = NULL; + __fake_dl[45].instance_pre_execute_hook = NULL; + __fake_dl[45].instance_pos_execute_hook = NULL; + __fake_dl[45].process_exec_hook = NULL; + __fake_dl[45].handler_hooks = NULL; +#endif + __fake_dl[45].modules_dependency = NULL; + + /* -------------------- mod_m7 -------------------- */ + + __fake_dl[46].dlname = "mod_m7"; +#ifdef __BGDC__ + __fake_dl[46].constants_def = mod_m7_constants_def; + __fake_dl[46].types_def = NULL; + __fake_dl[46].globals_def = &mod_m7_globals_def; + __fake_dl[46].locals_def = &mod_m7_locals_def; + __fake_dl[46].globals_fixup = NULL; + __fake_dl[46].locals_fixup = NULL; +#else + __fake_dl[46].constants_def = NULL; + __fake_dl[46].types_def = NULL; + __fake_dl[46].globals_def = NULL; + __fake_dl[46].locals_def = NULL; + __fake_dl[46].globals_fixup = mod_m7_globals_fixup; + __fake_dl[46].locals_fixup = mod_m7_locals_fixup; +#endif + __fake_dl[46].functions_exports = mod_m7_functions_exports; +#ifdef __BGDC__ + __fake_dl[46].module_initialize = NULL; + __fake_dl[46].module_finalize = NULL; + __fake_dl[46].instance_create_hook = NULL; + __fake_dl[46].instance_destroy_hook = NULL; + __fake_dl[46].instance_pre_execute_hook = NULL; + __fake_dl[46].instance_pos_execute_hook = NULL; + __fake_dl[46].process_exec_hook = NULL; + __fake_dl[46].handler_hooks = NULL; +#else + __fake_dl[46].module_initialize = mod_m7_module_initialize; + __fake_dl[46].module_finalize = NULL; + __fake_dl[46].instance_create_hook = NULL; + __fake_dl[46].instance_destroy_hook = NULL; + __fake_dl[46].instance_pre_execute_hook = NULL; + __fake_dl[46].instance_pos_execute_hook = NULL; + __fake_dl[46].process_exec_hook = NULL; + __fake_dl[46].handler_hooks = NULL; +#endif + __fake_dl[46].modules_dependency = mod_m7_modules_dependency; + + /* -------------------- LAST -------------------- */ + + __fake_dl[47].dlname = NULL; + __fake_dl[47].constants_def = NULL; + __fake_dl[47].types_def = NULL; + __fake_dl[47].globals_def = NULL; + __fake_dl[47].locals_def = NULL; + __fake_dl[47].globals_fixup = NULL; + __fake_dl[47].locals_fixup = NULL; + __fake_dl[47].functions_exports = NULL; + __fake_dl[47].module_initialize = NULL; + __fake_dl[47].module_finalize = NULL; + __fake_dl[47].instance_create_hook = NULL; + __fake_dl[47].instance_destroy_hook = NULL; + __fake_dl[47].instance_pre_execute_hook = NULL; + __fake_dl[47].instance_pos_execute_hook = NULL; + __fake_dl[47].process_exec_hook = NULL; + __fake_dl[47].handler_hooks = NULL; + __fake_dl[47].modules_dependency = NULL; + +} + +/* ------------------------------------------ */ + +#endif diff --git a/core/include/files.h b/core/include/files.h new file mode 100644 index 0000000..5ddab72 --- /dev/null +++ b/core/include/files.h @@ -0,0 +1,104 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __FILES_H +#define __FILES_H + +#include <stdint.h> + +#include "arrange.h" + +#include "files_st.h" + +/* Funciones de acceso a ficheros */ +/* ------------------------------ */ + +/* Ahora mismo son casi wrappers de stdio.h, pero en el futuro + * el tipo "file" puede ser una estructura y las funciones, + * ofrecer soporte transparente para ficheros PAK, etc. */ + +extern file * file_open (const char * filename, char * mode) ; + +extern int file_read (file * fp, void * buffer, int len) ; + +extern int file_readSint8 (file * fp, int8_t * buffer) ; +extern int file_readUint8 (file * fp, uint8_t * buffer) ; +extern int file_readSint16 (file * fp, int16_t * buffer) ; +extern int file_readUint16 (file * fp, uint16_t * buffer) ; +extern int file_readSint32 (file * fp, int32_t * buffer) ; +extern int file_readUint32 (file * fp, uint32_t * buffer) ; + +extern int file_readSint8A (file * fp, int8_t * buffer, int n) ; +extern int file_readUint8A (file * fp, uint8_t * buffer, int n) ; +extern int file_readSint16A (file * fp, int16_t * buffer, int n) ; +extern int file_readUint16A (file * fp, uint16_t * buffer, int n) ; +extern int file_readSint32A (file * fp, int32_t * buffer, int n) ; +extern int file_readUint32A (file * fp, uint32_t * buffer, int n) ; + +extern int file_write (file * fp, void * buffer, int len) ; + +extern int file_writeSint8 (file * fp, int8_t * buffer) ; +extern int file_writeUint8 (file * fp, uint8_t * buffer) ; +extern int file_writeSint16 (file * fp, int16_t * buffer) ; +extern int file_writeUint16 (file * fp, uint16_t * buffer) ; +extern int file_writeSint32 (file * fp, int32_t * buffer) ; +extern int file_writeUint32 (file * fp, uint32_t * buffer) ; + +extern int file_writeSint8A (file * fp, int8_t * buffer, int n) ; +extern int file_writeUint8A (file * fp, uint8_t * buffer, int n) ; +extern int file_writeSint16A(file * fp, int16_t * buffer, int n) ; +extern int file_writeUint16A(file * fp, uint16_t * buffer, int n) ; +extern int file_writeSint32A(file * fp, int32_t * buffer, int n) ; +extern int file_writeUint32A(file * fp, uint32_t * buffer, int n) ; + +extern int file_qgets (file * fp, char * buffer, int len) ; +extern int file_qputs (file * fp, char * buffer) ; +extern int file_gets (file * fp, char * buffer, int len) ; +extern int file_puts (file * fp, char * buffer) ; +extern int file_size (file * fp) ; +extern int file_pos (file * fp) ; +extern int file_flush (file * fp) ; +extern int file_seek (file * fp, int pos, int where) ; +extern void file_rewind (file * fp) ; +extern void file_addp (const char * path) ; +extern void file_close (file * fp) ; +extern int file_remove (const char * filename) ; +extern int file_move (const char * source_file, const char * target_file) ; +extern int file_exists (const char * filename) ; +extern void file_add_xfile (file * fp, char * stubname, long offset, char * name, int size) ; +extern int file_eof (file * fp) ; +extern FILE * file_fp (file * fp) ; + +extern void xfile_init (int maxfiles); + +extern int opened_files; + +extern char * getfullpath( char *rel_path ); +extern char * whereis( char *filename ); + +#endif diff --git a/core/include/files_st.h b/core/include/files_st.h new file mode 100644 index 0000000..495a195 --- /dev/null +++ b/core/include/files_st.h @@ -0,0 +1,94 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __FILES_ST_H +#define __FILES_ST_H + +#include <stdio.h> + +/* Funciones de acceso a ficheros */ +/* ------------------------------ */ + +/* Ahora mismo son casi wrappers de stdio.h, pero en el futuro + * el tipo "file" puede ser una estructura y las funciones, + * ofrecer soporte transparente para ficheros PAK, etc. */ + +#define F_XFILE 1 +#define F_FILE 2 +#define F_GZFILE 3 + +#ifndef NO_ZLIB +#include <zlib.h> +#endif + +#ifdef _WIN32 +#define __MAX_PATH 32768 +#else +#define __MAX_PATH 4096 +#endif + +/* +#define __MAX_PATH 260 +#define __MAX_DRIVE (3) +#define __MAX_DIR 256 +#define __MAX_FNAME 256 +#define __MAX_EXT 256 +*/ + +#ifdef WIN32 +#define PATH_SEP "\\" +#define PATH_ISEP "/" +#define PATH_CHAR_SEP '\\' +#define PATH_CHAR_ISEP '/' +#define PATH_BACKSLASH +#else +#define PATH_SEP "/" +#define PATH_ISEP "\\" +#define PATH_CHAR_SEP '/' +#define PATH_CHAR_ISEP '\\' +#define PATH_SLASH +#endif + + +typedef struct +{ + int type ; + + FILE * fp ; +#ifndef NO_ZLIB + gzFile gz ; +#endif + int n ; + int error ; + char name[__MAX_PATH]; + long pos ; + int eof ; +} +file ; + +#endif diff --git a/core/include/fmath.h b/core/include/fmath.h new file mode 100644 index 0000000..154d4bb --- /dev/null +++ b/core/include/fmath.h @@ -0,0 +1,62 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef _FMATH_H +#define _FMATH_H + +#include <math.h> + +#include "bgdcore.h" + +/* Rutinas matemáticas de punto fijo, basadas en Allegro */ + +#ifndef M_PI +#define M_PI 3.14159265358979323846 /* PI */ +#endif + +#ifndef ABS +#define ABS(x) (((x) < 0) ? -(x):(x)) +#endif +#ifndef SGN +#define SGN(a) (((a) < 0) ? -1 : !(a) ? 0 : 1) +#endif + +typedef long int fixed ; + +extern fixed ftofix( float x ); +extern float fixtof( fixed x ); +extern fixed itofix( int x ); +extern int fixtoi( fixed x ); +extern int fixceil( fixed x ); +extern fixed fcos( int x ); +extern fixed fsin( int x ); +extern fixed fmul( int x, int y ); +extern fixed fdiv( int x, int y ); +extern void init_cos_tables(); + +#endif diff --git a/core/include/i_procdef.h b/core/include/i_procdef.h new file mode 100644 index 0000000..9699edf --- /dev/null +++ b/core/include/i_procdef.h @@ -0,0 +1,47 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __I_PROCDEF_H +#define __I_PROCDEF_H + +#include <i_procdef_st.h> + +extern int local_strings; +extern int * localstr; + +extern PROCDEF * mainproc; +extern PROCDEF * procs; +extern int procdef_count; + +extern PROCDEF * procdef_get( int n ); +extern PROCDEF * procdef_get_by_name(char * name ); +extern SYSPROC * sysproc_get( int code ); +extern int sysproc_add( char * name, char * paramtypes, int type, void * func ); +extern void sysproc_init(); + +#endif diff --git a/core/include/i_procdef_st.h b/core/include/i_procdef_st.h new file mode 100644 index 0000000..15a8a6a --- /dev/null +++ b/core/include/i_procdef_st.h @@ -0,0 +1,87 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __I_PROCDEF_ST_H +#define __I_PROCDEF_ST_H + +#include "instance_st.h" + +/* Process definitions, more simple that in the compiler */ + +typedef struct _procdef +{ + int * pridata ; + int * pubdata ; + + int * code ; + + int exitcode ; + int errorcode ; + + int * strings ; + int * pubstrings ; + + int private_size ; + int public_size ; + + int code_size ; + + int string_count ; + int pubstring_count ; + + int params ; + int id ; + int type ; + int flags ; + char * name ; + + int breakpoint; +} +PROCDEF ; + +#define PROC_USES_FRAME 0x01 +#define PROC_USES_LOCALS 0x02 +#define PROC_FUNCTION 0x04 +#define PROC_USES_PUBLICS 0x08 + +/* System functions */ + +typedef int SYSFUNC (INSTANCE *, int *) ; +typedef struct _sysproc +{ + int code ; + char * name ; + char * paramtypes ; + int type ; + int params ; + SYSFUNC * func ; + int id ; +} +SYSPROC ; + +#endif diff --git a/core/include/instance.h b/core/include/instance.h new file mode 100644 index 0000000..4c2bcb5 --- /dev/null +++ b/core/include/instance.h @@ -0,0 +1,73 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __INSTANCE_H +#define __INSTANCE_H + +#include <stdint.h> +#include <instance_st.h> +#include "i_procdef_st.h" + +/* Instancias. Una instancia se crea a partir de un proceso, pero en + * realidad es independiente del proceso original */ + +#ifdef __BGDRTM__ +extern void * globaldata ; +extern void * localdata ; +#endif + +extern int local_size ; + +extern INSTANCE * first_instance ; +extern INSTANCE * last_instance ; + +extern int instance_getid() ; +extern INSTANCE * instance_get( int id ) ; +extern INSTANCE * instance_get_by_type( uint32_t type, INSTANCE ** context ) ; +extern INSTANCE * instance_getfather( INSTANCE * i ) ; +extern INSTANCE * instance_getson( INSTANCE * i ) ; +extern INSTANCE * instance_getbigbro( INSTANCE * i ) ; +extern INSTANCE * instance_getsmallbro( INSTANCE * i ) ; +extern INSTANCE * instance_new( PROCDEF * proc, INSTANCE * father ) ; +extern INSTANCE * instance_duplicate( INSTANCE * i ) ; +extern void instance_destroy( INSTANCE * r ) ; +extern void instance_dump( INSTANCE * father, int indent ) ; +extern void instance_dump_all() ; +extern void instance_posupdate( INSTANCE * i ) ; +extern int instance_poschanged( INSTANCE * i ) ; +extern int instance_exists( INSTANCE * i ) ; + +extern INSTANCE * instance_next_by_priority(); +extern void instance_dirty( INSTANCE * i ) ; + +/* Las siguientes funciones son el punto de entrada del intérprete */ + +extern int instance_go( INSTANCE * r ) ; +extern int instance_go_all() ; + +#endif diff --git a/core/include/instance_st.h b/core/include/instance_st.h new file mode 100644 index 0000000..9f732c1 --- /dev/null +++ b/core/include/instance_st.h @@ -0,0 +1,158 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __INSTANCE_ST_H +#define __INSTANCE_ST_H + +#define FIRST_INSTANCE_ID 0x00010000 +#define LAST_INSTANCE_ID 0x0001ffff + +#define STACK_RETURN_VALUE 0x8000 +#define STACK_SIZE_MASK 0x7FFF +#define STACK_SIZE 2048 + +/* Instancias. Una instancia se crea a partir de un proceso, pero en + * realidad es independiente del proceso original */ + +typedef struct _instance +{ + void * locdata ; + void * pridata ; + void * pubdata ; + + int * code ; + int * codeptr ; + + int exitcode ; + int errorcode ; + + int call_level ; + + struct _procdef * proc ; + + int private_size ; + int public_size ; + + int first_run ; + + /* General list - unsorted */ + + struct _instance * next ; + struct _instance * prev ; + + /* Linked list by priority */ + + struct _instance * next_by_priority ; + struct _instance * prev_by_priority ; + int last_priority ; + + /* Linked list by process_type */ + + struct _instance * next_by_type ; + struct _instance * prev_by_type ; + + /* Linked list by INSTANCE * */ + + struct _instance * next_by_instance ; + struct _instance * prev_by_instance ; + + /* Function support */ + + struct _instance * called_by ; + + /* The first integer at the stack is the stack size, + with optional NO_RETURN_VALUE mask. The stack contents follows */ + + int * stack ; + int * stack_ptr ; + + /* For debugging */ + + int switchval; + int switchval_string; + int cased; + + int breakpoint; + +} +INSTANCE ; + +/* Macros para acceder a datos locales o privados de una instancia */ + +#define LOCDWORD(a,b) ( *(uint32_t *) ((uint8_t *)(a->locdata)+b) ) +#define LOCWORD(a,b) ( *(uint16_t *) ((uint8_t *)(a->locdata)+b) ) +#define LOCBYTE(a,b) ( *(uint8_t *) ((uint8_t *)(a->locdata)+b) ) + +#define LOCINT32(a,b) ( *(int32_t *) ((uint8_t *)(a->locdata)+b) ) +#define LOCINT16(a,b) ( *(int16_t *) ((uint8_t *)(a->locdata)+b) ) +#define LOCINT8(a,b) ( *(int8_t *) ((uint8_t *)(a->locdata)+b) ) + +#define LOCUINT32(a,b) ( *(uint32_t *) ((uint8_t *)(a->locdata)+b) ) +#define LOCUINT16(a,b) ( *(uint16_t *) ((uint8_t *)(a->locdata)+b) ) +#define LOCUINT8(a,b) ( *(uint8_t *) ((uint8_t *)(a->locdata)+b) ) + + +#define PRIDWORD(a,b) ( *(uint32_t *) ((uint8_t *)(a->pridata)+b) ) +#define PRIWORD(a,b) ( *(uint16_t *) ((uint8_t *)(a->pridata)+b) ) +#define PRIBYTE(a,b) ( *(uint8_t *) ((uint8_t *)(a->pridata)+b) ) + +#define PRIINT32(a,b) ( *(int32_t *) ((uint8_t *)(a->pridata)+b) ) +#define PRIINT16(a,b) ( *(int16_t *) ((uint8_t *)(a->pridata)+b) ) +#define PRIINT8(a,b) ( *(int8_t *) ((uint8_t *)(a->pridata)+b) ) + +#define PRIUINT32(a,b) ( *(uint32_t *) ((uint8_t *)(a->pridata)+b) ) +#define PRIUINT16(a,b) ( *(uint16_t *) ((uint8_t *)(a->pridata)+b) ) +#define PRIUINT8(a,b) ( *(uint8_t *) ((uint8_t *)(a->pridata)+b) ) + + +#define PUBDWORD(a,b) ( *(uint32_t *) ((uint8_t *)(a->pubdata)+b) ) +#define PUBWORD(a,b) ( *(uint16_t *) ((uint8_t *)(a->pubdata)+b) ) +#define PUBBYTE(a,b) ( *(uint8_t *) ((uint8_t *)(a->pubdata)+b) ) + +#define PUBINT32(a,b) ( *(int32_t *) ((uint8_t *)(a->pubdata)+b) ) +#define PUBINT16(a,b) ( *(int16_t *) ((uint8_t *)(a->pubdata)+b) ) +#define PUBINT8(a,b) ( *(int8_t *) ((uint8_t *)(a->pubdata)+b) ) + +#define PUBUINT32(a,b) ( *(uint32_t *) ((uint8_t *)(a->pubdata)+b) ) +#define PUBUINT16(a,b) ( *(uint16_t *) ((uint8_t *)(a->pubdata)+b) ) +#define PUBUINT8(a,b) ( *(uint8_t *) ((uint8_t *)(a->pubdata)+b) ) + + +#define GLODWORD(b) ( *(uint32_t *) ((uint8_t *)(globaldata)+b) ) +#define GLOWORD(b) ( *(uint16_t *) ((uint8_t *)(globaldata)+b) ) +#define GLOBYTE(b) ( *(uint8_t *) ((uint8_t *)(globaldata)+b) ) + +#define GLOINT32(b) ( *(int32_t *) ((uint8_t *)(globaldata)+b) ) +#define GLOINT16(b) ( *(int16_t *) ((uint8_t *)(globaldata)+b) ) +#define GLOINT8(b) ( *(int8_t *) ((uint8_t *)(globaldata)+b) ) + +#define GLOUINT32(b) ( *(uint32_t *) ((uint8_t *)(globaldata)+b) ) +#define GLOUINT16(b) ( *(uint16_t *) ((uint8_t *)(globaldata)+b) ) +#define GLOUINT8(b) ( *(uint8_t *) ((uint8_t *)(globaldata)+b) ) + +#endif diff --git a/core/include/loadlib.h b/core/include/loadlib.h new file mode 100644 index 0000000..9d217e1 --- /dev/null +++ b/core/include/loadlib.h @@ -0,0 +1,336 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef _LOADLIB_H +#define _LOADLIB_H + +/* --------------------------------------------------------------------------- */ + +#ifdef _WIN32 +#include <windows.h> +#include <winbase.h> +#else +#define _GNU_SOURCE +#include <dlfcn.h> +#include <unistd.h> +#include <stdlib.h> +#include <string.h> + +#define __stdcall +#define __dllexport +#define __dllimport +#endif + +#include <stdio.h> + +/******************************************************************************* + * COMMON * + *******************************************************************************/ + +static char * __dliberr = NULL; + +/* --------------------------------------------------------------------------- */ + +static char * dliberror( void ) +{ + return __dliberr; +} + +/* --------------------------------------------------------------------------- */ + +#ifndef __STATIC__ + +/******************************************************************************* + * MODULAR * + *******************************************************************************/ + +#ifdef _WIN32 +#define dlclose(a) +#endif + +/* --------------------------------------------------------------------------- */ + +typedef struct +{ + char * fname; + void * hnd; +} dlibhandle ; + +/* --------------------------------------------------------------------------- */ + +static int dlibclose( void * _handle ) +{ + dlibhandle * handle = ( dlibhandle * ) _handle; + dlclose( handle->hnd ); + free( handle->fname ); + free( handle ); + + return 0; +} + +/* --------------------------------------------------------------------------- */ + +static void * dlibopen( const char * fname ) +{ + char *f; + char *_fname = NULL; +#ifdef _WIN32 + void * hnd = LoadLibrary( fname ); +#else + void * hnd = dlopen( fname, RTLD_NOW | RTLD_GLOBAL ); +#endif + + if ( !hnd ) + { + f = ( char * ) fname + strlen( fname ); + while ( f > fname && f[-1] != '\\' && f[-1] != '/' ) f-- ; + + if ( strncmp( f, "lib", 3 ) ) + { + if ( ( _fname = malloc( strlen( fname ) + 4 ) ) ) + { + sprintf( _fname, "%.*slib%s", ( int ) ( f - fname ), fname, f ); +#ifdef _WIN32 + hnd = LoadLibrary( _fname ); +#else + hnd = dlopen( _fname, RTLD_NOW | RTLD_GLOBAL ); +#endif + } + } + } + + if ( !hnd ) + { +#ifdef _WIN32 + __dliberr = "Could not load library." ; +#else + __dliberr = dlerror() ; +#endif + if ( _fname ) free( _fname ); + return NULL; + } + + dlibhandle * dlib = (dlibhandle*) malloc( sizeof( dlibhandle ) ); + if ( !dlib ) + { + __dliberr = "Could not load library." ; + dlclose( hnd ); + if ( _fname ) free( _fname ); + return NULL; + } + + f = ( char * ) fname + strlen( fname ); + while ( f > fname && f[-1] != '\\' && f[-1] != '/' ) f-- ; + dlib->fname = strdup( f ); + if ( !dlib->fname ) + { + __dliberr = "Could not load library." ; + free( dlib ); + dlclose( hnd ); + if ( _fname ) free( _fname ); + return NULL; + } + + dlib->hnd = hnd; + + if ( _fname ) free( _fname ); + + return ( ( void * ) dlib ); +} + +/* --------------------------------------------------------------------------- */ + +static void * dlibaddr( void * _handle, const char * symbol ) +{ + dlibhandle * handle = ( dlibhandle * ) _handle; + char * ptr, * f; + +#ifdef _WIN32 + void * addr = GetProcAddress( (HMODULE)handle->hnd, symbol ); + if ( !addr ) + { + __dliberr = "Symbol not found." ; + return NULL; + } +#else + void * addr = dlsym( handle->hnd, symbol ) ; + if ( !addr ) + { + __dliberr = dlerror() ; + return NULL; + } + +#ifndef TARGET_BEOS + Dl_info dli; + dladdr( addr, &dli ); + + ptr = ( char * ) dli.dli_fname; f = NULL; +/* + printf( "dli_fname=%s\n", dli.dli_fname ); + printf( "dli_fbase=%p\n", dli.dli_fbase ); + printf( "dli_sname=%s\n", dli.dli_sname ); + printf( "dli_saddr=%p\n", dli.dli_saddr ); +*/ + + while ( *ptr ) + { + if ( *ptr == '/' || *ptr == '\\' ) f = ptr ; + ptr++; + } + if ( f ) ptr = f + 1; + + if ( strcmp( ptr, handle->fname ) ) + { + if ( strncmp( ptr, "lib", 3 ) || strcmp( ptr + 3, handle->fname ) ) + { + __dliberr = "Symbol not found." ; + return NULL; + } + } +#endif +#endif + + return addr; +} + +/* --------------------------------------------------------------------------- */ + +static void * _dlibaddr( void * _handle, const char * symbol ) +{ + dlibhandle * handle = ( dlibhandle * ) _handle; + char * ptr, * f; + char * sym = (char*)malloc( strlen( handle->fname ) + strlen( symbol ) + 2 ); + if ( !sym ) + { + __dliberr = "Can't load symbol." ; + return NULL; + } + + strcpy( sym, handle->fname ); + ptr = ( char * ) sym; f = NULL; + while ( *ptr ) + { + if ( *ptr == '.' ) f = ptr ; + ptr++; + } + + if ( f ) *f = '\0'; + strcat( sym, "_" ); strcat( sym, symbol ); + + { + void * addr = dlibaddr( handle, sym ); + free( sym ); + return addr; + } +} + +/* --------------------------------------------------------------------------- */ + +#else + +/******************************************************************************* + * MONOLITH * + *******************************************************************************/ + +#include <fake_dl.h> + +static int fake_dl_inited = 0; + +/* --------------------------------------------------------------------------- */ + +#define _dlibaddr(a,b) dlibaddr(a,b) + +/* --------------------------------------------------------------------------- */ + +static int dlibclose( void * handle ) +{ + return 0; +} + +/* --------------------------------------------------------------------------- */ + +static void * dlibopen( const char * fname ) +{ + __FAKE_DL * fdl = __fake_dl; + char dlname[32], *p; + + if ( !fake_dl_inited ) + { + fake_dl_init(); + fake_dl_inited = 1; + } + + strcpy( dlname, basename( fname ) ); + + p = strrchr( dlname, '.' ); + if ( p ) *p = '\0' ; + + while( fdl->dlname ) + { + if ( !strcmp( dlname, fdl->dlname ) ) return ( void * ) fdl; + fdl++; + } + + __dliberr = "Could not load library." ; + + return NULL; +} + +/* --------------------------------------------------------------------------- */ + +static void * dlibaddr( void * handle, const char * symbol ) +{ + __FAKE_DL * fdl = ( __FAKE_DL * ) handle; + + if ( !fdl ) return NULL; + + if ( !strcmp( symbol, "constants_def" ) ) return ( fdl->constants_def ); + if ( !strcmp( symbol, "types_def" ) ) return ( fdl->types_def ); + if ( !strcmp( symbol, "globals_def" ) ) return ( fdl->globals_def ); + if ( !strcmp( symbol, "locals_def" ) ) return ( fdl->locals_def ); + if ( !strcmp( symbol, "globals_fixup" ) ) return ( fdl->globals_fixup ); + if ( !strcmp( symbol, "locals_fixup" ) ) return ( fdl->locals_fixup ); + if ( !strcmp( symbol, "functions_exports" ) ) return ( fdl->functions_exports ); + if ( !strcmp( symbol, "module_initialize" ) ) return ( fdl->module_initialize ); + if ( !strcmp( symbol, "module_finalize" ) ) return ( fdl->module_finalize ); + if ( !strcmp( symbol, "instance_create_hook" ) ) return ( fdl->instance_create_hook ); + if ( !strcmp( symbol, "instance_destroy_hook" ) ) return ( fdl->instance_destroy_hook ); + if ( !strcmp( symbol, "instance_pre_execute_hook" ) ) return ( fdl->instance_pre_execute_hook ); + if ( !strcmp( symbol, "instance_pos_execute_hook" ) ) return ( fdl->instance_pos_execute_hook ); + if ( !strcmp( symbol, "process_exec_hook" ) ) return ( fdl->process_exec_hook ); + if ( !strcmp( symbol, "handler_hooks" ) ) return ( fdl->handler_hooks ); + if ( !strcmp( symbol, "modules_dependency" ) ) return ( fdl->modules_dependency ); + + return NULL; +} + +/* --------------------------------------------------------------------------- */ + +#endif + +/* --------------------------------------------------------------------------- */ + +#endif diff --git a/core/include/offsets.h b/core/include/offsets.h new file mode 100644 index 0000000..1ef6e96 --- /dev/null +++ b/core/include/offsets.h @@ -0,0 +1,51 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +/* ------------------------------------------ */ +/* Offsets de los datos globales predefinidos */ +/* ------------------------------------------ */ + +#define ARGC 0 +#define ARGV_TABLE ARGC + 4 /* 32+1 cadenas */ +#define OS_ID ARGV_TABLE + 33*4 + +/* ----------------------------------------- */ +/* Offsets de los datos locales predefinidos */ +/* ----------------------------------------- */ + +#define PROCESS_ID 0 +#define PROCESS_TYPE PROCESS_ID + 4 +#define FRAME_PERCENT PROCESS_TYPE + 4 +#define STATUS FRAME_PERCENT + 4 +#define SAVED_STATUS STATUS + 4 +#define SAVED_PRIORITY SAVED_STATUS + 4 +#define FATHER SAVED_PRIORITY + 4 +#define SON FATHER + 4 +#define SMALLBRO SON + 4 +#define BIGBRO SMALLBRO + 4 +#define PRIORITY BIGBRO + 4 diff --git a/core/include/pslang.h b/core/include/pslang.h new file mode 100644 index 0000000..8bebe84 --- /dev/null +++ b/core/include/pslang.h @@ -0,0 +1,241 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __PSLANG_H +#define __PSLANG_H + +/* --------------------- */ +/* Flags para mnemónicos */ +/* --------------------- */ + +/* Número de parámetros */ + +#define MN_0_PARAMS (0x00) +#define MN_1_PARAMS (0x80) + +#define MN_PARAMS(code) (((code) & 0x80) >> 7) + +/* Mascara */ +#define MN_MASK 0xFF + +/* Tipo de dato */ + +#define MN_DWORD (0x000) +#define MN_WORD (0x100) +#define MN_BYTE (0x200) +#define MN_STRING (0x300) +#define MN_FLOAT (0x400) +#define MN_UNSIGNED (0x800) + +#define MN_TYPEOF(code) ((code) & 0xF00) + +/* -------------------- */ +/* Códigos de mnemónico */ +/* -------------------- */ + +/* Salidas */ + +#define MN_END (0x00| MN_0_PARAMS) +#define MN_RETURN (0x01| MN_0_PARAMS) +#define MN_FRAME (0x02| MN_0_PARAMS) + +/* Operaciones con la pila */ + +#define MN_DUP (0x03| MN_0_PARAMS) +#define MN_PUSH (0x04| MN_1_PARAMS) +#define MN_POP (0x05| MN_0_PARAMS) + +/* Control Switch */ + +#define MN_SWITCH (0x06| MN_0_PARAMS) +#define MN_CASE (0x07| MN_0_PARAMS) +#define MN_CASE_R (0x08| MN_0_PARAMS) + +/* Llamadas */ + +#define MN_CALL (0x09| MN_1_PARAMS) +#define MN_SYSCALL (0x0A| MN_1_PARAMS) +#define MN_PROC (0x0B| MN_1_PARAMS) +#define MN_SYSPROC (0x0C| MN_1_PARAMS) +#define MN_CLONE (0x0D| MN_1_PARAMS) + +#define MN_TYPE (0x0E| MN_1_PARAMS) +#define MN_DEBUG (0x0F| MN_0_PARAMS) + +/* Direccionamiento */ + +#define MN_INDEX (0x10| MN_1_PARAMS) +#define MN_ARRAY (0x11| MN_1_PARAMS) +#define MN_PRIVATE (0x12| MN_1_PARAMS) +#define MN_LOCAL (0x13| MN_1_PARAMS) +#define MN_GLOBAL (0x14| MN_1_PARAMS) +#define MN_REMOTE (0x15| MN_1_PARAMS) +#define MN_PTR (0x16| MN_0_PARAMS) + +/* Acceso a variables */ + +#define MN_GET_PRIV (0x17| MN_1_PARAMS) +#define MN_GET_LOCAL (0x18| MN_1_PARAMS) +#define MN_GET_GLOBAL (0x19| MN_1_PARAMS) +#define MN_GET_REMOTE (0x1A| MN_1_PARAMS) + +/* Control de flujo */ + +#define MN_JUMP (0x1B| MN_1_PARAMS) +#define MN_JFALSE (0x1C| MN_1_PARAMS) +#define MN_JTRUE (0x1D| MN_1_PARAMS) +#define MN_JTFALSE (0x1E| MN_1_PARAMS) +#define MN_JTTRUE (0x1F| MN_1_PARAMS) +#define MN_JNOCASE (0x20| MN_1_PARAMS) + +/* Operaciones unarias - aceptan tipos de dato numéricos */ + +#define MN_NEG (0x21| MN_0_PARAMS) +#define MN_NOT (0x22| MN_0_PARAMS) + +/* Operaciones binarias - Aceptan tipos de dato numéricos */ + +#define MN_MUL (0x23| MN_0_PARAMS) +#define MN_DIV (0x24| MN_0_PARAMS) +#define MN_ADD (0x25| MN_0_PARAMS) +#define MN_SUB (0x26| MN_0_PARAMS) +#define MN_MOD (0x27| MN_0_PARAMS) +#define MN_ROR (0x28| MN_0_PARAMS) +#define MN_ROL (0x29| MN_0_PARAMS) +#define MN_AND (0x2A| MN_0_PARAMS) +#define MN_OR (0x2B| MN_0_PARAMS) +#define MN_XOR (0x2C| MN_0_PARAMS) + +/* Comparaciones binarias */ + +#define MN_EQ (0x2D| MN_0_PARAMS) +#define MN_NE (0x2E| MN_0_PARAMS) +#define MN_GT (0x2F| MN_0_PARAMS) +#define MN_LT (0x30| MN_0_PARAMS) +#define MN_GTE (0x31| MN_0_PARAMS) +#define MN_LTE (0x32| MN_0_PARAMS) + +/* Post/pre-operadores */ + +#define MN_POSTINC (0x33| MN_1_PARAMS) +#define MN_POSTDEC (0x34| MN_1_PARAMS) +#define MN_INC (0x35| MN_1_PARAMS) +#define MN_DEC (0x36| MN_1_PARAMS) + +/* Alteración directa de variables */ + +#define MN_LET (0x37| MN_0_PARAMS) +#define MN_VARADD (0x38| MN_0_PARAMS) +#define MN_VARSUB (0x39| MN_0_PARAMS) +#define MN_VARMUL (0x3A| MN_0_PARAMS) +#define MN_VARDIV (0x3B| MN_0_PARAMS) +#define MN_VARMOD (0x3C| MN_0_PARAMS) +#define MN_VARXOR (0x3D| MN_0_PARAMS) +#define MN_VARAND (0x3E| MN_0_PARAMS) +#define MN_VAROR (0x3F| MN_0_PARAMS) +#define MN_VARROR (0x40| MN_0_PARAMS) +#define MN_VARROL (0x41| MN_0_PARAMS) + +/* Funciones de cadena */ + +#define MN_SUBSTR (0x42| MN_0_PARAMS) +#define MN_STRI2CHR (0x43| MN_0_PARAMS) +#define MN_INT2STR (0x44| MN_1_PARAMS) +#define MN_FLOAT2STR (0x45| MN_1_PARAMS) +#define MN_CHR2STR (0x46| MN_1_PARAMS) + +/* Optimizaciones */ + +#define MN_LETNP (0x47| MN_0_PARAMS) + +/* Operadores Bitwise */ + +#define MN_BNOT (0x48| MN_0_PARAMS) +#define MN_BAND (0x49| MN_0_PARAMS) +#define MN_BOR (0x4A| MN_0_PARAMS) +#define MN_BXOR (0x4B| MN_0_PARAMS) + +/*** Free 4C, 4D, 4E, 4F ***/ + +/* Funciones de conversión */ + +#define MN_INT2FLOAT (0x50| MN_1_PARAMS) +#define MN_FLOAT2INT (0x51| MN_1_PARAMS) + +/*** Free 52, 53, 54, 55, 56, 57, 58, 59, 5A, 5B, 5C, 5D, 5E, 5F ****/ + +#define MN_A2STR (0x60| MN_1_PARAMS) +#define MN_STR2A (0x61| MN_1_PARAMS) +#define MN_STRACAT (0x62| MN_1_PARAMS) +#define MN_INT2WORD (0x63| MN_1_PARAMS) +#define MN_INT2BYTE (0x64| MN_1_PARAMS) + +/* Funciones de control de flujo */ +#define MN_NCALL (0x65| MN_1_PARAMS) + +/*** Free 66, 67, 68, 69 ****/ + +/* Handlers */ +#define MN_EXITHNDLR (0x6A| MN_1_PARAMS) +#define MN_ERRHNDLR (0x6B| MN_1_PARAMS) +#define MN_RESUME (0x6C| MN_1_PARAMS) +#define MN_RESUMEGOTO (0x6D| MN_1_PARAMS) + +/*** Free 6E, 6F ****/ + +/* Mnemónicos inexistentes - usados por el compilador internamente */ + +#define MN_REPEAT (0x70| MN_1_PARAMS) +#define MN_BREAK (0x71| MN_1_PARAMS) +#define MN_BRFALSE (0x72| MN_1_PARAMS) +#define MN_RETRUE (0x73| MN_1_PARAMS) +#define MN_REFALSE (0x74| MN_1_PARAMS) + +/* Funciones de cadena (2) */ + +#define MN_POINTER2STR (0x75| MN_1_PARAMS) +/* #define MN_POINTER2BOL (0x76| MN_1_PARAMS) */ +#define MN_STR2INT (0x77| MN_1_PARAMS) +#define MN_STR2FLOAT (0x78| MN_1_PARAMS) +#define MN_STR2CHR (0x79| MN_1_PARAMS) + +/* Tratamiento de Locales a proceso */ + +#define MN_PUBLIC (0x7A| MN_1_PARAMS) /* Direccionamiento */ +#define MN_GET_PUBLIC (0x7B| MN_1_PARAMS) /* Acceso a variables */ + +#define MN_REMOTE_PUBLIC (0x7C| MN_1_PARAMS) /* Direccionamiento */ +#define MN_GET_REMOTE_PUBLIC (0x7D| MN_1_PARAMS) /* Acceso a variables */ + +/* Depurado */ + +#define MN_SENTENCE (0x7F| MN_1_PARAMS) + +/* Max: 0x7F */ + +#endif diff --git a/core/include/sysprocs.h b/core/include/sysprocs.h new file mode 100644 index 0000000..5799ef5 --- /dev/null +++ b/core/include/sysprocs.h @@ -0,0 +1,63 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +/* + * FILE : sysprocs.h + * DESCRIPTION : Defines Internals functions SPECS and handlers + ** + */ + +/* + * In interpreter: SYSMACRO returns a function pointer + * In compiler: Already defined to return 0 + */ + +#ifndef SYSMACRO +#define SYSMACRO(a) a +#endif + +#define MAX_SYSPROCS 3072 + +/* WARNING!!!! + This table must be sorted by element Code !!!! Don't unsort it !!! + 2006/11/09 Splinter (jj_arg@yahoo.com) +*/ + +#ifdef SYSPROCS_ONLY_DECLARE +extern SYSPROC sysprocs[MAX_SYSPROCS] ; +#else +SYSPROC sysprocs[MAX_SYSPROCS] = +{ + /* Internal use */ + { 0x01, "#COPY#" , "PV++I" , TYPE_POINTER , 5, SYSMACRO(bgd_copy_struct) }, + { 0x02, "#MEMCOPY#" , "PPI" , TYPE_INT , 3, SYSMACRO(bgd_internal_memcopy) }, + { 0x03, "#COPYSTRA#" , "PPI" , TYPE_INT , 3, SYSMACRO(bgd_internal_copy_string_array) }, + + { 0 , 0 , "" , TYPE_UNDEFINED , 0, 0 } +} ; +#endif diff --git a/core/include/sysprocs_st.h b/core/include/sysprocs_st.h new file mode 100644 index 0000000..be9af51 --- /dev/null +++ b/core/include/sysprocs_st.h @@ -0,0 +1,51 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __SYSPROCS_ST_H +#define __SYSPROCS_ST_H + +/* --------------------------------------------------------------------------- */ + +#ifndef __BGDC__ +#include <instance.h> +#endif + +/* ---------------------------------------------------------------------- */ + +typedef void ( * FN_HOOK )( void ); +typedef void ( * INSTANCE_HOOK )( INSTANCE * ); + +typedef struct +{ + int prio; + FN_HOOK hook; +} HOOK ; + +/* ---------------------------------------------------------------------- */ + +#endif diff --git a/core/include/typedef.h b/core/include/typedef.h new file mode 100644 index 0000000..d348fb8 --- /dev/null +++ b/core/include/typedef.h @@ -0,0 +1,51 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __TYPEDEF_H +#define __TYPEDEF_H + +#include <typedef_st.h> + +/* Tipos de dato */ + +extern TYPEDEF typedef_new (BASETYPE type) ; +extern TYPEDEF typedef_enlarge (TYPEDEF base) ; +extern TYPEDEF typedef_reduce (TYPEDEF base) ; +extern int typedef_size (TYPEDEF t) ; +extern int typedef_subsize (TYPEDEF t, int c) ; +extern void typedef_describe (char * buffer, TYPEDEF t) ; +extern TYPEDEF typedef_pointer (TYPEDEF to) ; +extern int typedef_tcount (TYPEDEF t) ; +extern int typedef_is_equal (TYPEDEF a, TYPEDEF b); + +extern TYPEDEF * typedef_by_name (int code) ; +extern void typedef_name (TYPEDEF t, int code) ; + +extern int mntype (TYPEDEF type, int accept_structs); + +#endif diff --git a/core/include/typedef_st.h b/core/include/typedef_st.h new file mode 100644 index 0000000..19c4c2d --- /dev/null +++ b/core/include/typedef_st.h @@ -0,0 +1,83 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __TYPEDEF_ST_H +#define __TYPEDEF_ST_H + +/* Tipos de dato */ + +typedef enum { + TYPE_UNDEFINED = 0, + + TYPE_INT = 1, + TYPE_DWORD = 2, + TYPE_SHORT = 3, + TYPE_WORD = 4, + TYPE_SBYTE = 5, + TYPE_BYTE = 6, + + TYPE_CHAR = 8, + TYPE_FLOAT = 9, + + TYPE_STRING = 16, + TYPE_ARRAY = 17, + TYPE_STRUCT = 18, + TYPE_POINTER = 19 +} +BASETYPE ; + +typedef struct _typechunk +{ + BASETYPE type ; + int count ; /* Para type == TYPE_ARRAY */ +} +TYPECHUNK ; + +#define MAX_TYPECHUNKS 8 + +typedef struct _typedef +{ + TYPECHUNK chunk[MAX_TYPECHUNKS] ; + int depth ; + struct _varspace * varspace ; +} +TYPEDEF ; + +#define typedef_is_numeric(t) ((t).chunk[0].type < 16) +#define typedef_is_integer(t) ((t).chunk[0].type < 8) +#define typedef_is_float(t) ((t).chunk[0].type == TYPE_FLOAT) +#define typedef_is_string(t) ((t).chunk[0].type == TYPE_STRING) +#define typedef_is_struct(t) ((t).chunk[0].type == TYPE_STRUCT) +#define typedef_is_array(t) ((t).chunk[0].type == TYPE_ARRAY) +#define typedef_is_pointer(t) ((t).chunk[0].type == TYPE_POINTER) +#define typedef_count(t) ((t).chunk[0].count) +#define typedef_base(t) ((t).chunk[0].type) +#define typedef_members(t) ((t).varspace) +#define typedef_is_unsigned(t) ((t).chunk[0].type <= 8 && (t).chunk[0].type > 0 && !((t).chunk[0].type & 1)) + +#endif diff --git a/core/include/varspace_file.h b/core/include/varspace_file.h new file mode 100644 index 0000000..9f11cf1 --- /dev/null +++ b/core/include/varspace_file.h @@ -0,0 +1,42 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __VARSPACE_FILE_H + #define __VARSPACE_FILE_H + + #include <stdint.h> + + #include "dcb.h" + #include "files.h" + + int savetype (file * fp, void * data, DCB_TYPEDEF * var, int dcbformat); + int loadtype (file * fp, void * data, DCB_TYPEDEF * var, int dcbformat); + int savetypes( file * fp, void * data, DCB_TYPEDEF * var, int nvars, int dcbformat ); + int loadtypes( file * fp, void * data, DCB_TYPEDEF * var, int nvars, int dcbformat ); + +#endif diff --git a/core/include/xctype.h b/core/include/xctype.h new file mode 100644 index 0000000..935bf00 --- /dev/null +++ b/core/include/xctype.h @@ -0,0 +1,45 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __XCTYPE_H +#define __XCTYPE_H + +#include <xctype_st.h> + +extern int dos_chars ; /* 1 = Código fuente en caracteres MS-DOS */ +extern char c_type[256] ; +extern unsigned char c_upper[256] ; +extern unsigned char c_lower[256] ; + +extern unsigned char convert (unsigned char c) ; +extern void init_c_type () ; + +extern unsigned char dos_to_win[256] ; +extern unsigned char win_to_dos[256] ; + +#endif diff --git a/core/include/xctype_st.h b/core/include/xctype_st.h new file mode 100644 index 0000000..ad5effc --- /dev/null +++ b/core/include/xctype_st.h @@ -0,0 +1,48 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +#ifndef __XCTYPE_ST_H +#define __XCTYPE_ST_H + +#define ISALPHA(c) (c_type [(unsigned char)c] & CTYPE_ALPHA) +#define ISSPACE(c) (c_type [(unsigned char)c] & CTYPE_SPACE) +#define ISNUM(c) (c_type [(unsigned char)c] & CTYPE_NUM) +#define ISALNUM(c) (c_type [(unsigned char)c] & CTYPE_ALNUM) +#define ISWORDCHAR(c) (c_type [(unsigned char)c] & CTYPE_WORDCHAR) +#define ISWORDFIRST(c) (c_type [(unsigned char)c] & CTYPE_WORDFIRST) +#define TOUPPER(c) (c_upper[(unsigned char)c]) +#define TOLOWER(c) (c_lower[(unsigned char)c]) + +#define CTYPE_ALPHA 1 +#define CTYPE_NUM 2 +#define CTYPE_WORDCHAR 4 +#define CTYPE_WORDFIRST 8 +#define CTYPE_SPACE 16 +#define CTYPE_ALNUM 32 + +#endif diff --git a/core/include/xstrings.h b/core/include/xstrings.h new file mode 100644 index 0000000..bb228f5 --- /dev/null +++ b/core/include/xstrings.h @@ -0,0 +1,70 @@ +/* + * Copyright © 2006-2013 SplinterGU (Fenix/Bennugd) + * Copyright © 2002-2006 Fenix Team (Fenix) + * Copyright © 1999-2002 José Luis Cebrián Pagüe (Fenix) + * + * This file is part of Bennu - Game Development + * + * This software is provided 'as-is', without any express or implied + * warranty. In no event will the authors be held liable for any damages + * arising from the use of this software. + * + * Permission is granted to anyone to use this software for any purpose, + * including commercial applications, and to alter it and redistribute it + * freely, subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you must not + * claim that you wrote the original software. If you use this software + * in a product, an acknowledgment in the product documentation would be + * appreciated but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must not be + * misrepresented as being the original software. + * + * 3. This notice may not be removed or altered from any source + * distribution. + * + */ + +/****************************************************************************/ +/* FILE : xstrings.h */ +/* DESCRIPTION : Strings management. Includes any function related to */ +/* variable-length strings. */ +/****************************************************************************/ +/* HISTORY : 29/01/2001 (jlceb) string_internal no longer used */ +/****************************************************************************/ + +#ifndef __XSTRINGS_H +#define __XSTRINGS_H + +extern void _string_ptoa( char *t, void * p ); +extern void _string_ntoa( char *p, unsigned long n ); +extern void _string_utoa( char *p, unsigned long n ); + +extern void string_init() ; +extern const char * string_get( int code ) ; +extern void string_dump( void ( *wlog )( const char *fmt, ... ) ); +extern void string_load( void *, int, int, int, int ) ; +extern int string_new( const char * ptr ) ; +extern int string_newa( const char * ptr, unsigned count ) ; +extern void string_use( int code ) ; +extern void string_discard( int code ) ; +extern int string_add( int code1, int code2 ) ; +extern int string_compile( const char ** source ) ; +extern int string_itoa( int n ) ; +extern int string_uitoa( unsigned int n ) ; +extern int string_ftoa( float n ) ; +extern int string_ptoa( void * n ) ; +extern int string_comp( int code1, int code2 ) ; +extern int string_casecmp( int code1, int code2 ) ; +extern int string_char( int n, int nchar ) ; +extern int string_substr( int code, int first, int len ) ; +extern int string_find( int code1, int code2, int first ) ; +extern int string_ucase( int code1 ) ; +extern int string_lcase( int code1 ) ; +extern int string_strip( int code ) ; +extern int string_pad( int code, int length, int align ) ; +extern int string_format( double number, int dec, char point, char thousands ) ; +extern int string_concat( int code1, char * str2 ) ; + +#endif |