win32: fix huge executable size. now maybe certain people will pay attention to less useless things

This commit is contained in:
zeromus 2010-06-29 21:47:30 +00:00
parent b5ff3a3111
commit 7b4b78b215
3 changed files with 19 additions and 17 deletions

View File

@ -55,14 +55,14 @@ public:
void NewFrame()
{
listPolys->SetItemCount(viewer3d_state.polylist.count);
labelFrameCounter->SetLabel(wxString::Format(wxT("Frame: %d"),viewer3d_state.frameNumber));
labelUserPolycount->SetLabel(wxString::Format(wxT("User Polys: %d"),viewer3d_state.polylist.count));
labelFinalPolycount->SetLabel(wxString::Format(wxT("Final Polys: %d"),viewer3d_state.polylist.count));
listPolys->SetItemCount(viewer3d_state->polylist.count);
labelFrameCounter->SetLabel(wxString::Format(wxT("Frame: %d"),viewer3d_state->frameNumber));
labelUserPolycount->SetLabel(wxString::Format(wxT("User Polys: %d"),viewer3d_state->polylist.count));
labelFinalPolycount->SetLabel(wxString::Format(wxT("Final Polys: %d"),viewer3d_state->polylist.count));
//tree->DeleteAllItems();
//tree->Freeze();
//wxTreeItemId root = tree->AddRoot("");
//for(int i=0;i<viewer3d_state.polylist.count;i++)
//for(int i=0;i<viewer3d_state->polylist.count;i++)
//{
// tree->AppendItem(root,"hai kirin");
//}
@ -84,9 +84,9 @@ public:
{
//------------
//do the 3d work..
engine.polylist = &viewer3d_state.polylist;
engine.vertlist = &viewer3d_state.vertlist;
engine.indexlist = &viewer3d_state.indexlist;
engine.polylist = &viewer3d_state->polylist;
engine.vertlist = &viewer3d_state->vertlist;
engine.indexlist = &viewer3d_state->indexlist;
engine.screen = _screen;
engine.screenColor = _screenColor;
engine.width = kViewportWidth;
@ -137,9 +137,9 @@ public:
int selection = GetSelectedListviewItem(listPolys);
if(selection < 0) return;
if(selection>=viewer3d_state.polylist.count) return;
if(selection>=viewer3d_state->polylist.count) return;
POLY& poly = viewer3d_state.polylist.list[selection];
POLY& poly = viewer3d_state->polylist.list[selection];
TexCacheItem* texkey = TexCache_SetTexture(TexFormat_32bpp,poly.texParam,poly.texPalette);
const u32 w = texkey->sizeX;

View File

@ -267,7 +267,7 @@ using std::max;
using std::min;
GFX3D gfx3d;
Viewer3d_State viewer3d_state;
Viewer3d_State* viewer3d_state = NULL;
static GFX3D_Clipper boxtestClipper;
//tables that are provided to anyone
@ -509,6 +509,8 @@ void gfx3d_reset()
{
//if this doesn't work on the xbox, we need to find out why.
reconstruct(&gfx3d);
delete viewer3d_state;
viewer3d_state = new Viewer3d_State();
gxf_hardware.reset();
@ -2090,11 +2092,11 @@ static void gfx3d_doFlush()
if(driver->view3d->IsRunning())
{
viewer3d_state.frameNumber = currFrameCounter;
viewer3d_state.state = gfx3d.state;
viewer3d_state.polylist = *gfx3d.polylist;
viewer3d_state.vertlist = *gfx3d.vertlist;
viewer3d_state.indexlist = gfx3d.indexlist;
viewer3d_state->frameNumber = currFrameCounter;
viewer3d_state->state = gfx3d.state;
viewer3d_state->polylist = *gfx3d.polylist;
viewer3d_state->vertlist = *gfx3d.vertlist;
viewer3d_state->indexlist = gfx3d.indexlist;
driver->view3d->NewFrame();
}

View File

@ -362,7 +362,7 @@ struct Viewer3d_State
INDEXLIST indexlist;
};
extern Viewer3d_State viewer3d_state;
extern Viewer3d_State* viewer3d_state;
struct GFX3D
{