Initial commit

This commit is contained in:
2026-02-02 04:50:13 +01:00
commit 5b11698731
22592 changed files with 7677434 additions and 0 deletions

View File

@@ -0,0 +1,752 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "common/memstream.h"
#include "ultima/ultima.h"
#include "ultima/ultima8/convert/convert_shape.h"
#include "ultima/ultima8/misc/stream_util.h"
#include "ultima/ultima8/misc/debugger.h"
namespace Ultima {
namespace Ultima8 {
void ConvertShapeFrame::Free() {
delete [] _line_offsets;
_line_offsets = nullptr;
delete [] _rle_data;
_rle_data = nullptr;
}
ConvertShape::ConvertShape() : _num_frames(0), _frames(nullptr) {
}
void ConvertShape::Free() {
if (_frames)
for(uint32 i = 0; i < _num_frames; ++i)
_frames[i].Free();
delete [] _frames;
_frames = nullptr;
_num_frames = 0;
}
void ConvertShape::Read(Common::SeekableReadStream &source, const ConvertShapeFormat *csf, uint32 real_len) {
// Just to be safe
uint32 start_pos = source.pos();
// Read the ident
if (csf->_bytes_ident) {
char ident[4];
source.read(ident, csf->_bytes_ident);
if (memcmp(ident, csf->_ident, csf->_bytes_ident)) {
warning("Corrupt shape");
return;
}
}
// Read special buffer
uint8 special[256];
if (csf->_bytes_special) {
memset(special, 0, 256);
for (uint32 i = 0; i < csf->_bytes_special; i++) special[source.readByte()&0xFF] = i + 2;
}
// Read the header unknown
if (csf->_bytes_header_unk) source.read(_header_unknown, csf->_bytes_header_unk);
// Now read _num_frames
_num_frames = 1;
if (csf->_bytes_num_frames) _num_frames = readX(source, csf->_bytes_num_frames);
if (_num_frames == 0) _num_frames = CalcNumFrames(source,csf,real_len,start_pos);
// if (_num_frames == 0xFFFF || _num_frames == 0xFFFFFF || _num_frames == -1)
// {
// warning("Corrupt shape?);
// _num_frames = 0;
// _frames = 0;
// return;
// }
// Create _frames array
_frames = new ConvertShapeFrame[_num_frames]();
// Now read the _frames
for(uint32 f = 0; f < _num_frames; ++f) {
ConvertShapeFrame *frame = _frames + f;
// Seek to initial pos
source.seek(start_pos + csf->_len_header + (csf->_len_frameheader * f));
// Read the offset
uint32 frame_offset = csf->_len_header + (csf->_len_frameheader * f);
if (csf->_bytes_frame_offset) frame_offset = readX(source, csf->_bytes_frame_offset);
// Read the unknown
if (csf->_bytes_frameheader_unk) source.read(frame->_header_unknown, csf->_bytes_frameheader_unk);
// Read frame_length
uint32 frame_length = real_len-frame_offset;
if (csf->_bytes_frame_length) frame_length = readX(source, csf->_bytes_frame_length) + csf->_bytes_frame_length_kludge;
// Seek to start of frame
source.seek(start_pos + frame_offset + csf->_bytes_special);
if (csf->_bytes_special)
frame->ReadCmpFrame(source, csf, special, f > 0 ? _frames + f - 1 : 0);
else
frame->Read(source, csf, frame_length);
}
}
void ConvertShapeFrame::Read(Common::SeekableReadStream &source, const ConvertShapeFormat *csf, uint32 frame_length) {
// Read unknown
if (csf->_bytes_frame_unknown) source.read(_unknown, csf->_bytes_frame_unknown);
// Frame details
_compression = readX(source, csf->_bytes_frame_compression);
_width = readXS(source, csf->_bytes_frame_width);
_height = readXS(source, csf->_bytes_frame_height);
_xoff = readXS(source, csf->_bytes_frame_xoff);
_yoff = readXS(source, csf->_bytes_frame_yoff);
if (_compression != 0 && _compression != 1) {
_compression = 0;
_width = 0;
_height = 0;
_xoff = 0;
_yoff = 0;
warning("Corrupt frame?");
}
if (_height) {
// Line offsets
_line_offsets = new uint32 [_height];
for (int32 i = 0; i < _height; ++i) {
_line_offsets[i] = readX(source, csf->_bytes_line_offset);
// Now fudge with the value and turn it into an offset into the rle data
// If required
if (!csf->_line_offset_absolute)
_line_offsets[i] -= (_height - i) * csf->_bytes_line_offset;
}
// Calculate the number of bytes of RLE data
_bytes_rle = frame_length - (csf->_len_frameheader2 + (_height * csf->_bytes_line_offset));
if (_bytes_rle < 0) {
_bytes_rle = 0;
warning("Corrupt frame?");
}
} else
_line_offsets = nullptr;
// Read the RLE Data
if (_bytes_rle) {
_rle_data = new uint8[_bytes_rle];
source.read(_rle_data, _bytes_rle);
} else
_rle_data = nullptr;
}
void ConvertShapeFrame::ReadCmpFrame(Common::SeekableReadStream &source, const ConvertShapeFormat *csf, const uint8 special[256], ConvertShapeFrame *prev) {
Common::MemoryWriteStreamDynamic rlebuf(DisposeAfterUse::YES);
uint8 outbuf[512];
// Read unknown
if (csf->_bytes_frame_unknown) source.read(_unknown, csf->_bytes_frame_unknown);
// Frame details
_compression = readX(source, csf->_bytes_frame_compression);
_width = readXS(source, csf->_bytes_frame_width);
_height = readXS(source, csf->_bytes_frame_height);
_xoff = readXS(source, csf->_bytes_frame_xoff);
_yoff = readXS(source, csf->_bytes_frame_yoff);
_line_offsets = new uint32 [_height];
for(int32 y = 0; y < _height; ++y) {
_line_offsets[y] = rlebuf.pos();
int32 xpos = 0;
do {
uint8 skip = source.readByte();
xpos += skip;
if (xpos > _width) {
source.seek(-1, SEEK_CUR);
skip = _width-(xpos-skip);
}
rlebuf.writeByte(skip);
if (xpos >= _width) break;
uint32 dlen = source.readByte();
uint8 *o = outbuf;
// Is this required???? It seems hacky and pointless
if (dlen == 0 || dlen == 1) {
source.seek(-1, SEEK_CUR);
rlebuf.seek(-1, SEEK_CUR);
rlebuf.writeByte(skip + (_width - xpos));
break;
}
int type = 0;
if (_compression) {
type = dlen & 1;
dlen >>= 1;
}
if (!type) {
uint32 extra = 0;
for (uint32 j = 0; j < dlen; j++) {
uint8 c = source.readByte();
if (special[c] && prev) {
int32 count = special[c];
prev->GetPixels(o, count, xpos - _xoff, y - _yoff);
o+=count;
extra += count - 1;
xpos += count;
} else if (c == 0xFF && prev) {
int32 count = source.readByte();
prev->GetPixels(o, count, xpos - _xoff, y - _yoff);
o+=count;
extra += count - 2;
xpos += count;
j++;
} else {
*o++ = c;
xpos++;
}
}
if (((dlen+extra) << _compression) > 255) {
warning("Corrupt Frame. RLE dlen too large");
}
rlebuf.writeByte((dlen+extra) << _compression);
rlebuf.write(outbuf,dlen+extra);
} else {
rlebuf.writeByte((dlen << 1) | 1);
rlebuf.writeByte(source.readByte());
xpos+=dlen;
}
} while (xpos < _width);
}
_bytes_rle = rlebuf.pos();
_rle_data = new uint8[_bytes_rle];
memcpy(_rle_data, rlebuf.getData(), _bytes_rle);
}
void ConvertShapeFrame::GetPixels(uint8 *buf, int32 count, int32 x, int32 y) {
x += _xoff;
y += _yoff;
if (y > _height) return;
int32 xpos = 0;
const uint8 * linedata = _rle_data + _line_offsets[y];
do {
xpos += *linedata++;
if (xpos == _width) break;
int32 dlen = *linedata++;
int type = 0;
if (_compression) {
type = dlen & 1;
dlen >>= 1;
}
if (x >= xpos && x < (xpos+dlen)) {
int diff = x-xpos;
dlen-=diff;
xpos = x;
int num = count;
if (dlen < count) num = dlen;
if (!type) {
const uint8 *l = (linedata += diff);
while (num--) {
*buf++ = *l++;
count--;
x++;
}
} else {
uint8 l = *linedata;
while (num--) {
*buf++ = l;
count--;
x++;
}
}
if (count == 0) return;
}
if (!type) linedata+=dlen;
else linedata++;
xpos += dlen;
} while (xpos < _width);
}
int ConvertShape::CalcNumFrames(Common::SeekableReadStream &source, const ConvertShapeFormat *csf, uint32 real_len, uint32 start_pos) {
int f = 0;
uint32 first_offset = 0xFFFFFFFF;
uint32 save_pos = source.pos();
for (f = 0;; f++) {
// Seek to initial pos
source.seek(start_pos + csf->_len_header + (csf->_len_frameheader * f));
if ((source.pos()-start_pos) >= first_offset) break;
// Read the offset
uint32 frame_offset = csf->_len_header + (csf->_len_frameheader * f);
if (csf->_bytes_frame_offset) frame_offset = readX(source, csf->_bytes_frame_offset) + csf->_bytes_special;
if (frame_offset < first_offset) first_offset = frame_offset;
// Read the unknown
if (csf->_bytes_frameheader_unk) source.skip(csf->_bytes_frameheader_unk);
// Read frame_length
uint32 frame_length = real_len-frame_offset;
if (csf->_bytes_frame_length)
frame_length = readX(source, csf->_bytes_frame_length) + csf->_bytes_frame_length_kludge;
debugC(kDebugGraphics, "Frame %d length = %xh", f, frame_length);
}
source.seek(save_pos);
return f;
}
bool ConvertShape::Check(Common::SeekableReadStream &source, const ConvertShapeFormat *csf, uint32 real_len) {
debugC(kDebugGraphics, "Testing shape format %s...", csf->_name);
bool result = true;
// Just to be safe
int start_pos = source.pos();
// Read the ident
if (csf->_bytes_ident) {
char ident[5];
ident[csf->_bytes_ident] = 0;
source.read(ident, csf->_bytes_ident);
if (memcmp(ident, csf->_ident, csf->_bytes_ident)) {
// Return to start position
source.seek(start_pos);
return false;
}
}
// Read the header special colour
if (csf->_bytes_special) source.skip(csf->_bytes_special);
// Read the header unknown
if (csf->_bytes_header_unk) source.skip(csf->_bytes_header_unk);
// Now read _num_frames
int numFrames = 1;
if (csf->_bytes_num_frames) numFrames = readX(source, csf->_bytes_num_frames);
if (numFrames == 0) numFrames = CalcNumFrames(source,csf,real_len,start_pos);
// Create _frames array
ConvertShapeFrame oneframe;
memset(&oneframe, 0, sizeof(ConvertShapeFrame));
// Now read the _frames
for (int f = 0; f < numFrames; f++) {
ConvertShapeFrame *frame = &oneframe;
// Seek to initial pos
source.seek(start_pos + csf->_len_header + (csf->_len_frameheader * f));
// Read the offset
uint32 frame_offset = csf->_len_header + (csf->_len_frameheader * f);
if (csf->_bytes_frame_offset) frame_offset = readX(source, csf->_bytes_frame_offset) + csf->_bytes_special;
// Read the unknown
if (csf->_bytes_frameheader_unk) source.read(frame->_header_unknown, csf->_bytes_frameheader_unk);
// Read frame_length
uint32 frame_length = real_len-frame_offset;
if (csf->_bytes_frame_length) frame_length = readX(source, csf->_bytes_frame_length) + csf->_bytes_frame_length_kludge;
// Invalid frame length
if ((frame_length + frame_offset) > real_len) {
result = false;
break;
}
// Seek to start of frame
source.seek(start_pos + frame_offset);
// Read unknown
if (csf->_bytes_frame_unknown) source.read(frame->_unknown, csf->_bytes_frame_unknown);
// Frame details
frame->_compression = readX(source, csf->_bytes_frame_compression);
frame->_width = readXS(source, csf->_bytes_frame_width);
frame->_height = readXS(source, csf->_bytes_frame_height);
frame->_xoff = readXS(source, csf->_bytes_frame_xoff);
frame->_yoff = readXS(source, csf->_bytes_frame_yoff);
if ((frame->_compression != 0 && frame->_compression != 1) || frame->_width < 0 || frame->_height < 0) {
frame->_compression = 0;
frame->_width = 0;
frame->_height = 0;
frame->_xoff = 0;
frame->_yoff = 0;
result = false;
break;
}
if (frame->_height) {
// Line offsets
int32 highest_offset_byte = 0;
// Calculate the number of bytes of RLE data
frame->_bytes_rle = frame_length - (csf->_len_frameheader2 + (frame->_height * csf->_bytes_line_offset));
// Totally invalid shape
if (frame->_bytes_rle < 0) {
result = false;
break;
}
// Only attempt to decompress the shape if we are not a compressed shapes
if (!csf->_bytes_special) {
// Seek to first in offset table
source.seek(start_pos + frame_offset + csf->_len_frameheader2);
// Loop through each of the _frames and find the last rle run
for (int i = 0; i < frame->_height; i++) {
int32 line_offset = readX(source, csf->_bytes_line_offset);
// Now fudge with the value and turn it into an offset into the rle data
// if required
if (!csf->_line_offset_absolute)
line_offset -= (frame->_height - i) * csf->_bytes_line_offset;
if (line_offset > frame->_bytes_rle) {
result = false;
break;
}
if (line_offset > highest_offset_byte) highest_offset_byte = line_offset;
};
// Failed for whatever reason
if (result == false) break;
// Jump to the line offset and calculate the length of the run
source.seek(highest_offset_byte + start_pos + frame_offset + csf->_len_frameheader2 + frame->_height * csf->_bytes_line_offset);
int xpos = 0;
uint32 dlen = 0;
// Compressed
if (frame->_compression) {
do {
xpos += source.readByte();
if (xpos == frame->_width) break;
dlen = source.readByte();
int type = dlen & 1;
dlen >>= 1;
if (!type) source.skip(dlen);
else source.skip(1);
xpos += dlen;
} while (xpos < frame->_width);
// Uncompressed
} else {
do {
xpos += source.readByte();
if (xpos == frame->_width) break;
dlen = source.readByte();
source.skip(dlen);
xpos += dlen;
} while (xpos < frame->_width);
}
// Calc 'real' bytes rle
int32 highest_rle_byte = source.pos();
highest_rle_byte -= start_pos + frame_offset + csf->_len_frameheader2 + frame->_height * csf->_bytes_line_offset;
// Too many bytes
if (highest_rle_byte > frame->_bytes_rle) {
result = false;
break;
}
}
}
}
// Free frames
oneframe.Free();
// Return to start position
source.seek(start_pos);
if (result)
debugC(kDebugGraphics, "Detected Shape Format: %s", csf->_name);
return result;
}
bool ConvertShape::CheckUnsafe(Common::SeekableReadStream &source, const ConvertShapeFormat *csf, uint32 real_len) {
debugC(kDebugGraphics, "Testing shape format %s...", csf->_name);
bool result = true;
// Just to be safe
const uint32 start_pos = source.pos();
// Read the ident
if (csf->_bytes_ident) {
char ident[5];
ident[csf->_bytes_ident] = 0;
source.read(ident, csf->_bytes_ident);
if (memcmp(ident, csf->_ident, csf->_bytes_ident)) {
// Return to start position
source.seek(start_pos);
return false;
}
}
// Read the header special colour
if (csf->_bytes_special) source.skip(csf->_bytes_special);
// Read the header unknown
if (csf->_bytes_header_unk) source.skip(csf->_bytes_header_unk);
// Now read _num_frames
int numFrames = 1;
if (csf->_bytes_num_frames) numFrames = readX(source, csf->_bytes_num_frames);
if (numFrames == 0) numFrames = CalcNumFrames(source,csf,real_len,start_pos);
// Create _frames array
ConvertShapeFrame oneframe;
memset(&oneframe, 0, sizeof(ConvertShapeFrame));
// Now read the _frames
for (int f = 0; f < numFrames; f++) {
ConvertShapeFrame *frame = &oneframe;
// Seek to initial pos
source.seek(start_pos + csf->_len_header + (csf->_len_frameheader * f));
// Read the offset
uint32 frame_offset = csf->_len_header + (csf->_len_frameheader * f);
if (csf->_bytes_frame_offset) frame_offset = readX(source, csf->_bytes_frame_offset) + csf->_bytes_special;
// Read the unknown
if (csf->_bytes_frameheader_unk) source.read(frame->_header_unknown, csf->_bytes_frameheader_unk);
// Read frame_length
uint32 frame_length = real_len-frame_offset;
if (csf->_bytes_frame_length) frame_length = readX(source, csf->_bytes_frame_length) + csf->_bytes_frame_length_kludge;
// Invalid frame length
if ((frame_length + frame_offset) > real_len) {
result = false;
break;
}
// Seek to start of frame
source.seek(start_pos + frame_offset);
// Read unknown
if (csf->_bytes_frame_unknown) source.read(frame->_unknown, csf->_bytes_frame_unknown);
// Frame details
frame->_compression = readX(source, csf->_bytes_frame_compression);
frame->_width = readXS(source, csf->_bytes_frame_width);
frame->_height = readXS(source, csf->_bytes_frame_height);
frame->_xoff = readXS(source, csf->_bytes_frame_xoff);
frame->_yoff = readXS(source, csf->_bytes_frame_yoff);
if ((frame->_compression != 0 && frame->_compression != 1) || frame->_width < 0 || frame->_height < 0) {
frame->_compression = 0;
frame->_width = 0;
frame->_height = 0;
frame->_xoff = 0;
frame->_yoff = 0;
result = false;
break;
}
if (frame->_height) {
// Calculate the number of bytes of RLE data (may not be accurate but we don't care)
frame->_bytes_rle = frame_length - (csf->_len_frameheader2 + (frame->_height * csf->_bytes_line_offset));
// Totally invalid shape
if (frame->_bytes_rle < 0) {
result = false;
break;
}
}
}
// Free _frames
oneframe.Free();
// Return to start position
source.seek(start_pos);
if (result)
debugC(kDebugGraphics, "Detected Shape Format: %s", csf->_name);
return result;
}
void ConvertShape::Write(Common::SeekableWriteStream &dest, const ConvertShapeFormat *csf, uint32 &write_len) {
// Just to be safe
const uint32 start_pos = dest.pos();
// Write the ident
if (csf->_bytes_ident) dest.write(csf->_ident, csf->_bytes_ident);
// Write the header unknown
if (csf->_bytes_header_unk) dest.write(_header_unknown, csf->_bytes_header_unk);
// Now write _num_frames
if (csf->_bytes_num_frames) writeX(dest, _num_frames, csf->_bytes_num_frames);
else if (!csf->_bytes_num_frames && _num_frames > 1) {
warning("Error: Unable to convert multiple frame shapes to %s", csf->_name);
return;
}
// Write filler space for the frame details
for (uint32 i = 0; i < _num_frames*csf->_len_frameheader; i++) dest.writeByte(0);
// Now write the _frames
for(uint32 f = 0; f < _num_frames; f++) {
ConvertShapeFrame *frame = _frames + f;
// Get the frame offset
uint32 frame_offset = dest.pos() - start_pos;
// Seek to the frame header pos
dest.seek(start_pos + csf->_len_header + (csf->_len_frameheader * f));
// Write the offset
if (csf->_bytes_frame_offset) writeX(dest, frame_offset, csf->_bytes_frame_offset);
// Write the unknown
if (csf->_bytes_frameheader_unk) dest.write(frame->_header_unknown, csf->_bytes_frameheader_unk);
// Calc and write frame_length
if (csf->_bytes_frame_length) {
uint32 frame_length = csf->_len_frameheader2 + (frame->_height * csf->_bytes_line_offset) + frame->_bytes_rle;
writeX(dest, frame_length - csf->_bytes_frame_length_kludge, csf->_bytes_frame_length);
}
// Seek to start of frame
dest.seek(start_pos + frame_offset);
// Write unknown
if (csf->_bytes_frame_unknown) dest.write(frame->_unknown, csf->_bytes_frame_unknown);
// Frame details
writeX(dest, frame->_compression, csf->_bytes_frame_compression);
writeX(dest, frame->_width, csf->_bytes_frame_width);
writeX(dest, frame->_height, csf->_bytes_frame_height);
writeX(dest, frame->_xoff, csf->_bytes_frame_xoff);
writeX(dest, frame->_yoff, csf->_bytes_frame_yoff);
// Line offsets
for (int32 i = 0; i < frame->_height; i++) {
int32 actual_offset = frame->_line_offsets[i];
// Unfudge the value and write it, if requiretd
if (!csf->_line_offset_absolute)
actual_offset += (frame->_height - i) * csf->_bytes_line_offset;
writeX(dest, actual_offset, csf->_bytes_line_offset);
}
// Write the RLE Data
dest.write(frame->_rle_data, frame->_bytes_rle);
}
// Just cheat
write_len = dest.pos() - start_pos;
}
// Shape format configuration for Pentagram
const ConvertShapeFormat PentagramShapeFormat = {
"Pentagram",
8, // header
"PSHP", // ident
4, // bytes_ident
0, // bytes_special
0, // header_unk
4, // _num_frames
8, // frameheader
4, // frame_offset
0, // frameheader_unk
4, // frame_length
0, // frame_length_kludge
20, // frameheader2
0, // frame_unknown
4, // frame_compression
4, // frame_width
4, // frame_height
4, // frame_xoff
4, // frame_yoff
4, // line_offset
1 // line_offset_absolute
};
} // End of namespace Ultima8
} // End of namespace Ultima

View File

@@ -0,0 +1,128 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef ULTIMA8_CONVERT_CONVERTSHAPE_H
#define ULTIMA8_CONVERT_CONVERTSHAPE_H
#include "common/scummsys.h"
#include "common/stream.h"
namespace Ultima {
namespace Ultima8 {
// Convert shape C
/********** Update AutoShapeFormat in shapeconv/ShapeConv.cpp when changed! **********/
struct ConvertShapeFormat {
const char * _name;
// U8 U8 Gump U8.SKF Cru Cru2D Pent Comp
uint32 _len_header; // 6 6 2 6 6 8 11
const char * _ident; // "" "" "\2\0" "" "" "PSHP" ""
uint32 _bytes_ident; // 0 0 2 0 0 4 0
uint32 _bytes_special; // 0 0 0 0 0 0 5
uint32 _bytes_header_unk; // 4 4 0 4 4 0 4
uint32 _bytes_num_frames; // 2 2 0 2 2 4 2
uint32 _len_frameheader; // 6 6 0 8 8 8 6
uint32 _bytes_frame_offset; // 3 3 0 3 3 4 4
uint32 _bytes_frameheader_unk; // 1 2 0 2 2 0 0
uint32 _bytes_frame_length; // 2 2 0 3 3 4 2
uint32 _bytes_frame_length_kludge; // 0 8 0 0 0 0 0
uint32 _len_frameheader2; // 18 18 10 28 20 20 10
uint32 _bytes_frame_unknown; // 8 8 0 8 0 0 0
uint32 _bytes_frame_compression; // 2 2 2 4 4 4 2
uint32 _bytes_frame_width; // 2 2 2 4 4 4 2
uint32 _bytes_frame_height; // 2 2 2 4 4 4 2
uint32 _bytes_frame_xoff; // 2 2 2 4 4 4 2
uint32 _bytes_frame_yoff; // 2 2 2 4 4 4 2
uint32 _bytes_line_offset; // 2 2 2 4 4 4 0
uint32 _line_offset_absolute; // 0 0 0 0 0 1 0
};
// ConvertShapeFrame structure
struct ConvertShapeFrame {
uint8 _header_unknown[2];
uint8 _unknown[8];
uint32 _compression;
int32 _width;
int32 _height;
int32 _xoff;
int32 _yoff;
uint32 *_line_offsets; // Note these are offsets into rle_data
int32 _bytes_rle; // Number of bytes of RLE Data
uint8 *_rle_data;
void Free();
void Read(Common::SeekableReadStream &source, const ConvertShapeFormat *csf, uint32 frame_length);
void ReadCmpFrame(Common::SeekableReadStream &source, const ConvertShapeFormat *csf, const uint8 special[256], ConvertShapeFrame *prev);
void GetPixels(uint8 *buf, int32 count, int32 x, int32 y);
};
// ConvertShape structure
class ConvertShape
{
uint8 _header_unknown[4];
uint32 _num_frames;
ConvertShapeFrame *_frames;
public:
ConvertShape();
~ConvertShape()
{
Free();
}
void Free();
void Read(Common::SeekableReadStream &source, const ConvertShapeFormat *csf, uint32 real_len);
void Write(Common::SeekableWriteStream &source, const ConvertShapeFormat *csf, uint32 &write_len);
// This will check to see if a Shape is of a certain type. Return true if ok, false if bad
static bool Check(Common::SeekableReadStream &source, const ConvertShapeFormat *csf, uint32 real_len);
// This will also check to see if a shape is of a certain type. However it won't check
// the rle data, it only checks headers. Return true if ok, false if bad
static bool CheckUnsafe(Common::SeekableReadStream &source, const ConvertShapeFormat *csf, uint32 real_len);
// Algorithmically calculate the number of frames
static int CalcNumFrames(Common::SeekableReadStream &source, const ConvertShapeFormat *csf, uint32 real_len, uint32 start_pos);
};
// Shape format configuration for Pentagram format
extern const ConvertShapeFormat PentagramShapeFormat;
} // End of namespace Ultima8
} // End of namespace Ultima
#endif

View File

@@ -0,0 +1,39 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef ULTIMA8_CONVERT_CONVERTUSECODE_H
#define ULTIMA8_CONVERT_CONVERTUSECODE_H
namespace Ultima {
namespace Ultima8 {
class ConvertUsecode {
public:
virtual ~ConvertUsecode() {}
virtual const char* const *intrinsics() = 0;
virtual const char* const *event_names() = 0;
};
} // End of namespace Ultima8
} // End of namespace Ultima
#endif

View File

@@ -0,0 +1,84 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ultima/ultima8/convert/crusader/convert_shape_crusader.h"
namespace Ultima {
namespace Ultima8 {
// Shape format configuration for Crusader
const ConvertShapeFormat CrusaderShapeFormat = {
"Crusader",
6, // header
"", // ident
0, // bytes_ident
0, // bytes_special
4, // header_unk
2, // num_frames
8, // frameheader
3, // frame_offset
1, // frameheader_unk
4, // frame_length
0, // frame_length_kludge
28, // frameheader2 20 for mouse/gumps
8, // frame_unknown 0 for mouse/gumps
4, // frame_compression
4, // frame_width
4, // frame_height
4, // frame_xoff
4, // frame_yoff
4, // line_offset
0 // line_offset_absolute
};
// Shape format configuration for 2D Crusader Shapes
const ConvertShapeFormat Crusader2DShapeFormat = {
"Crusader 2D",
6, // header
"", // ident
0, // bytes_ident
0, // bytes_special
4, // header_unk
2, // num_frames
8, // frameheader
3, // frame_offset
1, // frameheader_unk
4, // frame_length
0, // frame_length_kludge
20, // frameheader2 20 for mouse/gumps
0, // frame_unknown 0 for mouse/gumps
4, // frame_compression
4, // frame_width
4, // frame_height
4, // frame_xoff
4, // frame_yoff
4, // line_offset
0 // line_offset_absolute
};
} // End of namespace Ultima8
} // End of namespace Ultima

View File

@@ -0,0 +1,39 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef ULTIMA8_CONVERT_CRUSADER_CONVERTSHAPECRUSADER_H
#define ULTIMA8_CONVERT_CRUSADER_CONVERTSHAPECRUSADER_H
#include "ultima/ultima8/convert/convert_shape.h"
namespace Ultima {
namespace Ultima8 {
// Shape format configuration for Crusader
extern const ConvertShapeFormat CrusaderShapeFormat;
// Shape format configuration for Crusader 2D Interface Elements
extern const ConvertShapeFormat Crusader2DShapeFormat;
} // End of namespace Ultima8
} // End of namespace Ultima
#endif

View File

@@ -0,0 +1,416 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef ULTIMA8_CONVERT_U8_CONVERTUSECODECRUSADER_H
#define ULTIMA8_CONVERT_U8_CONVERTUSECODECRUSADER_H
#include "ultima/ultima8/convert/convert_usecode.h"
namespace Ultima {
namespace Ultima8 {
class ConvertUsecodeCrusader : public ConvertUsecode {
public:
const char* const *intrinsics() override { return _intrinsics; };
const char* const *event_names() override { return _event_names; };
static const char* const _event_names[];
private:
static const char* const _intrinsics[512];
};
// By convention, last pushed argument goes first on the list.
const char* const ConvertUsecodeCrusader::_intrinsics[] = {
// 0000
"byte World::I_getAlertActive(void)",
"int16 Item::I_getFrame(Item *)",
"void Item::I_setFrame(Item *, frame)",
"int16 Item::I_getMapArray(Item *)", // See TRIGGER::ordinal21 - stored in a variable 'mapNum'
"int16 Item::I_getStatus(Item *)",
"void Item::I_orStatus(Item *, uint16 flags)",
"int16 Item::I_equip(6 bytes)", // same coff as 0B5
"byte Item::I_isOnScreen(Item *)", // called for gattling guns and camera
"byte Actor::I_isNPC(Item *)", // proably - actually checks is itemno < 256?
"byte Item::I_getZ(Item *)",
"void Item::I_destroy(Item *)", // probably? often called after creating a replacement object and setting it to the same position (eg, LUGGAGE::gotHit)
"int16 Actor::I_GetNPCDataField0x63_00B(Actor *)", // Some unknown value set for NPCs based on Q of egg.
"void Ultima8Engine::I_setAvatarInStasis(int)",
"byte Item::I_getDirToItem(Item *, itemno)", // based on disasm
"int16 Actor::I_turnToward(Actor *, direction, dir_16)",
"void I_playFlic(void), int16 I_playFlic(Item *, char *name, int16 sizex, int16 sizey)",
// 0010
"int16 Item::I_getQLo(Item *)", // same as 02B based on same coff as 02B, 066, 084, 0A1, 0AE, 0D9, 0EA
"int16 Actor::I_getMap(4 bytes)", // based on disasm.
"void MusicProcess:I_playMusic(int trackno)",
"int16 Item::I_getX(Item *)",
"int16 Item::I_getY(Item *)",
"void AudioProcess::I_playSFXCru(Item *, uint16 sfxnum)",
"int16 Item::I_getShape(Item *)", // in STEAMBOX::func0A, is compared to 0x511 (the STEAM2 shape number) to determine direction
"void Item::I_explode(Item *, exptype, destroy_item)",
"int16 UCMachine::I_rndRange(uint16 x, uint16 y)", // // probably.. always called with 2 constants, then result often compared to some number between
"byte Item::I_legalCreateAtCoords(Item *, int16 shapeno, int16 frame, int16 x, int16 y, int16 z)", // probably, see usage in DOOR2::ordinal37
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132. Always associated with a bitwise-not or bitmask
"int16 World::I_getControlledNPCNum()",
"byte Actor::I_getDir(4 bytes)", // based on disasm. same coff as 112, 121
"int16 Actor::I_getLastAnimSet(4 bytes)", // based on disasm. part of same coff set 01D, 05A, 0B9, 0D7, 0E4, 124
"int16 Item::I_fireWeapon(Item *, x, y, z, byte, int, byte)",
"byte Item::I_create(Item *, uint16 shapenum, uint16 framenum)", // probably - used in MISS1EGG referencing keycards and NPCDEATH in creating blood spills
// 0020
"void Item::I_popToCoords(Item *, uint16 x, uint16 y, uint16 z)", // set coords, used after creating blood spills in NPCDEATH
"void Actor::I_setDead(4 bytes)", // part of same coff set 021, 060, 073, 0A0, 0A8, 0D8, 0E7, 135
"void Item::I_push(Item *)", // same code as U8
"int16 Item::I_getEtherealTop(void)", // based on disasm
"void Item::I_setShape(Item *, int16 shapeno)", // probably. See PEPSIEW::gotHit.
"void Item::I_touch(Item *)", // same code as U8
"int16 Item::I_getQHi(Item *)", // guess, based on variable name in BOUNCBOX::gotHit
"int16 I_getClosestDirectionInRange(x1, y1, x2, y2, numdirs, mindir, maxdir)",
"int16 Item::I_hurl(Item *,8 bytes)", // part of same coff set 028, 08D, 0BD, 0C0, 0C2, 0C8, 0F7, 0F9, 118, 11D
"int16 World::I_gameDifficulty(void)",
"void AudioProcess::I_playAmbientSFXCru(Item *, sndno)",
"int16 Item::I_getQLo(Item *)", // guess, based on variable name in BOUNCBOX::gotHit
"byte Item::I_inFastArea(Item *)",
"void Item::I_setQHi(Item *, uint16 qhi)", // probably setQHi, see usage in FREE::ordinal2E where object position is copied
"byte Item::I_legalMoveToPoint(Item *, Point *, int16 force)", // based on disasm
"byte CurrentMap::I_canExistAtPoint(int, int, shapeno, Point *)",
// 0030
"void Item::I_pop(Item *)", // same code as U8
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"void Item::I_receiveHit(Item *, other, dir, damage, damagetype)", // based on disasm
"byte Actor::I_isBusy(Actor *)", // same code as U8
"int16 Item::I_getDirFromTo16(x1, y1, x2, y2)",
"byte Actor::I_isKneeling(Actor *)",
"int16 Actor::I_doAnim(12 bytes)", // v. similar code to U8
"byte MainActor::I_addItemCru(4 bytes)", // same coff as 0B8
"void AudioProcess::I_stopSFXCru(Item *, int16 sndno)",
"byte Actor::I_isDead(Item *)", // same coff as 122, 12E
"byte AudioProcess::I_isSFXPlayingForObject(Item *, int16 unk)",
"void Item::I_setQLo(Item *, int16 qlo)", // probably setQLo, see usage in FREE::ordinal2E where object position is copied. Disassembly confirms.
"int16 Item::I_getItemFamily(Item *)", // based on disasm
"void Container::I_destroyContents(Item *)",
"void Item::I_fallProbably_03E(Item *)", // similar disasm to U8, but not totally the same.
"int16 Egg::I_getEggId(Item *)", // from disasm
// 0040
"void CameraProcess::I_moveTo(x, y, z)",
"void CameraProcess::I_setCenterOn(objid)",
"byte Item::I_getRangeIfVisible(Item *, otheritem)",
"void AudioProcess::I_playSFXCru(Item *, soundno)", // TODO: Work out how this is different from Int015 - to a first approximation they are quite similar.
"byte Item::I_IsOn(Item *, uint16 itemno)", // part of same coff set 044, 046, 048, 04A, 04C, 04E, 0A5, 0BC, 0C5, 0DC, 0F1, 0FA, 12C
"int16 Item::I_getQHi(Item *)", // same as 026 based on same coff set 026, 045, 047, 049, 04B, 04D, 04F, 0AF, 0BE, 0C9, 0F0, 0F3, 0FB, 133
"byte Item::I_IsOn(Item *, uint16 itemno))", // part of same coff set 044, 046, 048, 04A, 04C, 04E, 0A5, 0BC, 0C5, 0DC, 0F1, 0FA, 12C
"int16 Item::I_getQHi(Item *)", // same as 026 based on same coff set 026, 045, 047, 049, 04B, 04D, 04F, 0AF, 0BE, 0C9, 0F0, 0F3, 0FB, 133
"byte Item::I_IsOn(Item *, uint16 itemno)", // part of same coff set 044, 046, 048, 04A, 04C, 04E, 0A5, 0BC, 0C5, 0DC, 0F1, 0FA, 12C
"int16 Item::I_getQHi(Item *)", // same as 026 based on same coff set 026, 045, 047, 049, 04B, 04D, 04F, 0AF, 0BE, 0C9, 0F0, 0F3, 0FB, 133
"byte Item::I_IsOn(Item *, uint16 itemno)", // part of same coff set 044, 046, 048, 04A, 04C, 04E, 0A5, 0BC, 0C5, 0DC, 0F1, 0FA, 12C
"int16 Item::I_getQHi(Item *)", // same as 026 based on same coff set 026, 045, 047, 049, 04B, 04D, 04F, 0AF, 0BE, 0C9, 0F0, 0F3, 0FB, 133
"byte Item::I_IsOn(Item *, uint16 itemno)", // part of same coff set 044, 046, 048, 04A, 04C, 04E, 0A5, 0BC, 0C5, 0DC, 0F1, 0FA, 12C
"int16 Item::I_getQHi(Item *)", // same as 026 based on same coff set 026, 045, 047, 049, 04B, 04D, 04F, 0AF, 0BE, 0C9, 0F0, 0F3, 0FB, 133
"byte Item::I_IsOn(Item *, uint16 itemno)", // part of same coff set 044, 046, 048, 04A, 04C, 04E, 0A5, 0BC, 0C5, 0DC, 0F1, 0FA, 12C
"int16 Item::I_getQHi(Item *)", // same as 026 based on same coff set 026, 045, 047, 049, 04B, 04D, 04F, 0AF, 0BE, 0C9, 0F0, 0F3, 0FB, 133
// 0050
"int16 Actor::I_getCurrentActivityNo(Actor *)",
"void Actor::I_clrInCombat(Actor *)", // probably, based on disasm.
"void Actor::I_setDefaultActivity0(Actor *, int)",
"void Actor::I_setDefaultActivity1(Actor *, int)",
"void Actor::I_setDefaultActivity2(Actor *, int)",
"void Actor::I_setActivity(Actor *, int)", // part of same coff set 055, 07D, 0CD, 0DB, 0F2, 131
"void World::I_setControlledNPCNum(int itemno)", // when you take over the Thermatron etc.
"int16 Item::I_getSurfaceWeight(Item *)",
"byte Item::I_isCentreOn(Item *, uint16 other)",
"void Item::I_setFrame(Item *, frame)", // based on same coff as 002
"int16 Actor::I_getLastAnimSet(4 bytes)", // part of same coff set 01D, 05A, 0B9, 0D7, 0E4, 124
"byte Item::I_legalCreateAtPoint(Item *, int16 shape, int16 frame, Point *)", // see PEPSIEW::use
"void Item::I_getPoint(Item *, Point *)",
"void StatusGump::I_hideStatusGump(void)", // Probably hides gumps at the bottom, among other things.
"int16 MovieGump::I_playMovieOverlay(uint32, char *, int16 a, int16 b)", // Play video (as texture? parameters like (150, 250, "MVA11A") and other mvas)
"void StatusGump::I_showStatusGump(void)", // Probably shows gumps at the bottom, among other things.
// 0060
"void Actor::I_setDead(4 bytes)", // part of same coff set 021, 060, 073, 0A0, 0A8, 0D8, 0E7, 135
"void Actor::I_create(8 bytes)",
"void CameraProcess::I_somethingAboutCameraUpdate(void)",
"void Actor::I_teleport(12 bytes)", // based on disasm same as U8
"void Item::I_getFootpad(Item *, uint *, uint *, uint *)", // based on disasm. same coff as 12D
"byte Item::I_isInNPC(Item *)", // based on disasm - following parent containers, is one of them an NPC
"int16 Item::I_getQLo(Item *)", // same as 02B based on same coff set 010, 02B, 066, 084, 0A1, 0AE, 0D9, 0EA
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"void Item::I_setNpcNum(Item *, uint16 npcnum)", // maybe, see EVENT::func0A or VALUEBOX::ordinal20.. right next to getNPCNum in coff (confirmed by disassembly)
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"void Item::I_move(Item *, int16 x, int16 y, uint16 z)",
"int16 Game::I_isViolenceEnabled(void)",
"void Kernel::I_resetRef(int16, int16)", // same disasm as U8
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"byte Item::I_isCompletelyOn(Item *, uint16 other)",
// 0070
"byte Ultima8Engine::I_getCrusaderTeleporting(void)",
"void Ultima8Engine::I_setCrusaderTeleporting(void)",
"void Ultima8Engine::I_setCruStasis(void)",
"void Actor::I_setDead(4 bytes)", // part of same coff set 021, 060, 073, 0A0, 0A8, 0D8, 0E7, 135
"void Ultima8Engine::I_clrCrusaderTeleporting(void)",
"void Ultima8Engine::I_clrCruStasis(void)",
"void AudioProcess::I_stopSFX(Item *)",
"int16 PaletteFaderProcess::I_fadeToBlack(void)", // fade to black, no args (40 frames)
"void MainActor::I_clrKeycards(void)",
"int16 MainActor::I_teleportToEgg(int, int, int)",
"int16 PaletteFaderProcess::I_fadeToGamePal(void)", // from black, no arg (40 frames)
"void Actor::I_clrImmortal(Actor *)", // same coff as 130
"int16 Actor::I_getHp(Actor *)",
"void Actor::I_setActivity(Actor *, int)", // part of same coff set 055, 07D, 0CD, 0DB, 0F2, 131
"int16 Item::I_getQuality(Item *)", // based on disassembly
"void Item::I_setQuality(Item *, int)", // based on disassembly. same coff as 0BA, 125
// 0080
"int16 Item::I_use(Item *)", // same coff as 0D0, 0D5
"int16 MainActor::I_getMaxEnergy(Actor *)",
"int16 Actor::I_getMana(Actor *)",
"void Actor::I_setMana(Actor *, int)",
"int16 Item::I_getQLo(Item *)", // same as 02B based on same coff set 010, 02B, 066, 084, 0A1, 0AE, 0D9, 0EA
"void Actor::I_setImmortal(Actor *)",
"int16 CameraProcess::I_getCameraX(void)",
"int16 CameraProcess::I_getCameraY(void)",
"void Item::I_setMapArray(Item *, uint16 maparray)", // based on decompile - sets same value as read by getmaparray .. see VALUEBOX:ordinal20
"int16 Item::I_getNpcNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"void Item::I_shoot(Item *, Point3 *, int speed, int gravity)",
"int16 Item::I_enterFastArea(Item *)", // based on disasm, v similar to U8
"void Item::I_setIsBroken(Item *)", // same coff as 119, 12A
"int16 Item::I_hurl(Item *,8 bytes)", // part of same coff set 028, 08D, 0BD, 0C0, 0C2, 0C8, 0F7, 0F9, 118, 11D
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"void PaletteFaderProcess::I_jumpToAllBlack(void)",
// 0090
"void MusicProcess::I_stopMusic(void)",
"void I_setSomeMovieGlobal(void)", // sets global (cleared by 93) to control palette cycling
"void I_playMovieCutsceneFullscreen(char *)", // same coff as 0A9
"void I_clearSomeMovieGlobal(void)", // clears global (set by 91) to control palette cycling
"void Game::I_playCredits(void)",
"byte Kernel::I_getCurrentKeyDown(void)", // get global - something about keyboard (by disasm)
"int16 MainActor::I_teleportToEgg(int, int)", // a bit different to the U8 one - uses main actor map by default.
"void PaletteFaderProcess:I_jumpToGreyScale(void)",
"void I_resetVargasShieldTo500(void)",
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"void PaletteFaderProcess::I_jumpToNormalPalette(void)",
"int16 PaletteFaderProcess::I_fadeToGamePal(nsteps)",
"int16 PaletteFaderProcess::I_fadeToGamePalWithParam(nsteps, unk)",
"int16 PaletteFaderProcess::I_fadeToBlack(nsteps)",
"int16 PaletteFaderProcess::I_fadeToBlackWithParam(nsteps, unk)",
"int16 PaletteFaderProcess::I_fadeToColor(r, g, b, nsteps, unk)",
// 00A0
"void Actor::I_setDead(Actor *)", // part of same coff set 021, 060, 073, 0A0, 0A8, 0D8, 0E7, 135
"int16 Item::I_getQLo(Item *)", // same as 02B based on same coff set 010, 02B, 066, 084, 0A1, 0AE, 0D9, 0EA
"int16 Item::I_getUnkEggType(Item *)", // based on disassembly, same as U8
"void Egg::I_setEggXRange(Egg *, int)", // based on disasm
"byte Item::I_overlaps(Item *, uint16 unk)", // same disasm as U8
"byte Item::I_isOn(Item *, itemno)", // part of same coff set 044, 046, 048, 04A, 04C, 04E, 0A5, 0BC, 0C5, 0DC, 0F1, 0FA, 12C
"int16 I_getAnimationsEnabled(void)",
"int16 Egg::I_getEggXRange(Egg *)", // based on disasm
"void Actor::I_setDead(Actor *)", // part of same coff set 021, 060, 073, 0A0, 0A8, 0D8, 0E7, 135
"void I_playMovieCutsceneFullscreen(char *)", // same coff as 092
"void AudioProcess::I_playSFX(2 bytes)", // same coff as 0D4
"byte Actor::I_isFalling(Actor *)",
"int16 Item::I_getFamilyOfType(Item *)", // per pentagram notes, matches disasm.
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"int16 Item::I_getQLo(Item *)", // same as 02B based on same coff set 010, 02B, 066, 084, 0A1, 0AE, 0D9, 0EA
"int16 Item::I_getQHi(Item *)", // same as 026 based on same coff set 026, 045, 047, 049, 04B, 04D, 04F, 0AF, 0BE, 0C9, 0F0, 0F3, 0FB, 133
// 00B0
"int16 Item::I_unequip(6 bytes)",
"int16 Item::I_spawnUsecodeEvent0x13(Item *, 2 bytes)", // based on disasm - what is event 0x13? "avatar stole something" in U8..
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"int32 I_getCurrentTimerTick(void)",
"void Ultima8Engine::I_setAlertActive(void)",
"int16 Item::I_equip(6 bytes)",
"void Ultima8Engine::I_clrAlertActive(void)",
"int16 Ultima8Engine::I_getAvatarInStasis(void)",
"byte MainActor::I_addItemCru(4 bytes)", // same coff as 037
"int16 Actor::I_getLastAnimSet(4 bytes)", // part of same coff set 01D, 05A, 0B9, 0D7, 0E4, 124
"void Item::I_setQuality(Item *, int)", // same coff as 07F, 125
"byte CurrentMap::I_canExistAt(int shapeno, word x, word y, byte z)", // NOTE: actually slightly different, uses shape info for an imaginary chequered wall shape? (0x31A)
"byte Item::I_isOn(Item *, itemno)", // part of same coff set 044, 046, 048, 04A, 04C, 04E, 0A5, 0BC, 0C5, 0DC, 0F1, 0FA, 12C
"int16 Item::I_hurl(Item *,8 bytes)", // part of same coff set 028, 08D, 0BD, 0C0, 0C2, 0C8, 0F7, 0F9, 118, 11D
"int16 Item::I_getQHi(Item *)", // same as 026 based on same coff set 026, 045, 047, 049, 04B, 04D, 04F, 0AF, 0BE, 0C9, 0F0, 0F3, 0FB, 133
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
// 00C0
"int16 Item::I_hurl(Item *,8 bytes)", // part of same coff set 028, 08D, 0BD, 0C0, 0C2, 0C8, 0F7, 0F9, 118, 11D
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"int16 Item::I_hurl(Item *,8 bytes)", // part of same coff set 028, 08D, 0BD, 0C0, 0C2, 0C8, 0F7, 0F9, 118, 11D
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"int16 KeypadGump::I_showKeypad(int targetCode)",
"byte Item::I_isOn(Item *, itemno)", // part of same coff set 044, 046, 048, 04A, 04C, 04E, 0A5, 0BC, 0C5, 0DC, 0F1, 0FA, 12C
"void SpriteProcess::I_createSprite(word, word, word, word, uword, uword, ubyte)",
"byte Item::I_getDirFromItem(Item *, itemno)", // same disasm as U8
"int16 Item::I_hurl(Item *,8 bytes)", // part of same coff set 028, 08D, 0BD, 0C0, 0C2, 0C8, 0F7, 0F9, 118, 11D
"int16 Item::I_getQHi(Item *)", // same as 026 based on same coff set 026, 045, 047, 049, 04B, 04D, 04F, 0AF, 0BE, 0C9, 0F0, 0F3, 0FB, 133
"byte Actor::I_addHp(Actor *, int)",
"void MainActor::I_switchMap(int16 mapnum)",
"byte Actor::I_getInCombat(Actor *)",
"void Actor::I_setActivity(Actor *, int)", // part of same coff set 055, 07D, 0CD, 0DB, 0F2, 131
"int16 Game::I_isReleaseBuild(void)", // whether the string "GAME COMPILE=1" has the 1. Might be interesting to see what this does..
"void Item::I_setQAndCombine(Item *, int16 q)", // based on disassembly
// 00D0
"int16 Item::I_use(Item *)", // same coff as 080, 0D5
"void AudioProcess:I_stopAllSFX(void)", // based on disasm.
"void I_playMovieCutscene(int *item,char *flicname,word sizex,word sizey)", // play flic
"void I_clearKeyboardState(void)", // clears some globals and calls a keyboard reset function.. TODO: work out what those globals do?
"void I_playSFX(2 bytes)", // same coff as 0AA. Based on disasm.
"int16 Item::I_use(Item *)", // same coff as 080, 0D0
"byte CameraProcess::I_getCameraZ(void)",
"int16 Actor::I_getLastAnimSet(4 bytes)", // part of same coff set 01D, 05A, 0B9, 0D7, 0E4, 124
"void Actor::I_setDead(4 bytes)", // part of same coff set 021, 060, 073, 0A0, 0A8, 0D8, 0E7, 135
"int16 Item::I_getQLo(Item *)", // same as 02B based on same coff set 010, 02B, 066, 084, 0A1, 0AE, 0D9, 0EA
"void PaletteFaderProcess::I_setPalToAllGrey(void)", // sets all colors to 0x3F3F3F
"void Actor::I_setActivity(Actor *, int)", // part of same coff set 055, 07D, 0CD, 0DB, 0F2, 131
"byte Item::I_isOn(Item *, itemno)", // part of same coff set 044, 046, 048, 04A, 04C, 04E, 0A5, 0BC, 0C5, 0DC, 0F1, 0FA, 12C
"int16 Actor::I_getLastActivityNo(Actor *)",
"void Actor::I_setCombatTactic(Actor *, int)",
"int16 Actor::I_getEquip(6 bytes)", // based on disasm
// 00E0
"void Actor::I_setEquip(8 bytes)",
"int16 Actor::I_getDefaultActivity0(Actor *)",
"int16 Actor::I_getDefaultActivity1(Actor *)",
"int16 Actor::I_getDefaultActivity2(Actor *)",
"int16 Actor::I_getLastAnimSet(4 bytes)", // part of same coff set 01D, 05A, 0B9, 0D7, 0E4, 124
"void Actor::I_setTarget(Actor *, uint16 target)",
"void Actor::I_SetNPCDataField0x63_0E6(Actor *, int)",
"void Actor::I_setDead(4 bytes)", // part of same coff set 021, 060, 073, 0A0, 0A8, 0D8, 0E7, 135
"int16 Item::I_cast(6 bytes)",
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"int16 Item::I_getQLo(Item *)", // same as 02B based on same coff set 010, 02B, 066, 084, 0A1, 0AE, 0D9, 0EA
"int16 I_GetQOfAvatarInventoryItem0x4ed_0EB(void)",
"void Item::I_popToEnd(Item*, int)", // similar code to U8
"void Item::I_popToContainer(Item*, int)", // same code as U8
"void BatteryChargerProcess::I_create(void)",
"int16 Kernel::I_getNumProcesses(int, int)", // same code as U8
// 00F0
"int16 Item::I_getQHi(Item *)", // same as 026 based on same coff set 026, 045, 047, 049, 04B, 04D, 04F, 0AF, 0BE, 0C9, 0F0, 0F3, 0FB, 133
"byte Item::I_isOn(Item *, itemno)", // part of same coff set 044, 046, 048, 04A, 04C, 04E, 0A5, 0BC, 0C5, 0DC, 0F1, 0FA, 12C
"void Actor::I_setActivity(Actor *, int)", // part of same coff set 055, 07D, 0CD, 0DB, 0F2, 131
"int16 Item::I_getQHi(Item *)", // same as 026 based on same coff set 026, 045, 047, 049, 04B, 04D, 04F, 0AF, 0BE, 0C9, 0F0, 0F3, 0FB, 133
"int16 Item::I_getQ(Item *)", // based on disassembly
"void Item::I_setQ(Item *, uint16 q)", // based on disassembly
"void CruHealer::I_create_0F6(void)",
"int16 Item::I_hurl(Item *,8 bytes)", // part of same coff set 028, 08D, 0BD, 0C0, 0C2, 0C8, 0F7, 0F9, 118, 11D
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"int16 Item::I_hurl(Item *,8 bytes)", // part of same coff set 028, 08D, 0BD, 0C0, 0C2, 0C8, 0F7, 0F9, 118, 11D
"byte Item::I_isOn(Item *, itemno)", // part of same coff set 044, 046, 048, 04A, 04C, 04E, 0A5, 0BC, 0C5, 0DC, 0F1, 0FA, 12C
"int16 Item::I_getQHi(Item *)", // same as 026 based on same coff set 026, 045, 047, 049, 04B, 04D, 04F, 0AF, 0BE, 0C9, 0F0, 0F3, 0FB, 133
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"byte MainActor::I_hasKeycard(int)",
"void ComputerGump::I_readComputer(char *)",
"int16 UCMachine::I_numToStr(int16 num)", // same as 113 based on same coff set 0FF, 113, 126
// 0100
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"int16 Item::I_getNPCNum(Item *)", // Based on variable name in TRIGGER::ordinal21. Part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"byte Item::I_isCrusTypeNPC(uint16 shapenum)",
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
// 0110
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"byte Actor::I_getDir(Actor *)", // same coff as 01C, 121
"int16 UCMachine::I_numToStr(int16 num)", // based on VMAIL::func0A example usage
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"byte Item::I_fireDistance(14 bytes)",
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"int16 Item::I_hurl(Item *,8 bytes)", // part of same coff set 028, 08D, 0BD, 0C0, 0C2, 0C8, 0F7, 0F9, 118, 11D
"void Item::I_setIsBroken(Item *)", // same coff as 08C, 12A
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"byte Item::I_getTypeFlag(Item *, uint16 shift)",
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"int16 Item::I_hurl(Item *,8 bytes)", // part of same coff set 028, 08D, 0BD, 0C0, 0C2, 0C8, 0F7, 0F9, 118, 11D
"int16 Item::I_getCY(Item *)", // same coff as 12B
"byte Item::I_getCZ(Item *)", // based on disasm
// 0120
"int16 Item::I_getCX(Item *)",
"byte Actor::I_getDir(4 bytes)", // same coff as 01C, 112
"byte Actor::I_isDead(Item *)", // same coff as 12E, 039
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"int16 Actor::I_getLastAnimSet(4 bytes)", // part of same coff set 01D, 05A, 0B9, 0D7, 0E4, 124
"void Item::I_setQuality(Item *, int)", // same coff as 07F, 0BA
"int16 UCMachine::I_numToStr(int16 num)", // same as 113 based on same coff set 0FF, 113, 126
"byte Item::I_getDirToCoords(Item *, uin16 x, uint16 y)", // based on disassembly
"void Item::I_andStatus(Item *, uint16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"int16 Item::I_getNPCNum(Item *)", // part of same coff set 067, 06D, 089, 08E, 0AD, 0F8, 100, 102, 105, 107, 109, 10B, 10D, 10F, 111, 115, 11C, 123, 129
"void Item::I_setIsBroken(Item *)", // same coff as 08C, 119
"int16 IItem::I_getCY(Item *)", // same coff as 11E
"byte Item::I_isOn(Item *, itemno)", // part of same coff set 044, 046, 048, 04A, 04C, 04E, 0A5, 0BC, 0C5, 0DC, 0F1, 0FA, 12C
"void Item::I_getFootpadData(Item *, uint *, uint *, uint *)", // same coff as 064
"byte Actor::I_isDead(Item *)", // same coff as 122, 039
"int16 Actor::I_createActorCru(Item *, uint16 other_itemno)",
// 0130
"void Actor::I_clrImmortal(Actor *)", // same coff as 07B
"void Actor::I_setActivity(Actor *, int)", // part of same coff set 055, 07D, 0CD, 0DB, 0F2, 131
"void Item::I_andStatus(Item *, int16 status)", // part of same coff set 01A, 031, 069, 06E, 099, 0B2, 0BF, 0C1, 0C3, 0E9, 0FC, 101, 104, 106, 108, 10A, 10C, 10E, 110, 114, 117, 11A, 128, 132
"int16 Item::I_getQHi(Item *)", // same as 026 based on same coff set 026, 045, 047, 049, 04B, 04D, 04F, 0AF, 0BE, 0C9, 0F0, 0F3, 0FB, 133
"void WeaselGump::I_showGump(uint16 param)",
"void Actor::I_setDead(Actor *)", // part of same coff set 021, 060, 073, 0A0, 0A8, 0D8, 0E7, 135
"void UNUSEDInt136()",
"void UNUSEDInt137()"
};
const char * const ConvertUsecodeCrusader::_event_names[] = {
"look()", // 0x00
"use()", // 0x01
"anim()", // 0x02
"setActivity()", // 0x03
"cachein()", // 0x04
"hit(uword, word)", // 0x05
"gotHit(uword, word)", // 0x06
"hatch()", // 0x07
"schedule()", // 0x08
"release()", // 0x09
"equip()", // 0x0A
"unequip()", // 0x0B
"combine()", // 0x0C
"func0D", // 0x0D
"calledFromAnim()", // 0x0E
"enterFastArea()", // 0x0F
"leaveFastArea()", // 0x10
"cast(uword)", // 0x11
"justMoved()", // 0x12
"avatarStoleSomething(uword)", // 0x13
"animGetHit()", // 0x14
"unhatch(word)", // 0x15
"func16", // 0x16
"func17", // 0x17
"func18", // 0x18
"func19", // 0x19
"func1A", // 0x1A
"func1B", // 0x1B
"func1C", // 0x1C
"func1D", // 0x1D
"func1E", // 0x1E
"func1F", // 0x1F
0
};
} // End of namespace Ultima8
} // End of namespace Ultima
#endif

View File

@@ -0,0 +1,420 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef ULTIMA8_CONVERT_U8_CONVERTUSECODEREGRET_H
#define ULTIMA8_CONVERT_U8_CONVERTUSECODEREGRET_H
#include "ultima/ultima8/convert/convert_usecode.h"
#include "ultima/ultima8/convert/crusader/convert_usecode_crusader.h"
namespace Ultima {
namespace Ultima8 {
class ConvertUsecodeRegret : public ConvertUsecode {
public:
const char* const *intrinsics() override { return _intrinsics; };
const char* const *event_names() override { return ConvertUsecodeCrusader::_event_names; };
private:
static const char* const _intrinsics[512];
};
const char* const ConvertUsecodeRegret::_intrinsics[] = {
// 0000
"World::I_getAlertActive()",
"Item::getFrame(void)",
"Item::setFrame(uint16)",
"Item::getMapNum(void)",
"Item::getStatus(void)",
"Item::orStatus(sint16)",
"Item::equip(sint16)",
"Item::isEntirelyOnScreen()",
"Item::isNpc(void)",
"Item::getZ(void)",
"World::I_gameDifficulty()",
"Item::getQLo(void)",
"Item::destroy(void)",
"Actor::I_getUnkByte()", // same as field 0x63 in No Remorse
"Item::getX(void)",
"Item::getY(void)",
// 0010
"Item::playSfxCru()",
"Item::getShape(void)",
"Item::I_explode()",
"UCMachine::I_rndRange()",
"Item::legalCreateAtCoords(uint16,uint16,uint16,uint16,uint16)",
"Item::andStatus(void)",
"World::I_getControlledNPCNum()",
"Actor::I_getDir()",
"Actor::I_getLastAnimSet()",
"Item::I_fireWeapon()",
"Item::create(uint16,uint16)",
"Item::popToCoords(uint16,uint16,uint8)",
"Actor::I_setDead()",
"Item::push(void)",
"Item::I_getEtherealTop()",
"Item::getQLo(void)",
// 0020
"Item::setQLo(sint16)",
"Item::getQHi(void)",
"Item::setQHi(sint16)",
"Item::I_getClosestDirectionInRange()",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Item::getCY(void)",
"Item::getCX(void)",
"SpriteProcess::I_createSprite()",
"Item::setNpcNum(sint16)",
"AudioProcess::I_playSFXCru()",
"Item::setShape()",
"Item::pop(void)",
"AudioProcess::I_stopSFXCru()",
"Item::isCompletelyOn(uint16)",
"Item::popToContainer(uint16)",
"Actor::I_getHp()",
// 0030
"Actor::I_getMana()",
"Item::getFamily(void)",
"Actor::destroyContents(void)",
"AudioProcess::I_setVolumeForItemSFX(uint16,uint16,byte)",
"Item::getDirToItem(uint16)",
"AudioProcess::I_isSfxPlayingForObject(Item *,uint sfxno)",
"Item::I_getRangeIfVisible()",
"AudioProcess::I_playSFXCru()",
"Item::andStatus(void)",
"Kernel::resetRef(uint16,ProcessType)",
"Item::touch(void)",
"Egg::getEggId(void)",
"MainActor::I_addItemCru()",
"Actor::I_getMap()",
"Item::callEvent11(sint16)",
"CameraProcess::I_somethingAboutCameraUpdate()",
// 0040
"AudioProcess::I_stopSFXCru()",
"Item::isOn(uint16)",
"Item::getQHi(void)",
"Item::isOn(uint16)",
"Item::getQHi(void)",
"Item::isOn(uint16)",
"Item::getQHi(void)",
"Item::isOn(uint16)",
"Item::getQHi(void)",
"Item::isOn(uint16)",
"Item::getQHi(void)",
"Item::isOn(uint16)",
"Item::getQHi(void)",
"Actor::I_getCurrentActivityNo()",
"Actor::isDead(void)",
"Actor::I_clrInCombat()",
// 0050
"Actor::I_setDefaultActivity0()",
"Actor::I_setDefaultActivity1()",
"Actor::I_setDefaultActivity2()",
"Actor::I_setActivity()",
"World::I_setControlledNPCNum()",
"Item::I_receiveHit()",
"Game::I_isReleaseBuild()",
"MainActor::I_setMana()",
"Item::use(void)",
"Item::setUnkEggType(sint16)",
"MusicProcess::I_playMusic()",
"Item::getSurfaceWeight(void)",
"Item::I_isCentreOn()",
"Item::setFrame(uint16)",
"Actor::I_getLastAnimSet()",
"Ultima8Engine::I_setAvatarInStasis()",
// 0060
"Actor::I_isBusy()",
"Actor::I_getField0x13Flag2()",
"Actor::I_doAnim()",
"Item::legalCreateAtPoint(uint16,uint16,WorldPoint&)",
"Item::getPoint(WorldPoint&)",
"Item::legalMoveToPoint(WorldPoint&,uint16,uint16)",
"Item::fall(void)",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Kernel::getNumProcesses(uint16,ProcessType)",
"Item::getCY(void)",
"U8Engine::I_isCfgAnimationOff()",
"ResetKeyboardState()",
"MusicProcess::I_pauseMusic()",
"MovieGump::I_playMovieCutsceneRegret()",
"MusicProcess::I_unpauseMusic()",
"Item::isInNpc(void)",
// 0070
"Ultima8Engine::I_setCruStasis()",
"Ultima8Engine::I_clrCruStasis()",
"PaletteFaderProcess::I_jumpToColor()",
"PaletteFaderProcess::I_fadeToGamePal()",
"Actor::isDead(void)",
"Item::getNpcNum(void)",
"IntrinsicReturn0",
"Game::I_isViolenceEnabled()",
"Item::unequip(sint16)",
"Item::andStatus(void)",
"Item::move(uint16,uint16,uint8)",
"Ultima8Engine::I_getCrusaderTeleporting()",
"Ultima8Engine::I_setCrusaderTeleporting()",
"Ultima8Engine::I_clrCrusaderTeleporting()",
"Actor::I_turnToward()",
"PaletteFaderProcess::I_fadeToBlack()",
// 0080
"MainActor::I_clrKeycards()",
"MusicProcess::I_stopMusic()",
"PaletteFaderProcess::I_jumpToAllBlack()",
"I_setUnkFlagA4()",
"I_clearUnkFlagA4()",
"MainActor::I_switchMap(int16)",
"teleportToEgg(sint16,int,uint8)",
"PaletteFaderProcess::I_fadeToGamePal()",
"Actor::I_clrImmortal()",
"Actor::I_setActivity()",
"Item::getQuality(void)",
"Item::setQuality(sint16)",
"MainActor::I_getMaxEnergy()",
"CameraProcess::I_moveTo(x,y,z)",
"Actor::I_setImmortal()",
"Camera::getX(void)",
// 0090
"Camera::getY(void)",
"Item::setMapNum(sint16)",
"Item::getNpcNum(void)",
"Item::shoot(WorldPoint&,sint16,sint16)",
"CameraProcess::I_setCenterOn()",
"Item::enterFastArea(void)",
"Item::setBroken()",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Item::getNpcNum(void)",
"Ultima8Engine::I_moveKeyDownRecently()",
"teleportToEgg(sint16,uint8)",
"Actor::I_createActor()",
"Actor::I_clrInCombat()",
"PaletteFaderProcess::I_jumpToGreyScale()",
"PaletteFaderProcess::I_jumpToNormalPalette()",
"CruStatusGump::I_showStatusGump()",
// 00A0
"Item::andStatus(void)",
"Item::getUnkEggType(void)",
"Egg::setEggXRange(uint16)",
"Item::setFrame(uint16)",
"Item::overlaps(uint16)",
"Item::isOn(uint16)",
"Item::getQHi(void)",
"Actor::I_getLastAnimSet()",
"Item::getCY(void)",
"CurrentMap::I_canExistAt()", // Equivalent to Intrinsic00BB() in Remorse
"Item::isOn(uint16)",
"Actor::isDead(void)",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Item::I_inFastArea()",
"Item::getQHi(void)",
"Item::andStatus(void)",
// 00B0
"Item::hurl(sint16,sint16,sint16,sint16)",
"Item::andStatus(void)",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Item::andStatus(void)",
"Item::getDirToCoords(uint16,uint16)",
"MainActor::I_removeItem(uint16)",
"I_updateInventoryUI()",
"Item::getNpcNum(void)",
"Item::getCY(void)",
"Item::isOn(uint16)",
"Item::getFootpad(sint16&,sint16&,sint16&)",
"Actor::isDead(void)",
"Actor::I_createActorCru()",
"Actor::I_setActivity()",
"KeypadGump::I_showKeypad()",
"Item::andStatus(void)",
// 00C0
"ComputerGump::I_readComputer()",
"UCMachine::I_numToStr()",
"IntrinsicReturn0",
"Actor::I_getDir()",
"Item::getQHi(void)",
"Item::setQuality(sint16)",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Actor::I_addHp()",
"CruHealerProcess::I_create()",
"Item::callEvent0A(sint16)",
"Item::setBroken()",
"Item::isOn(uint16)",
"Actor::I_teleport()",
"Item::I_getDirFromTo16()",
"Item::getQHi(void)",
"Item::isOn(uint16)",
// 00D0
"Actor::I_isInCombat()",
"Actor::I_getNPCDataField0x4()",
"Actor::I_setCombatTactic()",
"Actor::I_setDead())",
"CameraProcess::I_getCameraY()",
"Actor::I_getEquip()",
"Actor::I_setEquip()",
"Actor::I_getDefaultActivity0()",
"Actor::I_getDefaultActivity1()",
"Actor::I_getDefaultActivity2()",
"Actor::I_getLastAnimSet()",
"Actor::I_isFalling()",
"Item::getQLo(void)",
"Item::getQHi(void)",
"Item::getNpcNum(void)",
"Item::I_setField0x81()",
// 00E0
"Item::hurl(sint16,sint16,sint16,sint16)",
"Actor::I_setDead()",
"Item::getQLo(void)",
"Item::getCY(void)",
"Item::getNpcNum(void)",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Item::getNpcNum(void)",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Item::getNpcNum(void)",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Item::getNpcNum(void)",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Item::getNpcNum(void)",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Item::getNpcNum(void)",
"Item::hurl(sint16,sint16,sint16,sint16)",
// 00F0
"Item::getNpcNum(void)",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Item::getNpcNum(void)",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Item::getNpcNum(void)",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Item::getNpcNum(void)",
"Item::andStatus(void)",
"Actor::I_setDead()",
"Item::getQLo(void)",
"Actor::I_setDead()",
"Dtable::I_getMaxHPForNPC()",
"Actor::I_setHP()",
"Item::getQLo(void)",
"BatteryChargerProcess::I_create()",
"Item::hurl(sint16,sint16,sint16,sint16)",
// 0100
"Item::andStatus(void)",
"Item::isOn(uint16)",
"Actor::isDead(void)",
"Actor::I_setActivity()",
"Item::getQHi(void)",
"Actor::I_getLastAnimSet()",
"Actor::I_setDead()",
"Item::getQLo(void)",
"Item::isOn(uint16)",
"Item::getQHi(void)",
"Item::isOn(uint16)",
"Item::getQHi(void)",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Item::getNpcNum(void)",
"Item::getCY(void)",
"Item::hurl(sint16,sint16,sint16,sint16)",
// 0110
"Item::isOn(uint16)",
"MainActor::I_hasKeycard()",
"IntrinsicReturn0",
"Actor::isDead(void)",
"Actor::I_clrImmortal()",
"UCMachine::I_numToStr()",
"Item::getQHi(void)",
"Actor::I_setActivity()",
"Item::andStatus(void)",
"Item::getNpcNum(void)",
"Item::andStatus(void)",
"Item::getNpcNum(void)",
"Item::I_isCrusTypeNPC()",
"Item::andStatus(void)",
"Item::getNpcNum(void)",
"Item::AvatarStoleSomehting(uint16)",
// 0120
"Item::andStatus(void)",
"Item::getNpcNum(void)",
"Item::getQ(void)",
"Item::setQ(uint)",
"Item::andStatus(void)",
"Item::getNpcNum(void)",
"Item::andStatus(void)",
"Item::getNpcNum(void)",
"Item::andStatus(void)",
"Item::getNpcNum(void)",
"Item::andStatus(void)",
"Item::getNpcNum(void)",
"Item::andStatus(void)",
"Item::getNpcNum(void)",
"Actor::I_getDir()",
"Item::andStatus(void)",
// 0130
"Item::getNpcNum(void)",
"Intrinsic0131()",
"Item::andStatus(void)",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Item::andStatus(void)",
"Camera::getY(void)",
"Camera::getZ(void)",
"CruStatusGump::I_hideStatusGump()",
"Actor::I_clrInCombat()",
"Item::getTypeFlagCrusader(sint16)",
"Item::getNpcNum(void)",
"Item::hurl(sint16,sint16,sint16,sint16)",
"Item::getCY(void)",
"Item::getCZ(void)",
"Item::setFrame(uint16)",
"AudioProcess::I_playAmbientSFX()",
// 0140
"AudioProcess::I_isSFXPlaying()",
"World::I_clrAlertActiveRegret()",
"PaletteFaderProcess::I_fadeToGivenColor()",
"Actor::isDead(void)",
"Actor::I_setDead()",
"Game::I_playCredits()",
"PaletteFaderProcess::I_jumpToAllGrey()",
"Item::I_getFamilyOfType()",
"Item::getNpcNum(void)",
"Item::getQLo(void)",
"Item::andStatus(void)",
"Ultima8Engine::getCurrentTimerTick()",
"World::I_setAlertActiveRegret()",
"Ultima8Engine::I_getAvatarInStasis()",
"MainActor::I_addItemCru()",
"Egg::getEggXRange(void)",
// 0150
"Actor::I_clrInCombat()",
"PaletteFaderProcess::I_jumpToColor()",
"Item::setFrame(uint16)",
"UCMachine::I_numToStr()",
"Actor::I_getDir()",
"UCMachine::I_numToStr()",
"Item::isOn(uint16)",
"Actor::I_getDir()",
"Actor::I_setDead()",
"Item::getQHi(void)",
"Item::getQLo(void)",
"UCMachine::I_numToStr()",
"Actor::I_getDir()",
"Intrinsic015D()",
0
};
} // End of namespace Ultima8
} // End of namespace Ultima
#endif

View File

@@ -0,0 +1,140 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ultima/ultima8/convert/u8/convert_shape_u8.h"
namespace Ultima {
namespace Ultima8 {
// Shape format configuration for Ultima8
const ConvertShapeFormat U8ShapeFormat = {
"Ultima8",
6, // header
"", // ident
0, // bytes_ident
0, // bytes_special
4, // header_unk
2, // num_frames
6, // frameheader
3, // frame_offset
1, // frameheader_unk
2, // frame_length
0, // frame_length_kludge
18, // frameheader2
8, // frame_unknown
2, // frame_compression
2, // frame_width
2, // frame_height
2, // frame_xoff
2, // frame_yoff
2, // line_offset
0 // line_offset_absolute
};
// Shape format configuration for Ultima8 2D interface components
const ConvertShapeFormat U82DShapeFormat = {
"Ultima8 2D",
6, // header
"", // ident
0, // bytes_ident
0, // bytes_special
4, // header_unk
2, // num_frames
6, // frameheader
3, // frame_offset
1, // frameheader_unk
2, // frame_length
8, // frame_length_kludge
18, // frameheader2
8, // frame_unknown
2, // frame_compression
2, // frame_width
2, // frame_height
2, // frame_xoff
2, // frame_yoff
2, // line_offset
0 // line_offset_absolute
};
// Shape format configuration for Ultima8 SKF
const ConvertShapeFormat U8SKFShapeFormat = {
"Ultima8 SKF",
2, // header
"\2", // ident
2, // bytes_ident
0, // bytes_special
0, // header_unk
0, // num_frames
0, // frameheader
0, // frame_offset
0, // frameheader_unk
0, // frame_length
0, // frame_length_kludge
10, // frameheader2
0, // frame_unknown
2, // frame_compression
2, // frame_width
2, // frame_height
2, // frame_xoff
2, // frame_yoff
2, // line_offset
0 // line_offset_absolute
};
// Shape format configuration for Compressed Ultima 8 shapes
const ConvertShapeFormat U8CMPShapeFormat = {
"Ultima8 CMP",
11, // header
"", // ident
0, // bytes_ident
5, // bytes_special
4, // header_unk
2, // num_frames
6, // frameheader
4, // frame_offset
2, // frameheader_unk
0,//2, // frame_length
0,//-16, // frame_length_kludge
10, // frameheader2
0, // frame_unknown
2, // frame_compression
2, // frame_width
2, // frame_height
2, // frame_xoff
2, // frame_yoff
0, // line_offset
0 // line_offset_absolute
};
} // End of namespace Ultima8
} // End of namespace Ultima

View File

@@ -0,0 +1,45 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef ULTIMA8_CONVERT_U8_CONVERTSHAPEU8_H
#define ULTIMA8_CONVERT_U8_CONVERTSHAPEU8_H
#include "ultima/ultima8/convert/convert_shape.h"
namespace Ultima {
namespace Ultima8 {
// Shape format configuration for Ultima 8
extern const ConvertShapeFormat U8ShapeFormat;
// Shape format configuration for Ultima 8 2D
extern const ConvertShapeFormat U82DShapeFormat;
// Shape format configuration for Ultima 8 SKF file shapes
extern const ConvertShapeFormat U8SKFShapeFormat;
// Shape format configuration for Compressed Ultima 8 shapes
extern const ConvertShapeFormat U8CMPShapeFormat;
} // End of namespace Ultima8
} // End of namespace Ultima
#endif

View File

@@ -0,0 +1,358 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef ULTIMA8_CONVERT_U8_CONVERTUSECODEU8_H
#define ULTIMA8_CONVERT_U8_CONVERTUSECODEU8_H
#include "ultima/ultima8/convert/convert_usecode.h"
namespace Ultima {
namespace Ultima8 {
class ConvertUsecodeU8 : public ConvertUsecode {
public:
const char* const *intrinsics() override { return _intrinsics; };
const char* const *event_names() override { return _event_names; };
private:
static const char* const _intrinsics[];
static const char* const _event_names[];
};
const char* const ConvertUsecodeU8::_intrinsics[] = {
// 0000
"process target()",
"Item::getNext()", // Unused
"Item::touch()",
"word Item::getX()",
"word Item::getY()",
"word Item::getZ()",
"word Item::getCX()",
"word Item::getCY()",
"word Item::getCZ()",
"word Item::Ultima8::getGumpX()", // Unused
"word Item::Ultima8::getGumpY()", // Unused
"void Item::setGumpXY(word x, word y)", // Unused
"Item::getPoint(WorldPoint*)",
"uword Item::getType()",
"void Item::setType(uword type)",
"uword Item::getFrame()",
// 0010
"void Item::setFrame(uword frame)",
"uword Item::getQuality()", // Get Q (Not generic familiy)
"uword Item::getUnkEggType()", // Get Q (UnkEgg family)
"uword Item::getQuantity()", // Get Q (Quantity or Reagent family)
"Item::getContents()", // Unused
"Item::getContainer()",
"Item::getRootContainer()",
"uword Item::getGlobNum()", // Get Q (GlobEgg family) - Unused
"void Item::setGlobNum(uword)", // Set Q (GlobEgg family) - Unused
"uword Item::getQ()", // Get Q
"void Item::setQ(uword)", // Set Q
"void Item::setQuality(word value)", // Set Q (Not generic familiy)
"void Item::setUnkEggType(word value)", // Set Q (UnkEgg family) - Unused
"void Item::setQuantity(word value)", // Set Q (Quantity and Reagent families)
"word Item::getFamily()",
"bool Item::getTypeFlag(word bit)", // Get TypeFlag (0 to 63 - not a mask!)
// 0020
"word Item::getStatus()", // Get Status Flags
"void Item::orStatus(word mask)", // Status |= mask;
"void Item::andStatus(word mask)", // Status &= mask;
"Item::getFootpad(word*, word*, word*)",
"Item::touches(uword)", // Unused
"Item::overlaps(uword)", // boundingbox Overlap in 3d
"Item::overlapsXY(uword)", // Unused
"Item::isOn(uword)", // 3dxy overlaps && other->ztop == this->zbot ???
"Item::isCompletelyOn(uword)", // Unused
"Item::isAbove(uword)", // Unused
"Item::isUnder(uword)", // Unused
"Item::ascend(word)", // used once
"Item::getWeight()",
"Item::getWeightIncludingContents()",
"Item::getSurfaceWeight()",
"Item::getVolume()", // Unused
// 0030
"Item::getCapacity()", // Unuses
"Item::legal_create(uword, uword, uword, uword, uword)",
"Item::create(uword, uword)",
"Item::legal_create(uword, uword, WorldPoint*)",
"Item::legal_create(uword, uword, uword, word)",
"Item::push()",
"Item::popToCoords(uword, uword, ubyte)",
"Item::popToContainer(uword)",
"Item::pop()",
"Item::popToEnd(uword)",
"Item::destroy()",
"Item::removeContents()",
"Item::destroyContents()",
"Item::isExplosive()",
"Item::move(uword, uword, ubyte)",
"Item::move(WorldPoint*)", // Unused
// 0040
"Item::legal_move(WorldPoint*, uword, uword)",
"Item::legal_move(uword*, uword)",
"Item::isNpc()",
"Item::isInNpc()", // Unused
"process Item::hurl(word, word, word, word)",
"Item::shoot(WorldPoint*, word, word)",
"Item::fall()",
"Item::grab()",
"Item::findTarget(word, word)", // Unused
"process Item::bark(char* str)",
"strptr process Item::ask(uword slist)",
"word Item::getSliderInput(word min, word max, word step)",
"Item::openGump(word)",
"Item::closeGump()",
"Item::isGumpOpen()", // Unused
"Item::getNpcArray()", // Unused
// 0050
"Item::getMapArray()",
"Item::setNpcArray(word)", // Unused
"Item::setMapArray(word)",
"Item::receiveHit(uword, byte, word, uword)",
"Item::explode()",
"Item::canReach(uword, word)",
"Item::getRange(uword)",
"Item::getRange(uword, uword, uword)", // Unused
"Item::getDirToCoords(uword, uword)",
"Item::getDirFromCoords(uword, uword)",
"Item::getDirToItem(uword)",
"Item::getDirFromItem(uword)",
"process Item::look()", // Call event 0x0
"process Item::use()", // Call event 0x1
"process Item::anim()", // Unused
"process Item::cachein()", // Unused
// 0060
"Item::hit(uword, word)", // Unused
"process Item::gotHit(uword, word)", // Call event ???
"process Item::release()", // Unused
"process Item::equip()", // Unused
"process Item::unequip()", // Unused
"process Item::combine()", // Unused
"process Item::calledFromAnim()", // Unused
"process Item::enterFastArea()", // Call event 0xF
"process Item::leaveFastArea()", // Unused
"process Item::cast(uword)", // Unused
"process Item::justMoved()", // Unused
"process Item::AvatarStoleSomething(uword)",// Unused
"process Item::animGetHit(uword)", // Unused
"process Item::guardianBark(word)", // Call event 0x15
"process Book::read(char*)",
"process Scroll::read(char*)",
// 0070
"process Grave::read(word,char*)",
"process Plaque::read(word,char*)",
"Egg::getEggXRange()",
"Egg::getEggYRange()",
"Egg::setEggXRange(uword)",
"Egg::setEggYRange(uword)", // Unused
"Egg::getEggId()",
"Egg::setEggId(uword)",
"Egg::hatch()", // Unused
"MonsterEgg::hatch()",
"MonsterEgg::getMonId()",
"MonsterEgg::getActivity()", // Unused
"MonsterEgg::getShapeType()", // Unused
"MonsterEgg::setMonId(word)", // Unused
"MonsterEgg::setActivity(word)", // Unused
"MonsterEgg::setShapeType(word)", // Unused
// 0080
"Npc::isBusy()",
"Npc::areEnemiesNear()",
"Npc::isInCombat()",
"Npc::setInCombat()",
"Npc::clrInCombat()",
"Npc::setTarget(uword)",
"Npc::getTarget()",
"Npc::setAlignment(ubyte)",
"Npc::getAlignment()", // Unused
"Npc::setEnemyAlignment(ubyte)",
"Npc::getEnemyAlignment()", // Unused
"Npc::isEnemy(uword)",
"Npc::isDead()",
"Npc::setDead()",
"Npc::clrDead()",
"Npc::isImmortal()", // Unused
// 0090
"Npc::setImmortal()",
"Npc::clrImmortal()",
"Npc::isWithstandDeath()", // Unused
"Npc::setWithstandDeath()",
"Npc::clrWithstandDeath()",
"Npc::isFeignDeath()", // Unused
"Npc::setFeignDeath()",
"Npc::clrFeignDeath()", // Unused
"Npc::freeEquip(uword)", // Unused
"Npc::clearEquip()", // Unused
"Npc::getNpcSlot()", // Unused
"Npc::freeNpcSlot()", // Unused
"Npc::getDir()",
"Npc::getMap()",
"Npc::teleport(uword, uword, ubyte, ubyte)",
"process Npc::doAnim(AnimSet, word, word, ubyte)",
// 00A0
"Npc::getLastAnimSet()",
"process Npc::pathfind(uword, uword, uword, uword)",
"process Npc::pathfind(uword, uword)",
"byte Npc::getStr()",
"byte Npc::getInt()",
"byte Npc::getDex()",
"ubyte Npc::getHp()",
"word Npc::getMana()",
"void Npc::setStr(byte str)",
"void Npc::setInt(byte int)",
"void Npc::setDex(byte dex)",
"void Npc::setHp(ubyte hp)",
"void Npc::setMana(word mana)",
"Npc::create(uword, uword)",
"process Npc::cSetActivity(Activity)",
"Npc::setAirWalkEnabled(ubyte)",
// 00B0
"Npc::getAirWalkEnabled()",
"Npc::schedule(ulong)",
"Npc::getEquip(word)",
"Npc::setEquip(word, uword)",
"closeAllGumps()",
"process Camera::scrollTo(uword, uword, ubyte, word)", // probably x, y, z, 'time'
"urandom(word)",
"rndRange(word,word)",
"castGrantPeaceSpell()",
"numToStr(uword)",
"strToNum(char*)", // Unused
"playMusic(byte)",
"getName()", // Returns the Avatar's name
"igniteChaos(uword, uword, ubyte)",
"Camera::setCenterOn(uword)",
"Camera::move_to(uword, uword, ubyte, word)",
// 00C0
"Camera::move_rel(word, word, word)", // Unused
"Camera::set_roof(word)", // Unused
"Camera::roof()", // Unused
"Camera::getX()", // Unused
"Camera::getY()", // Unused
"Camera::getZ()", // Unused
"Camera::startQuake(word)",
"Camera::stopQuake()",
"Camera::invertScreen(ubyte)",
"U8MousePointer::getDir()", // Unused
"Kernel::getNumProcesses(uword, ProcessType)",
"Kernel::resetRef(uword, ProcessType)",
"process teleportToEgg(word, word, ubyte)",
"resetRef(uword, uword)",
"setRef(uword, uword, uword)",
"getAvatarInStasis()",
// 00D0
"setAvatarInStasis(word)",
"getEtherealTop()",
"getCurrentTimerTick()",
"canGetThere(uword, uword, uword)", // Unused
"canExistAt(uword, uword, uword, uword, ubyte, uword, word)",
"createSprite(word, word, word, word, word, word, uword, uword, ubyte)",
"createSprite(word, word, word, word, uword, uword, ubyte)",
"word getFamilyOfType(uword type)",
"TimeInGameHours()",
"TimeInMinutes()",
"TimeInSeconds()", // Unused
"SetTimeInGameHours(word)",
"SetTimeInMinutes(long)", // Unused
"SetTimeInSeconds(long)", // unused
"process FadeToBlack()",
"process FadeFromBlack()",
// 00E0
"process FadeToPalette(word, word)",
"process LightningBolt()",
"process FadeToWhite()",
"process FadeFromWhite()",
"playEndgame()",
"FeedAvatar(word)",
"AccumulateStrength(word)", // Unused
"AccumulateIntelligence(word)",
"AccumulateDexterity(word)",
"ClrAvatarInCombat()",
"SetAvatarInCombat()",
"IsAvatarInCombat()", // Unused
"playSFX(word)",
"playSFX(word, ubyte)",
"playSFX(word, word, uword)",
"playAmbientSFX(word)", // Unused
// 00F0
"playAmbientSFX(word, word)", // Unused
"playAmbientSFX(word, word, uword)",
"isSFXPlaying(word)",
"setVolumeSFX(word, word)",
"stopSFX(word)",
"stopSFX(word, uword)",
"soundInit(word, word, word)", // Unused
"soundDeInit()", // Unused
"musicStop()",
"musicSlowStop()", // Unused
"musicPlay(word)", // Unused
"TonysBalls(word, word, uword, uword, uword)",
"AvatarCanCheat()",
"MakeAvatarACheater()",
"isGameRunning()",
"unused",
// 0100
"unused",
0
};
const char * const ConvertUsecodeU8::_event_names[] = {
"look()", // 0x00
"use()", // 0x01
"anim()", // 0x02
"setActivity()", // 0x03
"cachein()", // 0x04
"hit(uword, word)", // 0x05
"gotHit(uword, word)", // 0x06
"hatch()", // 0x07
"schedule()", // 0x08
"release()", // 0x09
"equip()", // 0x0A
"unequip()", // 0x0B
"combine()", // 0x0C
"func0D", // 0x0D
"calledFromAnim()", // 0x0E
"enterFastArea()", // 0x0F
"leaveFastArea()", // 0x10
"cast(uword)", // 0x11
"justMoved()", // 0x12
"AvatarStoleSomething(uword)", // 0x13
"animGetHit()", // 0x14
"guardianBark(word)", // 0x15
"func16", // 0x16
"func17", // 0x17
"func18", // 0x18
"func19", // 0x19
"func1A", // 0x1A
"func1B", // 0x1B
"func1C", // 0x1C
"func1D", // 0x1D
"func1E", // 0x1E
"func1F", // 0x1F
0
};
} // End of namespace Ultima8
} // End of namespace Ultima
#endif