void LantirnClass::ToggleFLIR () { if (m_flags & FLIR_ON) { DisplayExit(); display = NULL; } m_flags ^= FLIR_ON; }
void RwrClass::DisplayInit (ImageBuffer* image) { DisplayExit(); privateDisplay = new Render2D; ((Render2D*)privateDisplay)->Setup (image); privateDisplay->SetColor (0xff00ff00); }
void LantirnClass::DisplayInit (ImageBuffer* image) { RenderIR *irrend = (RenderIR *) privateDisplay; if (irrend && irrend->GetImageBuffer() == image) return; DisplayExit(); irrend = new RenderIR; privateDisplay = irrend; irrend->Setup(image, OTWDriver.GetViewpoint()); irrend->SetColor (0xff00ff00); irrend->SetFOV( 10.0F * DTR ); }
void DisplayAutoMap(int showAll) { int x, y, i, j; TTile *tile; unsigned char *p; unsigned char *screen; TTileItem *t; int cmd1, cmd2; int obj; screen = p = GetDstScreen(); for (x = 0; x < SCREEN_MEMSIZE; x++) p[x] = tableGreen[p[x] & 0xFF]; screen += MAP_YOFFS * SCREEN_WIDTH + MAP_XOFFS; for (y = 0; y < YMAX; y++) for (i = 0; i < MAP_FACTOR; i++) { for (x = 0; x < XMAX; x++) if (AutoMap(x, y) || showAll) { tile = &Map(x, y); for (j = 0; j < MAP_FACTOR; j++) if ((tile->flags & IS_WALL) != 0) *screen++ = WALL_COLOR; else if ((tile->flags & NO_WALK) != 0) *screen++ = DoorColor(x, y); else *screen++ = FLOOR_COLOR; } else screen += MAP_FACTOR; screen += SCREEN_WIDTH - XMAX * MAP_FACTOR; } for (y = 0; y < YMAX; y++) for (x = 0; x < XMAX; x++) { t = Map(x, y).things; while (t) { if ((t->flags & TILEITEM_OBJECTIVE) != 0) { obj = ObjectiveFromTileItem(t-> flags); if ((gMission.missionData-> objectives[obj]. flags & OBJECTIVE_HIDDEN) == 0 || showAll) { if ((gMission.missionData-> objectives[obj]. flags & OBJECTIVE_POSKNOWN) != 0 || AutoMap(x, y) || showAll) DisplayObjective(t, obj); } } else if (t->kind == KIND_OBJECT && t->data && AutoMap(x, y)) { TObject *o = t->data; if (o->objectIndex == OBJ_KEYCARD_RED) DrawDot(t, RED_DOOR_COLOR); else if (o->objectIndex == OBJ_KEYCARD_BLUE) DrawDot(t, BLUE_DOOR_COLOR); else if (o->objectIndex == OBJ_KEYCARD_GREEN) DrawDot(t, GREEN_DOOR_COLOR); else if (o->objectIndex == OBJ_KEYCARD_YELLOW) DrawDot(t, YELLOW_DOOR_COLOR); } t = t->next; } } DisplayPlayer(gPlayer1); DisplayPlayer(gPlayer2); DisplayExit(); DisplaySummary(); CopyToScreen(); if (!showAll) { do { cmd1 = cmd2 = 0; GetPlayerCmd(gPlayer1 ? &cmd1 : NULL, gPlayer2 ? &cmd2 : NULL); } while (((cmd1 | cmd2) & CMD_BUTTON3) != 0 || KeyDown(gOptions.mapKey)); memset(GetDstScreen(), 0, SCREEN_MEMSIZE); } }
LantirnClass::~LantirnClass() { DisplayExit(); }