Ejemplo n.º 1
0
	void save(FILE *fd) {
		writeUint16LE(fd, x1);
		writeUint16LE(fd, y1);
		writeUint16LE(fd, x2);
		writeUint16LE(fd, y2);
		writeUint32LE(fd, messageListOffset);
	}
Ejemplo n.º 2
0
	void save(FILE *fd) {
		writeUint16LE(fd, x1);
		writeUint16LE(fd, y1);
		writeUint16LE(fd, x2);
		writeUint16LE(fd, y2);
		writeUint16LE(fd, messageNum);
	}
Ejemplo n.º 3
0
void MfcArchive::writeObject(CObject *obj) {
	if (obj == NULL) {
		writeUint16LE(0);
	} else if (_objectHash.contains(obj)) {
		int32 idx = _objectHash[obj];

		if (idx < 0x7fff) {
			writeUint16LE(idx);
		} else {
			writeUint16LE(0x7fff);
			writeUint32LE(idx);
		}
	} else {
		writeUint16LE(0xffff); // New class
		_objectHash[obj] = _lastIndex++;

		writeUint16LE(1); // schema

		switch (obj->_objtype) {
		case kObjTypeGameVar:
			writePascalString(lookupObjectId(kGameVar), true); // Two byte counter
			break;
		default:
			error("Unhandled save for object type: %d", obj->_objtype);
		}

		obj->save(*this);
	}
}
Ejemplo n.º 4
0
	void save(FILE *fd) {
		writeUint16LE(fd, x1);
		writeUint16LE(fd, y1);
		writeUint16LE(fd, x2);
		writeUint16LE(fd, y2);
		writeUint32LE(fd, subRectItems.size());
		for (uint32 j = 0; j < subRectItems.size(); j++)
			subRectItems[j].save(fd);
	}
Ejemplo n.º 5
0
	void save(FILE *fd) {
		writeUint32LE(fd, id);
		writeUint32LE(fd, bgFilename);
		writeUint32LE(fd, class437Filename);
		writeUint32LE(fd, dataResourceFilename);
		writeUint32LE(fd, pointListName);
		writeUint32LE(fd, rectListName);
		writeUint32LE(fd, exPaletteFilename2);
		writeUint32LE(fd, exPaletteFilename1);
		writeUint32LE(fd, mouseCursorFilename);
		writeUint16LE(fd, which1);
		writeUint16LE(fd, which2);
	}
Ejemplo n.º 6
0
void MfcArchive::writePascalString(const Common::String &str, bool twoByte) {
	int len = str.size();

	if (twoByte)
		writeUint16LE(len);
	else
		writeByte(len);

	write(str.c_str(), len);
}
Ejemplo n.º 7
0
void writeUint32LE(FILE *file, uint32 x) {
	writeUint16LE(file, x & 0xffff);
	writeUint16LE(file, x >> 16);
}
Ejemplo n.º 8
0
	void save(FILE *fd) {
		writeUint16LE(fd, messageNum);
		writeUint32LE(fd, messageParam);
	}
Ejemplo n.º 9
0
void File::writeUint32LE(uint32_t n) {
	writeUint16LE(n & 0xFFFF);
	writeUint16LE(n >> 16);
}