mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-17 15:18:11 +00:00
CRYO: Use standard ScummVM types
This commit is contained in:
parent
85ba17c475
commit
0fbe26e06a
@ -20,9 +20,9 @@ bool ResourceManager::LoadDatFile(const Common::String &datFileName) {
|
||||
|
||||
assert(_datFile.open(datFileName));
|
||||
|
||||
unsigned short numFiles = _datFile.readUint16LE();
|
||||
uint16 numFiles = _datFile.readUint16LE();
|
||||
|
||||
for (unsigned short i = 0; i < numFiles; i++) {
|
||||
for (uint16 i = 0; i < numFiles; i++) {
|
||||
DatFileEntry entry;
|
||||
|
||||
_datFile.read(entry._name, sizeof(entry._name));
|
||||
@ -76,7 +76,7 @@ void *ResourceManager::StreamToBuffer(Common::SeekableReadStream *stream, unsign
|
||||
return nullptr;
|
||||
|
||||
unsigned int readSize = stream->size();
|
||||
unsigned char *data = new unsigned char[readSize + 1];
|
||||
byte *data = new byte[readSize + 1];
|
||||
readSize = stream->read(data, readSize);
|
||||
|
||||
if (size)
|
||||
@ -97,4 +97,4 @@ void *ResourceManager::GetData(int resIndex, unsigned int *size) {
|
||||
delete resource;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,11 +12,11 @@ namespace Cryo {
|
||||
template<typename T>
|
||||
class CryoArray {
|
||||
private:
|
||||
unsigned char *_data;
|
||||
byte *_data;
|
||||
bool _ownData;
|
||||
unsigned short ElementOffset(int num) {
|
||||
uint16 ElementOffset(int num) {
|
||||
assert(_data && num < Count())
|
||||
return (static_cast<unsigned short *>_data)[num];
|
||||
return (static_cast<uint16 *>_data)[num];
|
||||
}
|
||||
public:
|
||||
CryoArray(void *data, bool ownData) : _data(data), _ownData(ownData) {
|
||||
@ -25,7 +25,7 @@ public:
|
||||
if (_ownData)
|
||||
delete data;
|
||||
}
|
||||
unsigned short Count() {
|
||||
uint16 Count() {
|
||||
return ElementOffset(0) / 2;
|
||||
}
|
||||
const T *operator[](int index) {
|
||||
@ -39,7 +39,7 @@ private:
|
||||
char _name[16];
|
||||
unsigned int _size;
|
||||
unsigned int _offset;
|
||||
unsigned char _flag;
|
||||
byte _flag;
|
||||
};
|
||||
|
||||
Common::Array<DatFileEntry> _files;
|
||||
@ -67,4 +67,4 @@ public:
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,6 @@
|
||||
|
||||
namespace Cryo {
|
||||
|
||||
short __debug, __libError, __osError;
|
||||
int16 __debug, __libError, __osError;
|
||||
|
||||
} // End of namespace Cryo
|
||||
|
@ -26,32 +26,32 @@
|
||||
|
||||
namespace Cryo {
|
||||
|
||||
static short safe_palette = 0;
|
||||
static short pred_r = 0, pred_l = 0;
|
||||
static short use_adpcm = 0;
|
||||
static int16 safe_palette = 0;
|
||||
static int16 pred_r = 0, pred_l = 0;
|
||||
static int16 use_adpcm = 0;
|
||||
static float hnm_rate = 0.0;
|
||||
static float next_frame_time = 0.0;
|
||||
static float expected_frame_time = 0.0;
|
||||
static float time_drift = 0.0;
|
||||
static short use_mono = 0;
|
||||
static short use_sound = 0;
|
||||
static short use_sound_sync = 0;
|
||||
static short pending_sounds = 0;
|
||||
static short sound_started = 0;
|
||||
static short preserve_color0 = 0;
|
||||
static int16 use_mono = 0;
|
||||
static int16 use_sound = 0;
|
||||
static int16 use_sound_sync = 0;
|
||||
static int16 pending_sounds = 0;
|
||||
static int16 sound_started = 0;
|
||||
static int16 preserve_color0 = 0;
|
||||
static soundchannel_t *soundChannel_adpcm = 0;
|
||||
static soundgroup_t *soundGroup_adpcm = 0;
|
||||
static soundchannel_t *soundChannel = 0;
|
||||
static soundgroup_t *soundGroup = 0;
|
||||
static void (*custom_chunk_handler)(unsigned char *buffer, int size, short id, char h6, char h7) = 0;
|
||||
static short use_preload = 0;
|
||||
static short decomp_table[256];
|
||||
static void (*custom_chunk_handler)(byte *buffer, int size, int16 id, char h6, char h7) = 0;
|
||||
static int16 use_preload = 0;
|
||||
static int16 decomp_table[256];
|
||||
|
||||
void CLHNM_Desentrelace320(unsigned char *frame_buffer, unsigned char *final_buffer, unsigned short height);
|
||||
void CLHNM_Desentrelace320(byte *frame_buffer, byte *final_buffer, uint16 height);
|
||||
|
||||
void CLHNM_DecompLempelZiv(unsigned char *buffer, unsigned char *output) {
|
||||
unsigned char *inp = buffer;
|
||||
unsigned char *out = output;
|
||||
void CLHNM_DecompLempelZiv(byte *buffer, byte *output) {
|
||||
byte *inp = buffer;
|
||||
byte *out = output;
|
||||
|
||||
unsigned int queue = 0;
|
||||
int qpos = -1;
|
||||
@ -66,7 +66,7 @@ void CLHNM_DecompLempelZiv(unsigned char *buffer, unsigned char *output) {
|
||||
int l, o;
|
||||
if (GetBit()) {
|
||||
l = *inp & 7;
|
||||
o = *(unsigned short *)inp >> 3;
|
||||
o = *(uint16 *)inp >> 3;
|
||||
inp += 2;
|
||||
o -= 8192;
|
||||
if (!l)
|
||||
@ -90,14 +90,14 @@ void CLHNM_DecompLempelZiv(unsigned char *buffer, unsigned char *output) {
|
||||
return;
|
||||
}
|
||||
|
||||
void CLHNM_DecompUBA(unsigned char *output, unsigned char *curr_buffer, unsigned char *prev_buffer,
|
||||
unsigned char *input, int width, char flags) {
|
||||
void CLHNM_DecompUBA(byte *output, byte *curr_buffer, byte *prev_buffer,
|
||||
byte *input, int width, char flags) {
|
||||
unsigned int code;
|
||||
char mode, count, color;
|
||||
unsigned short offs;
|
||||
unsigned char *ref;
|
||||
unsigned char *out_start = output;
|
||||
unsigned char swap;
|
||||
uint16 offs;
|
||||
byte *ref;
|
||||
byte *out_start = output;
|
||||
byte swap;
|
||||
int shft1, shft2;
|
||||
// return;
|
||||
if ((flags & 1) == 0) {
|
||||
@ -123,8 +123,8 @@ void CLHNM_DecompUBA(unsigned char *output, unsigned char *curr_buffer, unsigned
|
||||
shft2 = 1;
|
||||
}
|
||||
while (count--) {
|
||||
unsigned char b0 = ref[shft1];
|
||||
unsigned char b1 = ref[shft2];
|
||||
byte b0 = ref[shft1];
|
||||
byte b1 = ref[shft2];
|
||||
output[swap] = b0;
|
||||
output[swap ^ 1] = b1;
|
||||
output += 2;
|
||||
@ -215,14 +215,14 @@ void CLHNM_WaitLoop(hnm_t *hnm) {
|
||||
time_drift = TimerTicks - next_frame_time;
|
||||
}
|
||||
|
||||
void CLHNM_SetupSound(short numSounds, short arg4, short sampleSize, float rate, short mode) {
|
||||
void CLHNM_SetupSound(int16 numSounds, int16 arg4, int16 sampleSize, float rate, int16 mode) {
|
||||
soundChannel = CLSoundChannel_New(mode);
|
||||
soundGroup = CLSoundGroup_New(numSounds, arg4, sampleSize, rate, mode);
|
||||
if (sampleSize == 16)
|
||||
CLSoundGroup_Reverse16All(soundGroup);
|
||||
}
|
||||
|
||||
void CLHNM_SetupSoundADPCM(short numSounds, short arg4, short sampleSize, float rate, short mode) {
|
||||
void CLHNM_SetupSoundADPCM(int16 numSounds, int16 arg4, int16 sampleSize, float rate, int16 mode) {
|
||||
soundChannel_adpcm = CLSoundChannel_New(mode);
|
||||
soundGroup_adpcm = CLSoundGroup_New(numSounds, arg4, sampleSize, rate, mode);
|
||||
}
|
||||
@ -248,13 +248,13 @@ void CLHNM_CloseSound() {
|
||||
}
|
||||
}
|
||||
|
||||
void CLHNM_SetForceZero2Black(short forceblack) {
|
||||
void CLHNM_SetForceZero2Black(int16 forceblack) {
|
||||
preserve_color0 = forceblack;
|
||||
}
|
||||
|
||||
hnm_t *CLHNM_New(int preload_size) {
|
||||
hnm_t *hnm;
|
||||
short i;
|
||||
int16 i;
|
||||
|
||||
preload_size = 0; //TODO: let's ignore it for now
|
||||
|
||||
@ -308,7 +308,7 @@ void CLHNM_SetFile(hnm_t *hnm, file_t *file) {
|
||||
CLNoError;
|
||||
}
|
||||
|
||||
void CLHNM_SetFinalBuffer(hnm_t *hnm, unsigned char *buffer) {
|
||||
void CLHNM_SetFinalBuffer(hnm_t *hnm, byte *buffer) {
|
||||
hnm->final_buffer = buffer;
|
||||
CLNoError;
|
||||
}
|
||||
@ -316,13 +316,13 @@ void CLHNM_SetFinalBuffer(hnm_t *hnm, unsigned char *buffer) {
|
||||
void CLHNM_AllocMemory(hnm_t *hnm) {
|
||||
CLBeginCheck;
|
||||
|
||||
hnm->work_buffer[0] = (unsigned char *)CLMemory_Alloc(hnm->header.buffersize + 2);
|
||||
hnm->work_buffer[0] = (byte *)CLMemory_Alloc(hnm->header.buffersize + 2);
|
||||
CLCheckError();
|
||||
|
||||
if (!hnm->work_buffer[0])
|
||||
goto fin;
|
||||
|
||||
hnm->work_buffer[1] = (unsigned char *)CLMemory_Alloc(hnm->header.buffersize + 2);
|
||||
hnm->work_buffer[1] = (byte *)CLMemory_Alloc(hnm->header.buffersize + 2);
|
||||
CLCheckError();
|
||||
|
||||
if (!hnm->work_buffer[1]) {
|
||||
@ -333,7 +333,7 @@ void CLHNM_AllocMemory(hnm_t *hnm) {
|
||||
}
|
||||
|
||||
if (!use_preload) {
|
||||
hnm->read_buffer = (unsigned char *)CLMemory_Alloc(hnm->header.buffersize + 2);
|
||||
hnm->read_buffer = (byte *)CLMemory_Alloc(hnm->header.buffersize + 2);
|
||||
// CLCheckError();
|
||||
if (!hnm->read_buffer) {
|
||||
CLMemory_Free(hnm->work_buffer[0]);
|
||||
@ -387,7 +387,7 @@ void CLHNM_GiveTime(hnm_t *hnm) {
|
||||
}
|
||||
}
|
||||
|
||||
void CLHNM_CanLoop(hnm_t *hnm, short can_loop) {
|
||||
void CLHNM_CanLoop(hnm_t *hnm, int16 can_loop) {
|
||||
hnm->can_loop = can_loop;
|
||||
}
|
||||
|
||||
@ -402,13 +402,13 @@ void CLHNM_SelectBuffers(hnm_t *hnm) {
|
||||
}
|
||||
|
||||
void CLHNM_ChangePalette(hnm_t *hnm) {
|
||||
short mincolor, maxcolor;
|
||||
unsigned short fst, cnt;
|
||||
unsigned char *pal;
|
||||
int16 mincolor, maxcolor;
|
||||
uint16 fst, cnt;
|
||||
byte *pal;
|
||||
color_t *color;
|
||||
CLPalette_GetLastPalette(hnm->palette);
|
||||
pal = hnm->data_ptr;
|
||||
if (*(unsigned short *)pal == 0xFFFF)
|
||||
if (*(uint16 *)pal == 0xFFFF)
|
||||
return;
|
||||
mincolor = 255;
|
||||
maxcolor = 0;
|
||||
@ -426,12 +426,12 @@ void CLHNM_ChangePalette(hnm_t *hnm) {
|
||||
color = hnm->palette + fst;
|
||||
if (safe_palette) {
|
||||
while (cnt--) {
|
||||
unsigned char r = *pal++;
|
||||
unsigned char g = *pal++;
|
||||
unsigned char b = *pal++;
|
||||
short rr = r << 10;
|
||||
short gg = g << 10;
|
||||
short bb = b << 10;
|
||||
byte r = *pal++;
|
||||
byte g = *pal++;
|
||||
byte b = *pal++;
|
||||
int16 rr = r << 10;
|
||||
int16 gg = g << 10;
|
||||
int16 bb = b << 10;
|
||||
if (color->r != rr || color->g != gg || color->b != bb)
|
||||
CLBlitter_OneBlackFlash();
|
||||
color->r = rr;
|
||||
@ -441,9 +441,9 @@ void CLHNM_ChangePalette(hnm_t *hnm) {
|
||||
}
|
||||
} else {
|
||||
while (cnt--) {
|
||||
unsigned char r = *pal++;
|
||||
unsigned char g = *pal++;
|
||||
unsigned char b = *pal++;
|
||||
byte r = *pal++;
|
||||
byte g = *pal++;
|
||||
byte b = *pal++;
|
||||
color->r = r << 10;
|
||||
color->g = g << 10;
|
||||
color->b = b << 10;
|
||||
@ -451,7 +451,7 @@ void CLHNM_ChangePalette(hnm_t *hnm) {
|
||||
}
|
||||
}
|
||||
|
||||
} while (*(unsigned short *)pal != 0xFFFF);
|
||||
} while (*(uint16 *)pal != 0xFFFF);
|
||||
#if 0
|
||||
if (preserve_color0) {
|
||||
hnm->palette[0].r = 0;
|
||||
@ -491,7 +491,7 @@ soundchannel_t *CLHNM_GetSoundChannel() {
|
||||
|
||||
|
||||
void CLHNM_TryRead(hnm_t *hnm, int size) {
|
||||
short err;
|
||||
int16 err;
|
||||
do {
|
||||
CLHNM_Read(hnm, size);
|
||||
err = __libError == -6;
|
||||
@ -515,7 +515,7 @@ void CLHNM_Reset(hnm_t *hnm) {
|
||||
CLNoError;
|
||||
}
|
||||
|
||||
short CLHNM_LoadFrame(hnm_t *hnm) {
|
||||
int16 CLHNM_LoadFrame(hnm_t *hnm) {
|
||||
int chunk;
|
||||
CLBeginCheck;
|
||||
CLHNM_TryRead(hnm, 4);
|
||||
@ -546,21 +546,21 @@ short CLHNM_LoadFrame(hnm_t *hnm) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
void CLHNM_WantsSound(short sound) {
|
||||
void CLHNM_WantsSound(int16 sound) {
|
||||
use_sound = sound;
|
||||
}
|
||||
|
||||
void CLHNM_LoadDecompTable(short *buffer) {
|
||||
short i;
|
||||
short e;
|
||||
void CLHNM_LoadDecompTable(int16 *buffer) {
|
||||
int16 i;
|
||||
int16 e;
|
||||
for (i = 0; i < 256; i++) {
|
||||
e = *buffer++;
|
||||
decomp_table[i] = LE16(e);
|
||||
}
|
||||
}
|
||||
|
||||
void CLHNM_DecompADPCM(unsigned char *buffer, short *output, int size) {
|
||||
short l = pred_l, r = pred_r;
|
||||
void CLHNM_DecompADPCM(byte *buffer, int16 *output, int size) {
|
||||
int16 l = pred_l, r = pred_r;
|
||||
size &= ~1;
|
||||
while (size--) {
|
||||
*output++ = l += decomp_table[*buffer++];
|
||||
@ -572,19 +572,19 @@ void CLHNM_DecompADPCM(unsigned char *buffer, short *output, int size) {
|
||||
pred_r = r;
|
||||
}
|
||||
|
||||
void CLHNM_SoundInADPCM(short is_adpcm) {
|
||||
void CLHNM_SoundInADPCM(int16 is_adpcm) {
|
||||
use_adpcm = is_adpcm;
|
||||
}
|
||||
|
||||
void CLHNM_SoundMono(short is_mono) {
|
||||
void CLHNM_SoundMono(int16 is_mono) {
|
||||
use_mono = is_mono;
|
||||
}
|
||||
|
||||
short CLHNM_NextElement(hnm_t *hnm) {
|
||||
int16 CLHNM_NextElement(hnm_t *hnm) {
|
||||
int sz;
|
||||
short id;
|
||||
int16 id;
|
||||
char h6, h7;
|
||||
short i;
|
||||
int16 i;
|
||||
if (hnm->frame == 0) {
|
||||
CLHNM_ResetInternalTimer();
|
||||
pred_l = pred_r = 0;
|
||||
@ -596,7 +596,7 @@ short CLHNM_NextElement(hnm_t *hnm) {
|
||||
for (;;) {
|
||||
sz = PLE32(hnm->data_ptr) & 0xFFFFFF;
|
||||
hnm->data_ptr += 4;
|
||||
id = *(short *)hnm->data_ptr;
|
||||
id = *(int16 *)hnm->data_ptr;
|
||||
hnm->data_ptr += 2;
|
||||
h6 = *hnm->data_ptr;
|
||||
hnm->data_ptr += 1;
|
||||
@ -667,10 +667,10 @@ short CLHNM_NextElement(hnm_t *hnm) {
|
||||
else
|
||||
pending_sounds++;
|
||||
} else {
|
||||
short *sound_buffer = (short *)CLSoundGroup_GetNextBuffer(soundGroup_adpcm);
|
||||
int16 *sound_buffer = (int16 *)CLSoundGroup_GetNextBuffer(soundGroup_adpcm);
|
||||
if (!pending_sounds) {
|
||||
const int kDecompTableSize = 256 * sizeof(short);
|
||||
CLHNM_LoadDecompTable((short *)hnm->data_ptr);
|
||||
const int kDecompTableSize = 256 * sizeof(int16);
|
||||
CLHNM_LoadDecompTable((int16 *)hnm->data_ptr);
|
||||
CLHNM_DecompADPCM(hnm->data_ptr + kDecompTableSize, sound_buffer, sound_size - kDecompTableSize);
|
||||
CLSoundGroup_AssignDatas(soundGroup_adpcm, sound_buffer, (sound_size - kDecompTableSize) * 2, 0);
|
||||
} else {
|
||||
@ -723,7 +723,7 @@ void CLHNM_ReadHeader(hnm_t *hnm) {
|
||||
hnm->header.buffersize += 4096; //TODO: checkme
|
||||
}
|
||||
|
||||
short CLHNM_GetVersion(hnm_t *hnm) {
|
||||
int16 CLHNM_GetVersion(hnm_t *hnm) {
|
||||
CLNoError;
|
||||
if (hnm->header.id == BE32('HNM4'))
|
||||
return 4;
|
||||
@ -747,13 +747,13 @@ void CLHNM_SetPosIntoFile(hnm_t *hnm, long pos) {
|
||||
CLFile_SetPosition(*hnm->file, 1, pos);
|
||||
}
|
||||
|
||||
void CLHNM_Desentrelace320(unsigned char *frame_buffer, unsigned char *final_buffer, unsigned short height) {
|
||||
void CLHNM_Desentrelace320(byte *frame_buffer, byte *final_buffer, uint16 height) {
|
||||
unsigned int *input = (unsigned int *)frame_buffer;
|
||||
unsigned int *line0 = (unsigned int *)final_buffer;
|
||||
unsigned int *line1 = (unsigned int *)(final_buffer + 320);
|
||||
int count = (height) / 2;
|
||||
while (count--) {
|
||||
short i;
|
||||
int16 i;
|
||||
for (i = 0; i < 320 / 4; i++) {
|
||||
unsigned int p0 = *input++;
|
||||
unsigned int p4 = *input++;
|
||||
|
@ -24,9 +24,9 @@
|
||||
|
||||
namespace Cryo {
|
||||
|
||||
soundgroup_t *CLSoundGroup_New(short numSounds, short arg4, short sampleSize, float rate, short mode) {
|
||||
soundgroup_t *CLSoundGroup_New(int16 numSounds, int16 arg4, int16 sampleSize, float rate, int16 mode) {
|
||||
soundgroup_t *sg;
|
||||
short i;
|
||||
int16 i;
|
||||
|
||||
sg = (soundgroup_t *)CLMemory_Alloc(sizeof(*sg));
|
||||
if (numSounds < CL_MAX_SOUNDS)
|
||||
@ -50,14 +50,14 @@ soundgroup_t *CLSoundGroup_New(short numSounds, short arg4, short sampleSize, fl
|
||||
}
|
||||
|
||||
void CLSoundGroup_Free(soundgroup_t *sg) {
|
||||
short i;
|
||||
int16 i;
|
||||
for (i = 0; i < sg->numSounds; i++)
|
||||
CLSoundRaw_Free(sg->sound[i]);
|
||||
CLMemory_Free(sg);
|
||||
}
|
||||
|
||||
void CLSoundGroup_Reverse16All(soundgroup_t *sg) {
|
||||
short i;
|
||||
int16 i;
|
||||
for (i = 0; i < sg->numSounds; i++)
|
||||
sg->sound[i]->reversed = 1;
|
||||
}
|
||||
@ -69,7 +69,7 @@ void *CLSoundGroup_GetNextBuffer(soundgroup_t *sg) {
|
||||
return ((char *)(*sound->sndHandle)) + sound->headerLen;
|
||||
}
|
||||
|
||||
short CLSoundGroup_AssignDatas(soundgroup_t *sg, void *buffer, int length, short isSigned) {
|
||||
int16 CLSoundGroup_AssignDatas(soundgroup_t *sg, void *buffer, int length, int16 isSigned) {
|
||||
sound_t *sound = sg->sound[sg->soundIndex];
|
||||
if (sg->ff_106)
|
||||
while (sound->locked) ;
|
||||
@ -90,7 +90,7 @@ short CLSoundGroup_AssignDatas(soundgroup_t *sg, void *buffer, int length, short
|
||||
return 1;
|
||||
}
|
||||
|
||||
short CLSoundGroup_SetDatas(soundgroup_t *sg, void *data, int length, short isSigned) {
|
||||
int16 CLSoundGroup_SetDatas(soundgroup_t *sg, void *data, int length, int16 isSigned) {
|
||||
void *buffer;
|
||||
sound_t *sound = sg->sound[sg->soundIndex];
|
||||
if (length >= sound->ff_1A) {
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
namespace Cryo {
|
||||
|
||||
sound_t *CLSoundRaw_New(short arg1, float rate, short sampleSize, short mode) {
|
||||
sound_t *CLSoundRaw_New(int16 arg1, float rate, int16 sampleSize, int16 mode) {
|
||||
sound_t *sound;
|
||||
CLBeginCheck;
|
||||
|
||||
|
@ -32,24 +32,24 @@
|
||||
namespace Cryo {
|
||||
|
||||
///// Mac APIs
|
||||
typedef short OSErr;
|
||||
typedef int16 OSErr;
|
||||
|
||||
short MemError() {
|
||||
int16 MemError() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SysBeep(int x) {
|
||||
}
|
||||
|
||||
OSErr SetFPos(short handle, short mode, long pos) {
|
||||
OSErr SetFPos(int16 handle, int16 mode, long pos) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
OSErr FSRead(short handle, long *size, void *buffer) {
|
||||
OSErr FSRead(int16 handle, long *size, void *buffer) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void FlushEvents(short arg1, short arg2) {
|
||||
void FlushEvents(int16 arg1, int16 arg2) {
|
||||
}
|
||||
|
||||
char *c2pstr(char *s) {
|
||||
@ -96,7 +96,7 @@ void CLView_Free(view_t *view) {
|
||||
CLMemory_Free(view);
|
||||
}
|
||||
void CLView_InitDatas(view_t *view, int w, int h, void *buffer) {
|
||||
view->p_buffer = (unsigned char *)buffer;
|
||||
view->p_buffer = (byte *)buffer;
|
||||
view->width = w;
|
||||
view->height = h;
|
||||
view->pitch = w;
|
||||
@ -117,7 +117,7 @@ void CLView_InitDatas(view_t *view, int w, int h, void *buffer) {
|
||||
view_t *CLView_New(int w, int h) {
|
||||
view_t *view = (view_t *)CLMemory_Alloc(sizeof(view_t));
|
||||
if (view) {
|
||||
void *buffer = (unsigned char *)CLMemory_Alloc(w * h);
|
||||
void *buffer = (byte *)CLMemory_Alloc(w * h);
|
||||
if (buffer) {
|
||||
view->allocated = 1;
|
||||
CLView_InitDatas(view, w, h, buffer);
|
||||
@ -150,35 +150,35 @@ void CLScreenView_CenterIn(view_t *view) {
|
||||
}
|
||||
|
||||
///// CLPalette
|
||||
unsigned short gIntervalLast, gIntervalFirst, gIntervalSet;
|
||||
short gMacintize = 0;
|
||||
uint16 gIntervalLast, gIntervalFirst, gIntervalSet;
|
||||
int16 gMacintize = 0;
|
||||
color_t black_palette[256];
|
||||
color_t last_palette[256];
|
||||
void CLPalette_Init() {
|
||||
short i;
|
||||
int16 i;
|
||||
for (i = 0; i < 256; i++)
|
||||
black_palette[i].r = black_palette[i].g = black_palette[i].b = 0;
|
||||
}
|
||||
void CLPalette_SetLastPalette(color_t *palette, short first, short count) {
|
||||
short i;
|
||||
void CLPalette_SetLastPalette(color_t *palette, int16 first, int16 count) {
|
||||
int16 i;
|
||||
for (i = first; i < first + count; i++)
|
||||
last_palette[i] = palette[i];
|
||||
}
|
||||
void CLPalette_GetLastPalette(color_t *palette) {
|
||||
short i;
|
||||
int16 i;
|
||||
for (i = 0; i < 256; i++)
|
||||
palette[i] = last_palette[i];
|
||||
}
|
||||
void CLPalette_SetRGBColor(color_t *palette, unsigned short index, color3_t *rgb) {
|
||||
void CLPalette_SetRGBColor(color_t *palette, uint16 index, color3_t *rgb) {
|
||||
palette[index].r = rgb->r;
|
||||
palette[index].g = rgb->g;
|
||||
palette[index].b = rgb->b;
|
||||
palette[index].a = 0;
|
||||
}
|
||||
void CLPalette_Macintize(short macintize) {
|
||||
void CLPalette_Macintize(int16 macintize) {
|
||||
gMacintize = macintize;
|
||||
}
|
||||
void CLPalette_SetInterval(unsigned short first, unsigned short last) {
|
||||
void CLPalette_SetInterval(uint16 first, uint16 last) {
|
||||
gIntervalFirst = first;
|
||||
gIntervalSet = 1;
|
||||
gIntervalLast = last;
|
||||
@ -186,9 +186,9 @@ void CLPalette_SetInterval(unsigned short first, unsigned short last) {
|
||||
void CLPalette_DeactivateInterval() {
|
||||
gIntervalSet = 0;
|
||||
}
|
||||
void CLPalette_Send2Screen(struct color_t *palette, unsigned short first, unsigned short count) {
|
||||
void CLPalette_Send2Screen(struct color_t *palette, uint16 first, uint16 count) {
|
||||
OSErr err;
|
||||
short i;
|
||||
int16 i;
|
||||
if (gMacintize) {
|
||||
palette[0].r = palette[0].g = palette[0].b = 0xFFFF;
|
||||
palette[255].r = palette[255].g = palette[255].b = 0;
|
||||
@ -219,9 +219,9 @@ void CLPalette_BeSystem() {
|
||||
}
|
||||
|
||||
///// CLBlitter
|
||||
static unsigned short newPaletteCount, newPaletteFirst;
|
||||
static uint16 newPaletteCount, newPaletteFirst;
|
||||
static color_t *pNewPalette;
|
||||
static unsigned short useNewPalette;
|
||||
static uint16 useNewPalette;
|
||||
|
||||
void CLBlitter_CopyViewRect(view_t *view1, view_t *view2, rect_t *rect1, rect_t *rect2) {
|
||||
int sy, dy = rect2->sy, x, w = rect1->ex - rect1->sx + 1;
|
||||
@ -231,13 +231,13 @@ void CLBlitter_CopyViewRect(view_t *view1, view_t *view2, rect_t *rect1, rect_t
|
||||
// (rect1->ex - rect1->sx == rect2->ex - rect2->sx && rect1->ey - rect1->sy == rect2->ey - rect2->sy) ? "ok" : "BAD");
|
||||
assert(rect1->ex - rect1->sx == rect2->ex - rect2->sx && rect1->ey - rect1->sy == rect2->ey - rect2->sy);
|
||||
for (sy = rect1->sy; sy <= rect1->ey; sy++, dy++) {
|
||||
unsigned char *s = view1->p_buffer + sy * view1->pitch + rect1->sx;
|
||||
unsigned char *d = view2->p_buffer + dy * view2->pitch + rect2->sx;
|
||||
byte *s = view1->p_buffer + sy * view1->pitch + rect1->sx;
|
||||
byte *d = view2->p_buffer + dy * view2->pitch + rect2->sx;
|
||||
for (x = 0; x < w; x++)
|
||||
*d++ = *s++;
|
||||
}
|
||||
}
|
||||
void CLBlitter_Send2ScreenNextCopy(color_t *palette, unsigned short first, unsigned short count) {
|
||||
void CLBlitter_Send2ScreenNextCopy(color_t *palette, uint16 first, uint16 count) {
|
||||
pNewPalette = palette;
|
||||
useNewPalette = 1;
|
||||
newPaletteFirst = first;
|
||||
@ -245,9 +245,9 @@ void CLBlitter_Send2ScreenNextCopy(color_t *palette, unsigned short first, unsig
|
||||
}
|
||||
void CLBlitter_OneBlackFlash() {
|
||||
}
|
||||
void CLBlitter_CopyView2ViewSimpleSize(unsigned char *src, short srcw, short srcp, short srch,
|
||||
unsigned char *dst, short dstw, short dstp, short dsth) {
|
||||
short x, y;
|
||||
void CLBlitter_CopyView2ViewSimpleSize(byte *src, int16 srcw, int16 srcp, int16 srch,
|
||||
byte *dst, int16 dstw, int16 dstp, int16 dsth) {
|
||||
int16 x, y;
|
||||
for (y = 0; y < srch; y++) {
|
||||
for (x = 0; x < srcw; x++)
|
||||
*dst++ = *src++;
|
||||
@ -258,8 +258,8 @@ void CLBlitter_CopyView2ViewSimpleSize(unsigned char *src, short srcw, short src
|
||||
void CLBlitter_CopyView2ScreenCUSTOM(view_t *view) {
|
||||
view_t *dest = &ScreenView;
|
||||
if (!view->doubled) {
|
||||
short srcpitch = view->pitch;
|
||||
short dstpitch = dest->pitch;
|
||||
int16 srcpitch = view->pitch;
|
||||
int16 dstpitch = dest->pitch;
|
||||
|
||||
// this is not quite correct?
|
||||
// CLBlitter_CopyView2ViewSimpleSize(view->p_buffer + view->norm.src_top * srcpitch + view->norm.src_left, view->norm.width, srcpitch, view->norm.height,
|
||||
@ -292,8 +292,8 @@ void CLBlitter_UpdateScreen() {
|
||||
CLBlitter_CopyView2Screen(nullptr);
|
||||
}
|
||||
void CLBlitter_FillView(view_t *view, unsigned int fill) {
|
||||
short x, y;
|
||||
unsigned char *d = view->p_buffer;
|
||||
int16 x, y;
|
||||
byte *d = view->p_buffer;
|
||||
assert((fill & 0xFF) * 0x01010101 == fill);
|
||||
for (y = 0; y < view->height; y++) {
|
||||
for (x = 0; x < view->width; x++)
|
||||
@ -345,16 +345,16 @@ void pollEvents() {
|
||||
|
||||
|
||||
///// CLKeyboard
|
||||
short CLKeyboard_HasCmdDown() {
|
||||
int16 CLKeyboard_HasCmdDown() {
|
||||
return 0;
|
||||
}
|
||||
void CLKeyboard_Read() {
|
||||
pollEvents();
|
||||
}
|
||||
unsigned char CLKeyboard_GetLastASCII() {
|
||||
byte CLKeyboard_GetLastASCII() {
|
||||
return 0;
|
||||
}
|
||||
short CLKeyboard_IsScanCodeDown(short scancode) {
|
||||
int16 CLKeyboard_IsScanCodeDown(int16 scancode) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -363,14 +363,14 @@ void CLMouse_Hide() {
|
||||
}
|
||||
void CLMouse_Show() {
|
||||
}
|
||||
void CLMouse_GetPosition(short *x, short *y) {
|
||||
void CLMouse_GetPosition(int16 *x, int16 *y) {
|
||||
*x = g_system->getEventManager()->getMousePos().x;
|
||||
*y = g_system->getEventManager()->getMousePos().y;
|
||||
}
|
||||
void CLMouse_SetPosition(short x, short y) {
|
||||
void CLMouse_SetPosition(int16 x, int16 y) {
|
||||
g_system->warpMouse(x, y);
|
||||
}
|
||||
unsigned short CLMouse_IsDown() {
|
||||
uint16 CLMouse_IsDown() {
|
||||
pollEvents();
|
||||
return _mouseButton != 0;
|
||||
}
|
||||
@ -389,13 +389,13 @@ void CLFile_MakeStruct(int a3, int a4, char *name, filespec_t *fs) {
|
||||
void CLFile_Create(filespec_t *fs) {
|
||||
fs->create = 1;
|
||||
}
|
||||
void CLFile_Open(filespec_t *fs, short mode, file_t &handle) {
|
||||
void CLFile_Open(filespec_t *fs, int16 mode, file_t &handle) {
|
||||
handle.open(fs->name);
|
||||
}
|
||||
void CLFile_Close(file_t &handle) {
|
||||
handle.close();
|
||||
}
|
||||
void CLFile_SetPosition(file_t &handle, short mode, long pos) {
|
||||
void CLFile_SetPosition(file_t &handle, int16 mode, long pos) {
|
||||
assert(mode == 1);
|
||||
handle.seek(pos, 0);
|
||||
}
|
||||
@ -408,7 +408,7 @@ void CLFile_Write(file_t &handle, void *buffer, long *size) {
|
||||
|
||||
///// CLSound
|
||||
// base sound
|
||||
void CLSound_PrepareSample(sound_t *sound, short mode) {
|
||||
void CLSound_PrepareSample(sound_t *sound, int16 mode) {
|
||||
sound->mode = mode;
|
||||
sound->locked = 0;
|
||||
sound->loopTimes = 0;
|
||||
@ -416,7 +416,7 @@ void CLSound_PrepareSample(sound_t *sound, short mode) {
|
||||
sound->ff_32 = 0;
|
||||
sound->volume = 255;
|
||||
}
|
||||
void CLSound_SetWantsDesigned(short designed) {
|
||||
void CLSound_SetWantsDesigned(int16 designed) {
|
||||
}
|
||||
void CLSound_SetLength(sound_t *sound, int length) {
|
||||
}
|
||||
@ -424,7 +424,7 @@ void CLSound_SetLength(sound_t *sound, int length) {
|
||||
///// CLSoundChannel
|
||||
/// sound output device that plays queue of sounds
|
||||
soundchannel_t *CLSoundChannel_New(int arg1) {
|
||||
short i;
|
||||
int16 i;
|
||||
soundchannel_t *ch = (soundchannel_t *)CLMemory_Alloc(sizeof(*ch));
|
||||
if (!ch)
|
||||
return 0;
|
||||
@ -445,21 +445,21 @@ void CLSoundChannel_Stop(soundchannel_t *ch) {
|
||||
}
|
||||
void CLSoundChannel_Play(soundchannel_t *ch, sound_t *sound) {
|
||||
}
|
||||
short CLSoundChannel_GetVolume(soundchannel_t *ch) {
|
||||
int16 CLSoundChannel_GetVolume(soundchannel_t *ch) {
|
||||
return (ch->volumeLeft + ch->volumeRight) / 2;
|
||||
}
|
||||
void CLSoundChannel_SetVolume(soundchannel_t *ch, short volume) {
|
||||
void CLSoundChannel_SetVolume(soundchannel_t *ch, int16 volume) {
|
||||
if (volume < 0 || volume > 255)
|
||||
return;
|
||||
ch->volumeLeft = volume;
|
||||
ch->volumeRight = volume;
|
||||
}
|
||||
void CLSoundChannel_SetVolumeRight(soundchannel_t *ch, short volume) {
|
||||
void CLSoundChannel_SetVolumeRight(soundchannel_t *ch, int16 volume) {
|
||||
if (volume < 0 || volume > 255)
|
||||
return;
|
||||
ch->volumeRight = volume;
|
||||
}
|
||||
void CLSoundChannel_SetVolumeLeft(soundchannel_t *ch, short volume) {
|
||||
void CLSoundChannel_SetVolumeLeft(soundchannel_t *ch, int16 volume) {
|
||||
if (volume < 0 || volume > 255)
|
||||
return;
|
||||
ch->volumeLeft = volume;
|
||||
@ -498,7 +498,7 @@ void CRYOLib_ManagersInit() {
|
||||
void CRYOLib_ManagersDone() {
|
||||
CLTimer_Done();
|
||||
}
|
||||
void CRYOLib_SetDebugMode(short enable) {
|
||||
void CRYOLib_SetDebugMode(int16 enable) {
|
||||
}
|
||||
void CRYOLib_InstallEmergencyExit(void(*proc)()) {
|
||||
}
|
||||
@ -510,10 +510,10 @@ void CRYOLib_TestConfig() {
|
||||
}
|
||||
|
||||
///// CLComputer
|
||||
short CLComputer_Has68030() {
|
||||
int16 CLComputer_Has68030() {
|
||||
return 0;
|
||||
}
|
||||
short CLComputer_Has68040() {
|
||||
int16 CLComputer_Has68040() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -44,8 +44,8 @@ namespace Cryo {
|
||||
#define BE16(n) SW16(n)
|
||||
#define BE32(n) SW32(n)
|
||||
#endif
|
||||
#define PLE16(p) ( (((unsigned char*)(p))[1] << 8) | ((unsigned char*)(p))[0] )
|
||||
#define PLE32(p) ( (((unsigned char*)(p))[3] << 24) | (((unsigned char*)(p))[2] << 16) | (((unsigned char*)(p))[1] << 8) | ((unsigned char*)(p))[0] )
|
||||
#define PLE16(p) ( (((byte*)(p))[1] << 8) | ((byte*)(p))[0] )
|
||||
#define PLE32(p) ( (((byte*)(p))[3] << 24) | (((byte*)(p))[2] << 16) | (((byte*)(p))[1] << 8) | ((byte*)(p))[0] )
|
||||
|
||||
typedef void *SndChannel;
|
||||
typedef char *Handle;
|
||||
@ -53,11 +53,11 @@ enum {
|
||||
fsFromStart = 1
|
||||
};
|
||||
|
||||
extern short __debug2;
|
||||
extern int16 __debug2;
|
||||
|
||||
extern short __debug, __libError, __osError;
|
||||
extern int16 __debug, __libError, __osError;
|
||||
|
||||
#define CLBeginCheck { short __oldDebug = __debug; __debug = -1;
|
||||
#define CLBeginCheck { int16 __oldDebug = __debug; __debug = -1;
|
||||
#define CLEndCheck __debug = __oldDebug; }
|
||||
#define CLNoError __libError = 0;
|
||||
|
||||
@ -79,12 +79,12 @@ struct rect_t {
|
||||
typedef struct rect_t rect_t;
|
||||
|
||||
struct view_t {
|
||||
unsigned char *p_buffer;
|
||||
byte *p_buffer;
|
||||
int width;
|
||||
int height;
|
||||
short pitch;
|
||||
short doubled;
|
||||
short allocated;
|
||||
int16 pitch;
|
||||
int16 doubled;
|
||||
int16 allocated;
|
||||
struct {
|
||||
int src_left;
|
||||
int src_top;
|
||||
@ -97,12 +97,12 @@ struct view_t {
|
||||
typedef struct view_t view_t;
|
||||
|
||||
struct color3_t {
|
||||
short r, g, b;
|
||||
int16 r, g, b;
|
||||
};
|
||||
typedef struct color3_t color3_t;
|
||||
|
||||
struct color_t {
|
||||
short a, r, g, b;
|
||||
int16 a, r, g, b;
|
||||
};
|
||||
typedef struct color_t color_t;
|
||||
|
||||
@ -118,15 +118,15 @@ struct hnmheader_t {
|
||||
char flag2;
|
||||
char reseverd;
|
||||
char bpp;
|
||||
unsigned short width;
|
||||
unsigned short height;
|
||||
uint16 width;
|
||||
uint16 height;
|
||||
int filesize;
|
||||
int nframe;
|
||||
int table_offset;
|
||||
short speed;
|
||||
short maxbuffer;
|
||||
int16 speed;
|
||||
int16 maxbuffer;
|
||||
int buffersize;
|
||||
short ff_20;
|
||||
int16 ff_20;
|
||||
char reserved2[14];
|
||||
char copyright[16];
|
||||
};
|
||||
@ -138,18 +138,18 @@ struct hnm_t {
|
||||
int ff_4;
|
||||
file_t *file;
|
||||
hnmheader_t header;
|
||||
unsigned char *work_buffer[2];
|
||||
unsigned char *final_buffer;
|
||||
unsigned char *new_frame_buffer;
|
||||
unsigned char *old_frame_buffer;
|
||||
unsigned char *read_buffer;
|
||||
unsigned char *data_ptr;
|
||||
byte *work_buffer[2];
|
||||
byte *final_buffer;
|
||||
byte *new_frame_buffer;
|
||||
byte *old_frame_buffer;
|
||||
byte *read_buffer;
|
||||
byte *data_ptr;
|
||||
color_t palette[256];
|
||||
|
||||
short can_loop;
|
||||
int16 can_loop;
|
||||
|
||||
short ff_896;
|
||||
short chunk_id;
|
||||
int16 ff_896;
|
||||
int16 chunk_id;
|
||||
int total_read;
|
||||
};
|
||||
typedef struct hnm_t hnm_t;
|
||||
@ -160,23 +160,23 @@ typedef struct hnm_t hnm_t;
|
||||
|
||||
struct sound_t {
|
||||
Handle sndHandle;
|
||||
short headerLen;
|
||||
int16 headerLen;
|
||||
long headerOffset;
|
||||
short ff_A;
|
||||
int16 ff_A;
|
||||
|
||||
char *buffer;
|
||||
int ff_16;
|
||||
short ff_1A;
|
||||
int16 ff_1A;
|
||||
float rate;
|
||||
short sampleSize;
|
||||
int16 sampleSize;
|
||||
int length;
|
||||
short mode;
|
||||
volatile short locked;
|
||||
int16 mode;
|
||||
volatile int16 locked;
|
||||
long loopStart;
|
||||
short loopTimes;
|
||||
short reversed;
|
||||
short ff_32;
|
||||
short volume;
|
||||
int16 loopTimes;
|
||||
int16 reversed;
|
||||
int16 ff_32;
|
||||
int16 volume;
|
||||
};
|
||||
typedef struct sound_t sound_t;
|
||||
|
||||
@ -184,10 +184,10 @@ typedef struct sound_t sound_t;
|
||||
|
||||
struct soundgroup_t {
|
||||
sound_t *sound[CL_MAX_SOUNDS];
|
||||
short numSounds;
|
||||
short soundIndex;
|
||||
short playIndex;
|
||||
short ff_106;
|
||||
int16 numSounds;
|
||||
int16 soundIndex;
|
||||
int16 playIndex;
|
||||
int16 ff_106;
|
||||
};
|
||||
typedef struct soundgroup_t soundgroup_t;
|
||||
|
||||
@ -197,13 +197,13 @@ struct soundchannel_t {
|
||||
Audio::SoundHandle ch;
|
||||
int xx;
|
||||
|
||||
short volumeLeft;
|
||||
short volumeRight;
|
||||
short numSounds;
|
||||
int16 volumeLeft;
|
||||
int16 volumeRight;
|
||||
int16 numSounds;
|
||||
|
||||
sound_t *sounds[CL_MAX_CH_SOUNDS];
|
||||
|
||||
short ff_536;
|
||||
int16 ff_536;
|
||||
};
|
||||
typedef struct soundchannel_t soundchannel_t;
|
||||
|
||||
@ -211,15 +211,15 @@ extern volatile long TimerTicks;
|
||||
extern view_t ScreenView;
|
||||
|
||||
|
||||
soundgroup_t *CLSoundGroup_New(short numSounds, short arg4, short sampleSize, float rate, short mode);
|
||||
soundgroup_t *CLSoundGroup_New(int16 numSounds, int16 arg4, int16 sampleSize, float rate, int16 mode);
|
||||
void CLSoundGroup_Free(soundgroup_t *sg);
|
||||
void CLSoundGroup_Reverse16All(soundgroup_t *sg);
|
||||
void *CLSoundGroup_GetNextBuffer(soundgroup_t *sg);
|
||||
short CLSoundGroup_AssignDatas(soundgroup_t *sg, void *buffer, int length, short isSigned);
|
||||
short CLSoundGroup_SetDatas(soundgroup_t *sg, void *data, int length, short isSigned);
|
||||
int16 CLSoundGroup_AssignDatas(soundgroup_t *sg, void *buffer, int length, int16 isSigned);
|
||||
int16 CLSoundGroup_SetDatas(soundgroup_t *sg, void *data, int length, int16 isSigned);
|
||||
void CLSoundGroup_PlayNextSample(soundgroup_t *sg, soundchannel_t *ch);
|
||||
|
||||
sound_t *CLSoundRaw_New(short arg1, float rate, short sampleSize, short mode);
|
||||
sound_t *CLSoundRaw_New(int16 arg1, float rate, int16 sampleSize, int16 mode);
|
||||
void CLSoundRaw_Free(sound_t *sound);
|
||||
void CLSoundRaw_AssignBuffer(sound_t *sound, void *buffer, int bufferOffs, int length);
|
||||
|
||||
@ -227,16 +227,16 @@ char *c2pstr(char *s);
|
||||
void DebugStr(char *s);
|
||||
void *CLMemory_Alloc(int size);
|
||||
void CLMemory_Free(void *ptr);
|
||||
short MemError();
|
||||
int16 MemError();
|
||||
void SysBeep(int x);
|
||||
long TickCount();
|
||||
void FlushEvents(short arg1, short arg2);
|
||||
void FlushEvents(int16 arg1, int16 arg2);
|
||||
|
||||
void CLBlitter_CopyViewRect(view_t *view1, view_t *view2, rect_t *rect1, rect_t *rect2);
|
||||
void CLBlitter_Send2ScreenNextCopy(color_t *palette, unsigned short first, unsigned short count);
|
||||
void CLBlitter_Send2ScreenNextCopy(color_t *palette, uint16 first, uint16 count);
|
||||
void CLBlitter_OneBlackFlash();
|
||||
void CLBlitter_CopyView2ViewSimpleSize(unsigned char *src, short srcw, short srcp, short srch,
|
||||
unsigned char *dst, short dstw, short dstp, short dsth);
|
||||
void CLBlitter_CopyView2ViewSimpleSize(byte *src, int16 srcw, int16 srcp, int16 srch,
|
||||
byte *dst, int16 dstw, int16 dstp, int16 dsth);
|
||||
void CLBlitter_CopyView2ScreenCUSTOM(view_t *view);
|
||||
void CLBlitter_CopyView2Screen(view_t *view);
|
||||
void CLBlitter_UpdateScreen();
|
||||
@ -244,13 +244,13 @@ void CLBlitter_FillView(view_t *view, unsigned int fill);
|
||||
void CLBlitter_FillScreenView(unsigned int fill);
|
||||
|
||||
void CLPalette_Init();
|
||||
void CLPalette_SetLastPalette(color_t *palette, short first, short count);
|
||||
void CLPalette_SetLastPalette(color_t *palette, int16 first, int16 count);
|
||||
void CLPalette_GetLastPalette(color_t *palette);
|
||||
void CLPalette_SetRGBColor(color_t *palette, unsigned short index, color3_t *rgb);
|
||||
void CLPalette_Macintize(short macintize);
|
||||
void CLPalette_SetInterval(unsigned short first, unsigned short last);
|
||||
void CLPalette_SetRGBColor(color_t *palette, uint16 index, color3_t *rgb);
|
||||
void CLPalette_Macintize(int16 macintize);
|
||||
void CLPalette_SetInterval(uint16 first, uint16 last);
|
||||
void CLPalette_DeactivateInterval();
|
||||
void CLPalette_Send2Screen(struct color_t *palette, unsigned short first, unsigned short count);
|
||||
void CLPalette_Send2Screen(struct color_t *palette, uint16 first, uint16 count);
|
||||
void CLPalette_BeBlack();
|
||||
void CLPalette_BeSystem();
|
||||
|
||||
@ -259,35 +259,35 @@ void CLFile_SetFinderInfos(void *fs, int a4, int a5);
|
||||
void CLFile_GetFullPath(void *a3, char *a4);
|
||||
void CLFile_MakeStruct(int a3, int a4, char *name, filespec_t *fs);
|
||||
void CLFile_Create(filespec_t *fs);
|
||||
void CLFile_Open(filespec_t *fs, short mode, file_t &handle);
|
||||
void CLFile_Open(filespec_t *fs, int16 mode, file_t &handle);
|
||||
void CLFile_Close(file_t &handle);
|
||||
void CLFile_SetPosition(file_t &handle, short mode, long pos);
|
||||
void CLFile_SetPosition(file_t &handle, int16 mode, long pos);
|
||||
void CLFile_Read(file_t &handle, void *buffer, long *size);
|
||||
void CLFile_Write(file_t &handle, void *buffer, long *size);
|
||||
|
||||
void CLSound_PrepareSample(sound_t *sound, short mode);
|
||||
void CLSound_SetWantsDesigned(short designed);
|
||||
void CLSound_PrepareSample(sound_t *sound, int16 mode);
|
||||
void CLSound_SetWantsDesigned(int16 designed);
|
||||
void CLSound_SetLength(sound_t *sound, int length);
|
||||
|
||||
soundchannel_t *CLSoundChannel_New(int arg1);
|
||||
void CLSoundChannel_Free(soundchannel_t *ch);
|
||||
void CLSoundChannel_Stop(soundchannel_t *ch);
|
||||
void CLSoundChannel_Play(soundchannel_t *ch, sound_t *sound);
|
||||
short CLSoundChannel_GetVolume(soundchannel_t *ch);
|
||||
void CLSoundChannel_SetVolume(soundchannel_t *ch, short volume);
|
||||
void CLSoundChannel_SetVolumeRight(soundchannel_t *ch, short volume);
|
||||
void CLSoundChannel_SetVolumeLeft(soundchannel_t *ch, short volume);
|
||||
int16 CLSoundChannel_GetVolume(soundchannel_t *ch);
|
||||
void CLSoundChannel_SetVolume(soundchannel_t *ch, int16 volume);
|
||||
void CLSoundChannel_SetVolumeRight(soundchannel_t *ch, int16 volume);
|
||||
void CLSoundChannel_SetVolumeLeft(soundchannel_t *ch, int16 volume);
|
||||
|
||||
short CLKeyboard_HasCmdDown();
|
||||
int16 CLKeyboard_HasCmdDown();
|
||||
void CLKeyboard_Read();
|
||||
unsigned char CLKeyboard_GetLastASCII();
|
||||
short CLKeyboard_IsScanCodeDown(short scancode);
|
||||
byte CLKeyboard_GetLastASCII();
|
||||
int16 CLKeyboard_IsScanCodeDown(int16 scancode);
|
||||
|
||||
void CLMouse_Hide();
|
||||
void CLMouse_Show();
|
||||
void CLMouse_GetPosition(short *x, short *y);
|
||||
void CLMouse_SetPosition(short x, short y);
|
||||
unsigned short CLMouse_IsDown();
|
||||
void CLMouse_GetPosition(int16 *x, int16 *y);
|
||||
void CLMouse_SetPosition(int16 x, int16 y);
|
||||
uint16 CLMouse_IsDown();
|
||||
|
||||
void CLView_SetSrcZoomValues(view_t *view, int x, int y);
|
||||
void CLView_SetDisplayZoomValues(view_t *view, int w, int h);
|
||||
@ -306,37 +306,37 @@ void CRYOLib_Done();
|
||||
void CRYOLib_MinimalInit();
|
||||
void CRYOLib_ManagersInit();
|
||||
void CRYOLib_ManagersDone();
|
||||
void CRYOLib_SetDebugMode(short enable);
|
||||
void CRYOLib_SetDebugMode(int16 enable);
|
||||
void CRYOLib_InstallEmergencyExit(void(*proc)());
|
||||
void CRYOLib_SetupEnvironment();
|
||||
void CRYOLib_RestoreEnvironment();
|
||||
void CRYOLib_TestConfig();
|
||||
|
||||
short CLComputer_Has68030();
|
||||
short CLComputer_Has68040();
|
||||
int16 CLComputer_Has68030();
|
||||
int16 CLComputer_Has68040();
|
||||
void CLDesktop_TestOpenFileAtStartup();
|
||||
|
||||
|
||||
void CLHNM_DecompLempelZiv(unsigned char *buffer, unsigned char *output);
|
||||
void CLHNM_DecompUBA(unsigned char *output, unsigned char *curr_buffer, unsigned char *prev_buffer,
|
||||
unsigned char *input, int width, char flags);
|
||||
void CLHNM_DecompLempelZiv(byte *buffer, byte *output);
|
||||
void CLHNM_DecompUBA(byte *output, byte *curr_buffer, byte *prev_buffer,
|
||||
byte *input, int width, char flags);
|
||||
void CLHNM_Init();
|
||||
void CLHNM_Done();
|
||||
void CLHNM_SetupTimer(float rate);
|
||||
void CLHNM_WaitLoop(hnm_t *hnm);
|
||||
void CLHNM_SetupSound(short numSounds, short arg4, short sampleSize, float rate, short mode);
|
||||
void CLHNM_SetupSoundADPCM(short numSounds, short arg4, short sampleSize, float rate, short mode);
|
||||
void CLHNM_SetupSound(int16 numSounds, int16 arg4, int16 sampleSize, float rate, int16 mode);
|
||||
void CLHNM_SetupSoundADPCM(int16 numSounds, int16 arg4, int16 sampleSize, float rate, int16 mode);
|
||||
void CLHNM_CloseSound();
|
||||
void CLHNM_SetForceZero2Black(short forceblack);
|
||||
void CLHNM_SetForceZero2Black(int16 forceblack);
|
||||
hnm_t *CLHNM_New(int preload_size);
|
||||
void CLHNM_Dispose(hnm_t *hnm);
|
||||
void CLHNM_SetFile(hnm_t *hnm, file_t *file);
|
||||
void CLHNM_SetFinalBuffer(hnm_t *hnm, unsigned char *buffer);
|
||||
void CLHNM_SetFinalBuffer(hnm_t *hnm, byte *buffer);
|
||||
void CLHNM_AllocMemory(hnm_t *hnm);
|
||||
void CLHNM_DeallocMemory(hnm_t *hnm);
|
||||
void CLHNM_Read(hnm_t *hnm, int size);
|
||||
void CLHNM_GiveTime(hnm_t *hnm);
|
||||
void CLHNM_CanLoop(hnm_t *hnm, short can_loop);
|
||||
void CLHNM_CanLoop(hnm_t *hnm, int16 can_loop);
|
||||
void CLHNM_SelectBuffers(hnm_t *hnm);
|
||||
void CLHNM_ChangePalette(hnm_t *hnm);
|
||||
void CLHNM_Desentrelace(hnm_t *hnm);
|
||||
@ -345,20 +345,20 @@ soundchannel_t *CLHNM_GetSoundChannel();
|
||||
void CLHNM_TryRead(hnm_t *hnm, int size);
|
||||
void CLHNM_ResetInternalTimer();
|
||||
void CLHNM_Reset(hnm_t *hnm);
|
||||
short CLHNM_LoadFrame(hnm_t *hnm);
|
||||
void CLHNM_WantsSound(short sound);
|
||||
void CLHNM_LoadDecompTable(short *buffer);
|
||||
void CLHNM_DecompADPCM(unsigned char *buffer, short *output, int size);
|
||||
void CLHNM_SoundInADPCM(short is_adpcm);
|
||||
void CLHNM_SoundMono(short is_mono);
|
||||
short CLHNM_NextElement(hnm_t *hnm);
|
||||
int16 CLHNM_LoadFrame(hnm_t *hnm);
|
||||
void CLHNM_WantsSound(int16 sound);
|
||||
void CLHNM_LoadDecompTable(int16 *buffer);
|
||||
void CLHNM_DecompADPCM(byte *buffer, int16 *output, int size);
|
||||
void CLHNM_SoundInADPCM(int16 is_adpcm);
|
||||
void CLHNM_SoundMono(int16 is_mono);
|
||||
int16 CLHNM_NextElement(hnm_t *hnm);
|
||||
void CLHNM_ReadHeader(hnm_t *hnm);
|
||||
short CLHNM_GetVersion(hnm_t *hnm);
|
||||
int16 CLHNM_GetVersion(hnm_t *hnm);
|
||||
int CLHNM_GetFrameNum(hnm_t *hnm);
|
||||
void CLHNM_DeactivatePreloadBuffer();
|
||||
void CLHNM_Prepare2Read(hnm_t *hnm, int mode);
|
||||
void CLHNM_SetPosIntoFile(hnm_t *hnm, long pos);
|
||||
void CLHNM_Desentrelace320(unsigned char *frame_buffer, unsigned char *final_buffer, unsigned short height);
|
||||
void CLHNM_Desentrelace320(byte *frame_buffer, byte *final_buffer, uint16 height);
|
||||
|
||||
|
||||
} // End of namespace Cryo
|
||||
|
@ -30,12 +30,12 @@ namespace Cryo {
|
||||
#define GetElem(array, idx) \
|
||||
( (char*)(array) + PLE16((idx) * 2 + (char*)(array)) )
|
||||
/*
|
||||
static inline void* AGetElem(unsigned char *arr, short index)
|
||||
static inline void* AGetElem(byte *arr, int16 index)
|
||||
{
|
||||
unsigned char *p = arr + num * 2;
|
||||
unsigned char o0 = *p++;
|
||||
unsigned char o1 = *p++;
|
||||
unsigned short ofs = (o1 << 8) | o0;
|
||||
byte *p = arr + num * 2;
|
||||
byte o0 = *p++;
|
||||
byte o1 = *p++;
|
||||
uint16 ofs = (o1 << 8) | o0;
|
||||
return arr + ofs;
|
||||
}
|
||||
*/
|
||||
@ -318,26 +318,26 @@ enum PersonFlags {
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct perso_t {
|
||||
unsigned short roomNum; // room this person currently in
|
||||
unsigned short actionId; // TODO: checkme
|
||||
unsigned short party; // party bit mask
|
||||
unsigned char id; // character
|
||||
unsigned char flags; // flags and kind
|
||||
unsigned char roomBankIdx;// index in kPersoRoomBankTable for specific room banks
|
||||
unsigned char bank; // sprite bank
|
||||
unsigned short items; // inventory
|
||||
unsigned short powers; // obj of power bitmask
|
||||
unsigned char targetLoc; // For party member this is mini sprite index
|
||||
unsigned char lastLoc; // For party member this is mini sprite x offset
|
||||
unsigned char speed; // num ticks per step
|
||||
unsigned char steps; // current ticks
|
||||
uint16 roomNum; // room this person currently in
|
||||
uint16 actionId; // TODO: checkme
|
||||
uint16 party; // party bit mask
|
||||
byte id; // character
|
||||
byte flags; // flags and kind
|
||||
byte roomBankIdx;// index in kPersoRoomBankTable for specific room banks
|
||||
byte bank; // sprite bank
|
||||
uint16 items; // inventory
|
||||
uint16 powers; // obj of power bitmask
|
||||
byte targetLoc; // For party member this is mini sprite index
|
||||
byte lastLoc; // For party member this is mini sprite x offset
|
||||
byte speed; // num ticks per step
|
||||
byte steps; // current ticks
|
||||
};
|
||||
typedef struct perso_t perso_t;
|
||||
|
||||
class EdenGame;
|
||||
|
||||
struct phase_t {
|
||||
short id;
|
||||
int16 id;
|
||||
void (EdenGame::*disp)();
|
||||
};
|
||||
typedef struct phase_t phase_t;
|
||||
@ -351,12 +351,12 @@ enum ObjectFlags {
|
||||
|
||||
#define MAX_OBJECTS 42
|
||||
struct object_t {
|
||||
unsigned char id;
|
||||
unsigned char flags;
|
||||
byte id;
|
||||
byte flags;
|
||||
int locations; // index in kObjectLocations
|
||||
short itemMask;
|
||||
short powerMask; // object of power bitmask
|
||||
short count;
|
||||
int16 itemMask;
|
||||
int16 powerMask; // object of power bitmask
|
||||
int16 count;
|
||||
};
|
||||
typedef struct object_t object_t;
|
||||
|
||||
@ -389,11 +389,11 @@ struct dial_t {
|
||||
typedef struct dial_t dial_t;
|
||||
|
||||
struct tape_t {
|
||||
short textNum;
|
||||
int16 textNum;
|
||||
perso_t *perso;
|
||||
short party;
|
||||
short roomNum;
|
||||
short bgBankNum;
|
||||
int16 party;
|
||||
int16 roomNum;
|
||||
int16 bgBankNum;
|
||||
dial_t *dialog;
|
||||
};
|
||||
typedef struct tape_t tape_t;
|
||||
@ -401,33 +401,33 @@ typedef struct tape_t tape_t;
|
||||
struct suiveur_t { // Characters on Mirror screen
|
||||
char id; // character
|
||||
char image; // sprite number
|
||||
short sx;
|
||||
short sy;
|
||||
short ex;
|
||||
short ey;
|
||||
short bank;
|
||||
short ff_C;
|
||||
short ff_E;
|
||||
int16 sx;
|
||||
int16 sy;
|
||||
int16 ex;
|
||||
int16 ey;
|
||||
int16 bank;
|
||||
int16 ff_C;
|
||||
int16 ff_E;
|
||||
};
|
||||
typedef struct suiveur_t suiveur_t;
|
||||
|
||||
struct icon_t {
|
||||
short sx;
|
||||
short sy;
|
||||
short ex;
|
||||
short ey;
|
||||
unsigned short cursor_id; // & 0x8000 - inactive/hidden
|
||||
int16 sx;
|
||||
int16 sy;
|
||||
int16 ex;
|
||||
int16 ey;
|
||||
uint16 cursor_id; // & 0x8000 - inactive/hidden
|
||||
unsigned int action_id;
|
||||
unsigned int object_id;
|
||||
};
|
||||
typedef struct icon_t icon_t;
|
||||
|
||||
struct goto_t {
|
||||
unsigned char areaNum; // target area
|
||||
unsigned char curAreaNum; // current area
|
||||
unsigned char departVid;
|
||||
unsigned char travelTime; // time to skip while in travel
|
||||
unsigned char arriveVid;
|
||||
byte areaNum; // target area
|
||||
byte curAreaNum; // current area
|
||||
byte departVid;
|
||||
byte travelTime; // time to skip while in travel
|
||||
byte arriveVid;
|
||||
};
|
||||
typedef struct goto_t goto_t;
|
||||
|
||||
@ -445,15 +445,15 @@ enum RoomFlags {
|
||||
}
|
||||
|
||||
struct room_t {
|
||||
unsigned char ff_0;
|
||||
unsigned char exits[4]; //TODO: signed?
|
||||
unsigned char flags;
|
||||
unsigned short bank;
|
||||
unsigned short party;
|
||||
unsigned char level; // Citadel level
|
||||
unsigned char video;
|
||||
unsigned char location;
|
||||
unsigned char background; // bg/mirror image number (relative)
|
||||
byte ff_0;
|
||||
byte exits[4]; //TODO: signed?
|
||||
byte flags;
|
||||
uint16 bank;
|
||||
uint16 party;
|
||||
byte level; // Citadel level
|
||||
byte video;
|
||||
byte location;
|
||||
byte background; // bg/mirror image number (relative)
|
||||
};
|
||||
typedef struct room_t room_t;
|
||||
|
||||
@ -484,14 +484,14 @@ enum AreaType {
|
||||
}
|
||||
|
||||
struct area_t {
|
||||
unsigned char num;
|
||||
unsigned char type;
|
||||
unsigned short flags;
|
||||
unsigned short firstRoomIndex;
|
||||
unsigned char citadelLevel;
|
||||
unsigned char salNum;
|
||||
byte num;
|
||||
byte type;
|
||||
uint16 flags;
|
||||
uint16 firstRoomIndex;
|
||||
byte citadelLevel;
|
||||
byte salNum;
|
||||
room_t *citadelRoom;
|
||||
short visitCount;
|
||||
int16 visitCount;
|
||||
};
|
||||
typedef struct area_t area_t;
|
||||
|
||||
@ -600,87 +600,87 @@ enum GameFlags {
|
||||
}
|
||||
|
||||
struct global_t {
|
||||
unsigned char areaNum;
|
||||
unsigned char areaVisitCount;
|
||||
unsigned char menuItemIdLo;
|
||||
unsigned char menuItemIdHi; //TODO: pad?
|
||||
unsigned short randomNumber; //TODO: this is randomized in pc ver and used by some conds. always zero on mac
|
||||
unsigned short gameTime;
|
||||
unsigned short gameDays;
|
||||
unsigned short chrono;
|
||||
unsigned short eloiDepartureDay;
|
||||
unsigned short roomNum; // current room number
|
||||
unsigned short newRoomNum; // target room number selected on world map
|
||||
unsigned short phaseNum;
|
||||
unsigned short metPersonsMask1;
|
||||
unsigned short party;
|
||||
unsigned short partyOutside;
|
||||
unsigned short metPersonsMask2;
|
||||
unsigned short __UNUSED_1C; //TODO: write-only?
|
||||
unsigned short phaseActionsCount;
|
||||
unsigned short curAreaFlags;
|
||||
unsigned short curItemsMask;
|
||||
unsigned short curPowersMask;
|
||||
unsigned short curPersoItems;
|
||||
unsigned short curPersoPowers;
|
||||
unsigned short wonItemsMask;
|
||||
unsigned short wonPowersMask;
|
||||
unsigned short stepsToFindAppleFast;
|
||||
unsigned short stepsToFindAppleNormal;
|
||||
unsigned short roomPersoItems; //TODO: write-only?
|
||||
unsigned short roomPersoPowers; //TODO: write-only?
|
||||
unsigned short gameFlags;
|
||||
unsigned short curVideoNum;
|
||||
unsigned short morkusSpyVideoNum1; //TODO: pad?
|
||||
unsigned short morkusSpyVideoNum2; //TODO: pad?
|
||||
unsigned short morkusSpyVideoNum3; //TODO: pad?
|
||||
unsigned short morkusSpyVideoNum4; //TODO: pad?
|
||||
unsigned char newMusicType;
|
||||
unsigned char ff_43;
|
||||
unsigned char videoSubtitleIndex;
|
||||
unsigned char partyInstruments; // &1 - Bell for Monk, &2 - Drum for Thugg
|
||||
unsigned char monkGotRing;
|
||||
unsigned char chrono_on;
|
||||
unsigned char curRoomFlags;
|
||||
unsigned char endGameFlag;
|
||||
unsigned char last_info;
|
||||
unsigned char autoDialog;
|
||||
unsigned char worldTyrannSighted;
|
||||
unsigned char ff_4D;
|
||||
unsigned char ff_4E;
|
||||
unsigned char worldGaveGold;
|
||||
unsigned char worldHasTriceraptors;
|
||||
unsigned char worldHasVelociraptors;
|
||||
unsigned char worldHasTyrann;
|
||||
unsigned char ff_53;
|
||||
unsigned char ff_54;
|
||||
unsigned char ff_55; //TODO: pad?
|
||||
unsigned char ff_56;
|
||||
unsigned char textToken1;
|
||||
unsigned char textToken2; //TODO: pad?
|
||||
unsigned char eloiHaveNews;
|
||||
unsigned char dialogFlags;
|
||||
unsigned char curAreaType;
|
||||
unsigned char curCitadelLevel;
|
||||
unsigned char newLocation;
|
||||
unsigned char prevLocation;
|
||||
unsigned char curPersoFlags;
|
||||
unsigned char ff_60;
|
||||
unsigned char eventType;
|
||||
unsigned char ff_62; //TODO: pad?
|
||||
unsigned char curObjectId;
|
||||
unsigned char curObjectFlags;
|
||||
unsigned char ff_65; //TODO: pad?
|
||||
unsigned char roomPersoType;
|
||||
unsigned char roomPersoFlags;
|
||||
unsigned char narratorSequence;
|
||||
unsigned char ff_69;
|
||||
unsigned char ff_6A;
|
||||
unsigned char fresqNumber;
|
||||
unsigned char ff_6C; //TODO: pad?
|
||||
unsigned char ff_6D; //TODO: pad?
|
||||
unsigned char labyrinthDirections;
|
||||
unsigned char labyrinthRoom;
|
||||
byte areaNum;
|
||||
byte areaVisitCount;
|
||||
byte menuItemIdLo;
|
||||
byte menuItemIdHi; //TODO: pad?
|
||||
uint16 randomNumber; //TODO: this is randomized in pc ver and used by some conds. always zero on mac
|
||||
uint16 gameTime;
|
||||
uint16 gameDays;
|
||||
uint16 chrono;
|
||||
uint16 eloiDepartureDay;
|
||||
uint16 roomNum; // current room number
|
||||
uint16 newRoomNum; // target room number selected on world map
|
||||
uint16 phaseNum;
|
||||
uint16 metPersonsMask1;
|
||||
uint16 party;
|
||||
uint16 partyOutside;
|
||||
uint16 metPersonsMask2;
|
||||
uint16 __UNUSED_1C; //TODO: write-only?
|
||||
uint16 phaseActionsCount;
|
||||
uint16 curAreaFlags;
|
||||
uint16 curItemsMask;
|
||||
uint16 curPowersMask;
|
||||
uint16 curPersoItems;
|
||||
uint16 curPersoPowers;
|
||||
uint16 wonItemsMask;
|
||||
uint16 wonPowersMask;
|
||||
uint16 stepsToFindAppleFast;
|
||||
uint16 stepsToFindAppleNormal;
|
||||
uint16 roomPersoItems; //TODO: write-only?
|
||||
uint16 roomPersoPowers; //TODO: write-only?
|
||||
uint16 gameFlags;
|
||||
uint16 curVideoNum;
|
||||
uint16 morkusSpyVideoNum1; //TODO: pad?
|
||||
uint16 morkusSpyVideoNum2; //TODO: pad?
|
||||
uint16 morkusSpyVideoNum3; //TODO: pad?
|
||||
uint16 morkusSpyVideoNum4; //TODO: pad?
|
||||
byte newMusicType;
|
||||
byte ff_43;
|
||||
byte videoSubtitleIndex;
|
||||
byte partyInstruments; // &1 - Bell for Monk, &2 - Drum for Thugg
|
||||
byte monkGotRing;
|
||||
byte chrono_on;
|
||||
byte curRoomFlags;
|
||||
byte endGameFlag;
|
||||
byte last_info;
|
||||
byte autoDialog;
|
||||
byte worldTyrannSighted;
|
||||
byte ff_4D;
|
||||
byte ff_4E;
|
||||
byte worldGaveGold;
|
||||
byte worldHasTriceraptors;
|
||||
byte worldHasVelociraptors;
|
||||
byte worldHasTyrann;
|
||||
byte ff_53;
|
||||
byte ff_54;
|
||||
byte ff_55; //TODO: pad?
|
||||
byte ff_56;
|
||||
byte textToken1;
|
||||
byte textToken2; //TODO: pad?
|
||||
byte eloiHaveNews;
|
||||
byte dialogFlags;
|
||||
byte curAreaType;
|
||||
byte curCitadelLevel;
|
||||
byte newLocation;
|
||||
byte prevLocation;
|
||||
byte curPersoFlags;
|
||||
byte ff_60;
|
||||
byte eventType;
|
||||
byte ff_62; //TODO: pad?
|
||||
byte curObjectId;
|
||||
byte curObjectFlags;
|
||||
byte ff_65; //TODO: pad?
|
||||
byte roomPersoType;
|
||||
byte roomPersoFlags;
|
||||
byte narratorSequence;
|
||||
byte ff_69;
|
||||
byte ff_6A;
|
||||
byte fresqNumber;
|
||||
byte ff_6C; //TODO: pad?
|
||||
byte ff_6D; //TODO: pad?
|
||||
byte labyrinthDirections;
|
||||
byte labyrinthRoom;
|
||||
void *__UNUSED_70; //TODO: pad?
|
||||
dial_t *dialog_ptr;
|
||||
tape_t *tape_ptr;
|
||||
@ -688,9 +688,9 @@ struct global_t {
|
||||
dial_t *narrator_dialog_ptr;
|
||||
dial_t *last_dialog_ptr;
|
||||
icon_t *nextRoomIcon;
|
||||
unsigned char *phraseBufferPtr;
|
||||
unsigned char *__UNUSED_90; //TODO: write-only?
|
||||
unsigned char *__UNUSED_94; //TODO: write-only?
|
||||
byte *phraseBufferPtr;
|
||||
byte *__UNUSED_90; //TODO: write-only?
|
||||
byte *__UNUSED_94; //TODO: write-only?
|
||||
room_t *room_ptr;
|
||||
area_t *area_ptr;
|
||||
area_t *last_area_ptr;
|
||||
@ -698,72 +698,72 @@ struct global_t {
|
||||
room_t *cita_area_firstRoom;
|
||||
perso_t *perso_ptr;
|
||||
perso_t *room_perso;
|
||||
unsigned char last_info_idx;
|
||||
unsigned char next_info_idx;
|
||||
unsigned char *persoSpritePtr;
|
||||
unsigned char *persoSpritePtr2;
|
||||
unsigned char *curPersoAnimPtr;
|
||||
unsigned char *ff_C2; //TODO: image desc arr
|
||||
short iconsIndex;
|
||||
short curObjectCursor; // TODO: useless?
|
||||
short ff_CA;
|
||||
short __UNUSED_CC; //TODO: unused/pad
|
||||
short perso_img_bank; //TODO: unsigned?
|
||||
unsigned short roomImgBank;
|
||||
unsigned short persoBackgroundBankIdx;
|
||||
unsigned short ff_D4; //TODO: unsigned?
|
||||
unsigned short fresqWidth;
|
||||
unsigned short fresqImgBank;
|
||||
unsigned short ff_DA; //TODO: pad?
|
||||
unsigned short ff_DC; //TODO: pad?
|
||||
unsigned short room_x_base;
|
||||
unsigned short ff_E0; //TODO: pad?
|
||||
unsigned short dialogType;
|
||||
unsigned short ff_E4; //TODO: pad?
|
||||
unsigned short currentMusicNum;
|
||||
short textNum;
|
||||
unsigned short travelTime;
|
||||
unsigned short ff_EC; //TODO: pad?
|
||||
unsigned char displayFlags;
|
||||
unsigned char oldDisplayFlags;
|
||||
unsigned char drawFlags;
|
||||
unsigned char ff_F1;
|
||||
unsigned char ff_F2;
|
||||
unsigned char menuFlags;
|
||||
unsigned char ff_F4; //TODO: write-only?
|
||||
unsigned char ff_F5;
|
||||
unsigned char ff_F6;
|
||||
unsigned char ff_F7;
|
||||
unsigned char ff_F8; //TODO: pad?
|
||||
unsigned char ff_F9; //TODO: pad?
|
||||
unsigned char ff_FA; //TODO: pad?
|
||||
unsigned char animationFlags;
|
||||
unsigned char __UNUSED_FC; //TODO: pad?
|
||||
unsigned char giveobj1;
|
||||
unsigned char giveobj2;
|
||||
unsigned char giveobj3;
|
||||
unsigned char ff_100;
|
||||
unsigned char roomVidNum;
|
||||
unsigned char ff_102;
|
||||
unsigned char ff_103;
|
||||
unsigned char roomBgBankNum;
|
||||
unsigned char valleyVidNum;
|
||||
unsigned char updatePaletteFlag;
|
||||
unsigned char inventoryScrollPos;
|
||||
unsigned char obj_count;
|
||||
unsigned char ff_109; //TODO: write-only?
|
||||
unsigned char textBankIndex;
|
||||
unsigned char pref_language;
|
||||
unsigned char pref_10C[2]; //TODO: volume
|
||||
unsigned char pref_10E[2]; // -//-
|
||||
unsigned char pref_110[2]; // -//-
|
||||
unsigned char cita_area_num;
|
||||
unsigned char ff_113;
|
||||
unsigned char lastSalNum;
|
||||
unsigned char save_end;
|
||||
short textWidthLimit;
|
||||
unsigned char numGiveObjs;
|
||||
unsigned char ff_119; // unused
|
||||
byte last_info_idx;
|
||||
byte next_info_idx;
|
||||
byte *persoSpritePtr;
|
||||
byte *persoSpritePtr2;
|
||||
byte *curPersoAnimPtr;
|
||||
byte *ff_C2; //TODO: image desc arr
|
||||
int16 iconsIndex;
|
||||
int16 curObjectCursor; // TODO: useless?
|
||||
int16 ff_CA;
|
||||
int16 __UNUSED_CC; //TODO: unused/pad
|
||||
int16 perso_img_bank; //TODO: unsigned?
|
||||
uint16 roomImgBank;
|
||||
uint16 persoBackgroundBankIdx;
|
||||
uint16 ff_D4; //TODO: unsigned?
|
||||
uint16 fresqWidth;
|
||||
uint16 fresqImgBank;
|
||||
uint16 ff_DA; //TODO: pad?
|
||||
uint16 ff_DC; //TODO: pad?
|
||||
uint16 room_x_base;
|
||||
uint16 ff_E0; //TODO: pad?
|
||||
uint16 dialogType;
|
||||
uint16 ff_E4; //TODO: pad?
|
||||
uint16 currentMusicNum;
|
||||
int16 textNum;
|
||||
uint16 travelTime;
|
||||
uint16 ff_EC; //TODO: pad?
|
||||
byte displayFlags;
|
||||
byte oldDisplayFlags;
|
||||
byte drawFlags;
|
||||
byte ff_F1;
|
||||
byte ff_F2;
|
||||
byte menuFlags;
|
||||
byte ff_F4; //TODO: write-only?
|
||||
byte ff_F5;
|
||||
byte ff_F6;
|
||||
byte ff_F7;
|
||||
byte ff_F8; //TODO: pad?
|
||||
byte ff_F9; //TODO: pad?
|
||||
byte ff_FA; //TODO: pad?
|
||||
byte animationFlags;
|
||||
byte __UNUSED_FC; //TODO: pad?
|
||||
byte giveobj1;
|
||||
byte giveobj2;
|
||||
byte giveobj3;
|
||||
byte ff_100;
|
||||
byte roomVidNum;
|
||||
byte ff_102;
|
||||
byte ff_103;
|
||||
byte roomBgBankNum;
|
||||
byte valleyVidNum;
|
||||
byte updatePaletteFlag;
|
||||
byte inventoryScrollPos;
|
||||
byte obj_count;
|
||||
byte ff_109; //TODO: write-only?
|
||||
byte textBankIndex;
|
||||
byte pref_language;
|
||||
byte pref_10C[2]; //TODO: volume
|
||||
byte pref_10E[2]; // -//-
|
||||
byte pref_110[2]; // -//-
|
||||
byte cita_area_num;
|
||||
byte ff_113;
|
||||
byte lastSalNum;
|
||||
byte save_end;
|
||||
int16 textWidthLimit;
|
||||
byte numGiveObjs;
|
||||
byte ff_119; // unused
|
||||
};
|
||||
typedef struct global_t global_t;
|
||||
|
||||
@ -776,15 +776,15 @@ struct pakfile_t {
|
||||
typedef struct pakfile_t pakfile_t;
|
||||
|
||||
struct pak_t {
|
||||
unsigned short count;
|
||||
uint16 count;
|
||||
pakfile_t files[10];
|
||||
};
|
||||
typedef struct pak_t pak_t;
|
||||
#pragma pack(pop)
|
||||
|
||||
struct cita_t {
|
||||
short ff_0;
|
||||
short ff_2[8 * 2];
|
||||
int16 ff_0;
|
||||
int16 ff_2[8 * 2];
|
||||
};
|
||||
typedef struct cita_t cita_t;
|
||||
|
||||
@ -807,7 +807,7 @@ enum {
|
||||
LAB_W
|
||||
};
|
||||
|
||||
extern unsigned char kLabyrinthPath[];
|
||||
extern byte kLabyrinthPath[];
|
||||
|
||||
extern char kDinoSpeedForCitaLevel[16];
|
||||
|
||||
@ -818,46 +818,46 @@ extern char kPersoRoomBankTable[];
|
||||
|
||||
// area transition descriptors
|
||||
extern goto_t gotos[];
|
||||
extern short tab_2D24C[];
|
||||
extern short tab_2D28E[];
|
||||
extern short tab_2D298[];
|
||||
extern short tab_2D2AA[];
|
||||
extern short tab_2D2C4[];
|
||||
extern int16 tab_2D24C[];
|
||||
extern int16 tab_2D28E[];
|
||||
extern int16 tab_2D298[];
|
||||
extern int16 tab_2D2AA[];
|
||||
extern int16 tab_2D2C4[];
|
||||
extern object_t objects[];
|
||||
extern short kObjectLocations[100];
|
||||
extern int16 kObjectLocations[100];
|
||||
extern perso_t kPersons[];
|
||||
extern cita_t cita_list[];
|
||||
extern short tab_2CB16[];
|
||||
extern int16 tab_2CB16[];
|
||||
extern char tab_2CB1E[8][4];
|
||||
|
||||
struct prect_t {
|
||||
short sx, sy, ex, ey;
|
||||
int16 sx, sy, ex, ey;
|
||||
};
|
||||
typedef struct prect_t prect_t;
|
||||
|
||||
extern prect_t perso_rects[];
|
||||
extern unsigned char tab_persxx[][5];
|
||||
extern byte tab_persxx[][5];
|
||||
extern area_t kAreasTable[];
|
||||
extern short tab_2CEF0[64];
|
||||
extern short tab_2CF70[64];
|
||||
extern short kActionCursors[299];
|
||||
extern int16 tab_2CEF0[64];
|
||||
extern int16 tab_2CF70[64];
|
||||
extern int16 kActionCursors[299];
|
||||
|
||||
struct cubeface_t {
|
||||
int tri;
|
||||
char ff_4;
|
||||
char ff_5;
|
||||
|
||||
unsigned char *texptr;
|
||||
unsigned short *indices;
|
||||
short *uv;
|
||||
byte *texptr;
|
||||
uint16 *indices;
|
||||
int16 *uv;
|
||||
};
|
||||
typedef struct cubeface_t cubeface_t;
|
||||
|
||||
struct cube_t {
|
||||
int num;
|
||||
cubeface_t **faces;
|
||||
short *projection; // projected XYZ coords
|
||||
short *vertices;
|
||||
int16 *projection; // projected XYZ coords
|
||||
int16 *vertices;
|
||||
};
|
||||
typedef struct cube_t cube_t;
|
||||
|
||||
@ -868,7 +868,7 @@ extern float flt_2DF84;
|
||||
// Cube faces to texture coords mapping
|
||||
// each entry is num_polys(6) * num_faces_per_poly(2) * vertex_per_face(3) * uv(2)
|
||||
|
||||
extern short cube_texcoords[3][6 * 2 * 3 * 2];
|
||||
extern int16 cube_texcoords[3][6 * 2 * 3 * 2];
|
||||
extern char tab_2E138[4 * 3];
|
||||
|
||||
} // End of namespace Cryo
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -44,17 +44,17 @@ private:
|
||||
void finfresques();
|
||||
void scrollmiroir();
|
||||
void scrollpano();
|
||||
void affsuiveur(suiveur_t *suiveur, short x, short y);
|
||||
void affsuiveur(suiveur_t *suiveur, int16 x, int16 y);
|
||||
void persoinmiroir();
|
||||
void gametomiroir(unsigned char arg1);
|
||||
void gametomiroir(byte arg1);
|
||||
void flipmode();
|
||||
void quitmiroir();
|
||||
void clictimbre();
|
||||
void clicplanval();
|
||||
void gotolieu(goto_t *go);
|
||||
void deplaval(unsigned short roomNum);
|
||||
void deplacement(short dir);
|
||||
void deplacement2(short dir);
|
||||
void deplaval(uint16 roomNum);
|
||||
void deplacement(int16 dir);
|
||||
void deplacement2(int16 dir);
|
||||
void dinosoufle();
|
||||
void plaquemonk();
|
||||
void fresquesgraa();
|
||||
@ -94,22 +94,22 @@ private:
|
||||
void afficher();
|
||||
void afficher128();
|
||||
void sauvefrises();
|
||||
void sauvefriseshaut(short x);
|
||||
void sauvefriseshaut(int16 x);
|
||||
void sauvefrisesbas();
|
||||
void restaurefrises();
|
||||
void restaurefriseshaut();
|
||||
void restaurefrisesbas();
|
||||
void use_main_bank();
|
||||
void use_bank(short bank);
|
||||
void sundcurs(short x, short y);
|
||||
void use_bank(int16 bank);
|
||||
void sundcurs(int16 x, int16 y);
|
||||
void rundcurs();
|
||||
void noclipax(short index, short x, short y);
|
||||
void noclipax_avecnoir(short index, short x, short y);
|
||||
void getglow(short x, short y, short w, short h);
|
||||
void noclipax(int16 index, int16 x, int16 y);
|
||||
void noclipax_avecnoir(int16 index, int16 x, int16 y);
|
||||
void getglow(int16 x, int16 y, int16 w, int16 h);
|
||||
void unglow();
|
||||
void glow(short index);
|
||||
void readpalette(unsigned char *ptr);
|
||||
void spritesurbulle(short index, short x, short y);
|
||||
void glow(int16 index);
|
||||
void readpalette(byte *ptr);
|
||||
void spritesurbulle(int16 index, int16 x, int16 y);
|
||||
void bars_out();
|
||||
void bars_in();
|
||||
void sauvefondbouche();
|
||||
@ -117,12 +117,12 @@ private:
|
||||
void blackbars();
|
||||
void afftopscr();
|
||||
void affplanval();
|
||||
void affrepere(short index, short location);
|
||||
void affrepereadam(short location);
|
||||
void affrepere(int16 index, int16 location);
|
||||
void affrepereadam(int16 location);
|
||||
void rest_repadam();
|
||||
void save_repadam(short x, short y);
|
||||
char istrice(short roomNum);
|
||||
char istyran(short roomNum);
|
||||
void save_repadam(int16 x, int16 y);
|
||||
char istrice(int16 roomNum);
|
||||
char istyran(int16 roomNum);
|
||||
void istyranval(area_t *area);
|
||||
char getdirection(perso_t *perso);
|
||||
char caselibre(char loc, perso_t *perso);
|
||||
@ -130,9 +130,9 @@ private:
|
||||
void melange2(char elem[4]);
|
||||
void melangedir();
|
||||
char naitredino(char persoType);
|
||||
void newcita(char arg1, short arg2, room_t *room);
|
||||
void citaevol(short level);
|
||||
void citacapoute(short roomNum);
|
||||
void newcita(char arg1, int16 arg2, room_t *room);
|
||||
void citaevol(int16 level);
|
||||
void citacapoute(int16 roomNum);
|
||||
void buildcita();
|
||||
void citatombe(char level);
|
||||
void constcita();
|
||||
@ -140,19 +140,19 @@ private:
|
||||
void deplaalldino();
|
||||
void newvallee();
|
||||
char whereiscita();
|
||||
char iscita(short loc);
|
||||
char iscita(int16 loc);
|
||||
void lieuvava(area_t *area);
|
||||
void vivredino();
|
||||
void vivreval(short areaNum);
|
||||
void vivreval(int16 areaNum);
|
||||
void chaquejour();
|
||||
void temps_passe(short t);
|
||||
void temps_passe(int16 t);
|
||||
void heurepasse();
|
||||
void anim_perso();
|
||||
void getanimrnd();
|
||||
void addanim();
|
||||
void virespritebouche();
|
||||
void anim_perfin();
|
||||
void perso_spr(unsigned char *spr);
|
||||
void perso_spr(byte *spr);
|
||||
void af_image();
|
||||
void af_perso1();
|
||||
void af_perso();
|
||||
@ -169,13 +169,13 @@ private:
|
||||
void show_perso();
|
||||
void showpersopanel();
|
||||
void getdatasync();
|
||||
short ReadNombreFrames();
|
||||
int16 ReadNombreFrames();
|
||||
void waitendspeak();
|
||||
void my_bulle();
|
||||
void my_pr_bulle();
|
||||
void charsurbulle(unsigned char c, unsigned char color, short width);
|
||||
void charsurbulle(byte c, byte color, int16 width);
|
||||
void af_subtitle();
|
||||
void sauvefondbulle(short y);
|
||||
void sauvefondbulle(int16 y);
|
||||
void restaurefondbulle();
|
||||
void af_subtitlehnm();
|
||||
void patchphrase();
|
||||
@ -190,7 +190,7 @@ private:
|
||||
void init_perso_ptr(perso_t *perso);
|
||||
void perso1(perso_t *perso);
|
||||
void perso_normal(perso_t *perso);
|
||||
void persoparle(short pers);
|
||||
void persoparle(int16 pers);
|
||||
void roi();
|
||||
void dina();
|
||||
void thoo();
|
||||
@ -237,48 +237,48 @@ private:
|
||||
void abortdial();
|
||||
void narrateur();
|
||||
void vrf_phrases_file();
|
||||
unsigned char *gettxtad(short id);
|
||||
byte *gettxtad(int16 id);
|
||||
void gotocarte();
|
||||
void record();
|
||||
char dial_scan(dial_t *dial);
|
||||
char dialoscansvmas(dial_t *dial);
|
||||
char dialo_even(perso_t *perso);
|
||||
void stay_here();
|
||||
void mort(short vid);
|
||||
void mort(int16 vid);
|
||||
void evenchrono();
|
||||
void chronoon(short t);
|
||||
void prechargephrases(short vid);
|
||||
void chronoon(int16 t);
|
||||
void prechargephrases(int16 vid);
|
||||
void effet1();
|
||||
void effet2();
|
||||
void effet3();
|
||||
void effet4();
|
||||
void ClearScreen();
|
||||
void colimacon(short pattern[16]);
|
||||
void colimacon(int16 pattern[16]);
|
||||
void fadetoblack(int delay);
|
||||
void fadetoblack128(int delay);
|
||||
void fadefromblack128(int delay);
|
||||
void rectanglenoir32();
|
||||
void setRS1(short sx, short sy, short ex, short ey);
|
||||
void setRD1(short sx, short sy, short ex, short ey);
|
||||
void setRS1(int16 sx, int16 sy, int16 ex, int16 ey);
|
||||
void setRD1(int16 sx, int16 sy, int16 ex, int16 ey);
|
||||
void wait(int howlong);
|
||||
void effetpix();
|
||||
void verifh(void *ptr);
|
||||
void openbigfile();
|
||||
void closebigfile();
|
||||
void loadfile(unsigned short num, void *buffer);
|
||||
void shnmfl(unsigned short num);
|
||||
int ssndfl(unsigned short num);
|
||||
void loadfile(uint16 num, void *buffer);
|
||||
void shnmfl(uint16 num);
|
||||
int ssndfl(uint16 num);
|
||||
void ConvertIcons(icon_t *icon, int count);
|
||||
void ConvertLinks(room_t *room, int count);
|
||||
void ConvertMacToPC();
|
||||
void loadpermfiles();
|
||||
char ReadDataSync(unsigned short num);
|
||||
void loadpartoffile(unsigned short num, void *buffer, long pos, long len);
|
||||
char ReadDataSync(uint16 num);
|
||||
void loadpartoffile(uint16 num, void *buffer, long pos, long len);
|
||||
void Expand_hsq(void *input, void *output);
|
||||
void ajouinfo(unsigned char info);
|
||||
void ajouinfo(byte info);
|
||||
void unlockinfo();
|
||||
void nextinfo();
|
||||
void delinfo(unsigned char info);
|
||||
void delinfo(byte info);
|
||||
void updateinfolist();
|
||||
void init_globals();
|
||||
void initrect();
|
||||
@ -286,17 +286,17 @@ private:
|
||||
void afsalle1(room_t *room);
|
||||
void afsalle();
|
||||
void aflieu();
|
||||
void loadsal(short num);
|
||||
void loadsal(int16 num);
|
||||
void specialoutside();
|
||||
void specialout();
|
||||
void specialin();
|
||||
void animpiece();
|
||||
void getdino(room_t *room);
|
||||
room_t *getsalle(short loc);
|
||||
void initlieu(short roomNum);
|
||||
room_t *getsalle(int16 loc);
|
||||
void initlieu(int16 roomNum);
|
||||
void maj2();
|
||||
void majsalle1(short roomNum);
|
||||
void maj_salle(unsigned short roomNum);
|
||||
void majsalle1(int16 roomNum);
|
||||
void maj_salle(uint16 roomNum);
|
||||
void initbuf();
|
||||
void freebuf();
|
||||
void openwindow();
|
||||
@ -308,32 +308,32 @@ private:
|
||||
void signon(char *s);
|
||||
void testPommeQ();
|
||||
void FRDevents();
|
||||
icon_t *scan_icon_list(short x, short y, short index);
|
||||
icon_t *scan_icon_list(int16 x, int16 y, int16 index);
|
||||
void update_cursor();
|
||||
void mouse();
|
||||
void showfilm(char arg1);
|
||||
void playhnm(short num);
|
||||
void playhnm(int16 num);
|
||||
void bullehnm();
|
||||
void musique();
|
||||
void startmusique(unsigned char num);
|
||||
void startmusique(byte num);
|
||||
void musicspy();
|
||||
int loadmusicfile(short num);
|
||||
int loadmusicfile(int16 num);
|
||||
void persovox();
|
||||
void endpersovox();
|
||||
void fademusicup();
|
||||
void fademusica0(short delay);
|
||||
object_t *getobjaddr(short id);
|
||||
void fademusica0(int16 delay);
|
||||
object_t *getobjaddr(int16 id);
|
||||
void countobjects();
|
||||
void showobjects();
|
||||
void winobject(short id);
|
||||
void loseobject(short id);
|
||||
void winobject(int16 id);
|
||||
void loseobject(int16 id);
|
||||
void lostobject();
|
||||
char objecthere(short id);
|
||||
void objectmain(short id);
|
||||
void getobject(short id);
|
||||
char objecthere(int16 id);
|
||||
void objectmain(int16 id);
|
||||
void getobject(int16 id);
|
||||
void putobject();
|
||||
void newobject(short id, short arg2);
|
||||
void giveobjectal(short id);
|
||||
void newobject(int16 id, int16 arg2);
|
||||
void giveobjectal(int16 id);
|
||||
void giveobject();
|
||||
void takeobject();
|
||||
void newchampi();
|
||||
@ -359,7 +359,7 @@ private:
|
||||
void choixsubtitle();
|
||||
void reglervol();
|
||||
void changervol();
|
||||
void newvol(unsigned char *volptr, short delta);
|
||||
void newvol(byte *volptr, int16 delta);
|
||||
void playtape();
|
||||
void rewindtape();
|
||||
void depcurstape();
|
||||
@ -372,25 +372,25 @@ private:
|
||||
void langbuftopanel();
|
||||
void affpanel();
|
||||
void afflangue();
|
||||
void affcursvol(short x, short vol1, short vol2);
|
||||
void affcursvol(int16 x, int16 vol1, int16 vol2);
|
||||
void affcurseurs();
|
||||
void curseurselect(int itemId);
|
||||
void afftoppano();
|
||||
void affresult();
|
||||
void limitezonecurs(short xmin, short xmax, short ymin, short ymax);
|
||||
void limitezonecurs(int16 xmin, int16 xmax, int16 ymin, int16 ymax);
|
||||
void PommeQ();
|
||||
void habitants(perso_t *perso);
|
||||
void suiveurs(perso_t *perso);
|
||||
void evenements(perso_t *perso);
|
||||
void followme(perso_t *perso);
|
||||
void rangermammi(perso_t *perso, room_t *room);
|
||||
void perso_ici(short action);
|
||||
void perso_ici(int16 action);
|
||||
void setpersohere();
|
||||
void faire_suivre(short roomNum);
|
||||
void faire_suivre(int16 roomNum);
|
||||
void suis_moi5();
|
||||
void suis_moi(short index);
|
||||
void suis_moi(int16 index);
|
||||
void reste_ici5();
|
||||
void reste_ici(short index);
|
||||
void reste_ici(int16 index);
|
||||
void eloipart();
|
||||
char eloirevientq();
|
||||
void eloirevient();
|
||||
@ -459,20 +459,20 @@ private:
|
||||
void lieuoffsetin();
|
||||
void bandeoffsetout();
|
||||
void bandeoffsetin();
|
||||
char testcondition(short index);
|
||||
unsigned short opera_add(unsigned short v1, unsigned short v2);
|
||||
unsigned short opera_sub(unsigned short v1, unsigned short v2);
|
||||
unsigned short opera_and(unsigned short v1, unsigned short v2);
|
||||
unsigned short opera_or(unsigned short v1, unsigned short v2);
|
||||
unsigned short opera_egal(unsigned short v1, unsigned short v2);
|
||||
unsigned short opera_petit(unsigned short v1, unsigned short v2);
|
||||
unsigned short opera_grand(unsigned short v1, unsigned short v2);
|
||||
unsigned short opera_diff(unsigned short v1, unsigned short v2);
|
||||
unsigned short opera_petega(unsigned short v1, unsigned short v2);
|
||||
unsigned short opera_graega(unsigned short v1, unsigned short v2);
|
||||
unsigned short opera_faux(unsigned short v1, unsigned short v2);
|
||||
unsigned short operation(unsigned char op, unsigned short v1, unsigned short v2);
|
||||
unsigned short cher_valeur();
|
||||
char testcondition(int16 index);
|
||||
uint16 opera_add(uint16 v1, uint16 v2);
|
||||
uint16 opera_sub(uint16 v1, uint16 v2);
|
||||
uint16 opera_and(uint16 v1, uint16 v2);
|
||||
uint16 opera_or(uint16 v1, uint16 v2);
|
||||
uint16 opera_egal(uint16 v1, uint16 v2);
|
||||
uint16 opera_petit(uint16 v1, uint16 v2);
|
||||
uint16 opera_grand(uint16 v1, uint16 v2);
|
||||
uint16 opera_diff(uint16 v1, uint16 v2);
|
||||
uint16 opera_petega(uint16 v1, uint16 v2);
|
||||
uint16 opera_graega(uint16 v1, uint16 v2);
|
||||
uint16 opera_faux(uint16 v1, uint16 v2);
|
||||
uint16 operation(byte op, uint16 v1, uint16 v2);
|
||||
uint16 cher_valeur();
|
||||
void monbreak();
|
||||
void ret();
|
||||
void make_tabcos();
|
||||
@ -481,36 +481,36 @@ private:
|
||||
void init_cube();
|
||||
void moteur();
|
||||
void affiche_objet(cube_t *cube);
|
||||
void NEWcharge_map(int file_id, unsigned char *buffer);
|
||||
void NEWcharge_objet_mob(cube_t *cube, int file_id, unsigned char *texptr);
|
||||
void NEWcharge_map(int file_id, byte *buffer);
|
||||
void NEWcharge_objet_mob(cube_t *cube, int file_id, byte *texptr);
|
||||
static int next_val(char **ptr, char *error);
|
||||
void selectmap(short num);
|
||||
void selectmap(int16 num);
|
||||
void Eden_dep_and_rot();
|
||||
void restoreZDEP();
|
||||
void affiche_polygone_mapping(cube_t *cube, cubeface_t *face);
|
||||
void trace_ligne_mapping(short r3, short r4, short r5, short r6, short r7, short r8, short r9, short r10, short *lines);
|
||||
void affiche_ligne_mapping(short r3, short r4, unsigned char *target, unsigned char *texture);
|
||||
short OpenDialog(void *arg1, void *arg2);
|
||||
void trace_ligne_mapping(int16 r3, int16 r4, int16 r5, int16 r6, int16 r7, int16 r8, int16 r9, int16 r10, int16 *lines);
|
||||
void affiche_ligne_mapping(int16 r3, int16 r4, byte *target, byte *texture);
|
||||
int16 OpenDialog(void *arg1, void *arg2);
|
||||
void LostEdenMac_InitPrefs();
|
||||
|
||||
private:
|
||||
short old_scroll_pos, scroll_pos;
|
||||
short word_2F514;
|
||||
unsigned char fresqTalk;
|
||||
unsigned char keep01, keep02, keep10, keep11, keep12, keep13, keep21, keep22;
|
||||
unsigned char curs_keepbuf[2500];
|
||||
short curs_keepy, curs_keepx;
|
||||
short torchCursor;
|
||||
short cur_bank_num;
|
||||
short glow_h;
|
||||
short glow_w;
|
||||
short glow_y;
|
||||
short glow_x;
|
||||
unsigned char needPaletteUpdate;
|
||||
unsigned char curs_saved;
|
||||
unsigned char showBlackBars;
|
||||
unsigned char fond_saved;
|
||||
unsigned char *bank_data_ptr;
|
||||
int16 old_scroll_pos, scroll_pos;
|
||||
int16 word_2F514;
|
||||
byte fresqTalk;
|
||||
byte keep01, keep02, keep10, keep11, keep12, keep13, keep21, keep22;
|
||||
byte curs_keepbuf[2500];
|
||||
int16 curs_keepy, curs_keepx;
|
||||
int16 torchCursor;
|
||||
int16 cur_bank_num;
|
||||
int16 glow_h;
|
||||
int16 glow_w;
|
||||
int16 glow_y;
|
||||
int16 glow_x;
|
||||
byte needPaletteUpdate;
|
||||
byte curs_saved;
|
||||
byte showBlackBars;
|
||||
byte fond_saved;
|
||||
byte *bank_data_ptr;
|
||||
color3_t pal_entry;
|
||||
color_t global_palette[256]; //TODO palette_t
|
||||
perso_t *tyranPtr;
|
||||
@ -518,34 +518,34 @@ private:
|
||||
int cur_anim_frame_num;
|
||||
int last_anim_ticks;
|
||||
prect_t *cur_perso_rect;
|
||||
short num_anim_frames;
|
||||
short max_perso_desc;
|
||||
short num_img_desc;
|
||||
unsigned char restartAnimation;
|
||||
unsigned char animationActive;
|
||||
unsigned char animationDelay;
|
||||
unsigned char animationIndex;
|
||||
unsigned char lastAnimationIndex;
|
||||
int16 num_anim_frames;
|
||||
int16 max_perso_desc;
|
||||
int16 num_img_desc;
|
||||
byte restartAnimation;
|
||||
byte animationActive;
|
||||
byte animationDelay;
|
||||
byte animationIndex;
|
||||
byte lastAnimationIndex;
|
||||
|
||||
unsigned char *dword_30724;
|
||||
unsigned char *dword_30728; //TODO: rename - something amim-related
|
||||
unsigned char *dword_3072C; //TODO ditto
|
||||
unsigned char *animationTable;
|
||||
unsigned char imagedesc[512];
|
||||
unsigned char *perso_img_bank_data_ptr;
|
||||
unsigned char savedUnderSubtitles;
|
||||
short num_text_lines;
|
||||
unsigned char phraseBuffer[400];
|
||||
unsigned char *text_ptr;
|
||||
unsigned char phraseIconsBuffer[10];
|
||||
unsigned char phraseCoordsBuffer[22];
|
||||
unsigned char *textoutptr;
|
||||
unsigned char *textout;
|
||||
byte *dword_30724;
|
||||
byte *dword_30728; //TODO: rename - something amim-related
|
||||
byte *dword_3072C; //TODO ditto
|
||||
byte *animationTable;
|
||||
byte imagedesc[512];
|
||||
byte *perso_img_bank_data_ptr;
|
||||
byte savedUnderSubtitles;
|
||||
int16 num_text_lines;
|
||||
byte phraseBuffer[400];
|
||||
byte *text_ptr;
|
||||
byte phraseIconsBuffer[10];
|
||||
byte phraseCoordsBuffer[22];
|
||||
byte *textoutptr;
|
||||
byte *textout;
|
||||
object_t *currentSpecialObject;
|
||||
short word_30AFC;
|
||||
unsigned char byte_30AFE;
|
||||
int16 word_30AFC;
|
||||
byte byte_30AFE;
|
||||
|
||||
unsigned char byte_30B00;
|
||||
byte byte_30B00;
|
||||
int dword_30B04;
|
||||
|
||||
char lastPhrasesFile;
|
||||
@ -557,36 +557,36 @@ private:
|
||||
rect_t rect_dst, rect_src;
|
||||
void *voiceSamplesBuffer; //TODO: sound sample buffer
|
||||
file_t h_bigfile;
|
||||
unsigned char info_list[16];
|
||||
unsigned char needToFade;
|
||||
unsigned char lastMusicNum;
|
||||
unsigned char *main_bank_buf;
|
||||
unsigned char *music_buf;
|
||||
unsigned char *gameLipsync;
|
||||
unsigned char *gamePhrases;
|
||||
unsigned char *gameDialogs; //TODO: rename to dialogs?
|
||||
unsigned char *gameConditions;
|
||||
byte info_list[16];
|
||||
byte needToFade;
|
||||
byte lastMusicNum;
|
||||
byte *main_bank_buf;
|
||||
byte *music_buf;
|
||||
byte *gameLipsync;
|
||||
byte *gamePhrases;
|
||||
byte *gameDialogs; //TODO: rename to dialogs?
|
||||
byte *gameConditions;
|
||||
void *sal_buf; //TODO: fixme
|
||||
unsigned char *bank_data_buf;
|
||||
byte *bank_data_buf;
|
||||
icon_t *gameIcons;
|
||||
room_t *gameRooms;
|
||||
pak_t *bigfile_header;
|
||||
unsigned char *glow_buffer;
|
||||
unsigned char *p_mainview_buf;
|
||||
unsigned char *p_view2_buf;
|
||||
unsigned char *gameFont; //TODO: rename to font?
|
||||
unsigned char *p_subtitlesview_buf;
|
||||
unsigned char *p_underSubtitlesView_buf;
|
||||
byte *glow_buffer;
|
||||
byte *p_mainview_buf;
|
||||
byte *p_view2_buf;
|
||||
byte *gameFont; //TODO: rename to font?
|
||||
byte *p_subtitlesview_buf;
|
||||
byte *p_underSubtitlesView_buf;
|
||||
global_t *p_global;
|
||||
unsigned short mouse_y_center, mouse_x_center;
|
||||
uint16 mouse_y_center, mouse_x_center;
|
||||
int quit_flag3; //TODO: some obsolete error flag?
|
||||
unsigned short machine_speed;
|
||||
unsigned char quit_flag;
|
||||
uint16 machine_speed;
|
||||
byte quit_flag;
|
||||
|
||||
unsigned char gameStarted;
|
||||
byte gameStarted;
|
||||
|
||||
unsigned char quit_flag2;
|
||||
unsigned char soundAllocated;
|
||||
byte quit_flag2;
|
||||
byte soundAllocated;
|
||||
soundchannel_t *music_channel;
|
||||
soundchannel_t *hnmsound_ch;
|
||||
sound_t *voiceSound;
|
||||
@ -604,59 +604,59 @@ private:
|
||||
int demoCurrentTicks;
|
||||
int demoStartTicks;
|
||||
int currentTime;
|
||||
short mouse_y;
|
||||
short mouse_x;
|
||||
short doubled;
|
||||
short curs_x_pan;
|
||||
short inventoryScrollDelay;
|
||||
short curs_y, curs_x;
|
||||
short current_cursor;
|
||||
int16 mouse_y;
|
||||
int16 mouse_x;
|
||||
int16 doubled;
|
||||
int16 curs_x_pan;
|
||||
int16 inventoryScrollDelay;
|
||||
int16 curs_y, curs_x;
|
||||
int16 current_cursor;
|
||||
icon_t *current_spot;
|
||||
icon_t *current_spot2;
|
||||
unsigned char pomme_q;
|
||||
unsigned char keybd_held;
|
||||
unsigned char mouse_held;
|
||||
unsigned char normalCursor;
|
||||
unsigned char *p_hnmview_buf;
|
||||
unsigned char showVideoSubtitle;
|
||||
unsigned char videoCanceled; //TODO: hnm_canceled
|
||||
unsigned char specialTextMode;
|
||||
byte pomme_q;
|
||||
byte keybd_held;
|
||||
byte mouse_held;
|
||||
byte normalCursor;
|
||||
byte *p_hnmview_buf;
|
||||
byte showVideoSubtitle;
|
||||
byte videoCanceled; //TODO: hnm_canceled
|
||||
byte specialTextMode;
|
||||
int hnm_position;
|
||||
int voiceSamplesSize; //TODO: perso vox sample data len
|
||||
short mus_vol_right;
|
||||
short mus_vol_left;
|
||||
int16 mus_vol_right;
|
||||
int16 mus_vol_left;
|
||||
|
||||
|
||||
unsigned char animateTalking;
|
||||
unsigned char personTalking;
|
||||
unsigned char mus_fade_flags;
|
||||
byte animateTalking;
|
||||
byte personTalking;
|
||||
byte mus_fade_flags;
|
||||
|
||||
char musicSequencePos;
|
||||
unsigned char musicPlaying;
|
||||
byte musicPlaying;
|
||||
|
||||
unsigned char *mus_samples_ptr;
|
||||
unsigned char *mus_patterns_ptr; //TODO: sndblock_t ?
|
||||
unsigned char *mus_sequence_ptr;
|
||||
byte *mus_samples_ptr;
|
||||
byte *mus_patterns_ptr; //TODO: sndblock_t ?
|
||||
byte *mus_sequence_ptr;
|
||||
soundgroup_t *mus_queue_grp;
|
||||
short *pCurrentObjectLocation;
|
||||
unsigned char own_objects[128];
|
||||
unsigned char byte_31D64;
|
||||
int16 *pCurrentObjectLocation;
|
||||
byte own_objects[128];
|
||||
byte byte_31D64;
|
||||
|
||||
unsigned char no_palette;
|
||||
unsigned char gameLoaded;
|
||||
byte no_palette;
|
||||
byte gameLoaded;
|
||||
#define MAX_TAPES 16
|
||||
tape_t tapes[MAX_TAPES];
|
||||
unsigned char confirmMode;
|
||||
unsigned char *cur_slider_value_ptr;
|
||||
unsigned char lastMenuItemIdLo;
|
||||
short lastTapeRoomNum;
|
||||
short cur_slider_x;
|
||||
short cur_slider_y;
|
||||
short destinationRoom;
|
||||
short word_31E7A;
|
||||
byte confirmMode;
|
||||
byte *cur_slider_value_ptr;
|
||||
byte lastMenuItemIdLo;
|
||||
int16 lastTapeRoomNum;
|
||||
int16 cur_slider_x;
|
||||
int16 cur_slider_y;
|
||||
int16 destinationRoom;
|
||||
int16 word_31E7A;
|
||||
|
||||
short word_378CC; //TODO: set by CLComputer_Init to 0
|
||||
short word_378CE;
|
||||
int16 word_378CC; //TODO: set by CLComputer_Init to 0
|
||||
int16 word_378CE;
|
||||
|
||||
};
|
||||
|
||||
|
@ -52,7 +52,7 @@ suiveur_t suiveurs_list[] = {
|
||||
|
||||
*/
|
||||
|
||||
unsigned char kLabyrinthPath[] = {
|
||||
byte kLabyrinthPath[] = {
|
||||
// each nibble tells wich direction to choose to exit the labyrinth
|
||||
0x11, 0x11, 0x11, 0x22, 0x33, 0x55, 0x25, 0x44, 0x25, 0x11, 0x11, 0x11,
|
||||
0x11, 0x35, 0x55, 0x45, 0x45, 0x44, 0x44, 0x34, 0x44, 0x34, 0x32, 0x52,
|
||||
@ -239,7 +239,7 @@ goto_t gotos[] = {
|
||||
#define SUB_LINE(start, end) \
|
||||
(start), (end) | 0x8000
|
||||
|
||||
short tab_2D24C[] = {
|
||||
int16 tab_2D24C[] = {
|
||||
SUB_LINE(68, 120),
|
||||
123, 32964,
|
||||
199, 33042,
|
||||
@ -259,13 +259,13 @@ short tab_2D24C[] = {
|
||||
-1
|
||||
};
|
||||
|
||||
short tab_2D28E[] = {
|
||||
int16 tab_2D28E[] = {
|
||||
99, 32923,
|
||||
157, 33024,
|
||||
-1
|
||||
};
|
||||
|
||||
short tab_2D298[] = {
|
||||
int16 tab_2D298[] = {
|
||||
106, 32941,
|
||||
175, 33012,
|
||||
246, 33118,
|
||||
@ -273,7 +273,7 @@ short tab_2D298[] = {
|
||||
-1
|
||||
};
|
||||
|
||||
short tab_2D2AA[] = {
|
||||
int16 tab_2D2AA[] = {
|
||||
126, 32944,
|
||||
178, 33035,
|
||||
269, 33110,
|
||||
@ -283,7 +283,7 @@ short tab_2D2AA[] = {
|
||||
-1
|
||||
};
|
||||
|
||||
short tab_2D2C4[] = {
|
||||
int16 tab_2D2C4[] = {
|
||||
101, 32981,
|
||||
215, 33121,
|
||||
355, 33223,
|
||||
@ -344,7 +344,7 @@ object_t objects[] = {
|
||||
{ 42, 0, 3, 0x8000, 0, 0} // Tablet #6 (Castra)
|
||||
};
|
||||
|
||||
short kObjectLocations[100] = {
|
||||
int16 kObjectLocations[100] = {
|
||||
0x112, -1,
|
||||
0x202, -1,
|
||||
0x120, -1,
|
||||
@ -496,7 +496,7 @@ cita_t cita_list[] = {
|
||||
};
|
||||
|
||||
|
||||
short tab_2CB16[] = { 2075, 2080, 2119, -1};
|
||||
int16 tab_2CB16[] = { 2075, 2080, 2119, -1};
|
||||
|
||||
char tab_2CB1E[8][4] = {
|
||||
{ 0x10, 0x81, 1, 0x90},
|
||||
@ -509,7 +509,7 @@ char tab_2CB1E[8][4] = {
|
||||
{ 0x81, 0x90, 1, 0x10}
|
||||
};
|
||||
|
||||
prect_t perso_rects[] = { //TODO: just an array of shorts?
|
||||
prect_t perso_rects[] = { //TODO: just an array of int16s?
|
||||
{ 93, 69, 223, 176},
|
||||
{ 102, 86, 162, 126},
|
||||
{ 88, 103, 168, 163},
|
||||
@ -531,7 +531,7 @@ prect_t perso_rects[] = { //TODO: just an array of shorts?
|
||||
{ 188, 83, 251, 158}
|
||||
};
|
||||
|
||||
unsigned char tab_persxx[][5] = { //TODO: struc?
|
||||
byte tab_persxx[][5] = { //TODO: struc?
|
||||
{ 8, 15, 23, 25, -1},
|
||||
{ 0, 9, -1 },
|
||||
{ 0, 9, -1 },
|
||||
@ -569,21 +569,21 @@ area_t kAreasTable[] = {
|
||||
{ Areas::arMoorkusLair , AreaType::atCave , 0, 127, 0, 12}
|
||||
};
|
||||
|
||||
short tab_2CEF0[64] = {
|
||||
int16 tab_2CEF0[64] = {
|
||||
25, 257, 0, 0, 37, 258, 38, 259, 0, 0, 24, 260, 0, 0, 0, 0,
|
||||
0, 0, 53, 265, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
39, 261, 0, 0, 40, 262, 62, 263, 0, 0, 63, 264, 0, 0, 0, 0,
|
||||
18, 275, 0, 0, 35, 254, 36, 255, 19, 318, 23, 256, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
short tab_2CF70[64] = {
|
||||
int16 tab_2CF70[64] = {
|
||||
65, 266, 0, 0, 66, 267, 67, 268, 0, 0, 68, 269, 0, 0, 0, 0,
|
||||
0, 0, 73, 274, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
69, 270, 0, 0, 70, 271, 71, 272, 0, 0, 72, 273, 0, 0, 0, 0,
|
||||
18, 275, 0, 0, 35, 254, 36, 255, 19, 318, 23, 256, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
short kActionCursors[299] = {
|
||||
int16 kActionCursors[299] = {
|
||||
3, 1, 2, 4, 5, 5, 5, 0, 5, 5,
|
||||
5, 5, 5, 3, 2, 5, 5, 5, 3, 2,
|
||||
4, 5, 7, 7, 4, 5, 5, 0, 0, 0,
|
||||
@ -623,7 +623,7 @@ float flt_2DF84 = 200;
|
||||
// Cube faces to texture coords mapping
|
||||
// each entry is num_polys(6) * num_faces_per_poly(2) * vertex_per_face(3) * uv(2)
|
||||
|
||||
short cube_texcoords[3][6 * 2 * 3 * 2] = {
|
||||
int16 cube_texcoords[3][6 * 2 * 3 * 2] = {
|
||||
{
|
||||
32, 32, 0, 32, 0, 0,
|
||||
32, 32, 0, 0, 32, 0,
|
||||
|
Loading…
Reference in New Issue
Block a user