#ifndef TRNG_CORE_H_INCLUDED
#define TRNG_CORE_H_INCLUDED

#include <malloc.h>
#include <string>
#include <iostream>
#include <fstream>
#include <sys/stat.h>

#ifdef _WIN32 // for _mkdir()
#include <direct.h>
#endif

#include "bass.h"        // prototypes for extra sound library: bass.dll
// Following header files will be updated for every new version of 
// the tomb_NextGeneration.dll, so it's better you don't change them
//  because they will be replaced for any new update.

#include "Tomb_NextGeneration.h" // mnemonic constants defined in tomb_NextGeneration.dll
#include "structures.h" // structure of tomb4 program and trng dll
#include "DefTomb4Funct.h"
#include "macros.h"  // definition of macros

// FOR_YOU:
// While the followings are the headers you can use 
// to type your structures, constants and new tomb4 procedures you 
// discovered. 
// Following files are only yours and trng will not ever change them:
#include "macros_mine.h"  // here you define your own macros
#include "constants_mine.h" // here you define your mnemonic constants
#include "structures_mine.h" // here you type your structure definitions
#include "Tomb4Discoveries_mine.h"

#include "trng.h" // list of trng functions imported from trng.cpp source.

extern BITE_INFO EnemyBite[TROFF_NUMBER];

extern StrMyData mydata;

extern bool tsu_active;
extern int tsu_handle;

extern short tsu_links[TR_OBJECTS_NUMBER][LNK_NUMBER], tsu_objects[TR_OBJECTS_NUMBER], tsu_attributes[TR_OBJECTS_NUMBER][ATT_NUMBER], tsu_slots[SLOT_NUMBER_OBJECTS], tsu_properties[TR_OBJECTS_NUMBER][PTY_NUMBER], tsu_options[TR_OBJECTS_NUMBER][OPT_NUMBER], tsu_meshswaps[TR_OBJECTS_NUMBER][32][MSH_NUMBER], tsu_killer, tsu_spaz, tsu_frame, tsu_direction, tsu_sprites[TR_OBJECTS_NUMBER][SPR_NUMBER];
extern bool tsu_aiming_status, tsu_aiming[AIM_NUMBER];
extern int tsu_x, tsu_z;

int cbFlipEffectMine(WORD FlipIndex, WORD Timer, WORD Extra, WORD ActivationMode);

#pragma warning(disable: 4146) // unary minus operator applied to unsigned type, result still unsigned
#endif