mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-01 15:09:47 +00:00
TITANIC: Added CStarArray initialization
This commit is contained in:
parent
0b860220fc
commit
b725c9add7
@ -36,16 +36,23 @@ void CStarArray::initialize() {
|
||||
Common::SeekableReadStream *stream = g_vm->_filesManager->getResource("STARFIELD/POINTS");
|
||||
assert(stream && stream->size() == (12 * ARRAY_COUNT));
|
||||
|
||||
double factor = 3.1415927 * 0.0055555557;
|
||||
|
||||
_data.resize(ARRAY_COUNT);
|
||||
for (int idx = 0; idx < ARRAY_COUNT; ++idx) {
|
||||
CStarArrayEntry &entry = _data[idx];
|
||||
|
||||
// Get the next set of values
|
||||
int v1 = stream->readUint32LE();
|
||||
int v2 = stream->readUint32LE();
|
||||
double v1 = stream->readUint32LE();
|
||||
double v2 = stream->readUint32LE();
|
||||
stream->readUint32LE();
|
||||
|
||||
warning("TODO: %d %d", v1, v2);
|
||||
// Pre-process them
|
||||
// TODO
|
||||
v1 *= 0.0099999998 * factor;
|
||||
v2 *= 0.015 * factor;
|
||||
|
||||
entry._v1 = cos(v2) * 3000000.0 * cos(v1);
|
||||
entry._v2 = sin(v2) * 3000000.0 * cos(v1);
|
||||
entry._v3 = sin(v1) * 3000000.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user