Ticket #4846: tinsel-sched-v2.patch

File tinsel-sched-v2.patch, 2.0 KB (added by lordhoto, 15 years ago)
  • engines/tinsel/play.cpp

    diff --git a/engines/tinsel/play.cpp b/engines/tinsel/play.cpp
    index 54281c9..103b8f4 100644
    a b static void SoundReel(CORO_PARAM, SCNHANDLE hFilm, int column, int speed,  
    376376        CORO_END_CODE;
    377377}
    378378
    379 static void ResSoundReel(CORO_PARAM, const void *) {
     379static void ResSoundReel(CORO_PARAM, const void *param) {
    380380        // get the stuff copied to process when it was created
    381         PPROCESS pProc = g_scheduler->getCurrentProcess();
    382         int     i = *(int *)pProc->param;
     381        int i = *(const int *)param;
    383382
    384383        CORO_BEGIN_CONTEXT;
    385384        CORO_END_CONTEXT(_ctx);
  • engines/tinsel/sched.cpp

    diff --git a/engines/tinsel/sched.cpp b/engines/tinsel/sched.cpp
    index c081ff6..d8a4494 100644
    a b void Scheduler::setResourceCallback(VFPTRPP pFunc) {  
    508508/**
    509509 * The code for for restored scene processes.
    510510 */
    511 static void RestoredProcessProcess(CORO_PARAM, const void *) {
     511static void RestoredProcessProcess(CORO_PARAM, const void *param) {
    512512        CORO_BEGIN_CONTEXT;
    513513                INT_CONTEXT *pic;
    514514        CORO_END_CONTEXT(_ctx);
    515515
    516516        CORO_BEGIN_CODE(_ctx);
    517517
    518         PROCESS *pProc;         // this process pointer
    519 
    520518        // get the stuff copied to process when it was created
    521         pProc = g_scheduler->getCurrentProcess();
    522         _ctx->pic = *((INT_CONTEXT **) pProc->param);
     519        _ctx->pic = *(const PINT_CONTEXT *)param;
    523520
    524521        _ctx->pic = RestoreInterpretContext(_ctx->pic);
    525         AttachInterpret(_ctx->pic, pProc);
     522        AttachInterpret(_ctx->pic, g_scheduler->getCurrentProcess());
    526523
    527524        CORO_INVOKE_1(Interpret, _ctx->pic);
    528525
    static void RestoredProcessProcess(CORO_PARAM, const void *) {  
    532529/**
    533530 * Process Tinsel Process
    534531 */
    535 static void ProcessTinselProcess(CORO_PARAM, const void *) {
    536         PPROCESS pProc = g_scheduler->getCurrentProcess();
    537         PINT_CONTEXT *pPic = (PINT_CONTEXT *) pProc->param;
     532static void ProcessTinselProcess(CORO_PARAM, const void *param) {
     533        const PINT_CONTEXT *pPic = (const PINT_CONTEXT *)param;
    538534
    539535        CORO_BEGIN_CONTEXT;
    540536        CORO_END_CONTEXT(_ctx);