/* Reinit */ void Cinematic::OneTimeSceneReInit() { m_camera.size = Anglef(160.f, 60.f, 60.f); m_camera.orgTrans.pos = Vec3f(900.f, -160.f, 4340.f); m_camera.angle = Anglef(3.f, 268.f, 0.f); m_camera.clip = Rect(LargeurRender, HauteurRender); m_camera.center = m_camera.clip.center(); m_camera.focal = 350.f; m_camera.bkgcolor = Color::none; SetCameraDepth(m_camera, 2500.f); numbitmap = -1; numbitmapsuiv = -1; fx = -1; changekey = true; idsound = -1; key = NULL; projectload = false; DeleteAllBitmap(); DeleteAllSound(); DeleteTrack(); FlashBlancEnCours = false; m_flIntensityRND = 0.f; }
void ARX_GLOBALMODS_Apply() { if (EDITMODE) return; float baseinc = _framedelay; float incdiv1000 = _framedelay * DIV1000; if (desired.flags & GMOD_ZCLIP) { current.zclip = Approach(current.zclip, desired.zclip, baseinc * 2); } else // return to default... { desired.zclip = current.zclip = Approach(current.zclip, DEFAULT_ZCLIP, baseinc * 2); } // Now goes for RGB mods if (desired.flags & GMOD_DCOLOR) { current.depthcolor.r = Approach(current.depthcolor.r, desired.depthcolor.r, incdiv1000); current.depthcolor.g = Approach(current.depthcolor.g, desired.depthcolor.g, incdiv1000); current.depthcolor.b = Approach(current.depthcolor.b, desired.depthcolor.b, incdiv1000); } else { current.depthcolor.r = Approach(current.depthcolor.r, 0, incdiv1000); current.depthcolor.g = Approach(current.depthcolor.g, 0, incdiv1000); current.depthcolor.b = Approach(current.depthcolor.b, 0, incdiv1000); } ModeLight &= ~MODE_DEPTHCUEING; if (pMenuConfig) { float fZclipp = ((((float)pMenuConfig->iFogDistance) * 1.2f) * (DEFAULT_ZCLIP - DEFAULT_MINZCLIP) / 10.f) + DEFAULT_MINZCLIP; fZclipp += (ACTIVECAM->focal - 310.f) * 5.f; SetCameraDepth(__min(current.zclip, fZclipp)); } else { SetCameraDepth(current.zclip); } if (USE_D3DFOG) { D3DDEVICEDESC7 d3dDeviceDesc; GDevice->GetCaps(&d3dDeviceDesc); #define PERCENT_FOG (.6f) ulBKGColor = D3DRGB(current.depthcolor.r, current.depthcolor.g, current.depthcolor.b); //pour compatibilité ATI, etc... GDevice->SetRenderState(D3DRENDERSTATE_FOGCOLOR, ulBKGColor); float zval; zval = fZFogEnd; float zvalstart = fZFogStart; if ((!pMenuConfig->bATI) && (d3dDeviceDesc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_FOGTABLE)) { GDevice->SetRenderState(D3DRENDERSTATE_FOGVERTEXMODE, D3DFOG_NONE); GDevice->SetRenderState(D3DRENDERSTATE_FOGTABLEMODE, D3DFOG_LINEAR); bUSE_D3DFOG_INTER = true; //WORLD COORDINATE if (d3dDeviceDesc.dpcTriCaps.dwRasterCaps & D3DPRASTERCAPS_WFOG) { zval *= ACTIVECAM->cdepth; zvalstart *= ACTIVECAM->cdepth; } } else { zval *= ACTIVECAM->cdepth; zvalstart *= ACTIVECAM->cdepth; fZFogStartWorld = zvalstart; fZFogEndWorld = zval; GDevice->SetRenderState(D3DRENDERSTATE_FOGVERTEXMODE, D3DFOG_LINEAR); GDevice->SetRenderState(D3DRENDERSTATE_FOGTABLEMODE, D3DFOG_NONE); bUSE_D3DFOG_INTER = false; } GDevice->SetRenderState(D3DRENDERSTATE_FOGTABLEEND, *((LPDWORD)(&zval))); GDevice->SetRenderState(D3DRENDERSTATE_FOGTABLESTART, *((LPDWORD)(&zvalstart))); } else { GDevice->SetRenderState(D3DRENDERSTATE_FOGCOLOR, D3DRGB(current.depthcolor.r, current.depthcolor.g, current.depthcolor.b)); GDevice->SetRenderState(D3DRENDERSTATE_FOGVERTEXMODE, D3DFOG_NONE); GDevice->SetRenderState(D3DRENDERSTATE_FOGTABLEMODE, D3DFOG_NONE); } }