// // P_AnimateSurfaces // // Called every tic in P_Ticker // void P_AnimateSurfaces(void) { // update sky scroll offsets // haleyjd: stored as regular ints in the mapinfo so we need // to transform these to fixed point values :) Sky1ColumnOffset += ((fixed_t)LevelInfo.skyDelta ) << 8; Sky2ColumnOffset += ((fixed_t)LevelInfo.sky2Delta) << 8; if(LevelInfo.hasLightning) { if(!NextLightningFlash || LightningFlash) P_LightningFlash(); else NextLightningFlash--; } }
void P_AnimateSurfaces(void) { int i; line_t *line; // Update scrolling textures for(i = 0; i < numlinespecials; i++) { line = linespeciallist[i]; switch (line->special) { case 100: // Scroll_Texture_Left sides[line->sidenum[0]].textureoffset += line->arg1 << 10; break; case 101: // Scroll_Texture_Right sides[line->sidenum[0]].textureoffset -= line->arg1 << 10; break; case 102: // Scroll_Texture_Up sides[line->sidenum[0]].rowoffset += line->arg1 << 10; break; case 103: // Scroll_Texture_Down sides[line->sidenum[0]].rowoffset -= line->arg1 << 10; break; } } // Update sky column offsets Sky1ColumnOffset += Sky1ScrollDelta; Sky2ColumnOffset += Sky2ScrollDelta; Rend_SkyParams(1, DD_OFFSET, FIX2FLT(Sky1ColumnOffset)); Rend_SkyParams(0, DD_OFFSET, FIX2FLT(Sky2ColumnOffset)); if(LevelHasLightning) { if(!NextLightningFlash || LightningFlash) { P_LightningFlash(); } else { NextLightningFlash--; } } }
// // P_AnimateSurfaces // // Called every tic in P_Ticker // void P_AnimateSurfaces() { // update sky scroll offsets // haleyjd: stored as regular ints in the mapinfo so we need // to transform these to fixed point values :) skyflat_t *sky1 = R_SkyFlatForIndex(0); skyflat_t *sky2 = R_SkyFlatForIndex(1); if(sky1) sky1->columnoffset += LevelInfo.skyDelta << 8; if(sky2) sky2->columnoffset += LevelInfo.sky2Delta << 8; if(LevelInfo.hasLightning) { if(!NextLightningFlash || LightningFlash) P_LightningFlash(); else NextLightningFlash--; } }