amxmodx/compiler/amxxpc/amxxpc.h

83 lines
1.6 KiB
C
Raw Normal View History

2014-08-04 09:31:39 +00:00
// vim: set ts=4 sw=4 tw=99 noet:
//
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
// Copyright (C) The AMX Mod X Development Team.
//
// This software is licensed under the GNU General Public License, version 3 or higher.
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
// https://alliedmods.net/amxmodx-license
2005-07-25 00:01:54 +00:00
#ifndef _AMXXSC_INCLUDE_H
#define _AMXXSC_INCLUDE_H
#include <amxmodx_version.h>
2005-08-01 08:47:54 +00:00
#define MAGIC_HEADER2 0x414D5858
#define MAGIC_VERSION 0x0300
2005-07-25 00:01:54 +00:00
#if defined(__linux__) || defined(__APPLE__)
2005-07-25 00:01:54 +00:00
# include <dlfcn.h>
#else
# include <windows.h>
#endif
#include <string.h>
#if defined(__linux__) || defined(__APPLE__)
2005-08-02 18:37:59 +00:00
# define dlmount(x) dlopen(x, RTLD_NOW|RTLD_GLOBAL)
2005-07-25 00:01:54 +00:00
typedef void* HINSTANCE;
#else
# define dlsym(x, s) GetProcAddress(x, s)
# define dlmount(x) LoadLibrary(x)
# define dlclose(x) FreeLibrary(x)
#endif
#include "zlib/zlib.h"
2005-08-01 08:47:54 +00:00
#include "Binary.h"
2005-07-25 00:01:54 +00:00
typedef int (*COMPILER)(int argc, char **argv);
typedef int (*PRINTF)(const char *message, ...);
char *FindFileName(int argc, char **argv);
char *swiext(const char *file, const char *ext);
void show_help();
struct ablhdr
{
int magic;
char size;
};
struct abl
{
long stp;
char cellsize;
int size;
long cmpsize;
char *data;
char *cmp;
};
2005-08-01 08:47:54 +00:00
struct BinHeader
{
int32_t magic;
int16_t version;
int8_t plugins;
};
struct BinPlugin
{
int8_t cellsize; //cell size
int32_t imagesize; //uncompressed image size
int32_t disksize; //compressed image size
int32_t memsize; //memory image size
int32_t offs; //file offset
};
#if defined(__linux__) || defined(__APPLE__)
2005-09-18 01:14:23 +00:00
bool FileExists(const char *file);
#endif
2005-07-25 00:01:54 +00:00
#endif //_AMXXSC_INCLUDE_H