本文整理汇总了C++中Sim::GetScene方法的典型用法代码示例。如果您正苦于以下问题:C++ Sim::GetScene方法的具体用法?C++ Sim::GetScene怎么用?C++ Sim::GetScene使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sim
的用法示例。
在下文中一共展示了Sim::GetScene方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void
CmpSceneDlg::Show()
{
FormWindow::Show();
Starshatter* stars = Starshatter::GetInstance();
if (stars->InCutscene()) {
Sim* sim = Sim::GetSim();
if (sim) {
cam_view->UseCamera(CameraDirector::GetInstance()->GetCamera());
cam_view->UseScene(sim->GetScene());
}
// initialize lens flare bitmaps:
if (stars->LensFlare()) {
cam_view->LensFlareElements(flare1, flare4, flare2, flare3);
cam_view->LensFlare(true);
}
// if lens flare disabled, just create the corona:
else if (stars->Corona()) {
cam_view->LensFlareElements(flare1, 0, 0, 0);
cam_view->LensFlare(true);
}
if (disp_view) {
old_disp_win = disp_view->GetWindow();
disp_view->SetWindow(mov_scene);
mov_scene->AddView(disp_view);
}
if (subtitles_box) {
subtitles_box->SetText(stars->GetSubtitles());
subtitles_delay = 0;
subtitles_time = 0;
}
}
}
示例2: if
//.........这里部分代码省略.........
if (events.size() > lst_news->NumItems()) {
while (events.size() > lst_news->NumItems()) {
CombatEvent* info = events[lst_news->NumItems()];
const char* unread = info->Visited() ? " " : "*";
int i = lst_news->AddItemWithData(unread, (DWORD) info) - 1;
char dateline[32];
FormatDayTime(dateline, info->Time());
lst_news->SetItemText(i, 1, dateline);
lst_news->SetItemText(i, 2, info->Title());
lst_news->SetItemText(i, 3, info->Region());
lst_news->SetItemText(i, 4, Game::GetText(info->SourceName()));
if (!info->Visited())
auto_scroll = true;
}
if (lst_news->GetSortColumn() > 0)
lst_news->SortItems();
}
else if (events.size() < lst_news->NumItems()) {
lst_news->ClearItems();
for (int i = 0; i < events.size(); i++) {
CombatEvent* info = events[i];
const char* unread = info->Visited() ? " " : "*";
int j = lst_news->AddItemWithData(unread, (DWORD) info) - 1;
char dateline[32];
FormatDayTime(dateline, info->Time());
lst_news->SetItemText(j, 1, dateline);
lst_news->SetItemText(j, 2, info->Title());
lst_news->SetItemText(j, 3, info->Region());
lst_news->SetItemText(j, 4, Game::GetText(info->SourceName()));
if (!info->Visited())
auto_scroll = true;
}
if (lst_news->GetSortColumn() > 0)
lst_news->SortItems();
txt_news->SetText("");
if (img_news)
img_news->SetPicture(bmp_default);
}
if (auto_scroll) {
int first_unread = -1;
for (int i = 0; i < lst_news->NumItems(); i++) {
if (lst_news->GetItemText(i, 0) == "*") {
first_unread = i;
break;
}
}
if (first_unread >= 0)
lst_news->ScrollTo(first_unread);
}
}
Starshatter* stars = Starshatter::GetInstance();
if (start_scene > 0) {
ShowMovie();
start_scene--;
if (start_scene == 0) {
if (stars && campaign) {
stars->ExecCutscene(event_scene, campaign->Path());
if (stars->InCutscene()) {
Sim* sim = Sim::GetSim();
if (sim) {
cam_view->UseCamera(CameraDirector::GetInstance()->GetCamera());
cam_view->UseScene(sim->GetScene());
}
}
}
event_scene = "";
}
}
else {
if (dsp_view)
dsp_view->ExecFrame();
if (stars->InCutscene())
ShowMovie();
else
HideMovie();
}
}