void del_mapobj(MAP * map, mapobj * mapob, int type, int zap) { /* Delete the specified mapobj */ struct mapobj_struct *tmp; if (!(map->flags & MAPFLAG_MAPO)) return; if (map->mapobj[type] != mapob) { for (tmp = map->mapobj[type]; tmp->next && tmp->next != mapob; tmp = tmp->next); if (!tmp->next) return; tmp->next = mapob->next; } else map->mapobj[type] = mapob->next; /* Then, the silly thing. Decorations, they suck */ if (type <= TYPE_LAST_DEC) { /* Need to alter terrain back to 'usual' */ if (!(zap & 2)) SetTerrain(map, mapob->x, mapob->y, mapob->datac); if (zap) StopDec(mapob); } mapob->next = free_mapobjs; free_mapobjs = mapob; }
static void fire_dissipation_event(EVENT * e) { MAP *map = (MAP *) e->data; mapobj *o = (mapobj *) e->data2; int x, y; x = o->x; y = o->y; del_mapobj(map, o, TYPE_FIRE, 0); if (IsForestHex(map, x, y)) { if (Number(1, 6) < 3) SetTerrain(map, x, y, GRASSLAND); else SetTerrain(map, x, y, ROUGH); } }
void GlueMapWindow::OnDestroy() { /* stop the TopographyThread and the TerrainThread */ SetTopography(nullptr); SetTerrain(nullptr); #ifdef ENABLE_OPENGL data_timer.Cancel(); #endif MapWindow::OnDestroy(); }
void TargetMapWindow::OnDestroy() { SetTerrain(nullptr); SetTopograpgy(nullptr); SetAirspaces(nullptr); SetWaypoints(nullptr); #ifndef ENABLE_OPENGL buffer_canvas.Destroy(); #endif BufferWindow::OnDestroy(); }
/** * AppSetup() */ int AppSetup() { SetGUIStyle(); SetCamera(); SetShaders(); SetMaterials(); SetTerrain(); SetMeshes(); SetLights(); SetSky(); scene.backgroundColor = 0xff1e90ff; return 1; }
CTerrainCursor::CTerrainCursor(CTerrain *pterrain) { SetTerrain(pterrain); m_Load = FALSE; m_IsTerrainUp = TRUE; m_Flag = 0; m_OutterRadius = 30.f; m_InnerRadius = 10.f; m_OutterAlpha = 0.f; m_InnerAlpha = 1.0f; m_Offset = 20.f; m_TextureName[ 0] = NULL; }
bool TargetMapWindow::on_destroy() { SetTerrain(NULL); SetTopograpgy(NULL); SetAirspaces(NULL); SetWaypoints(NULL); #ifndef ENABLE_OPENGL buffer_canvas.reset(); stencil_canvas.reset(); #endif BufferWindow::on_destroy(); return true; }
void TargetMapWindow::on_destroy() { SetTerrain(NULL); SetTopograpgy(NULL); SetAirspaces(NULL); SetWaypoints(NULL); #ifndef ENABLE_OPENGL buffer_canvas.reset(); if (!IsAncientHardware()) stencil_canvas.reset(); #endif BufferWindow::on_destroy(); }
void MapWindow::OnDestroy() { #ifdef HAVE_NOAA SetNOAAStore(nullptr); #endif airspace_renderer.Clear(); SetWaypoints(nullptr); SetTopography(nullptr); SetTerrain(nullptr); SetWeather(nullptr); #ifndef ENABLE_OPENGL buffer_canvas.Destroy(); #endif DoubleBufferWindow::OnDestroy(); }
void MapWindow::OnDestroy() { SetMarks(NULL); airspace_renderer.Clear(); SetWaypoints(NULL); SetTopography(NULL); SetTerrain(NULL); SetWeather(NULL); #ifndef ENABLE_OPENGL buffer_canvas.reset(); if (!IsAncientHardware()) stencil_canvas.reset(); #endif DoubleBufferWindow::OnDestroy(); }
CTerrainCursor::CTerrainCursor() { SetTerrain(NULL); m_Load = FALSE; }