#include "SCENE.h" #ifdef RASTERS_ACTIVATED typedef struct RASTER_ { char Name[128]; double TimeInMs; double TimeInMs_BLENDED[MAX_RASTER]; } RASTER; typedef struct RASTER_TREE_ { RASTER_ENUM raster; int parent; double TimeInMs_Start; double TimeInMs; } RASTER_TREE; void WORLD::DRawRaster(u32 Pos, u32 LC, u32 Color , float BeginTimeInMiliSeconds, float TimeInMiliSeconds) { DI->SetCurrentColor(0xff000000 | Color); DI->DrawQuad(-1, ((float)XSize * (float)BeginTimeInMiliSeconds * 20.0f / 1000.0f), ((float)XSize * (float)(TimeInMiliSeconds+BeginTimeInMiliSeconds) * 20.0f / 1000.0f), YSize - (Pos+LC),YSize - Pos); DI->SetCurrentColor(0xffffffff); DI->DrawQuad(-1, XSize / 3, (XSize / 3) + 2, YSize - (Pos+LC),YSize - (Pos-LC)); DI->DrawQuad(-1, 2*(XSize / 3), 2*(XSize / 3) + 2, YSize - (Pos+LC),YSize - (Pos-LC)); return; u32 *Ptr,CCCCC,CCCCCBegin; Color &= 0xfefefefe; //Color>>=1; while (LC--) { /*Ptr = (u32 *)SOURCEMAP->BASE + (Pos+LC) * SOURCEMAP->PITCH; CCCCCBegin = (u32)((float)XSize * (float)BeginTimeInMiliSeconds * 20.0f / 1000.0f); CCCCC = (u32)((float)XSize * (float)(TimeInMiliSeconds+BeginTimeInMiliSeconds) * 20.0f / 1000.0f); if (CCCCCBegin > XSize) continue; if (CCCCC > XSize) CCCCC = XSize; CCCCC -= CCCCCBegin; Ptr += CCCCCBegin; while (CCCCC--) *(Ptr++) = Color ; DrawLine_Clip(SOURCEMAP,XSize / 3,(Pos+0),XSize / 3,(Pos+5),0xffffff); DrawLine_Clip(SOURCEMAP,XSize * 2 / 3,(Pos+0),XSize * 2 / 3,(Pos+5),0xffffff);*/ } } u32 GetColor(int i) { u32 Color; Color = 0x202020; i++; if (i & 1) Color |= 0x800000; if (i & 2) Color |= 0x8000; if (i & 4) Color |= 0x80; if (i & 8) Color |= 0x400000; if (i & 16) Color |= 0x4000; if (i & 32) Color |= 0x40; return Color; } BOOL RasterInit = false; RASTER AllRasters[MAX_RASTER]; RASTER_TREE AllRastersTree[1024]; int RasterInTreePosition = -1; int RasterInTreeNb = 0; int GetChild(RASTER_ENUM RE) { for (int i=RasterInTreePosition+1; iDrawText((u8*)AllRasters[i].Name,0, KBase, 1,1,Color); DRawRaster(KBase,2,Color, 0, AllRasters[i].TimeInMs_BLENDED[i]); beginTime = 0; for (j=0; j