[Bug 10729] Clicking things in-game in LEGO Island causes game to hang

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Mar 3 03:40:02 CST 2016


https://bugs.winehq.org/show_bug.cgi?id=10729

Sergey Isakov <isakov-sl at bk.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |isakov-sl at bk.ru

--- Comment #10 from Sergey Isakov <isakov-sl at bk.ru> ---
Reopen, please, this bug. I confirm it exactly as is with wine 1.9.4.

The reason of the hang is a crash as the function d3d_device1_GetPickRecords is
a stub.
The game works as follow:
1. It draws a scene with numerous objects and record tracking what and where.
2. It proposes user to choose something ("Pick up blue cube") and wait for
mouse click.
3. Then the game call function ->Pick(..., rect) where rect is a place where
mouse clicked.
The function must choose records from the ExecuteBufferData corresponding to
this rect. So the game will know what object the user click.
4. Then the game call function ->GetPickRecords(&count, &records) where
"Windows" should return how many record found and their datas.
5. But this simple game just check if there is one record found.
So with this hack the game playable:

 *****************************************************************************/
static D3DPICKRECORD FakeRecord = { 0x2, 0, 0x1, 0};

static HRESULT WINAPI d3d_device1_GetPickRecords(IDirect3DDevice *iface,
        DWORD *count, D3DPICKRECORD *records)
{
    FIXME("iface %p, count %p, records %p stub!\n", iface, count, records);
    *count = 1;

    if (!records) {
        return DDERR_INVALIDPARAMS;
    }
    *records = FakeRecord;

    return D3D_OK;
}

/*****************************************************************************

Real implementation must be much more complex
static HRESULT WINAPI d3d_device1_Pick(IDirect3DDevice *iface,
IDirect3DExecuteBuffer *buffer,
        IDirect3DViewport *viewport, DWORD flags, D3DRECT *rect)
- should call buffer->GetExecuteData, it will be array of D3DPICKRECORD
- compare each record if offset correspond to rect
- fill viewport data

d3d_device1_GetPickRecords()
- link to the viewport
- get viewport data
- copy records from it to output buffer
- return a number of records copied

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list