Subversion Repositories eduke32

Rev

Rev 5046 | Rev 5048 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5046 Rev 5047
Line 4448... Line 4448...
4448
#endif
4448
#endif
4449
            G_DrawBackground();
4449
            G_DrawBackground();
4450
        pub = 0;
4450
        pub = 0;
4451
    }
4451
    }
4452
4452
-
 
4453
    VM_OnEvent(EVENT_DISPLAYSTART, p->i, snum);
-
 
4454
4453
    if (ud.overhead_on == 2 || ud.show_help || (p->cursectnum == -1 && getrendermode() != REND_CLASSIC))
4455
    if (ud.overhead_on == 2 || ud.show_help || (p->cursectnum == -1 && getrendermode() != REND_CLASSIC))
4454
        return;
4456
        return;
4455
4457
4456
    if (r_usenewaspect)
4458
    if (r_usenewaspect)
4457
    {
4459
    {
4458
        newaspect_enable = 1;
4460
        newaspect_enable = 1;
4459
        setaspect_new();
4461
        setaspect_new();
4460
    }
4462
    }
4461
4463
4462
    if (ud.pause_on || g_player[snum].ps->on_crane > -1)
4464
    if (ud.pause_on || p->on_crane > -1)
4463
        smoothratio = 65536;
4465
        smoothratio = 65536;
4464
    else
4466
    else
4465
        smoothratio = calc_smoothratio(totalclock, ototalclock);
4467
        smoothratio = calc_smoothratio(totalclock, ototalclock);
4466
4468
4467
    {
4469
    {
Line 4482... Line 4484...
4482
        if (s->yvel < 0) s->yvel = -100;
4484
        if (s->yvel < 0) s->yvel = -100;
4483
        else if (s->yvel > 199) s->yvel = 300;
4485
        else if (s->yvel > 199) s->yvel = 300;
4484
4486
4485
        CAMERA(ang) = actor[ud.camerasprite].tempang +
4487
        CAMERA(ang) = actor[ud.camerasprite].tempang +
4486
            mulscale16(((s->ang+1024-actor[ud.camerasprite].tempang)&2047)-1024, smoothratio);
4488
            mulscale16(((s->ang+1024-actor[ud.camerasprite].tempang)&2047)-1024, smoothratio);
-
 
4489
-
 
4490
        dont_draw = VM_OnEvent(EVENT_DISPLAYROOMSCAMERA, p->i, snum);
-
 
4491
-
 
4492
        if (dont_draw != 1)  // event return values other than 0 and 1 are reserved
-
 
4493
        {
-
 
4494
            if (EDUKE32_PREDICT_FALSE(dont_draw != 0))
-
 
4495
                OSD_Printf(OSD_ERROR "ERROR: EVENT_DISPLAYROOMSCAMERA return value must be 0 or 1, "
-
 
4496
                           "other values are reserved.\n");
-
 
4497
4487
#ifdef LEGACY_ROR
4498
#ifdef LEGACY_ROR
4488
        G_SE40(smoothratio);
4499
            G_SE40(smoothratio);
4489
#endif
4500
#endif
4490
#ifdef POLYMER
4501
#ifdef POLYMER
4491
        if (getrendermode() == REND_POLYMER)
4502
            if (getrendermode() == REND_POLYMER)
Line 4495... Line 4506...
4495
        drawrooms(s->x,s->y,s->z-(4<<8),CAMERA(ang),s->yvel,s->sectnum);
4506
            drawrooms(s->x,s->y,s->z-(4<<8),CAMERA(ang),s->yvel,s->sectnum);
4496
        yax_drawrooms(G_DoSpriteAnimations, s->sectnum, 0, smoothratio);
4507
            yax_drawrooms(G_DoSpriteAnimations, s->sectnum, 0, smoothratio);
4497
        G_DoSpriteAnimations(s->x,s->y,CAMERA(ang),smoothratio);
4508
            G_DoSpriteAnimations(s->x,s->y,CAMERA(ang),smoothratio);
4498
        drawmasks();
4509
            drawmasks();
4499
    }
4510
        }
-
 
4511
    }
4500
    else
4512
    else
4501
    {
4513
    {
4502
        int32_t j,fz,cz;
4514
        int32_t j,fz,cz;
4503
        int32_t tiltcx, tiltcy, tiltcs=0;    // JBF 20030807
4515
        int32_t tiltcx, tiltcy, tiltcs=0;    // JBF 20030807
4504
4516
Line 4735... Line 4747...
4735
                    CAMERA(pos.z) = fz-(4<<8);
4747
                    CAMERA(pos.z) = fz-(4<<8);
4736
4748
4737
            break;
4749
            break;
4738
        }
4750
        }
4739
4751
4740
        dont_draw = 0;
-
 
4741
        // NOTE: might be rendering off-screen here, so CON commands that draw stuff
4752
        // NOTE: might be rendering off-screen here, so CON commands that draw stuff
4742
        //  like showview must cope with that situation or bail out!
4753
        //  like showview must cope with that situation or bail out!
4743
        dont_draw = VM_OnEvent(EVENT_DISPLAYROOMS, g_player[screenpeek].ps->i, screenpeek);
4754
        dont_draw = VM_OnEvent(EVENT_DISPLAYROOMS, p->i, snum);
4744
4755
4745
        CAMERA(horiz) = clamp(CAMERA(horiz), HORIZ_MIN, HORIZ_MAX);
4756
        CAMERA(horiz) = clamp(CAMERA(horiz), HORIZ_MIN, HORIZ_MAX);
4746
4757
4747
        if (dont_draw != 1)  // event return values other than 0 and 1 are reserved
4758
        if (dont_draw != 1)  // event return values other than 0 and 1 are reserved
4748
        {
4759
        {