mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-05-08 12:10:40 -04:00
merge from isledecomp/isle
This commit is contained in:
commit
9db0e795f4
5 changed files with 88 additions and 12 deletions
LEGO1/omni
|
@ -92,6 +92,9 @@ private:
|
||||||
// List<MxDSBuffer *>::~List<MxDSBuffer *>
|
// List<MxDSBuffer *>::~List<MxDSBuffer *>
|
||||||
|
|
||||||
// TEMPLATE: LEGO1 0x100c7ef0
|
// TEMPLATE: LEGO1 0x100c7ef0
|
||||||
// list<MxNextActionDataStart *>::insert
|
// list<MxNextActionDataStart *,allocator<MxNextActionDataStart *> >::insert
|
||||||
|
|
||||||
|
// TEMPLATE: BETA10 0x10150e60
|
||||||
|
// MxUtilityList<MxNextActionDataStart *>::PushBack
|
||||||
|
|
||||||
#endif // MXDISKSTREAMCONTROLLER_H
|
#endif // MXDISKSTREAMCONTROLLER_H
|
||||||
|
|
|
@ -66,13 +66,13 @@ public:
|
||||||
MxS32 p_height,
|
MxS32 p_height,
|
||||||
MxBool p_RLE
|
MxBool p_RLE
|
||||||
); // vtable+0x30
|
); // vtable+0x30
|
||||||
virtual undefined4 VTable0x34(
|
virtual void VTable0x34(
|
||||||
undefined4,
|
MxU8* p_pixels,
|
||||||
undefined4,
|
MxS32 p_bpp,
|
||||||
undefined4,
|
MxS32 p_width,
|
||||||
undefined4,
|
MxS32 p_height,
|
||||||
undefined4,
|
MxS32 p_x,
|
||||||
undefined4
|
MxS32 p_y
|
||||||
); // vtable+0x34
|
); // vtable+0x34
|
||||||
virtual void Display(
|
virtual void Display(
|
||||||
MxS32 p_left,
|
MxS32 p_left,
|
||||||
|
|
|
@ -18,6 +18,9 @@ public:
|
||||||
this->pop_front();
|
this->pop_front();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note: does not take a reference
|
||||||
|
void PushBack(T p_obj) { this->push_back(p_obj); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MXUTILITYLIST_H
|
#endif // MXUTILITYLIST_H
|
||||||
|
|
|
@ -248,27 +248,31 @@ MxResult MxDiskStreamController::FUN_100c7d10()
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100c7db0
|
// FUNCTION: LEGO1 0x100c7db0
|
||||||
|
// FUNCTION: BETA10 0x101551d0
|
||||||
MxDSStreamingAction* MxDiskStreamController::FUN_100c7db0()
|
MxDSStreamingAction* MxDiskStreamController::FUN_100c7db0()
|
||||||
{
|
{
|
||||||
AUTOLOCK(m_criticalSection);
|
AUTOLOCK(m_criticalSection);
|
||||||
|
|
||||||
for (MxNextActionDataStartList::iterator it = m_nextActionList.begin(); it != m_nextActionList.end(); it++) {
|
for (MxNextActionDataStartList::iterator it = m_nextActionList.begin(); it != m_nextActionList.end(); it++) {
|
||||||
MxNextActionDataStart* data = *it;
|
MxNextActionDataStart* data = *it;
|
||||||
|
|
||||||
for (MxDSObjectList::iterator it2 = m_list0x64.begin(); it2 != m_list0x64.end(); it2++) {
|
for (MxDSObjectList::iterator it2 = m_list0x64.begin(); it2 != m_list0x64.end(); it2++) {
|
||||||
MxDSStreamingAction* streamingAction = (MxDSStreamingAction*) *it2;
|
MxDSStreamingAction* streamingAction = (MxDSStreamingAction*) *it2;
|
||||||
|
|
||||||
if (streamingAction->GetObjectId() == data->GetObjectId() &&
|
if (streamingAction->GetObjectId() == data->GetObjectId() &&
|
||||||
streamingAction->GetUnknown24() == data->GetUnknown24() &&
|
streamingAction->GetUnknown24() == data->GetUnknown24() &&
|
||||||
streamingAction->GetBufferOffset() == data->GetData()) {
|
streamingAction->GetBufferOffset() == data->GetData()) {
|
||||||
m_nextActionList.erase(it);
|
m_nextActionList.erase(it);
|
||||||
|
|
||||||
data->SetData(m_provider->GetFileSize() + data->GetData());
|
data->SetData(m_provider->GetFileSize() + data->GetData());
|
||||||
m_nextActionList.push_back(data);
|
m_nextActionList.PushBack(data);
|
||||||
|
|
||||||
m_list0x64.erase(it2);
|
m_list0x64.erase(it2);
|
||||||
return streamingAction;
|
return streamingAction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include "mxdisplaysurface.h"
|
#include "mxdisplaysurface.h"
|
||||||
|
|
||||||
#include "mxbitmap.h"
|
#include "mxbitmap.h"
|
||||||
|
#include "mxdebug.h"
|
||||||
#include "mxmisc.h"
|
#include "mxmisc.h"
|
||||||
#include "mxomni.h"
|
#include "mxomni.h"
|
||||||
#include "mxpalette.h"
|
#include "mxpalette.h"
|
||||||
|
@ -739,10 +740,75 @@ sixteen_bit:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100bb850
|
// FUNCTION: LEGO1 0x100bb850
|
||||||
undefined4 MxDisplaySurface::VTable0x34(undefined4, undefined4, undefined4, undefined4, undefined4, undefined4)
|
// FUNCTION: BETA10 0x10141191
|
||||||
|
void MxDisplaySurface::VTable0x34(MxU8* p_pixels, MxS32 p_bpp, MxS32 p_width, MxS32 p_height, MxS32 p_x, MxS32 p_y)
|
||||||
{
|
{
|
||||||
return 0;
|
DDSURFACEDESC surfaceDesc;
|
||||||
|
memset(&surfaceDesc, 0, sizeof(surfaceDesc));
|
||||||
|
surfaceDesc.dwSize = sizeof(surfaceDesc);
|
||||||
|
|
||||||
|
HRESULT result = m_ddSurface2->Lock(NULL, &surfaceDesc, DDLOCK_WAIT, NULL);
|
||||||
|
|
||||||
|
if (result == DDERR_SURFACELOST) {
|
||||||
|
m_ddSurface2->Restore();
|
||||||
|
result = m_ddSurface2->Lock(NULL, &surfaceDesc, DDLOCK_WAIT, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result == DD_OK) {
|
||||||
|
MxU8* pixels = p_pixels;
|
||||||
|
|
||||||
|
switch (m_surfaceDesc.ddpfPixelFormat.dwRGBBitCount) {
|
||||||
|
case 8: {
|
||||||
|
if (p_bpp == 16) {
|
||||||
|
MxTrace("16 bit source to 8 bit display NOT_IMPLEMENTED");
|
||||||
|
assert(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MxU8* dst = (MxU8*) surfaceDesc.lpSurface + p_y * surfaceDesc.lPitch + p_x;
|
||||||
|
MxLong stride = p_width;
|
||||||
|
MxLong length = surfaceDesc.lPitch;
|
||||||
|
|
||||||
|
while (p_height--) {
|
||||||
|
memcpy(dst, pixels, p_width);
|
||||||
|
pixels += stride;
|
||||||
|
dst += length;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 16: {
|
||||||
|
if (p_bpp == 16) {
|
||||||
|
MxU8* dst = (MxU8*) surfaceDesc.lpSurface + p_y * surfaceDesc.lPitch + p_x;
|
||||||
|
MxLong stride = p_width * 2;
|
||||||
|
MxLong length = surfaceDesc.lPitch;
|
||||||
|
|
||||||
|
while (p_height--) {
|
||||||
|
memcpy(dst, pixels, 2 * p_width);
|
||||||
|
pixels += stride;
|
||||||
|
dst += length;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (p_bpp == 8) {
|
||||||
|
MxU8* dst = (MxU8*) surfaceDesc.lpSurface + p_y * surfaceDesc.lPitch + 2 * p_x;
|
||||||
|
MxLong stride = p_width * 2;
|
||||||
|
MxLong length = -2 * p_width + surfaceDesc.lPitch;
|
||||||
|
|
||||||
|
for (MxS32 i = 0; i < p_height; i++) {
|
||||||
|
for (MxS32 j = 0; j < p_width; j++) {
|
||||||
|
*(MxU16*) dst = m_16bitPal[*pixels++];
|
||||||
|
dst += 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
pixels += stride;
|
||||||
|
dst += length;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_ddSurface2->Unlock(surfaceDesc.lpSurface);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100bba50
|
// FUNCTION: LEGO1 0x100bba50
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue