add render option for no glowmaps

remove render option for fog (why was this even there??)
add tech model view for missiles with special tech models (will hopefully help spur some work towards fixing the currently broken models)
handle Z-buf issue that made the lab interface disappear when the transparent render option was ticked
This commit is contained in:
taylor committed 2006-08-20 00:47:10 +00:00
1 parent 677b753a04
commit a0fc8f1932
2 files changed
+35 -6

No files matched your search

+23 -4
View File
@@ -9,11 +9,14 @@
/*
* $Logfile: /Freespace2/code/lab/lab.cpp $
* $Revision: 1.30 $
* $Date: 2006-07-08 11:30:13 $
* $Revision: 1.31 $
* $Date: 2006-08-20 00:47:10 $
* $Author: taylor $
*
* $Log: not supported by cvs2svn $
* Revision 1.30 2006/07/08 11:30:13 taylor
* hopefully this should get missile viewing working decently again
*
* Revision 1.29 2006/07/06 21:59:34 taylor
* add a render option to make the model not spin around, easier to work with in some cases, and better screenshots
*
@@ -400,6 +403,10 @@ void make_options_window(Button *caller)
RenderOptWin = (Window*)Lab_screen->Add(new Window("Options", gr_screen.max_w - 300, 200));
int y = 0;
ccp = RenderOptWin->AddChild(new Checkbox("No Glowmap", 0, y));
((Checkbox*)ccp)->SetFlag(&ModelFlags, MR_NO_GLOWMAPS);
y += ccp->GetHeight() + 10;
ccp = RenderOptWin->AddChild(new Checkbox("No rotation", 0, y));
((Checkbox*)ccp)->SetFlag(&LabViewerFlags, LAB_NO_ROTATION);
@@ -423,9 +430,9 @@ void make_options_window(Button *caller)
ccp = RenderOptWin->AddChild(new Checkbox("No culling", 0, y));
((Checkbox*)ccp)->SetFlag(&ModelFlags, MR_NO_CULL);
y += ccp->GetHeight() + 10;
/*y += ccp->GetHeight() + 10;
ccp = RenderOptWin->AddChild(new Checkbox("No Fogging", 0, y));
((Checkbox*)ccp)->SetFlag(&ModelFlags, MR_NO_FOGGING);
((Checkbox*)ccp)->SetFlag(&ModelFlags, MR_NO_FOGGING);*/
y += ccp->GetHeight() + 10;
ccp = RenderOptWin->AddChild(new Checkbox("Wireframe", 0, y));
@@ -693,6 +700,14 @@ void zero_weap_class_win(GUIObject *caller)
{
WeapClassWin = NULL;
}
void weap_show_tech_model(Tree* caller)
{
int weap_index = (int)(caller->GetSelectedItem()->GetParentItem()->GetData());
labviewer_change_model(Weapon_info[weap_index].tech_model, caller->GetSelectedItem()->GetData());
}
void weaps_make_window(Button* caller)
{
@@ -731,6 +746,10 @@ void weaps_make_window(Button* caller)
stip = type_nodes[Weapon_info[i].subtype];
cwip = cmp->AddItem(stip, Weapon_info[i].name, i, false, change_weapon);
if ( strlen(Weapon_info[i].tech_model) > 0 ) {
cmp->AddItem(cwip, "Tech Model", 0, false, weap_show_tech_model);
}
}
//Get rid of any empty nodes
+12 -2
View File
@@ -9,11 +9,14 @@
/*
* $Logfile: /Freespace2/code/lab/wmcgui.cpp $
* $Revision: 1.28 $
* $Date: 2006-03-22 18:20:06 $
* $Revision: 1.29 $
* $Date: 2006-08-20 00:47:10 $
* $Author: taylor $
*
* $Log: not supported by cvs2svn $
* Revision 1.28 2006/03/22 18:20:06 taylor
* minor warning fixage
*
* Revision 1.27 2006/01/21 02:22:05 wmcoolmon
* Scripting updates; Special scripting image list; Better operator meta; Orientation type; Wing type; Texture type. Fix for MSVC7 compiling.
*
@@ -687,6 +690,10 @@ int GUIScreen::OnFrame(float frametime, bool doevents)
DeletionCache.pop_back();
}
// save zbuffer so that we can reset it after drawing (FIXME: this could probably be done better)
int saved_zbuf = gr_zbuffer_get();
gr_zbuffer_set(GR_ZBUFF_NONE);
//Draw now. This prevents problems from an object deleting itself or moving around in the list
for(cgp = (GUIObject*)GET_LAST(&Guiobjects); cgp != END_OF_LIST(&Guiobjects); cgp = (GUIObject*)GET_PREV(cgp))
{
@@ -695,6 +702,9 @@ int GUIScreen::OnFrame(float frametime, bool doevents)
cgp->OnDraw(frametime);
}
// reset zbuffer to saved value
gr_zbuffer_set(saved_zbuf);
if(SomethingPressed)
return GSOF_SOMETHINGPRESSED;
else