frontierproject-cvs Mailing List for Frontier Project
Status: Pre-Alpha
Brought to you by:
bdragon28
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(18) |
May
(46) |
Jun
(6) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
|
From: Brandon B. <bdr...@us...> - 2006-10-09 20:19:27
|
Update of /cvsroot/frontierproject/frontierproject/src In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv26898/src Modified Files: DebugConsole.cpp gui_mainscreen.cpp widget_painter.cpp Log Message: Commit local changes in preperation for resync. Index: gui_mainscreen.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/gui_mainscreen.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** gui_mainscreen.cpp 1 Jun 2006 05:23:19 -0000 1.18 --- gui_mainscreen.cpp 9 Oct 2006 20:19:22 -0000 1.19 *************** *** 64,72 **** FXMainWindow(a,"Frontier Project: A FreeStars Client",s,l,DECOR_ALL,0,0,800,600) { - - topdock=new FXDockSite(this,LAYOUT_SIDE_TOP|LAYOUT_FILL_X); - bottomdock=new FXDockSite(this,LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X); leftdock=new FXDockSite(this,LAYOUT_SIDE_LEFT|LAYOUT_FILL_Y); rightdock=new FXDockSite(this,LAYOUT_SIDE_RIGHT|LAYOUT_FILL_Y); //////////////////////////////////////// --- 64,71 ---- FXMainWindow(a,"Frontier Project: A FreeStars Client",s,l,DECOR_ALL,0,0,800,600) { leftdock=new FXDockSite(this,LAYOUT_SIDE_LEFT|LAYOUT_FILL_Y); rightdock=new FXDockSite(this,LAYOUT_SIDE_RIGHT|LAYOUT_FILL_Y); + topdock=new FXDockSite(this,LAYOUT_SIDE_TOP|LAYOUT_FILL_X); + bottomdock=new FXDockSite(this,LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X); //////////////////////////////////////// *************** *** 87,91 **** menubar_s=new FXToolBarShell(this); ! menubar=new FXMenuBar(topdock,menubar_s,LAYOUT_SIDE_TOP|LAYOUT_FILL_X|FRAME_RAISED); new FXToolBarGrip(menubar,menubar,FXMenuBar::ID_TOOLBARGRIP,TOOLBARGRIP_DOUBLE); --- 86,90 ---- menubar_s=new FXToolBarShell(this); ! menubar=new FXMenuBar(topdock,menubar_s,LAYOUT_FILL|FRAME_RAISED); new FXToolBarGrip(menubar,menubar,FXMenuBar::ID_TOOLBARGRIP,TOOLBARGRIP_DOUBLE); Index: DebugConsole.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/DebugConsole.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** DebugConsole.cpp 18 May 2006 07:08:20 -0000 1.10 --- DebugConsole.cpp 9 Oct 2006 20:19:22 -0000 1.11 *************** *** 80,84 **** debugConsole::debugConsole(FXApp *app):FXDialogBox(app, "Debug Console", DECOR_TITLE|DECOR_BORDER) { ! FXPacker *pak = new FXPacker(this,LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT,0,0,400,350); FXVerticalFrame *botframe = new FXVerticalFrame(pak,LAYOUT_SIDE_BOTTOM,0,0,0,0,0,0,0,0,0,0); --- 80,93 ---- debugConsole::debugConsole(FXApp *app):FXDialogBox(app, "Debug Console", DECOR_TITLE|DECOR_BORDER) { ! FXHorizontalFrame *outer = new FXHorizontalFrame(this,0,0,0,0,0,0,0,0,0,0,0); ! FXPacker *pak = new FXPacker(outer,LAYOUT_FIX_WIDTH|LAYOUT_FIX_HEIGHT,0,0,400,350); ! ! objList = new FXFoldingList(outer,this,ID_OBJECTLIST,FOLDINGLIST_NORMAL|LAYOUT_FIX_WIDTH|LAYOUT_FILL_Y,0,0,300,0); ! ! /* ! FXHorizontalFrame *right = new FXHorizontalFrame(outer,LAYOUT_FILL_Y|LAYOUT_FIX_WIDTH,0,0,300,0); ! ! objTree = new FXTreeList(right,this,ID_OBJECTTREE,TREELIST_NORMAL|LAYOUT_SIDE_RIGHT|LAYOUT_FILL_Y|LAYOUT_FIX_WIDTH,0,0,150,0); ! objTable = new FXTable(right,this,ID_OBJECTTABLE,LAYOUT_FILL_X|LAYOUT_FILL_Y); */ FXVerticalFrame *botframe = new FXVerticalFrame(pak,LAYOUT_SIDE_BOTTOM,0,0,0,0,0,0,0,0,0,0); *************** *** 126,129 **** --- 135,144 ---- text->setEditable(false); + + objList->appendHeader("Test",0,40); + objList->appendItem(objList->appendItem(0,"Test2"),new FXFoldingItem("Test5")); + + objList->recalc(); + vm = lua_open(); Index: widget_painter.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/widget_painter.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** widget_painter.cpp 1 Jun 2006 05:23:19 -0000 1.23 --- widget_painter.cpp 9 Oct 2006 20:19:22 -0000 1.24 *************** *** 83,87 **** drawPlanetsTEST(dc); - if(flag_planetvalueview) drawFlags(dc); --- 83,86 ---- *************** *** 550,557 **** { //if(curPlanet->SeenBy(TheGame->GetCurrentPlayer())) ! if(curPlanet->GetOwner() != 0) //Habited. { X = u2sx(curPlanet->GetPosX()); Y = u2sy(curPlanet->GetPosY()); switch(TheGame->GetCurrentPlayer()->GetRelations(curPlanet->GetOwner())) { --- 549,558 ---- { //if(curPlanet->SeenBy(TheGame->GetCurrentPlayer())) ! TheGame->UpdateSeen(); ! if(curPlanet->SeenBy(TheGame->GetCurrentPlayer()) && curPlanet->GetOwner())//->GetOwner() != 0) //Habited. { X = u2sx(curPlanet->GetPosX()); Y = u2sy(curPlanet->GetPosY()); + CLOG("Relation: %i\n",TheGame->GetCurrentPlayer()->GetRelations(curPlanet->GetOwner())); switch(TheGame->GetCurrentPlayer()->GetRelations(curPlanet->GetOwner())) { *************** *** 560,564 **** dc.fillRectangle(X-1,Y-20,9,8); ! dc.setForeground(FXRGB(0,198,0)); //Green dc.fillRectangle(X,Y-19,7,6); dc.drawLine(X,Y+1,X,Y-16); --- 561,565 ---- dc.fillRectangle(X-1,Y-20,9,8); ! dc.setForeground(FXRGB(0,0,198)); //Blue dc.fillRectangle(X,Y-19,7,6); dc.drawLine(X,Y+1,X,Y-16); *************** *** 568,572 **** dc.fillRectangle(X-1,Y-20,9,8); ! dc.setForeground(FXRGB(0,0,198)); //Blue @@@ Verify color dc.fillRectangle(X,Y-19,7,6); dc.drawLine(X,Y+1,X,Y-16); --- 569,573 ---- dc.fillRectangle(X-1,Y-20,9,8); ! dc.setForeground(FXRGB(198,198,0)); //Yellow dc.fillRectangle(X,Y-19,7,6); dc.drawLine(X,Y+1,X,Y-16); *************** *** 576,580 **** dc.fillRectangle(X-1,Y-20,9,8); ! dc.setForeground(FXRGB(198,198,0)); //Yellow @@@ Verify color dc.fillRectangle(X,Y-19,7,6); dc.drawLine(X,Y+1,X,Y-16); --- 577,581 ---- dc.fillRectangle(X-1,Y-20,9,8); ! dc.setForeground(FXRGB(127,0,0)); //Dark Red dc.fillRectangle(X,Y-19,7,6); dc.drawLine(X,Y+1,X,Y-16); *************** *** 584,588 **** dc.fillRectangle(X-1,Y-20,9,8); ! dc.setForeground(FXRGB(198,0,0)); //Red @@@ Verify color dc.fillRectangle(X,Y-19,7,6); dc.drawLine(X,Y+1,X,Y-16); --- 585,589 ---- dc.fillRectangle(X-1,Y-20,9,8); ! dc.setForeground(FXRGB(255,0,0)); //Light Red dc.fillRectangle(X,Y-19,7,6); dc.drawLine(X,Y+1,X,Y-16); |
|
From: Brandon B. <bdr...@us...> - 2006-10-09 20:19:25
|
Update of /cvsroot/frontierproject/frontierproject/include In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv26898/include Modified Files: DebugConsole.h Log Message: Commit local changes in preperation for resync. Index: DebugConsole.h =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/include/DebugConsole.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DebugConsole.h 16 May 2006 18:30:40 -0000 1.5 --- DebugConsole.h 9 Oct 2006 20:19:22 -0000 1.6 *************** *** 1,4 **** /***************************************************************************** ! * Copyright (C) 2003-2005 Brandon Bergren * * * * This file is part of The Frontier Project. * --- 1,4 ---- /***************************************************************************** ! * Copyright (C) 2003-2005,2006 Brandon Bergren * * * * This file is part of The Frontier Project. * *************** *** 50,53 **** --- 50,56 ---- ID_DEBUG_3, ID_DEBUG_4, + ID_OBJECTTREE, + ID_OBJECTTABLE, + ID_OBJECTLIST, }; *************** *** 81,84 **** --- 84,91 ---- FXButton *b4; + FXTreeList *objTree; + FXTable *objTable; + FXFoldingList *objList; + //Temporary stuff w_componentPopup *testcom; |
|
From: Brandon B. <bdr...@us...> - 2006-06-01 05:30:32
|
Update of /cvsroot/frontierproject/frontierproject/doc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv29503/doc Modified Files: autoTarget.txt Log Message: Document tonight's changes Index: autoTarget.txt =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/doc/autoTarget.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** autoTarget.txt 18 May 2006 07:08:20 -0000 1.1 --- autoTarget.txt 1 Jun 2006 05:30:29 -0000 1.2 *************** *** 2,5 **** multiple subsystems. ! Targets for Painter: ! /painter/forceshift Makes the next click act as a shifted click. --- 2,13 ---- multiple subsystems. ! Target List: ! -------ID----------------------Type-----Owner-------Desc--------------------------- ! /painter/forceshift bool Painter Makes the next click act as a shifted click. ! /painter/overlay/flags bool Painter *** Toggles flags (OBSOLETE) *** ! /painter/overlay/planetnames bool Painter Display planet names or not. ! /painter/overlay/minefields bool Painter Display minefields or not. ! /painter/overlay/fleetpaths bool Painter Display fleet paths or not. ! /painter/overlay/shipcounts bool Painter Display ship counts or not. ! /painter/overlay/scanners bool Painter Show scanner overlay or not. ! /painter/mode int Painter Drawing mode for Player Info. |
|
From: Brandon B. <bdr...@us...> - 2006-06-01 05:23:22
|
Update of /cvsroot/frontierproject/frontierproject/src In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv27271/src Modified Files: gui_mainscreen.cpp widget_painter.cpp Log Message: Wormholes! Index: gui_mainscreen.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/gui_mainscreen.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** gui_mainscreen.cpp 31 May 2006 22:30:02 -0000 1.17 --- gui_mainscreen.cpp 1 Jun 2006 05:23:19 -0000 1.18 *************** *** 162,167 **** // Toolbar implement ! new FXToggleButton(toolbar, "", "", gdArt::getIcon("/gui/flag"), gdArt::getIcon("/gui/flag"), playarea, w_Painter::ID_TOGGLE_PLANETVALUEVIEW,TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE); ! new FXToggleButton(toolbar, "", "", gdArt::getIcon("/gui/togglenames"),gdArt::getIcon("/gui/togglenames"),playarea,w_Painter::ID_TOGGLE_SHOWPLANETNAMES,TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE); //////////////////////////////////////// --- 162,209 ---- // Toolbar implement ! new FXToggleButton(toolbar, "", "", ! gdArt::getIcon("/gui/toolbar/normal"),gdArt::getIcon("/gui/toolbar/normal"), ! autoTarget::tieInt("/painter/mode",1), ! FXDataTarget::ID_OPTION+w_Painter::MODE_NORMALVIEW, ! TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE); ! new FXToggleButton(toolbar, "", "", ! gdArt::getIcon("/gui/toolbar/surface"),gdArt::getIcon("/gui/toolbar/surface"), ! autoTarget::tieInt("/painter/mode",1), ! FXDataTarget::ID_OPTION+w_Painter::MODE_SURFACEMINERALVIEW, ! TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE); ! new FXToggleButton(toolbar, "", "", ! gdArt::getIcon("/gui/toolbar/concentration"),gdArt::getIcon("/gui/toolbar/concentration"), ! autoTarget::tieInt("/painter/mode",1), ! FXDataTarget::ID_OPTION+w_Painter::MODE_MINERALCONCVIEW, ! TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE); ! new FXToggleButton(toolbar, "", "", ! gdArt::getIcon("/gui/toolbar/percent"),gdArt::getIcon("/gui/toolbar/percent"), ! autoTarget::tieInt("/painter/mode",1), ! FXDataTarget::ID_OPTION+w_Painter::MODE_PLANETVALUEVIEW, ! TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE); ! new FXToggleButton(toolbar, "", "", ! gdArt::getIcon("/gui/toolbar/population"),gdArt::getIcon("/gui/toolbar/population"), ! autoTarget::tieInt("/painter/mode",1), ! FXDataTarget::ID_OPTION+w_Painter::MODE_POPULATIONVIEW, ! TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE); ! new FXToggleButton(toolbar, "", "", ! gdArt::getIcon("/gui/toolbar/noinfo"),gdArt::getIcon("/gui/toolbar/noinfo"), ! autoTarget::tieInt("/painter/mode",1), ! FXDataTarget::ID_OPTION+w_Painter::MODE_NOPLAYERINFOVIEW, ! TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE); ! ! // new FXToggleButton(toolbar, "", "", gdArt::getIcon("/gui/toolbar/flag"), gdArt::getIcon("/gui/toolbar/flag"), playarea, w_Painter::ID_TOGGLE_PLANETVALUEVIEW,TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE); ! new FXToggleButton(toolbar, "", "", ! gdArt::getIcon("/gui/toolbar/flag"),gdArt::getIcon("/gui/toolbar/flag"), ! autoTarget::tieBool("/painter/overlay/flags",true), ! FXDataTarget::ID_VALUE,TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE); ! new FXToggleButton(toolbar, "", "", ! gdArt::getIcon("/gui/toolbar/togglenames"),gdArt::getIcon("/gui/toolbar/togglenames"), ! autoTarget::tieBool("/painter/overlay/planetnames",true), ! FXDataTarget::ID_VALUE,TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE); ! new FXToggleButton(toolbar, "", "", ! gdArt::getIcon("/gui/toolbar/sco"),gdArt::getIcon("/gui/toolbar/sco"), ! autoTarget::tieBool("/painter/overlay/scanners",true), ! FXDataTarget::ID_VALUE,TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE); //////////////////////////////////////// Index: widget_painter.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/widget_painter.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** widget_painter.cpp 31 May 2006 22:31:30 -0000 1.22 --- widget_painter.cpp 1 Jun 2006 05:23:19 -0000 1.23 *************** *** 52,56 **** FXMAPFUNC(SEL_COMMAND, w_Painter::ID_ZOOMIN, w_Painter::onCommand ), FXMAPFUNC(SEL_COMMAND, w_Painter::ID_ZOOMOUT, w_Painter::onCommand ), ! FXMAPFUNC(SEL_COMMAND, w_Painter::ID_TOGGLE_SHOWPLANETNAMES, w_Painter::onCommand), FXMAPFUNC(SEL_COMMAND, w_Painter::ID_TOGGLE_PLANETVALUEVIEW, w_Painter::onCommand), // FXMAPFUNC(SEL_UPDATE, w_Painter::ID_UPD_PLANETNAMES, w_Painter::onCommand), --- 52,56 ---- FXMAPFUNC(SEL_COMMAND, w_Painter::ID_ZOOMIN, w_Painter::onCommand ), FXMAPFUNC(SEL_COMMAND, w_Painter::ID_ZOOMOUT, w_Painter::onCommand ), ! // FXMAPFUNC(SEL_COMMAND, w_Painter::ID_TOGGLE_SHOWPLANETNAMES, w_Painter::onCommand), FXMAPFUNC(SEL_COMMAND, w_Painter::ID_TOGGLE_PLANETVALUEVIEW, w_Painter::onCommand), // FXMAPFUNC(SEL_UPDATE, w_Painter::ID_UPD_PLANETNAMES, w_Painter::onCommand), *************** *** 73,80 **** dc.setForeground(FXRGB(255,255,0)); ! calcFont(dc); drawScanners(dc); //drawPlanets(dc); --- 73,82 ---- dc.setForeground(FXRGB(255,255,0)); ! dc.setFont(planetFont); drawScanners(dc); + drawWormholes(dc); + //drawPlanets(dc); *************** *** 87,91 **** drawRoute(dc); - drawWormholes(dc); drawSelectMarker(dc); --- 89,92 ---- *************** *** 114,120 **** mLastSelected = 0; mpLastSelected = 0; FXScrollArea::create(); ! tinyFont = new FXFont(getApp(),"Tahoma,70"); smallFont = new FXFont(getApp(),"Tahoma,80"); normalFont = new FXFont(getApp(),"Tahoma,100"); --- 115,122 ---- mLastSelected = 0; mpLastSelected = 0; + scanner_effectiveness = 1.0f; FXScrollArea::create(); ! tinyFont = new FXFont(getApp(),"Tahoma,70"); ///@todo Make this configurable smallFont = new FXFont(getApp(),"Tahoma,80"); normalFont = new FXFont(getApp(),"Tahoma,100"); *************** *** 132,139 **** uMaxY = static_cast<FXshort>(TheGalaxy->MaxY()); - d_drawFlags = static_cast<FXbool*>(autoTarget::tieBool("/painter/show/planetnames",true)->getData()); simulateShift = static_cast<FXbool*>(autoTarget::tieBool("/painter/forceshift",false)->getData()); } --- 134,151 ---- uMaxY = static_cast<FXshort>(TheGalaxy->MaxY()); simulateShift = static_cast<FXbool*>(autoTarget::tieBool("/painter/forceshift",false)->getData()); + + //@@@ not actually in stars + overlayFlags = static_cast<FXbool*>(autoTarget::tieBool("/painter/overlay/flags",true)->getData()); + overlayPlanetNames = static_cast<FXbool*>(autoTarget::tieBool("/painter/overlay/planetnames",true)->getData()); + overlayMineFields = static_cast<FXbool*>(autoTarget::tieBool("/painter/overlay/minefields",true)->getData()); + overlayFleetPaths = static_cast<FXbool*>(autoTarget::tieBool("/painter/overlay/fleetpaths",true)->getData()); + overlayShipCounts = static_cast<FXbool*>(autoTarget::tieBool("/painter/overlay/shipcounts",true)->getData()); + overlayScanners = static_cast<FXbool*>(autoTarget::tieBool("/painter/overlay/scanners",true)->getData()); + + mode = static_cast<FXint*>(autoTarget::tieInt("/painter/mode",1)->getData()); + wh = gdArt::getIcon("/gui/painter/wormhole"); } *************** *** 162,165 **** --- 174,178 ---- void w_Painter::drawScanners(FXDCWindow &dc) { + if(!*overlayScanners) return; FreeStars::Planet *curPlanet; int i; *************** *** 178,183 **** X = (pX-u2sl(curPlanet->GetScanSpace()/2)); Y = (pY-u2sl(curPlanet->GetScanSpace()/2)); ! W = u2sl(curPlanet->GetScanSpace()); ! H = u2sl(curPlanet->GetScanSpace()); dc.fillArc(X,Y,W,H,64*0,64*360); } --- 191,196 ---- X = (pX-u2sl(curPlanet->GetScanSpace()/2)); Y = (pY-u2sl(curPlanet->GetScanSpace()/2)); ! W = u2sl(curPlanet->GetScanSpace()*scanner_effectiveness); ! H = u2sl(curPlanet->GetScanSpace()*scanner_effectiveness); dc.fillArc(X,Y,W,H,64*0,64*360); } *************** *** 381,406 **** using FreeStars::Wormhole; ! CGalaxy* f = dynamic_cast<CGalaxy*>(TheGalaxy); ! ! //deque<Wormhole*>::const_iterator wh = (dynamic_cast<CGalaxy*>(FreeStars::TheGalaxy))->GetWormholes(); ! ! const std::deque<FreeStars::Wormhole*> &wh = f->GetWormholes(); ! ! //dynamic_cast<CGalaxy*>(FreeStars::TheGalaxy)->GetWormholes(start,end); ! ! for(std::deque<FreeStars::Wormhole*>::const_iterator it=wh.begin();it!=wh.end();++it) { CLOG("Wormhole at %u,%u\n",(*it)->GetPosX(),(*it)->GetPosY()); } - - - - - //@@@ Remove these 3 lines ASAP!!! @@@ - //dc.setForeground(FXRGB(255,0,255)); - //dc.setBackground(FXRGB(255,0,255)); - //dc.drawPoint(u2sx(1079),u2sy(1047)); - //@@@ - } --- 394,404 ---- using FreeStars::Wormhole; ! const deque<Wormhole*> &w = dynamic_cast<CGalaxy*>(TheGalaxy)->GetWormholes(); ! for(deque<Wormhole*>::const_iterator it=w.begin();it!=w.end();++it) { + //Wormhole is currently a 9x9 icon. Offset 4 left and 4 up to center. + dc.drawIcon(wh,u2sx((*it)->GetPosX())-4,u2sy((*it)->GetPosY())-4); CLOG("Wormhole at %u,%u\n",(*it)->GetPosX(),(*it)->GetPosY()); } } *************** *** 493,497 **** { using FreeStars::Planet; - // int foo; FXshort pX, pY; --- 491,494 ---- *************** *** 516,526 **** Y = pY - (H/2); - // X = (u2sx(curPlanet->GetPosX())-(getPlanetWidth(curPlanet))/2); - // Y = (u2sy(curPlanet->GetPosY())-(getPlanetWidth(curPlanet))/2); - dc.fillArc(X,Y,W,H,64*0,64*360); //@@@Hacked in from above routine. ! if (flag_showplanetnames) { //user wants planet text. --- 513,520 ---- Y = pY - (H/2); dc.fillArc(X,Y,W,H,64*0,64*360); //@@@Hacked in from above routine. ! if (*overlayPlanetNames) { //user wants planet text. *************** *** 528,533 **** dc.drawText(pX+10, pY+ 10, - //en.world.planets[foo].name->text(), - //en.world.planets[foo].name->length()); curPlanet->GetName().c_str(), curPlanet->GetName().length()); --- 522,525 ---- *************** *** 535,545 **** dc.drawText(pX+ 11, pY+ 11, - //en.world.planets[foo].name->text(), - //en.world.planets[foo].name->length()); curPlanet->GetName().c_str(), curPlanet->GetName().length()); dc.setForeground(FXRGB(0,255,0)); } ! } //*/ } } --- 527,535 ---- dc.drawText(pX+ 11, pY+ 11, curPlanet->GetName().c_str(), curPlanet->GetName().length()); dc.setForeground(FXRGB(0,255,0)); } ! } } } *************** *** 547,550 **** --- 537,541 ---- void w_Painter::drawFlags(FXDCWindow &dc) { + if(!*overlayFlags) return; // Note: I don't have a test for this code yet. // In theory, it works. *************** *** 603,616 **** } ! void w_Painter::calcFont(FXDCWindow &dc) { //Determine which font to use, depending on zoom. //@@@Sometime, do this more scientifically. const double mult = 2; ! if(zoom<1*mult) dc.setFont(tinyFont); ! else if(zoom < 1.5*mult) dc.setFont(smallFont); ! else if(zoom < 2*mult) dc.setFont(normalFont); ! else if(zoom < 2.5*mult) dc.setFont(largeFont); ! else dc.setFont(largestFont); } --- 594,607 ---- } ! void w_Painter::calcFont() { //Determine which font to use, depending on zoom. //@@@Sometime, do this more scientifically. const double mult = 2; ! if(zoom<1*mult) planetFont = tinyFont; ! else if(zoom < 1.5*mult) planetFont = smallFont; ! else if(zoom < 2*mult) planetFont = normalFont; ! else if(zoom < 2.5*mult) planetFont = largeFont; ! else planetFont = largestFont; } *************** *** 933,939 **** --- 924,939 ---- zoom = z; + + calcFont(); + layout(); } + void w_Painter::setScanEffectiveness(FXfloat eff) + { + CLOG("Painter: Setting scanner effectiveness to %f\n",eff); + scanner_effectiveness = eff; + } + long w_Painter::onMouseWheel(FXObject*, FXSelector, void *ptr) { *************** *** 964,971 **** setZoom(zoom*0.5f); break; ! case ID_TOGGLE_SHOWPLANETNAMES: flag_showplanetnames = static_cast<FXbool>(FXuval(p)); //repaint(); ! break; case ID_TOGGLE_PLANETVALUEVIEW: flag_planetvalueview = static_cast<FXbool>(FXuval(p)); --- 964,971 ---- setZoom(zoom*0.5f); break; ! /* case ID_TOGGLE_SHOWPLANETNAMES: flag_showplanetnames = static_cast<FXbool>(FXuval(p)); //repaint(); ! break; */ case ID_TOGGLE_PLANETVALUEVIEW: flag_planetvalueview = static_cast<FXbool>(FXuval(p)); |
|
From: Brandon B. <bdr...@us...> - 2006-06-01 05:23:21
|
Update of /cvsroot/frontierproject/frontierproject/include In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv27271/include Modified Files: widget_painter.h Log Message: Wormholes! Index: widget_painter.h =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/include/widget_painter.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** widget_painter.h 31 May 2006 22:31:30 -0000 1.16 --- widget_painter.h 1 Jun 2006 05:23:19 -0000 1.17 *************** *** 48,52 **** ID_ZOOMIN, ID_ZOOMOUT, ! ID_TOGGLE_SHOWPLANETNAMES, ID_TOGGLE_PLANETVALUEVIEW, ID_SWITCHMODE, --- 48,52 ---- ID_ZOOMIN, ID_ZOOMOUT, ! //ID_TOGGLE_SHOWPLANETNAMES, ID_TOGGLE_PLANETVALUEVIEW, ID_SWITCHMODE, *************** *** 95,98 **** --- 95,99 ---- void layout(); void setZoom(FXfloat zoom); + void setScanEffectiveness(FXfloat eff); //Message Handlers *************** *** 130,135 **** FXPixel bgcol; FXbool *simulateShift; ! FXbool *d_drawFlags; //Disable default and copy ctors. --- 131,146 ---- FXPixel bgcol; + FXint *mode; FXbool *simulateShift; ! FXbool *overlayFlags; ! FXbool *overlayPlanetNames; ! FXbool *overlayMineFields; ! FXbool *overlayFleetPaths; ! FXbool *overlayShipCounts; ! FXbool *overlayScanners; ! ! FXfloat scanner_effectiveness; ! ! FXIcon *wh; //Disable default and copy ctors. *************** *** 144,147 **** --- 155,160 ---- FXFont* tinyFont; //@@@ Move these to some global thing? + FXFont* planetFont; + int viewMode; *************** *** 165,172 **** FXshort uMaxY; ! FXbool flag_showplanetnames; FXbool flag_planetvalueview; ! void calcFont(FXDCWindow &dc); //From the department of *EWWWW* comes... --- 178,185 ---- FXshort uMaxY; ! //FXbool flag_showplanetnames; FXbool flag_planetvalueview; ! void calcFont(); //From the department of *EWWWW* comes... |
|
From: Brandon B. <bdr...@us...> - 2006-06-01 05:13:29
|
Update of /cvsroot/frontierproject/frontierproject/data/xml In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv23845/data/xml Modified Files: resources.xml Log Message: Add the new files into the map. Index: resources.xml =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/data/xml/resources.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** resources.xml 17 May 2006 04:59:35 -0000 1.4 --- resources.xml 1 Jun 2006 05:13:23 -0000 1.5 *************** *** 31,38 **** <image filename="/icons/partslot/elect.gif" format="GIF" name="/partslot/ELECTRICAL" transparency_mode="IMAGE_ALPHAGUESS"/> <image filename="/icons/partslot/weapons.gif" format="GIF" name="/partslot/WEAPON" transparency_mode="IMAGE_ALPHAGUESS"/> ! <image filename="/icons/partslot/shield.gif" format="GIF" name="/partslot/SHIELD" transparency_mode="IMAGE_ALPHAGUESS"/> ! <image filename="/icons/gui/flag.gif" format="GIF" name="/gui/flag" transparency_mode="IMAGE_ALPHAGUESS"/> ! <image filename="/icons/gui/names.gif" format="GIF" name="/gui/togglenames" transparency_mode="IMAGE_ALPHAGUESS"/> ! <image filename="/test/t1.gif" format="GIF" name="/test/1" transparency_mode="IMAGE_ALPHAGUESS"/> <image filename="/cursors/part_1.gif" format="GIF" name="/cursor/1part" transparency_mode="IMAGE_ALPHAGUESS"/> <image filename="/cursors/part_fill.gif" format="GIF" name="/cursor/fillpart" transparency_mode="IMAGE_ALPHAGUESS"/> --- 31,46 ---- <image filename="/icons/partslot/elect.gif" format="GIF" name="/partslot/ELECTRICAL" transparency_mode="IMAGE_ALPHAGUESS"/> <image filename="/icons/partslot/weapons.gif" format="GIF" name="/partslot/WEAPON" transparency_mode="IMAGE_ALPHAGUESS"/> ! <image filename="/icons/partslot/shield.gif" format="GIF" name="/partslot/SHIELD" transparency_mode="IMAGE_ALPHAGUESS"/> ! <image filename="/icons/gui/normal.gif" format="GIF" name="/gui/toolbar/normal" transparency_mode="IMAGE_ALPHAGUESS"/> ! <image filename="/icons/gui/surface.gif" format="GIF" name="/gui/toolbar/surface" transparency_mode="IMAGE_ALPHAGUESS"/> ! <image filename="/icons/gui/concentration.gif" format="GIF" name="/gui/toolbar/concentration" transparency_mode="IMAGE_ALPHAGUESS"/> ! <image filename="/icons/gui/percent.gif" format="GIF" name="/gui/toolbar/percent" transparency_mode="IMAGE_ALPHAGUESS"/> ! <image filename="/icons/gui/population.gif" format="GIF" name="/gui/toolbar/population" transparency_mode="IMAGE_ALPHAGUESS"/> ! <image filename="/icons/gui/noinfo.gif" format="GIF" name="/gui/toolbar/noinfo" transparency_mode="IMAGE_ALPHAGUESS"/> ! <image filename="/icons/gui/flag.gif" format="GIF" name="/gui/toolbar/flag" transparency_mode="IMAGE_ALPHAGUESS"/> ! <image filename="/icons/gui/names.gif" format="GIF" name="/gui/toolbar/togglenames" transparency_mode="IMAGE_ALPHAGUESS"/> ! <image filename="/icons/gui/Wormhole.gif" format="GIF" name="/gui/painter/wormhole" transparency_mode="IMAGE_ALPHAGUESS"/> ! <image filename="/icons/gui/sco.gif" format="GIF" name="/gui/toolbar/sco" transparency_mode="IMAGE_ALPHAGUESS"/> ! <image filename="/test/t1.gif" format="GIF" name="/test/1" transparency_mode="IMAGE_ALPHAGUESS"/> <image filename="/cursors/part_1.gif" format="GIF" name="/cursor/1part" transparency_mode="IMAGE_ALPHAGUESS"/> <image filename="/cursors/part_fill.gif" format="GIF" name="/cursor/fillpart" transparency_mode="IMAGE_ALPHAGUESS"/> |
|
From: Brandon B. <bdr...@us...> - 2006-06-01 05:12:38
|
Update of /cvsroot/frontierproject/frontierproject/data/icons/gui In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv23371/data/icons/gui Added Files: Wormhole.gif Log Message: Add in wormhole icon needed to draw wormholes in Painter. --- NEW FILE: Wormhole.gif --- (This appears to be a binary file; contents omitted.) |
|
From: Brandon B. <bdr...@us...> - 2006-06-01 05:11:18
|
Update of /cvsroot/frontierproject/frontierproject/data/icons/gui In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv22832/data/icons/gui Added Files: concentration.gif noinfo.gif normal.gif percent.gif population.gif sco.gif surface.gif Log Message: Add crappy icons for more buttons. --- NEW FILE: concentration.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: percent.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: population.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: surface.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: normal.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: sco.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: noinfo.gif --- (This appears to be a binary file; contents omitted.) |
|
From: Brandon B. <bdr...@us...> - 2006-05-31 22:31:34
|
Update of /cvsroot/frontierproject/frontierproject/src In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv7115/src Modified Files: widget_painter.cpp Log Message: Move some stuff around in Painter. TRYING to make it a bit easier to understand... Index: widget_painter.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/widget_painter.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** widget_painter.cpp 18 May 2006 07:44:50 -0000 1.21 --- widget_painter.cpp 31 May 2006 22:31:30 -0000 1.22 *************** *** 127,134 **** largestFont -> create(); ! uMinX = TheGalaxy->MinX(); ! uMinY = TheGalaxy->MinY(); ! uMaxX = TheGalaxy->MaxX(); ! uMaxY = TheGalaxy->MaxY(); d_drawFlags = static_cast<FXbool*>(autoTarget::tieBool("/painter/show/planetnames",true)->getData()); --- 127,134 ---- largestFont -> create(); ! uMinX = static_cast<FXshort>(TheGalaxy->MinX()); ! uMinY = static_cast<FXshort>(TheGalaxy->MinY()); ! uMaxX = static_cast<FXshort>(TheGalaxy->MaxX()); ! uMaxY = static_cast<FXshort>(TheGalaxy->MaxY()); d_drawFlags = static_cast<FXbool*>(autoTarget::tieBool("/painter/show/planetnames",true)->getData()); *************** *** 164,168 **** FreeStars::Planet *curPlanet; int i; ! FXlong X,Y,W,H; dc.setForeground(FXRGB(96,0,0)); //Darkish red --- 164,169 ---- FreeStars::Planet *curPlanet; int i; ! FXshort pX,pY; ! FXshort X,Y,W,H; dc.setForeground(FXRGB(96,0,0)); //Darkish red *************** *** 173,180 **** if(curPlanet->GetOwner() == TheGame->GetCurrentPlayer()) { ! X = (u2sx(curPlanet->GetPosX())-u2sl(curPlanet->GetScanSpace()/2)); ! Y = (u2sy(curPlanet->GetPosY())-u2sl(curPlanet->GetScanSpace()/2)); W = u2sl(curPlanet->GetScanSpace()); ! dc.fillArc(X,Y,W,W,64*0,64*360); } } --- 174,184 ---- if(curPlanet->GetOwner() == TheGame->GetCurrentPlayer()) { ! pX = u2sx(curPlanet->GetPosX()); ! pY = u2sy(curPlanet->GetPosY()); ! X = (pX-u2sl(curPlanet->GetScanSpace()/2)); ! Y = (pY-u2sl(curPlanet->GetScanSpace()/2)); W = u2sl(curPlanet->GetScanSpace()); ! H = u2sl(curPlanet->GetScanSpace()); ! dc.fillArc(X,Y,W,H,64*0,64*360); } } *************** *** 190,197 **** ! X = (u2sx(curPlanet->GetPosX())-u2sl(curPlanet->GetScanPenetrating()/2)); ! Y = (u2sy(curPlanet->GetPosY())-u2sl(curPlanet->GetScanPenetrating()/2)); W = u2sl(curPlanet->GetScanPenetrating()); ! dc.fillArc(X,Y,W,W,64*0,64*360); } } --- 194,202 ---- ! X = (pX-u2sl(curPlanet->GetScanPenetrating()/2)); ! Y = (pY-u2sl(curPlanet->GetScanPenetrating()/2)); W = u2sl(curPlanet->GetScanPenetrating()); ! H = u2sl(curPlanet->GetScanPenetrating()); ! dc.fillArc(X,Y,W,H,64*0,64*360); } } *************** *** 280,284 **** Fleet *f; ! long X1, Y1, X2, Y2; int i=0; int j=0; --- 285,289 ---- Fleet *f; ! // long X1, Y1, X2, Y2; int i=0; int j=0; *************** *** 488,493 **** { using FreeStars::Planet; ! int foo; ! FXint X, Y, W, H; dc.setForeground(FXRGB(0,255,0)); --- 493,500 ---- { using FreeStars::Planet; ! // int foo; ! ! FXshort pX, pY; ! FXshort X, Y, W, H; dc.setForeground(FXRGB(0,255,0)); *************** *** 500,507 **** if (curPlanet) { ! X = (u2sx(curPlanet->GetPosX())-(getPlanetWidth(curPlanet))/2); ! Y = (u2sy(curPlanet->GetPosY())-(getPlanetWidth(curPlanet))/2); W = getPlanetWidth(curPlanet); ! H = getPlanetWidth(curPlanet); dc.fillArc(X,Y,W,H,64*0,64*360); --- 507,521 ---- if (curPlanet) { ! ! pX = u2sx(curPlanet->GetPosX()); ! pY = u2sy(curPlanet->GetPosY()); W = getPlanetWidth(curPlanet); ! H = getPlanetWidth(curPlanet); //@@@? ! ! X = pX - (W/2); ! Y = pY - (H/2); ! ! // X = (u2sx(curPlanet->GetPosX())-(getPlanetWidth(curPlanet))/2); ! // Y = (u2sy(curPlanet->GetPosY())-(getPlanetWidth(curPlanet))/2); dc.fillArc(X,Y,W,H,64*0,64*360); *************** *** 511,524 **** { //user wants planet text. ! dc.setForeground (FXRGB (0, 0, 0)); ! dc.drawText (u2sx(curPlanet->GetPosX())+10, ! u2sy(curPlanet->GetPosY())+ 10, //en.world.planets[foo].name->text(), //en.world.planets[foo].name->length()); curPlanet->GetName().c_str(), curPlanet->GetName().length()); ! dc.setForeground (FXRGB (255, 255, 255)); ! dc.drawText (u2sx(curPlanet->GetPosX())+ 11, ! u2sy(curPlanet->GetPosY())+ 11, //en.world.planets[foo].name->text(), //en.world.planets[foo].name->length()); --- 525,538 ---- { //user wants planet text. ! dc.setForeground(FXRGB(0,0,0)); ! dc.drawText(pX+10, ! pY+ 10, //en.world.planets[foo].name->text(), //en.world.planets[foo].name->length()); curPlanet->GetName().c_str(), curPlanet->GetName().length()); ! dc.setForeground(FXRGB(255,255,255)); ! dc.drawText(pX+ 11, ! pY+ 11, //en.world.planets[foo].name->text(), //en.world.planets[foo].name->length()); *************** *** 536,540 **** // In theory, it works. using FreeStars::Planet; ! FXlong X,Y; Planet *curPlanet; int i; --- 550,554 ---- // In theory, it works. using FreeStars::Planet; ! FXshort X,Y; Planet *curPlanet; int i; *************** *** 641,646 **** } ! cursorx = co->GetPosX(); //@@@ Behavior is NOT like this. ! cursory = co->GetPosY(); hasselection = true; --- 655,660 ---- } ! cursorx = static_cast<FXshort>(co->GetPosX()); //@@@ Behavior is NOT like this. ! cursory = static_cast<FXshort>(co->GetPosY()); hasselection = true; *************** *** 657,662 **** event = ev; ! FXlong x1 = s2ux(ev->win_x); ! FXlong y1 = s2uy(ev->win_y); --- 671,676 ---- event = ev; ! FXshort x1 = s2ux(ev->win_x); ! FXshort y1 = s2uy(ev->win_y); *************** *** 669,673 **** //End Debug ! int i; FXMenuCommand *mc = 0; --- 683,687 ---- //End Debug ! // int i; FXMenuCommand *mc = 0; *************** *** 722,727 **** FXPoint foo[3]; ! long x = u2sx(cursorx); ! long y = u2sy(cursory); foo[0].x = (int) x; --- 736,741 ---- FXPoint foo[3]; ! FXshort x = u2sx(cursorx); ! FXshort y = u2sy(cursory); foo[0].x = (int) x; *************** *** 774,779 **** event = ev; ! FXlong x1 = s2ux(ev->win_x); ! FXlong y1 = s2uy(ev->win_y); deque<SpaceObject *> *d; --- 788,793 ---- event = ev; ! FXshort x1 = s2ux(ev->win_x); ! FXshort y1 = s2uy(ev->win_y); deque<SpaceObject *> *d; *************** *** 819,824 **** } ///// End shifted click handling ///// ! cursorx = d->at(0)->GetPosX(); //@@@ Behavior is NOT like this. ! cursory = d->at(0)->GetPosY(); hasselection = true; --- 833,838 ---- } ///// End shifted click handling ///// ! cursorx = static_cast<FXshort>(d->at(0)->GetPosX()); //@@@ Behavior is NOT like this. ! cursory = static_cast<FXshort>(d->at(0)->GetPosY()); hasselection = true; *************** *** 929,936 **** { case -120: ! setZoom(zoom*0.8); break; case 120: ! setZoom(zoom*1.2); break; }; --- 943,950 ---- { case -120: ! setZoom(zoom*0.8f); break; case 120: ! setZoom(zoom*1.2f); break; }; *************** *** 945,952 **** { case ID_ZOOMIN: ! setZoom(zoom*1.5); break; case ID_ZOOMOUT: ! setZoom(zoom*0.5); break; case ID_TOGGLE_SHOWPLANETNAMES: --- 959,966 ---- { case ID_ZOOMIN: ! setZoom(zoom*1.5f); break; case ID_ZOOMOUT: ! setZoom(zoom*0.5f); break; case ID_TOGGLE_SHOWPLANETNAMES: *************** *** 981,988 **** */ ! FXlong w_Painter::u2sx(FXlong x) ! { ! return FXlong(zoom*(x-uMinX) + getXPosition()); ! } FXlong w_Painter::u2sy(FXlong y) --- 995,1003 ---- */ ! /* ! FXshort w_Painter::u2sx(FXshort x) ! { ! return FXlong(zoom*(x-uMinX) + getXPosition()); ! } FXlong w_Painter::u2sy(FXlong y) *************** *** 1005,1006 **** --- 1020,1022 ---- return FXlong(w*zoom); } + */ \ No newline at end of file |
|
From: Brandon B. <bdr...@us...> - 2006-05-31 22:31:33
|
Update of /cvsroot/frontierproject/frontierproject/include In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv7115/include Modified Files: widget_painter.h Log Message: Move some stuff around in Painter. TRYING to make it a bit easier to understand... Index: widget_painter.h =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/include/widget_painter.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** widget_painter.h 18 May 2006 07:08:20 -0000 1.15 --- widget_painter.h 31 May 2006 22:31:30 -0000 1.16 *************** *** 107,112 **** //Public variables ! FXlong cursorx; //What universe coordinate is the focus at? ! FXlong cursory; //.. bool hasselection; --- 107,112 ---- //Public variables ! FXshort cursorx; //What universe coordinate is the focus at? ! FXshort cursory; //.. bool hasselection; *************** *** 160,167 **** //Universe bounds ! FXlong uMinX; ! FXlong uMinY; ! FXlong uMaxX; ! FXlong uMaxY; FXbool flag_showplanetnames; --- 160,167 ---- //Universe bounds ! FXshort uMinX; ! FXshort uMinY; ! FXshort uMaxX; ! FXshort uMaxY; FXbool flag_showplanetnames; *************** *** 188,196 **** */ ! FXlong u2sx(FXlong x); ! FXlong u2sy(FXlong y); ! FXlong s2ux(FXlong x); ! FXlong s2uy(FXlong y); ! FXlong u2sl(FXlong w); --- 188,196 ---- */ ! FXshort u2sx(FXshort x) {return zoom*(x-uMinX) + pos_x;}; ! FXshort u2sy(FXshort y) {return zoom*(uMaxY-y) + pos_y;}; ! FXshort s2ux(FXshort x) {return double(x-pos_x)/zoom + uMinX;}; ! FXshort s2uy(FXshort y) {return uMaxY - double(y - pos_y)/zoom;}; ! FXshort u2sl(FXshort w) {return w*zoom;}; |
|
From: Brandon B. <bdr...@us...> - 2006-05-31 22:30:08
|
Update of /cvsroot/frontierproject/frontierproject/src In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv6498/src Modified Files: gui_mainscreen.cpp Log Message: Change window title to reflect status of project :) Index: gui_mainscreen.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/gui_mainscreen.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** gui_mainscreen.cpp 18 May 2006 07:08:20 -0000 1.16 --- gui_mainscreen.cpp 31 May 2006 22:30:02 -0000 1.17 *************** *** 62,66 **** /* Implement a mainWindow, derive from FXMainWindow. */ mainWindow::mainWindow(FXApp *a, FXIcon *s, FXIcon *l): ! FXMainWindow(a,"Frontier",s,l,DECOR_ALL,0,0,800,600) { --- 62,66 ---- /* Implement a mainWindow, derive from FXMainWindow. */ mainWindow::mainWindow(FXApp *a, FXIcon *s, FXIcon *l): ! FXMainWindow(a,"Frontier Project: A FreeStars Client",s,l,DECOR_ALL,0,0,800,600) { |
|
From: Brandon B. <bdr...@us...> - 2006-05-18 07:44:59
|
Update of /cvsroot/frontierproject/frontierproject/src In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv13197/src Modified Files: widget_painter.cpp Log Message: Winner, "Smallest change to painter" award. Index: widget_painter.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/widget_painter.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** widget_painter.cpp 18 May 2006 07:08:20 -0000 1.20 --- widget_painter.cpp 18 May 2006 07:44:50 -0000 1.21 *************** *** 1,4 **** /***************************************************************************** ! * Copyright (C) 2004-2005, 2006 Brandon Bergren * * * * This file is part of The Frontier Project. * --- 1,4 ---- /***************************************************************************** ! * Copyright (C) 2004-2005,2006 Brandon Bergren * * * * This file is part of The Frontier Project. * |
|
From: Brandon B. <bdr...@us...> - 2006-05-18 07:08:26
|
Update of /cvsroot/frontierproject/frontierproject In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv31984 Modified Files: ChangeLog Log Message: Got a lot done today. Index: ChangeLog =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/ChangeLog,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ChangeLog 16 May 2006 18:30:40 -0000 1.5 --- ChangeLog 18 May 2006 07:08:20 -0000 1.6 *************** *** 1,2 **** --- 1,9 ---- + 2006 May 18 bdragon: + Upgraded to Fox 1.6, rebuilt to use FOXDLL. + Now using DLL CRT. (no manual tweaking needed now.) + Made build more portable. + Preparations to release a library kit. + new "AutoTarget" system. + 2006 May 16 bdragon: Refactor and cleanup. |
|
From: Brandon B. <bdr...@us...> - 2006-05-18 07:08:26
|
Update of /cvsroot/frontierproject/frontierproject/vcproj/Frontier In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv31984/vcproj/Frontier Modified Files: Frontier.vcproj Log Message: Got a lot done today. Index: Frontier.vcproj =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/vcproj/Frontier/Frontier.vcproj,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Frontier.vcproj 17 May 2006 20:45:29 -0000 1.8 --- Frontier.vcproj 18 May 2006 07:08:20 -0000 1.9 *************** *** 4,7 **** --- 4,8 ---- Version="7.10" Name="Frontier" + RootNamespace="Frontier" SccProjectName="" SccLocalPath=""> *************** *** 23,29 **** Optimization="2" InlineFunctionExpansion="1" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" StringPooling="TRUE" ! RuntimeLibrary="4" EnableFunctionLevelLinking="TRUE" UsePrecompiledHeader="2" --- 24,31 ---- Optimization="2" InlineFunctionExpansion="1" + AdditionalIncludeDirectories="../../include;../../..;../..;../../../freestars/Server" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" StringPooling="TRUE" ! RuntimeLibrary="2" EnableFunctionLevelLinking="TRUE" UsePrecompiledHeader="2" *************** *** 38,42 **** <Tool Name="VCLinkerTool" ! AdditionalDependencies="odbc32.lib odbccp32.lib luacore.lib luastdlib.lib" OutputFile=".\Release/Frontier.exe" LinkIncremental="1" --- 40,44 ---- <Tool Name="VCLinkerTool" ! AdditionalDependencies="comctl32.lib liblua.lib FOXDLL-1.6.lib ws2_32.lib zlib.lib libpng.lib ../../../freestars\Server\Release\libFS.lib ../../../freestars\Server\Release\libTinyXML.lib libjpeg.lib" OutputFile=".\Release/Frontier.exe" LinkIncremental="1" *************** *** 86,89 **** --- 88,92 ---- AdditionalOptions="/Zm500 " Optimization="0" + AdditionalIncludeDirectories="../../include;../../..;../..;../../../freestars/Server" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" BasicRuntimeChecks="3" *************** *** 156,166 **** Optimization="0" AdditionalIncludeDirectories="../../include;../../..;../..;../../../freestars/Server" ! PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TIXML_USE_STL" GeneratePreprocessedFile="0" KeepComments="FALSE" BasicRuntimeChecks="3" ! RuntimeLibrary="1" RuntimeTypeInfo="TRUE" ! PrecompiledHeaderFile=".\Debug/Frontier.pch" AssemblerListingLocation=".\Debug/" ObjectFile=".\Debug/" --- 159,173 ---- Optimization="0" AdditionalIncludeDirectories="../../include;../../..;../..;../../../freestars/Server" ! PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TIXML_USE_STL;FOXDLL" GeneratePreprocessedFile="0" KeepComments="FALSE" BasicRuntimeChecks="3" ! RuntimeLibrary="3" ! BufferSecurityCheck="TRUE" ! EnableFunctionLevelLinking="TRUE" RuntimeTypeInfo="TRUE" ! UsePrecompiledHeader="3" ! PrecompiledHeaderThrough="FrontierClient.h" ! PrecompiledHeaderFile=".\Debug/FrontierClient.pch" AssemblerListingLocation=".\Debug/" ObjectFile=".\Debug/" *************** *** 175,179 **** <Tool Name="VCLinkerTool" ! AdditionalDependencies="comctl32.lib odbc32.lib odbccp32.lib lualib.lib luacore.lib FOXD-1.4.lib ws2_32.lib zlib.lib libpng12.lib c:\docs\programming\freestars\Server\Debug\libFS.lib c:\docs\programming\freestars\Server\Debug\libTinyXML.lib" OutputFile=".\Debug/Frontier.exe" LinkIncremental="0" --- 182,186 ---- <Tool Name="VCLinkerTool" ! AdditionalDependencies="comctl32.lib libluad.lib FOXDLLD-1.6.lib ws2_32.lib zlibd.lib libpngd.lib ../../../freestars\Server\Debug\libFS.lib ../../../freestars\Server\Debug\libTinyXML.lib libjpeg.lib" OutputFile=".\Debug/Frontier.exe" LinkIncremental="0" *************** *** 252,257 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 259,263 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 286,289 **** --- 292,304 ---- </File> <File + RelativePath="..\..\src\FrontierClient.cpp"> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1"/> + </FileConfiguration> + </File> + <File RelativePath="..\..\src\gdArt.cpp"> </File> *************** *** 343,348 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 358,362 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 402,407 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 416,420 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 432,437 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 445,449 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 462,467 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 474,478 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 492,497 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 503,507 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 522,527 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 532,536 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 584,589 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 593,597 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 668,677 **** <Tool Name="VCCLCompilerTool" - Optimization="0" AdditionalIncludeDirectories="" PreprocessorDefinitions="" ! BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 676,682 ---- <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="" PreprocessorDefinitions="" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 702,707 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 707,711 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 761,766 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 765,769 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 791,796 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 794,798 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 821,826 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 823,827 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 889,894 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 890,894 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 925,930 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 925,929 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 1017,1022 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 1016,1020 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 1204,1209 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 1202,1206 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> *************** *** 1237,1242 **** PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1" ! WarningLevel="2"/> </FileConfiguration> </File> --- 1234,1238 ---- PreprocessorDefinitions="" BasicRuntimeChecks="3" ! BrowseInformation="1"/> </FileConfiguration> </File> |
|
From: Brandon B. <bdr...@us...> - 2006-05-18 07:08:26
|
Update of /cvsroot/frontierproject/frontierproject/doc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv31984/doc Added Files: autoTarget.txt Log Message: Got a lot done today. --- NEW FILE: autoTarget.txt --- AutoTarget is a system built on FXDict and FXDataTarget that allows automatic collaboration between multiple subsystems. Targets for Painter: /painter/forceshift Makes the next click act as a shifted click. |
Update of /cvsroot/frontierproject/frontierproject/src In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv31984/src Modified Files: ClientObjects.cpp ColorListItem.cpp DebugConsole.cpp Entity.cpp Tech.cpp autoTarget.cpp event.cpp gui_Host.cpp gui_joingame.cpp gui_mainscreen.cpp gui_racewizard.cpp gui_shipdesigner.cpp gui_splashscreen.cpp hullTech.cpp luaIface.cpp main.cpp v_FIO.cpp v_Fleet.cpp v_Starbase.cpp widget_componentpopup.cpp widget_componenttray.cpp widget_fleetsummary.cpp widget_mineraltable.cpp widget_painter.cpp widget_selectionsummary.cpp widget_shipbuildview.cpp Added Files: FrontierClient.cpp Log Message: Got a lot done today. Index: main.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/main.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** main.cpp 16 May 2006 19:58:12 -0000 1.10 --- main.cpp 18 May 2006 07:08:20 -0000 1.11 *************** *** 61,65 **** Bdragon */ ! #include <fx.h> #include "event.h" Event *evh; --- 61,65 ---- Bdragon */ ! #include "FrontierClient.h" #include "event.h" Event *evh; Index: gui_shipdesigner.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/gui_shipdesigner.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** gui_shipdesigner.cpp 16 May 2006 22:42:17 -0000 1.9 --- gui_shipdesigner.cpp 18 May 2006 07:08:20 -0000 1.10 *************** *** 204,208 **** using FreeStars::Rules; using FreeStars::Component; - using FreeStars::TheGame; FXString s; --- 204,207 ---- Index: gui_Host.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/gui_Host.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gui_Host.cpp 20 Jul 2005 02:34:37 -0000 1.1 --- gui_Host.cpp 18 May 2006 07:08:20 -0000 1.2 *************** *** 25,30 **** * */ - #include <fx.h> #include "gui_Host.h" --- 25,30 ---- * */ + #include "FrontierClient.h" #include "gui_Host.h" Index: ClientObjects.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/ClientObjects.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ClientObjects.cpp 14 May 2006 05:22:11 -0000 1.3 --- ClientObjects.cpp 18 May 2006 07:08:20 -0000 1.4 *************** *** 22,25 **** --- 22,27 ---- //2005 + + #include "FrontierClient.h" *************** *** 41,45 **** std::deque<FreeStars::Component*> CGame::GetCompenentsByType(FreeStars::ComponentType type) { ! using FreeStars::TheGame; using FreeStars::Component; using std::deque; --- 43,47 ---- std::deque<FreeStars::Component*> CGame::GetCompenentsByType(FreeStars::ComponentType type) { ! // using FreeStars::TheGame; using FreeStars::Component; using std::deque; *************** *** 63,67 **** using std::deque; using FreeStars::Component; ! using FreeStars::TheGame; const deque<Component*> cl = TheGame->GetComponents(); --- 65,69 ---- using std::deque; using FreeStars::Component; ! // using FreeStars::TheGame; const deque<Component*> cl = TheGame->GetComponents(); *************** *** 72,73 **** --- 74,89 ---- return 0; } + + /*void CGalaxy::GetWormholes( + std::deque<FreeStars::Wormhole*>::const_iterator& b, + std::deque<FreeStars::Wormhole*>::const_iterator& e) + { + b=mWormholes.begin(); + e=mWormholes.end(); + } + */ + + const std::deque<FreeStars::Wormhole*> &CGalaxy::GetWormholes() + { + return mWormholes; + } Index: v_Fleet.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/v_Fleet.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** v_Fleet.cpp 17 May 2006 04:59:35 -0000 1.7 --- v_Fleet.cpp 18 May 2006 07:08:20 -0000 1.8 *************** *** 70,74 **** void v_Fleet::setFleet(const FreeStars::Fleet* fleet) { ! using FreeStars::TheGame; setHeader(fleet->GetName(TheGame->GetCurrentPlayer()).c_str()); //pic->setImage(en.getPlanetIcon(fleet->->PICTURE)); --- 70,74 ---- void v_Fleet::setFleet(const FreeStars::Fleet* fleet) { ! // using FreeStars::TheGame; setHeader(fleet->GetName(TheGame->GetCurrentPlayer()).c_str()); //pic->setImage(en.getPlanetIcon(fleet->->PICTURE)); --- NEW FILE: FrontierClient.cpp --- /***************************************************************************** * Copyright (C) 2006 Brandon Bergren * * * * This file is part of The Frontier Project. * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * ****************************************************************************/ // Precompiled header for Frontier #include "FrontierClient.h" Index: widget_componentpopup.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/widget_componentpopup.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** widget_componentpopup.cpp 16 May 2006 18:30:40 -0000 1.1 --- widget_componentpopup.cpp 18 May 2006 07:08:20 -0000 1.2 *************** *** 24,32 **** * Popup component details window. */ ! ! #include <fx.h> #include "widget_componentpopup.h" - #include "FSServer.h" - #include "DebugConsole.h" #include "gdArt.h" --- 24,29 ---- * Popup component details window. */ ! #include "FrontierClient.h" #include "widget_componentpopup.h" #include "gdArt.h" Index: autoTarget.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/autoTarget.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** autoTarget.cpp 17 May 2006 20:45:29 -0000 1.1 --- autoTarget.cpp 18 May 2006 07:08:20 -0000 1.2 *************** *** 27,56 **** #include "FrontierClient.h" ! FXDict *intTargets; ! //std::deque<FXint*> intValues; ! //FXApp *apptr; ! //FXString *dataPath; bool autoTarget::init() { ! intTargets = new FXDict(); return true; } ! FXDataTarget* autoTarget::tieInt(const char *key,FXint def) { ! if(intTargets->find(key)) ! return static_cast<FXDataTarget*>(intTargets->find(key)); FXDataTarget *theTarget; ! FXint *theValue = new FXint; ! *theValue = def; ! theTarget = new FXDataTarget(def); ! intTargets->insert(key,static_cast<void*>(theTarget)); return theTarget; } --- 27,65 ---- #include "FrontierClient.h" ! FXDict *targets; bool autoTarget::init() { ! targets = new FXDict(); //@todo Earlier initialization. return true; } ! template<class T> ! FXDataTarget* doTie(const char* key, T def) { ! if(targets->find(key)) ! return static_cast<FXDataTarget*>(targets->find(key)); FXDataTarget *theTarget; ! T *theValue = new T; ! (*theValue) = def; ! theTarget = new FXDataTarget(*theValue); ! targets->insert(key,static_cast<void*>(theTarget)); return theTarget; } + + + FXDataTarget* autoTarget::tieInt(const char *key,FXint def) + { + return doTie(key,def); + } + + FXDataTarget* autoTarget::tieBool(const char *key,FXbool def) + { + return doTie(key,def); + } \ No newline at end of file Index: widget_fleetsummary.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/widget_fleetsummary.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** widget_fleetsummary.cpp 21 Jul 2005 16:02:26 -0000 1.1 --- widget_fleetsummary.cpp 18 May 2006 07:08:20 -0000 1.2 *************** *** 19,20 **** --- 19,21 ---- * * ****************************************************************************/ + #include "FrontierClient.h" \ No newline at end of file Index: widget_shipbuildview.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/widget_shipbuildview.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** widget_shipbuildview.cpp 16 May 2006 20:47:08 -0000 1.4 --- widget_shipbuildview.cpp 18 May 2006 07:08:20 -0000 1.5 *************** *** 297,301 **** ! foo.format("%s/data/xml/parttypemap.xml",FXFile::getCurrentDirectory().text()); TiXmlDocument file(foo.text()); --- 297,301 ---- ! foo.format("%s/data/xml/parttypemap.xml",FXSystem::getCurrentDirectory().text()); TiXmlDocument file(foo.text()); Index: widget_painter.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/widget_painter.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** widget_painter.cpp 17 May 2006 20:45:29 -0000 1.19 --- widget_painter.cpp 18 May 2006 07:08:20 -0000 1.20 *************** *** 36,44 **** cursor? */ - - #include <fx.h> - #include <fxkeys.h> - #include <vector> - #include "FrontierClient.h" #include "FrontierTypes.h" --- 36,39 ---- *************** *** 59,62 **** --- 54,58 ---- FXMAPFUNC(SEL_COMMAND, w_Painter::ID_TOGGLE_SHOWPLANETNAMES, w_Painter::onCommand), FXMAPFUNC(SEL_COMMAND, w_Painter::ID_TOGGLE_PLANETVALUEVIEW, w_Painter::onCommand), + // FXMAPFUNC(SEL_UPDATE, w_Painter::ID_UPD_PLANETNAMES, w_Painter::onCommand), }; *************** *** 119,129 **** mpLastSelected = 0; - using FreeStars::TheGalaxy; FXScrollArea::create(); ! tinyFont = new FXFont(getApp(),NULL,7 ); ! smallFont = new FXFont(getApp(),NULL,8 ); ! normalFont = new FXFont(getApp(),NULL,10); ! largeFont = new FXFont(getApp(),NULL,12,FONTWEIGHT_BOLD); ! largestFont = new FXFont(getApp(),NULL,14,FONTWEIGHT_BOLD); tinyFont -> create(); smallFont -> create(); --- 115,124 ---- mpLastSelected = 0; FXScrollArea::create(); ! tinyFont = new FXFont(getApp(),"Tahoma,70"); ! smallFont = new FXFont(getApp(),"Tahoma,80"); ! normalFont = new FXFont(getApp(),"Tahoma,100"); ! largeFont = new FXFont(getApp(),"Tahoma,120,bold"); ! largestFont = new FXFont(getApp(),"Tahoma,140,bold"); tinyFont -> create(); smallFont -> create(); *************** *** 137,142 **** uMaxY = TheGalaxy->MaxY(); ! autoTarget::tieInt("/painter/forceshift",0)->connect(simulateShift); } --- 132,138 ---- uMaxY = TheGalaxy->MaxY(); + d_drawFlags = static_cast<FXbool*>(autoTarget::tieBool("/painter/show/planetnames",true)->getData()); ! simulateShift = static_cast<FXbool*>(autoTarget::tieBool("/painter/forceshift",false)->getData()); } *************** *** 161,171 **** cursory = 0; hasselection=false; ! simulateShift=false; }; void w_Painter::drawScanners(FXDCWindow &dc) { - using FreeStars::TheGalaxy; - using FreeStars::TheGame; FreeStars::Planet *curPlanet; int i; --- 157,165 ---- cursory = 0; hasselection=false; ! //simulateShift=false; }; void w_Painter::drawScanners(FXDCWindow &dc) { FreeStars::Planet *curPlanet; int i; *************** *** 241,245 **** segs[j-1].x2 = u2sx(f->GetOrders().at(j)->GetLocation()->GetPosX()); segs[j-1].y2 = u2sy(f->GetOrders().at(j)->GetLocation()->GetPosY()); ! CLOG("Painter: route line: %s, (%i, %i)-(%i, %i) j=%i\n",f->GetName(FreeStars::TheGame->GetCurrentPlayer()).c_str(),segs[j-1].x1,segs[j-1].y1,segs[j-1].x2,segs[j-1].y2,j); } // nukeDupeSegments(segs,j); --- 235,239 ---- segs[j-1].x2 = u2sx(f->GetOrders().at(j)->GetLocation()->GetPosX()); segs[j-1].y2 = u2sy(f->GetOrders().at(j)->GetLocation()->GetPosY()); ! CLOG("Painter: route line: %s, (%i, %i)-(%i, %i) j=%i\n",f->GetName(TheGame->GetCurrentPlayer()).c_str(),segs[j-1].x1,segs[j-1].y1,segs[j-1].x2,segs[j-1].y2,j); } // nukeDupeSegments(segs,j); *************** *** 283,287 **** { using FreeStars::Fleet; - using FreeStars::TheGame; FXString foo; --- 277,280 ---- *************** *** 380,387 **** void w_Painter::drawWormholes(FXDCWindow &dc) { //@@@ Remove these 3 lines ASAP!!! @@@ ! dc.setForeground(FXRGB(255,0,255)); ! dc.setBackground(FXRGB(255,0,255)); ! dc.drawPoint(u2sx(1079),u2sy(1047)); //@@@ --- 373,399 ---- void w_Painter::drawWormholes(FXDCWindow &dc) { + using std::deque; + using FreeStars::Wormhole; + + CGalaxy* f = dynamic_cast<CGalaxy*>(TheGalaxy); + + //deque<Wormhole*>::const_iterator wh = (dynamic_cast<CGalaxy*>(FreeStars::TheGalaxy))->GetWormholes(); + + const std::deque<FreeStars::Wormhole*> &wh = f->GetWormholes(); + + //dynamic_cast<CGalaxy*>(FreeStars::TheGalaxy)->GetWormholes(start,end); + + for(std::deque<FreeStars::Wormhole*>::const_iterator it=wh.begin();it!=wh.end();++it) + { + CLOG("Wormhole at %u,%u\n",(*it)->GetPosX(),(*it)->GetPosY()); + } + + + + //@@@ Remove these 3 lines ASAP!!! @@@ ! //dc.setForeground(FXRGB(255,0,255)); ! //dc.setBackground(FXRGB(255,0,255)); ! //dc.drawPoint(u2sx(1079),u2sy(1047)); //@@@ *************** *** 391,396 **** { using FreeStars::Planet; - using FreeStars::TheGame; - using FreeStars::TheGalaxy; Planet *curPlanet; int i; --- 403,406 ---- *************** *** 478,483 **** { using FreeStars::Planet; - using FreeStars::TheGalaxy; - using FreeStars::TheGame; int foo; FXint X, Y, W, H; --- 488,491 ---- *************** *** 528,533 **** // In theory, it works. using FreeStars::Planet; - using FreeStars::TheGalaxy; - using FreeStars::TheGame; FXlong X,Y; Planet *curPlanet; --- 536,539 ---- *************** *** 605,609 **** //bar = getHabforPlanet(planet,en.state.thisPlayer); ! bar = 1.0 * FreeStars::TheGame->GetCurrentPlayer()->HabFactor(p) / 100; //bar = 1; //if(bar<0) --- 611,615 ---- //bar = getHabforPlanet(planet,en.state.thisPlayer); ! bar = 1.0 * TheGame->GetCurrentPlayer()->HabFactor(p) / 100; //bar = 1; //if(bar<0) *************** *** 616,620 **** long w_Painter::onRCMenuChoice(FXObject *o, FXSelector, void *) { - using FreeStars::TheGame; FXString foo; int i; --- 622,625 ---- *************** *** 648,652 **** long w_Painter::onRightClick(FXObject *, FXSelector, void *ptr) { - using FreeStars::TheGame; FXEvent *ev = (FXEvent*)ptr; --- 653,656 ---- *************** *** 738,742 **** bool w_Painter::targetFleet(FreeStars::Fleet* f) { - using FreeStars::TheGame; using FreeStars::SpaceObject; ///@todo Better permission checking --- 742,745 ---- *************** *** 763,767 **** long w_Painter::onClick(FXObject *, FXSelector, void *ptr) { - using FreeStars::TheGame; using FreeStars::Planet; using FreeStars::Fleet; --- 766,769 ---- *************** *** 785,791 **** ///// Are we doing a shifted click? ///// ! if(simulateShift || (ev->state & SHIFTMASK)) { ! simulateShift = false; ///// We were last selecting a fleet ///// --- 787,793 ---- ///// Are we doing a shifted click? ///// ! if((*simulateShift) || (ev->state & SHIFTMASK)) { ! (*simulateShift) = false; ///// We were last selecting a fleet ///// Index: luaIface.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/luaIface.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** luaIface.cpp 16 May 2006 20:47:08 -0000 1.3 --- luaIface.cpp 18 May 2006 07:08:20 -0000 1.4 *************** *** 25,28 **** --- 25,29 ---- * luaIface: Interface for Lua functions. */ + #include "FrontierClient.h" extern "C" *************** *** 33,37 **** } - #include "FrontierClient.h" #include "luaIface.h" --- 34,37 ---- *************** *** 107,113 **** { state = lua_open(); ! lua_baselibopen(state); lua_iolibopen(state); ! lua_mathlibopen(state); // lua_register(state,"debugprint",l_debugprint); } --- 107,113 ---- { state = lua_open(); ! /* lua_baselibopen(state); lua_iolibopen(state); ! lua_mathlibopen(state); */ // lua_register(state,"debugprint",l_debugprint); } *************** *** 121,124 **** void Script::load(const char *filename) { ! lua_dofile(state,filename); } --- 121,125 ---- void Script::load(const char *filename) { ! CLOG("LUA: @@@ port to new API!"); ! //lua_dofile(state,filename); } Index: v_Starbase.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/v_Starbase.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** v_Starbase.cpp 17 May 2006 20:45:29 -0000 1.9 --- v_Starbase.cpp 18 May 2006 07:08:20 -0000 1.10 *************** *** 114,119 **** void v_Starbase::setPlanet(const FreeStars::Planet* planet) { - using FreeStars::TheGame; - FXString foo; --- 114,117 ---- Index: widget_mineraltable.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/widget_mineraltable.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** widget_mineraltable.cpp 16 May 2006 18:52:11 -0000 1.2 --- widget_mineraltable.cpp 18 May 2006 07:08:20 -0000 1.3 *************** *** 32,41 **** ^left align ^right align */ - #include <fx.h> - #include <deque> #include "widget_mineraltable.h" - #include "FSServer.h" - #include "DebugConsole.h" --- 32,38 ---- ^left align ^right align */ + #include "FrontierClient.h" #include "widget_mineraltable.h" Index: hullTech.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/hullTech.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** hullTech.cpp 20 Jul 2005 02:34:37 -0000 1.1 --- hullTech.cpp 18 May 2006 07:08:20 -0000 1.2 *************** *** 25,28 **** --- 25,30 ---- // @FS@ Figure out how to load hulls under Freestars system... + #include "FrontierClient.h" + #if 0 //@FS@ added Index: ColorListItem.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/ColorListItem.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ColorListItem.cpp 20 Jul 2005 02:34:37 -0000 1.1 --- ColorListItem.cpp 18 May 2006 07:08:20 -0000 1.2 *************** *** 1,4 **** /***************************************************************************** ! * Copyright (C) 2005 Brandon Bergren * * * * This file is part of The Frontier Project. * --- 1,4 ---- /***************************************************************************** ! * Copyright (C) 2005,2006 Brandon Bergren * * * * This file is part of The Frontier Project. * *************** *** 19,27 **** * * ****************************************************************************/ ! ! ! // ! ! //Spacing between icon and label --- 19,23 ---- * * ****************************************************************************/ ! #include "FrontierClient.h" //Spacing between icon and label *************** *** 33,43 **** #define LIST_MASK (SELECT_MASK|LIST_AUTOSELECT) - #include <fx.h> #include "ColorListItem.h" FXIMPLEMENT(ColorListItem,FXListItem,NULL,0) - - ColorListItem::ColorListItem(const FXString& text,FXColor tc, FXint q, FXIcon* ic,void* ptr): FXListItem(text,ic,ptr) --- 29,36 ---- Index: gui_joingame.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/gui_joingame.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gui_joingame.cpp 16 May 2006 23:05:36 -0000 1.7 --- gui_joingame.cpp 18 May 2006 07:08:20 -0000 1.8 *************** *** 64,68 **** // this->handle(this,MKUINT(FXDialogBox::ID_ACCEPT,SEL_COMMAND),NULL); //fsBrowser-> ! txtFileName->setText(FXFileDialog::getOpenFilename(this,"Please select the game file.",FXFile::getCurrentDirectory(),"All FreeStars Game Files (*.def,*.hst,*.m*)\nPlayer Files (*.x*)\nHost Files (*.def,*.hst)")); getApp()->reg().writeStringEntry("GUI","jgfilename",txtFileName->getText().text()); return 1; --- 64,68 ---- // this->handle(this,MKUINT(FXDialogBox::ID_ACCEPT,SEL_COMMAND),NULL); //fsBrowser-> ! txtFileName->setText(FXFileDialog::getOpenFilename(this,"Please select the game file.",FXSystem::getCurrentDirectory(),"All FreeStars Game Files (*.def,*.hst,*.m*)\nPlayer Files (*.x*)\nHost Files (*.def,*.hst)")); getApp()->reg().writeStringEntry("GUI","jgfilename",txtFileName->getText().text()); return 1; Index: Entity.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/Entity.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Entity.cpp 16 May 2006 20:47:08 -0000 1.8 --- Entity.cpp 18 May 2006 07:08:20 -0000 1.9 *************** *** 25,28 **** --- 25,29 ---- * */ + #include "FrontierClient.h" #if 0 *************** *** 30,34 **** #define ENTITY_CPP - #include "FrontierClient.h" #include "FrontierTypes.h" --- 31,34 ---- Index: widget_selectionsummary.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/widget_selectionsummary.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** widget_selectionsummary.cpp 21 Jul 2005 16:02:26 -0000 1.1 --- widget_selectionsummary.cpp 18 May 2006 07:08:20 -0000 1.2 *************** *** 19,20 **** --- 19,21 ---- * * ****************************************************************************/ + #include "FrontierClient.h" \ No newline at end of file Index: DebugConsole.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/DebugConsole.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** DebugConsole.cpp 16 May 2006 20:47:08 -0000 1.9 --- DebugConsole.cpp 18 May 2006 07:08:20 -0000 1.10 *************** *** 132,139 **** exit(10); //@@@ ! lua_baselibopen(vm); lua_iolibopen(vm); lua_strlibopen(vm); ! lua_mathlibopen(vm); lua_register(vm,"debugprint",l_debugprint); --- 132,139 ---- exit(10); //@@@ ! /* lua_baselibopen(vm); lua_iolibopen(vm); lua_strlibopen(vm); ! lua_mathlibopen(vm); */ lua_register(vm,"debugprint",l_debugprint); *************** *** 222,226 **** // For now, dump components. print("Dumping components.\n"); ! const std::deque<FreeStars::Component*> c = FreeStars::TheGame->GetComponents(); for(std::deque<FreeStars::Component*>::const_iterator i = c.begin(); i!=c.end(); ++i) --- 222,226 ---- // For now, dump components. print("Dumping components.\n"); ! const std::deque<FreeStars::Component*> c = TheGame->GetComponents(); for(std::deque<FreeStars::Component*>::const_iterator i = c.begin(); i!=c.end(); ++i) *************** *** 240,244 **** if(parsed==false) { ! l_ckerr(vm,lua_dostring(vm, cmd.text())); parsed = true; //@@@ } --- 240,245 ---- if(parsed==false) { ! CLOG("NOT EVALUATING -- @@@ need to convert to lua 5.1"); ! //l_ckerr(vm,lua_dostring(vm, cmd.text())); parsed = true; //@@@ } *************** *** 269,274 **** long debugConsole::doBut1(FXObject*,FXSelector,void* ev) { - using FreeStars::TheGame; - //FXEvent* event = static_cast<FXEvent*>(ev); --- 270,273 ---- *************** *** 334,338 **** { case SEL_RIGHTBUTTONPRESS: ! testcom->setComponent(FreeStars::TheGame->GetComponents().at(13)); testpop->popup(this,30,30); break; --- 333,337 ---- { case SEL_RIGHTBUTTONPRESS: ! testcom->setComponent(TheGame->GetComponents().at(13)); testpop->popup(this,30,30); break; Index: gui_mainscreen.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/gui_mainscreen.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** gui_mainscreen.cpp 17 May 2006 20:45:29 -0000 1.15 --- gui_mainscreen.cpp 18 May 2006 07:08:20 -0000 1.16 *************** *** 162,167 **** // Toolbar implement ! new FXToggleButton(toolbar, NULL, NULL, gdArt::getIcon("/gui/flag"), gdArt::getIcon("/gui/flag"), playarea, w_Painter::ID_TOGGLE_PLANETVALUEVIEW,TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE); ! new FXToggleButton(toolbar, NULL, NULL, gdArt::getIcon("/gui/togglenames"),gdArt::getIcon("/gui/togglenames"),playarea,w_Painter::ID_TOGGLE_SHOWPLANETNAMES,TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE); //////////////////////////////////////// --- 162,167 ---- // Toolbar implement ! new FXToggleButton(toolbar, "", "", gdArt::getIcon("/gui/flag"), gdArt::getIcon("/gui/flag"), playarea, w_Painter::ID_TOGGLE_PLANETVALUEVIEW,TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE); ! new FXToggleButton(toolbar, "", "", gdArt::getIcon("/gui/togglenames"),gdArt::getIcon("/gui/togglenames"),playarea,w_Painter::ID_TOGGLE_SHOWPLANETNAMES,TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE); //////////////////////////////////////// *************** *** 172,179 **** // Add mainWindow keys. // //////////////////////////////////////// ! getAccelTable()->addAccel(fxparseAccel("Alt-F4"),getApp(),MKUINT(FXApp::ID_QUIT, SEL_COMMAND)); //make jeff happy. //getAccelTable()->addAccel(fxparseAccel("~" ),getApp(),MKUINT(mainWindow::ID_MNU_DEBUG_SHOWCONSOLE,SEL_COMMAND)); //make ME happy. ! getAccelTable()->addAccel(fxparseAccel("P"),playarea,MKUINT(w_Painter::ID_ZOOMIN,SEL_COMMAND)); ! getAccelTable()->addAccel(fxparseAccel("L"),playarea,MKUINT(w_Painter::ID_ZOOMOUT,SEL_COMMAND)); //////////////////////////////////////// --- 172,179 ---- // Add mainWindow keys. // //////////////////////////////////////// ! getAccelTable()->addAccel(parseAccel("Alt-F4"),getApp(),MKUINT(FXApp::ID_QUIT, SEL_COMMAND)); //make jeff happy. //getAccelTable()->addAccel(fxparseAccel("~" ),getApp(),MKUINT(mainWindow::ID_MNU_DEBUG_SHOWCONSOLE,SEL_COMMAND)); //make ME happy. ! getAccelTable()->addAccel(parseAccel("P"),playarea,MKUINT(w_Painter::ID_ZOOMIN,SEL_COMMAND)); ! getAccelTable()->addAccel(parseAccel("L"),playarea,MKUINT(w_Painter::ID_ZOOMOUT,SEL_COMMAND)); //////////////////////////////////////// *************** *** 374,378 **** if(foo) { ! FreeStars::TheGalaxy->GetPlanet("Heart")->ProcessLoad(foo,FreeStars::POPULATION,FreeStars::TRANSFER_LOADAMT,20,false); } return 1; --- 374,378 ---- if(foo) { ! TheGalaxy->GetPlanet("Heart")->ProcessLoad(foo,FreeStars::POPULATION,FreeStars::TRANSFER_LOADAMT,20,false); } return 1; *************** *** 388,392 **** { // racewizard->show(); ! FreeStars::TheGame->GetCurrentPlayer()->SaveXFile(); return 1; }; --- 388,392 ---- { // racewizard->show(); ! TheGame->GetCurrentPlayer()->SaveXFile(); return 1; }; *************** *** 429,433 **** using FreeStars::Fleet; using FreeStars::Planet; - using FreeStars::TheGame; Location* loc = static_cast<Location*>(ptr); --- 429,432 ---- Index: v_FIO.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/v_FIO.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** v_FIO.cpp 16 May 2006 20:47:08 -0000 1.5 --- v_FIO.cpp 18 May 2006 07:08:20 -0000 1.6 *************** *** 74,78 **** void v_FIO::setPlanet( FreeStars::Planet* planet) { ! using FreeStars::TheGame; lstFleets->clearItems(); --- 74,78 ---- void v_FIO::setPlanet( FreeStars::Planet* planet) { ! // using FreeStars::TheGame; lstFleets->clearItems(); Index: event.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/event.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** event.cpp 17 May 2006 20:45:29 -0000 1.14 --- event.cpp 18 May 2006 07:08:20 -0000 1.15 *************** *** 24,27 **** --- 24,28 ---- * Event: The event-based state machine */ + #define CLIENT #include "FrontierClient.h" *************** *** 48,51 **** --- 49,62 ---- FXIMPLEMENT(Event,FXObject,EventMap,ARRAYNUMBER(EventMap)) + + + + FreeStars::Game *TheGame; + FreeStars::Galaxy *TheGalaxy; + + //CGame *TheGame; + //CGalaxy *TheGalaxy; + + Event::Event(FXApp* app) { *************** *** 61,66 **** long Event::onEvent(FXObject*, FXSelector, void*st) { ! using FreeStars::TheGame; ! using FreeStars::TheGalaxy; mOldState = mState; mState = (int)(st); //cast --- 72,77 ---- long Event::onEvent(FXObject*, FXSelector, void*st) { ! //using FreeStars::TheGame; ! //using FreeStars::TheGalaxy; mOldState = mState; mState = (int)(st); //cast *************** *** 101,105 **** FXString remp; ! remp.format("%s/data",FXFile::getCurrentDirectory().text()); gdArt::init(apptr,remp.text()); --- 112,116 ---- FXString remp; ! remp.format("%s/data",FXSystem::getCurrentDirectory().text()); gdArt::init(apptr,remp.text()); *************** *** 185,190 **** bool error = false; ! TheGame = new FreeStars::Game(); ! TheGalaxy = new FreeStars::Galaxy(); ///@bug We need to force a chdir() here, so it picks up the right files. --- 196,201 ---- bool error = false; ! TheGame = new CGame(); ! TheGalaxy = new CGalaxy(); ///@bug We need to force a chdir() here, so it picks up the right files. *************** *** 258,264 **** { splashOn(); ! TheGame = new FreeStars::Game(); ! TheGalaxy = new FreeStars::Galaxy(); ! FreeStars::TheGame->LoadPlayerFile(strGameFileName.text()); wGameWindow = new mainWindow(apptr, gdArt::getIcon("/icons/app/big"), gdArt::getIcon("/icons/app/small")); wGameWindow->create(); --- 269,275 ---- { splashOn(); ! TheGame = new CGame(); ! TheGalaxy = new CGalaxy(); ! TheGame->LoadPlayerFile(strGameFileName.text()); wGameWindow = new mainWindow(apptr, gdArt::getIcon("/icons/app/big"), gdArt::getIcon("/icons/app/small")); wGameWindow->create(); Index: gui_splashscreen.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/gui_splashscreen.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gui_splashscreen.cpp 16 May 2006 19:58:12 -0000 1.4 --- gui_splashscreen.cpp 18 May 2006 07:08:20 -0000 1.5 *************** *** 24,28 **** */ ! #include <fx.h> #include "gui_splashscreen.h" #include "data/gui/gui.inc" --- 24,28 ---- */ ! #include "FrontierClient.h" #include "gui_splashscreen.h" #include "data/gui/gui.inc" Index: Tech.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/Tech.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Tech.cpp 14 May 2006 03:28:10 -0000 1.4 --- Tech.cpp 18 May 2006 07:08:20 -0000 1.5 *************** *** 36,39 **** --- 36,40 ---- */ + #include "FrontierClient.h" #if 0 Index: gui_racewizard.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/gui_racewizard.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gui_racewizard.cpp 20 Jul 2005 02:34:37 -0000 1.1 --- gui_racewizard.cpp 18 May 2006 07:08:20 -0000 1.2 *************** *** 25,30 **** * */ ! ! #include <fx.h> #include "gui_racewizard.h" --- 25,29 ---- * */ ! #include "FrontierClient.h" #include "gui_racewizard.h" Index: widget_componenttray.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/widget_componenttray.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** widget_componenttray.cpp 16 May 2006 20:47:08 -0000 1.8 --- widget_componenttray.cpp 18 May 2006 07:08:20 -0000 1.9 *************** *** 140,144 **** using FreeStars::Component; using FreeStars::ComponentType; ! using FreeStars::TheGame; FXint foo; lstTray->clearItems(); --- 140,144 ---- using FreeStars::Component; using FreeStars::ComponentType; ! // using FreeStars::TheGame; FXint foo; lstTray->clearItems(); |
|
From: Brandon B. <bdr...@us...> - 2006-05-18 07:08:26
|
Update of /cvsroot/frontierproject/frontierproject/include In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv31984/include Modified Files: ClientObjects.h FrontierClient.h autoTarget.h widget_painter.h Log Message: Got a lot done today. Index: autoTarget.h =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/include/autoTarget.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** autoTarget.h 17 May 2006 20:45:29 -0000 1.1 --- autoTarget.h 18 May 2006 07:08:20 -0000 1.2 *************** *** 26,30 **** * AutoTarget. * So there I was, wondering how the hell I was going to make the Set Packet Destination ! * button work. All of the sudden, I had a flash of inspiration. */ class autoTarget --- 26,33 ---- * AutoTarget. * So there I was, wondering how the hell I was going to make the Set Packet Destination ! * button work. All of the sudden, I had a flash of inspiration: ! * Why not combine gdArt style storage with FXDataTarget? ! * Then, for example, you can connect to /object/whatever and manipulate stuff, and it will ! * apply automatically elsewhere. */ class autoTarget *************** *** 33,39 **** static bool init(); static FXDataTarget* tieInt(const char *key, FXint def=0); ! // static FXIcon* getIcon(const FXchar *name); ! // static FXIcon* getPlanetIcon(int num); ! // static FXIcon* getPartSlot(const FXchar *name); private: --- 36,40 ---- static bool init(); static FXDataTarget* tieInt(const char *key, FXint def=0); ! static FXDataTarget* tieBool(const char *key, FXbool def=false); private: Index: FrontierClient.h =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/include/FrontierClient.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FrontierClient.h 17 May 2006 20:45:29 -0000 1.6 --- FrontierClient.h 18 May 2006 07:08:20 -0000 1.7 *************** *** 27,30 **** --- 27,34 ---- //Toolkit includes #include <fx.h> + using namespace FX; + + #include <deque> + #include <vector> //Server includes Index: ClientObjects.h =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/include/ClientObjects.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ClientObjects.h 14 May 2006 05:22:11 -0000 1.4 --- ClientObjects.h 18 May 2006 07:08:20 -0000 1.5 *************** *** 41,44 **** --- 41,49 ---- :Galaxy(){} virtual ~CGalaxy(); + + // void GetWormholes( + // std::deque<FreeStars::Wormhole*>::const_iterator&, + // std::deque<FreeStars::Wormhole*>::const_iterator&); + const std::deque<FreeStars::Wormhole*>& GetWormholes(); }; Index: widget_painter.h =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/include/widget_painter.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** widget_painter.h 17 May 2006 20:45:29 -0000 1.14 --- widget_painter.h 18 May 2006 07:08:20 -0000 1.15 *************** *** 115,119 **** FXfloat zoom; //Zoom factor. ! bool d_DrawFlags; bool d_PlanetSizeIsHab; bool d_PlanetSizeIsPop; --- 115,121 ---- FXfloat zoom; //Zoom factor. ! //bool d_DrawFlags; ! ! bool d_PlanetSizeIsHab; bool d_PlanetSizeIsPop; *************** *** 122,131 **** //Public inlines ! FXbool canFocus() const { return 1; } protected: FXPixel bgcol; ! FXint simulateShift; //Disable default and copy ctors. --- 124,135 ---- //Public inlines ! FXbool canFocus(){ return 1; } protected: FXPixel bgcol; ! ! FXbool *simulateShift; ! FXbool *d_drawFlags; //Disable default and copy ctors. *************** *** 191,195 **** - }; #endif --- 195,198 ---- |
|
From: Brandon B. <bdr...@us...> - 2006-05-18 07:08:25
|
Update of /cvsroot/frontierproject/frontierproject/vcproj In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv31984/vcproj Modified Files: Frontier.sln Log Message: Got a lot done today. Index: Frontier.sln =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/vcproj/Frontier.sln,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Frontier.sln 16 May 2006 18:30:40 -0000 1.3 --- Frontier.sln 18 May 2006 07:08:20 -0000 1.4 *************** *** 22,26 **** GlobalSection(SolutionConfiguration) = preSolution Debug = Debug - Profile = Profile Release = Release EndGlobalSection --- 22,25 ---- *************** *** 28,51 **** {3CFE7133-27A7-47D5-8CAE-AF547AD279A5}.Debug.ActiveCfg = Debug|Win32 {3CFE7133-27A7-47D5-8CAE-AF547AD279A5}.Debug.Build.0 = Debug|Win32 - {3CFE7133-27A7-47D5-8CAE-AF547AD279A5}.Profile.ActiveCfg = Profile|Win32 - {3CFE7133-27A7-47D5-8CAE-AF547AD279A5}.Profile.Build.0 = Profile|Win32 {3CFE7133-27A7-47D5-8CAE-AF547AD279A5}.Release.ActiveCfg = Release|Win32 {3CFE7133-27A7-47D5-8CAE-AF547AD279A5}.Release.Build.0 = Release|Win32 {A2A34182-B515-41B9-ACD3-561A9EA30DAD}.Debug.ActiveCfg = Debug|Win32 {A2A34182-B515-41B9-ACD3-561A9EA30DAD}.Debug.Build.0 = Debug|Win32 - {A2A34182-B515-41B9-ACD3-561A9EA30DAD}.Profile.ActiveCfg = Release|Win32 - {A2A34182-B515-41B9-ACD3-561A9EA30DAD}.Profile.Build.0 = Release|Win32 {A2A34182-B515-41B9-ACD3-561A9EA30DAD}.Release.ActiveCfg = Release|Win32 {A2A34182-B515-41B9-ACD3-561A9EA30DAD}.Release.Build.0 = Release|Win32 {CAB32DCE-C549-4FFB-9277-BE5E800FEC3C}.Debug.ActiveCfg = Debug|Win32 {CAB32DCE-C549-4FFB-9277-BE5E800FEC3C}.Debug.Build.0 = Debug|Win32 - {CAB32DCE-C549-4FFB-9277-BE5E800FEC3C}.Profile.ActiveCfg = Release|Win32 - {CAB32DCE-C549-4FFB-9277-BE5E800FEC3C}.Profile.Build.0 = Release|Win32 {CAB32DCE-C549-4FFB-9277-BE5E800FEC3C}.Release.ActiveCfg = Release|Win32 {CAB32DCE-C549-4FFB-9277-BE5E800FEC3C}.Release.Build.0 = Release|Win32 {05EA38A7-3734-416B-A16D-421788282738}.Debug.ActiveCfg = Debug|Win32 {05EA38A7-3734-416B-A16D-421788282738}.Debug.Build.0 = Debug|Win32 - {05EA38A7-3734-416B-A16D-421788282738}.Profile.ActiveCfg = Debug|Win32 - {05EA38A7-3734-416B-A16D-421788282738}.Profile.Build.0 = Debug|Win32 {05EA38A7-3734-416B-A16D-421788282738}.Release.ActiveCfg = Release|Win32 {05EA38A7-3734-416B-A16D-421788282738}.Release.Build.0 = Release|Win32 --- 27,42 ---- |
|
From: Brandon B. <bdr...@us...> - 2006-05-17 20:45:36
|
Update of /cvsroot/frontierproject/frontierproject/src In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv29547/src Modified Files: event.cpp gui_mainscreen.cpp v_Starbase.cpp widget_painter.cpp widget_toolwell.cpp Added Files: autoTarget.cpp Log Message: Add autoTarget. The Set Packet Dest button works now. Index: gui_mainscreen.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/gui_mainscreen.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** gui_mainscreen.cpp 17 May 2006 06:51:08 -0000 1.14 --- gui_mainscreen.cpp 17 May 2006 20:45:29 -0000 1.15 *************** *** 46,58 **** FXDEFMAP (mainWindow) mainWindowMap[] = { ! FXMAPFUNC (SEL_COMMAND, mainWindow::ID_TOOLBARBUTTONS, mainWindow::onToolbar ), ! FXMAPFUNC (SEL_COMMAND, mainWindow::ID_MNU_HELP_ABOUT, mainWindow::onMnuHelpAbout ), ! FXMAPFUNC (SEL_COMMAND, mainWindow::ID_MNU_DEBUG_SHOWCONSOLE, mainWindow::onMnuDebugShowConsole ), ! FXMAPFUNC (SEL_COMMAND, mainWindow::ID_MNU_DEBUG_GENTURN, mainWindow::onMnuDebugGenTurn ), ! FXMAPFUNC (SEL_COMMAND, mainWindow::ID_MNU_DEBUG_SHOWRACE, mainWindow::onMnuDebugShowRace ), ! FXMAPFUNC (SEL_COMMAND, mainWindow::ID_MNU_DEBUG_SHOWGAMESETUP, mainWindow::onMnuDebugShowGameSetup ), ! FXMAPFUNC (SEL_COMMAND, mainWindow::ID_MNU_DEBUG_SHOWSD, mainWindow::onMnuDebugShowShipdesigner ), ! FXMAPFUNC (SEL_COMMAND, mainWindow::ID_MNU_DEBUG_ADDSHIP, mainWindow::onMnuDebugAddShip ), ! FXMAPFUNC (SEL_COMMAND, mainWindow::ID_CANVAS, mainWindow::onGetPaintCommand ), }; --- 46,59 ---- FXDEFMAP (mainWindow) mainWindowMap[] = { ! FXMAPFUNC(SEL_COMMAND, mainWindow::ID_TOOLBARBUTTONS, mainWindow::onToolbar ), ! FXMAPFUNC(SEL_COMMAND, mainWindow::ID_M_HELP_ABOUT, mainWindow::onMnuHelpAbout ), ! FXMAPFUNC(SEL_COMMAND, mainWindow::ID_M_DBG_CONSOLE, mainWindow::onMnuDebugShowConsole ), ! FXMAPFUNC(SEL_COMMAND, mainWindow::ID_M_DBG_TURN, mainWindow::onMnuDebugGenTurn ), ! FXMAPFUNC(SEL_COMMAND, mainWindow::ID_M_DBG_RACE, mainWindow::onMnuDebugShowRace ), ! FXMAPFUNC(SEL_COMMAND, mainWindow::ID_M_DBG_GS, mainWindow::onMnuDebugShowGameSetup ), ! FXMAPFUNC(SEL_COMMAND, mainWindow::ID_M_DBG_SHOWSD, mainWindow::onMnuDebugShowShipdesigner), ! FXMAPFUNC(SEL_COMMAND, mainWindow::ID_M_DBG_ADDSHIP, mainWindow::onMnuDebugAddShip ), ! FXMAPFUNC(SEL_COMMAND, mainWindow::ID_CANVAS, mainWindow::onGetPaintCommand ), ! FXMAPFUNC(SEL_COMMAND, mainWindow::ID_M_COMM_SD, mainWindow::onShowShipdesigner ), }; *************** *** 79,82 **** --- 80,89 ---- // Implement the menus // //////////////////////////////////////// + + // FXMenuPane* mnuTurn; + // FXMenuCommand* mnuTurnGenerate; + // FXMenuPane* mnuComm; + // FXMenuCommand* mnuCommSD; + menubar_s=new FXToolBarShell(this); menubar=new FXMenuBar(topdock,menubar_s,LAYOUT_SIDE_TOP|LAYOUT_FILL_X|FRAME_RAISED); *************** *** 86,102 **** new FXMenuTitle(menubar, "&File", NULL, mnuFile); mnuFileExit = new FXMenuCommand(mnuFile, "E&xit", NULL, getApp(), FXApp::ID_QUIT,0); mnuHelp = new FXMenuPane(this); new FXMenuTitle (menubar , "&Help", NULL, mnuHelp); ! mnuHelpAbout = new FXMenuCommand(mnuHelp, "&About", NULL, this, ID_MNU_HELP_ABOUT,0); mnuDebug = new FXMenuPane(this); new FXMenuTitle (menubar , "&Debug", NULL, mnuDebug); ! mnuDebugShowConsole = new FXMenuCommand(mnuDebug, "Show &Console", NULL, this, ID_MNU_DEBUG_SHOWCONSOLE, 0); ! mnuDebugGenTurn = new FXMenuCommand(mnuDebug, "Generate Turn", NULL, this, ID_MNU_DEBUG_GENTURN, 0); ! mnuDebugShowRace = new FXMenuCommand(mnuDebug, "Save turn (TEMP)", NULL, this, ID_MNU_DEBUG_SHOWRACE, 0); ! mnuDebugShowGameSetup = new FXMenuCommand(mnuDebug, "Attempt to load colonists(TEMP)", NULL, this, ID_MNU_DEBUG_SHOWGAMESETUP, 0); ! mnuDebugShowShipdesigner = new FXMenuCommand(mnuDebug, "Show Ship Designer", NULL, this, ID_MNU_DEBUG_SHOWSD, 0); ! mnuDebugAddShip = new FXMenuCommand(mnuDebug, "Add test fleet", NULL, this, ID_MNU_DEBUG_ADDSHIP, 0); //////TOOLBAR Init/////// --- 93,117 ---- new FXMenuTitle(menubar, "&File", NULL, mnuFile); mnuFileExit = new FXMenuCommand(mnuFile, "E&xit", NULL, getApp(), FXApp::ID_QUIT,0); + + // mnuTurn = new FXMenuPane(this); + // new FXMenuTitle(menubar, "&Turn", NULL, mnuTurn); + // mnuTurnGenerate = new FXMenuCommand(mnuTurn, "&Generate", NULL, getApp(), FXApp::ID_QUIT, 0); + + // mnuComm = new FXMenuPane(this); + // new FXMenuTitle(menubar, "&Commands", NULL, mnuComm); + // mnuCommSD = new FXMenuCommand(mnuComm, "&Ship Design\tF4", NULL, this, ID_M_COMM_SD, 0); mnuHelp = new FXMenuPane(this); new FXMenuTitle (menubar , "&Help", NULL, mnuHelp); ! mnuHelpAbout = new FXMenuCommand(mnuHelp, "&About", NULL, this, ID_M_HELP_ABOUT,0); mnuDebug = new FXMenuPane(this); new FXMenuTitle (menubar , "&Debug", NULL, mnuDebug); ! mnuDebugShowConsole = new FXMenuCommand(mnuDebug, "Show &Console", NULL, this, ID_M_DBG_CONSOLE, 0); ! mnuDebugGenTurn = new FXMenuCommand(mnuDebug, "Generate Turn", NULL, this, ID_M_DBG_TURN, 0); ! mnuDebugShowRace = new FXMenuCommand(mnuDebug, "Save turn (TEMP)", NULL, this, ID_M_DBG_RACE, 0); ! mnuDebugShowGameSetup = new FXMenuCommand(mnuDebug, "Attempt to load colonists(TEMP)", NULL, this, ID_M_DBG_GS, 0); ! mnuDebugShowShipdesigner = new FXMenuCommand(mnuDebug, "Show Ship Designer", NULL, this, ID_M_DBG_SHOWSD, 0); ! mnuDebugAddShip = new FXMenuCommand(mnuDebug, "Add test fleet", NULL, this, ID_M_DBG_ADDSHIP, 0); //////TOOLBAR Init/////// *************** *** 185,188 **** --- 200,204 ---- toolbar_s->create(); menubar_s->create(); + // ps_s->create(); *************** *** 344,347 **** --- 360,370 ---- } + long mainWindow::onShowShipdesigner(FXObject*,FXSelector,void*) + { + shipdesigner->show(PLACEMENT_SCREEN); + getApp()->runModalWhileShown(shipdesigner); + return 1; + } + long mainWindow::onMnuDebugShowGameSetup(FXObject *, FXSelector, void *) { --- NEW FILE: autoTarget.cpp --- /***************************************************************************** * Copyright (C) 2006 Brandon Bergren * * * * This file is part of The Frontier Project. * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * ****************************************************************************/ /** * @file * AutoTarget: Evil will always triumph, because good is dumb. */ #include "FrontierClient.h" FXDict *intTargets; //std::deque<FXint*> intValues; //FXApp *apptr; //FXString *dataPath; bool autoTarget::init() { intTargets = new FXDict(); return true; } FXDataTarget* autoTarget::tieInt(const char *key,FXint def) { if(intTargets->find(key)) return static_cast<FXDataTarget*>(intTargets->find(key)); FXDataTarget *theTarget; FXint *theValue = new FXint; *theValue = def; theTarget = new FXDataTarget(def); intTargets->insert(key,static_cast<void*>(theTarget)); return theTarget; } Index: widget_toolwell.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/widget_toolwell.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** widget_toolwell.cpp 14 May 2006 03:28:10 -0000 1.4 --- widget_toolwell.cpp 17 May 2006 20:45:29 -0000 1.5 *************** *** 36,40 **** */ ! #include <fx.h> #include "vTemplate.h" --- 36,40 ---- */ ! #include "FrontierClient.h" #include "vTemplate.h" Index: event.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/event.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** event.cpp 16 May 2006 21:00:21 -0000 1.13 --- event.cpp 17 May 2006 20:45:29 -0000 1.14 *************** *** 103,106 **** --- 103,109 ---- remp.format("%s/data",FXFile::getCurrentDirectory().text()); gdArt::init(apptr,remp.text()); + + CLOG("EVENT: Initializing AutoTarget.\n"); + autoTarget::init(); splashOff(); Index: widget_painter.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/widget_painter.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** widget_painter.cpp 17 May 2006 06:41:09 -0000 1.18 --- widget_painter.cpp 17 May 2006 20:45:29 -0000 1.19 *************** *** 136,139 **** --- 136,143 ---- uMaxX = TheGalaxy->MaxX(); uMaxY = TheGalaxy->MaxY(); + + + autoTarget::tieInt("/painter/forceshift",0)->connect(simulateShift); + } *************** *** 157,160 **** --- 161,165 ---- cursory = 0; hasselection=false; + simulateShift=false; }; *************** *** 759,764 **** { using FreeStars::TheGame; ! FXEvent *ev = (FXEvent*)ptr; event = ev; --- 764,773 ---- { using FreeStars::TheGame; ! using FreeStars::Planet; ! using FreeStars::Fleet; ! using FreeStars::SpaceObject; ! using std::deque; + FXEvent *ev = (FXEvent*)ptr; event = ev; *************** *** 766,770 **** FXlong y1 = s2uy(ev->win_y); ! std::deque<FreeStars::SpaceObject *> * d; d = TheGame->GetClosestTop(x1, y1); //Debug --- 775,780 ---- FXlong y1 = s2uy(ev->win_y); ! deque<SpaceObject *> *d; ! d = TheGame->GetClosestTop(x1, y1); //Debug *************** *** 773,794 **** //End Debug ! //Waypoint addition ! if(ev->state & SHIFTMASK) { ! if(dynamic_cast<FreeStars::Fleet*>(mLastSelected->at(mpLastSelected))) { ! CLOG("Would have sent %s to location %i,%i, but not implemented yet!\n",dynamic_cast<FreeStars::Fleet*>(mLastSelected->at(mpLastSelected))->GetName(TheGame->GetCurrentPlayer()).c_str(),d->at(0)->GetPosX(),d->at(0)->GetPosY()); } ! else if(dynamic_cast<FreeStars::Planet*>(mLastSelected->at(mpLastSelected))) { ! FreeStars::Planet* p = dynamic_cast<FreeStars::Planet*>(mLastSelected->at(mpLastSelected)); ! //set packet dest CLOG("Painter: Setting packet dest! %s's new destination is %s!\n", p->GetName().c_str(), d->at(0)->InOrbit()->GetName().c_str()); ! dynamic_cast<FreeStars::Planet*>(mLastSelected->at(mpLastSelected))->SetPacketDest(d->at(0)->InOrbit()); update(); return 1; } ! } ! cursorx = d->at(0)->GetPosX(); //@@@ Behavior is NOT like this. --- 783,819 ---- //End Debug ! ! ///// Are we doing a shifted click? ///// ! if(simulateShift || (ev->state & SHIFTMASK)) { ! simulateShift = false; ! ! ///// We were last selecting a fleet ///// ! if(dynamic_cast<Fleet*>(mLastSelected->at(mpLastSelected))) { ! CLOG("Would have sent %s to location %i,%i, but not implemented yet!\n",dynamic_cast<Fleet*>(mLastSelected->at(mpLastSelected))->GetName(TheGame->GetCurrentPlayer()).c_str(),d->at(0)->GetPosX(),d->at(0)->GetPosY()); } ! ! ///// We were last selecting a planet ///// ! else if(dynamic_cast<Planet*>(mLastSelected->at(mpLastSelected))) { ! Planet* p = dynamic_cast<Planet*>(mLastSelected->at(mpLastSelected)); ! CLOG("Painter: Setting packet dest! %s's new destination is %s!\n", p->GetName().c_str(), d->at(0)->InOrbit()->GetName().c_str()); ! ! //Set the packet dest. ! dynamic_cast<Planet*>(mLastSelected->at(mpLastSelected))->SetPacketDest(d->at(0)->InOrbit()); ! ! //Signal update ! target->handle(this,FXSEL(SEL_COMMAND,message),static_cast<void*>(mLastSelected->at(mpLastSelected))); ! ! //Mark ourself dirty. update(); + + //Return early because the selection hasn't changed. return 1; } ! ! } ///// End shifted click handling ///// cursorx = d->at(0)->GetPosX(); //@@@ Behavior is NOT like this. *************** *** 861,865 **** target->handle(this,FXSEL(SEL_COMMAND,message),static_cast<void*>(d->at(mpLastSelected))); ! return 0; }; --- 886,890 ---- target->handle(this,FXSEL(SEL_COMMAND,message),static_cast<void*>(d->at(mpLastSelected))); ! return 0; //@bug haven't we successfully handled the message? }; Index: v_Starbase.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/v_Starbase.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** v_Starbase.cpp 16 May 2006 20:47:08 -0000 1.8 --- v_Starbase.cpp 17 May 2006 20:45:29 -0000 1.9 *************** *** 45,49 **** // FXMAPFUNC(SEL_DND_DROP, w_shipBuilder::ID_DROP, w_shipBuilder::onDNDDrop), FXMAPFUNC(SEL_COMMAND, v_Starbase::ID_FOO, v_Starbase::onFoo), ! FXMAPFUNC(SEL_COMMAND, v_Starbase::ID_SETDEST, v_Starbase::onSetDest), }; --- 45,49 ---- // FXMAPFUNC(SEL_DND_DROP, w_shipBuilder::ID_DROP, w_shipBuilder::onDNDDrop), FXMAPFUNC(SEL_COMMAND, v_Starbase::ID_FOO, v_Starbase::onFoo), ! // FXMAPFUNC(SEL_COMMAND, v_Starbase::ID_SETDEST, v_Starbase::onSetDest), }; *************** *** 88,92 **** lblDest = new FXLabel(matArr,"none" ,0,LAYOUT_FILL_COLUMN|LAYOUT_RIGHT, 0,0,0,0,0,2,0,0); ! btnSetDest = new FXButton(matArr,"Set dest",0,this,ID_SETDEST,BUTTON_NORMAL|LAYOUT_LEFT,0,0,0,0,2,0,0,0); } --- 88,93 ---- lblDest = new FXLabel(matArr,"none" ,0,LAYOUT_FILL_COLUMN|LAYOUT_RIGHT, 0,0,0,0,0,2,0,0); ! //btnSetDest = ! new FXToggleButton(matArr,"Set dest","Set dest",0,0,autoTarget::tieInt("/painter/forceshift",0),FXDataTarget::ID_VALUE,TOGGLEBUTTON_NORMAL|TOGGLEBUTTON_KEEPSTATE|LAYOUT_LEFT,0,0,0,0,2,0,0,0); } *************** *** 103,111 **** } ! long v_Starbase::onSetDest(FXObject*,FXSelector,void*) { //@@@ Implement return 1; ! } void v_Starbase::setPlanet(const FreeStars::Planet* planet) --- 104,114 ---- } ! /* ! long v_Starbase::onSetDest(FXObject* o,FXSelector s,void*ptr) { + target->handle(o,FXSEL(SEL_PAINTERCOMMAND,w_Painter::ID_FORCESHIFT),ptr); //@@@ Implement return 1; ! }*/ void v_Starbase::setPlanet(const FreeStars::Planet* planet) |
|
From: Brandon B. <bdr...@us...> - 2006-05-17 20:45:36
|
Update of /cvsroot/frontierproject/frontierproject/include In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv29547/include Modified Files: FrontierClient.h gui_mainscreen.h widget_painter.h Added Files: autoTarget.h Log Message: Add autoTarget. The Set Packet Dest button works now. --- NEW FILE: autoTarget.h --- /***************************************************************************** * Copyright (C) 2006 Brandon Bergren * * * * This file is part of The Frontier Project. * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the Free Software * * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * * ****************************************************************************/ #ifndef AUTOTARGET_H #define AUTOTARGET_H /** * AutoTarget. * So there I was, wondering how the hell I was going to make the Set Packet Destination * button work. All of the sudden, I had a flash of inspiration. */ class autoTarget { public: static bool init(); static FXDataTarget* tieInt(const char *key, FXint def=0); // static FXIcon* getIcon(const FXchar *name); // static FXIcon* getPlanetIcon(int num); // static FXIcon* getPartSlot(const FXchar *name); private: autoTarget(); ~autoTarget(); }; #endif Index: gui_mainscreen.h =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/include/gui_mainscreen.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gui_mainscreen.h 16 May 2006 22:42:17 -0000 1.4 --- gui_mainscreen.h 17 May 2006 20:45:29 -0000 1.5 *************** *** 46,56 **** { ID_CANVAS = FXMainWindow::ID_LAST, ! ID_MNU_HELP_ABOUT, ! ID_MNU_DEBUG_SHOWCONSOLE, ! ID_MNU_DEBUG_GENTURN, ! ID_MNU_DEBUG_SHOWRACE, ! ID_MNU_DEBUG_SHOWGAMESETUP, ! ID_MNU_DEBUG_SHOWSD, ! ID_MNU_DEBUG_ADDSHIP, ID_TOOLBARBUTTONS, ID_LAST --- 46,57 ---- { ID_CANVAS = FXMainWindow::ID_LAST, ! ID_M_COMM_SD, ! ID_M_HELP_ABOUT, ! ID_M_DBG_CONSOLE, ! ID_M_DBG_TURN, ! ID_M_DBG_RACE, ! ID_M_DBG_GS, ! ID_M_DBG_SHOWSD, ! ID_M_DBG_ADDSHIP, ID_TOOLBARBUTTONS, ID_LAST Index: FrontierClient.h =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/include/FrontierClient.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FrontierClient.h 16 May 2006 20:47:07 -0000 1.5 --- FrontierClient.h 17 May 2006 20:45:29 -0000 1.6 *************** *** 35,38 **** --- 35,39 ---- #include "ClientObjects.h" #include "gdArt.h" + #include "autoTarget.h" //Misc. includes Index: widget_painter.h =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/include/widget_painter.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** widget_painter.h 14 May 2006 03:28:10 -0000 1.13 --- widget_painter.h 17 May 2006 20:45:29 -0000 1.14 *************** *** 127,130 **** --- 127,131 ---- protected: FXPixel bgcol; + FXint simulateShift; //Disable default and copy ctors. |
|
From: Brandon B. <bdr...@us...> - 2006-05-17 20:45:35
|
Update of /cvsroot/frontierproject/frontierproject/vcproj/Frontier In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv29547/vcproj/Frontier Modified Files: Frontier.vcproj Log Message: Add autoTarget. The Set Packet Dest button works now. Index: Frontier.vcproj =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/vcproj/Frontier/Frontier.vcproj,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Frontier.vcproj 16 May 2006 18:30:40 -0000 1.7 --- Frontier.vcproj 17 May 2006 20:45:29 -0000 1.8 *************** *** 221,224 **** --- 221,227 ---- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> <File + RelativePath="..\..\src\autoTarget.cpp"> + </File> + <File RelativePath="..\..\src\ClientObjects.cpp"> </File> *************** *** 374,406 **** </File> <File - RelativePath="..\..\src\gui_joingame.cpp"> - <FileConfiguration - Name="Release|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - PreprocessorDefinitions=""/> - </FileConfiguration> - <FileConfiguration - Name="Profile|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - BrowseInformation="1"/> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - BrowseInformation="1"/> - </FileConfiguration> - </File> - <File RelativePath="..\..\src\gui_mainscreen.cpp"> <FileConfiguration --- 377,380 ---- *************** *** 493,556 **** </File> <File - RelativePath="..\..\src\gui_splashscreen.cpp"> - <FileConfiguration - Name="Release|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - PreprocessorDefinitions=""/> - </FileConfiguration> - <FileConfiguration - Name="Profile|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - BrowseInformation="1"/> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - BrowseInformation="1" - WarningLevel="2"/> - </FileConfiguration> - </File> - <File - RelativePath="..\..\src\hullTech.cpp"> - <FileConfiguration - Name="Release|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - PreprocessorDefinitions=""/> - </FileConfiguration> - <FileConfiguration - Name="Profile|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - BrowseInformation="1"/> - </FileConfiguration> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3" - BrowseInformation="1" - WarningLevel="2"/> - </FileConfiguration> - </File> - <File RelativePath="..\..\src\luaIface.cpp"> <FileConfiguration --- 467,470 ---- *************** *** 613,617 **** </File> <Filter ! Name="foxgui_extensions" Filter=""> <File --- 527,531 ---- </File> <Filter ! Name="Widgets" Filter=""> <File *************** *** 1046,1053 **** </Filter> <Filter ! Name="ext" Filter=""> <File ! RelativePath="..\..\src\Tech.cpp"> <FileConfiguration Name="Release|Win32"> --- 960,996 ---- </Filter> <Filter ! Name="Windows" Filter=""> <File ! RelativePath="..\..\src\gui_joingame.cpp"> ! <FileConfiguration ! Name="Release|Win32"> ! <Tool ! Name="VCCLCompilerTool" ! Optimization="2" ! PreprocessorDefinitions=""/> ! </FileConfiguration> ! <FileConfiguration ! Name="Profile|Win32"> ! <Tool ! Name="VCCLCompilerTool" ! Optimization="0" ! PreprocessorDefinitions="" ! BasicRuntimeChecks="3" ! BrowseInformation="1"/> ! </FileConfiguration> ! <FileConfiguration ! Name="Debug|Win32"> ! <Tool ! Name="VCCLCompilerTool" ! Optimization="0" ! AdditionalIncludeDirectories="" ! PreprocessorDefinitions="" ! BasicRuntimeChecks="3" ! BrowseInformation="1"/> ! </FileConfiguration> ! </File> ! <File ! RelativePath="..\..\src\gui_splashscreen.cpp"> <FileConfiguration Name="Release|Win32"> *************** *** 1084,1091 **** Filter="h;hpp;hxx;hm;inl"> <File ! RelativePath="..\..\include\ClientObjects.h"> </File> <File ! RelativePath="..\..\include\ColorListItem.h"> </File> <File --- 1027,1034 ---- Filter="h;hpp;hxx;hm;inl"> <File ! RelativePath="..\..\include\autoTarget.h"> </File> <File ! RelativePath="..\..\include\ClientObjects.h"> </File> <File *************** *** 1108,1144 **** </File> <File - RelativePath="..\..\include\gui_gamemenu.h"> - </File> - <File - RelativePath="..\..\include\gui_gamesetup.h"> - </File> - <File - RelativePath="..\..\include\gui_Host.h"> - </File> - <File - RelativePath="..\..\include\gui_joingame.h"> - </File> - <File - RelativePath="..\..\include\gui_mainscreen.h"> - </File> - <File - RelativePath="..\..\include\gui_racewizard.h"> - </File> - <File - RelativePath="..\..\include\gui_shipdesigner.h"> - </File> - <File - RelativePath="..\..\include\gui_splashscreen.h"> - </File> - <File - RelativePath="..\..\include\hullTech.h"> - </File> - <File RelativePath="..\..\include\luaIface.h"> </File> <File - RelativePath="..\..\include\Tech.h"> - </File> - <File RelativePath="..\..\include\v_FIO.h"> </File> --- 1051,1057 ---- *************** *** 1191,1194 **** --- 1104,1142 ---- RelativePath="..\..\include\widget_toolwell.h"> </File> + <Filter + Name="Widgets" + Filter=""> + <File + RelativePath="..\..\include\ColorListItem.h"> + </File> + </Filter> + <Filter + Name="Windows" + Filter=""> + <File + RelativePath="..\..\include\gui_gamemenu.h"> + </File> + <File + RelativePath="..\..\include\gui_gamesetup.h"> + </File> + <File + RelativePath="..\..\include\gui_Host.h"> + </File> + <File + RelativePath="..\..\include\gui_joingame.h"> + </File> + <File + RelativePath="..\..\include\gui_mainscreen.h"> + </File> + <File + RelativePath="..\..\include\gui_racewizard.h"> + </File> + <File + RelativePath="..\..\include\gui_shipdesigner.h"> + </File> + <File + RelativePath="..\..\include\gui_splashscreen.h"> + </File> + </Filter> </Filter> <Filter *************** *** 1227,1230 **** --- 1175,1248 ---- </File> </Filter> + <Filter + Name="Scrap" + Filter=""> + <File + RelativePath="..\..\src\hullTech.cpp"> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="Profile|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1" + WarningLevel="2"/> + </FileConfiguration> + </File> + <File + RelativePath="..\..\include\hullTech.h"> + </File> + <File + RelativePath="..\..\src\Tech.cpp"> + <FileConfiguration + Name="Release|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + PreprocessorDefinitions=""/> + </FileConfiguration> + <FileConfiguration + Name="Profile|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1"/> + </FileConfiguration> + <FileConfiguration + Name="Debug|Win32"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="" + PreprocessorDefinitions="" + BasicRuntimeChecks="3" + BrowseInformation="1" + WarningLevel="2"/> + </FileConfiguration> + </File> + <File + RelativePath="..\..\include\Tech.h"> + </File> + </Filter> </Files> <Globals> |
|
From: Brandon B. <bdr...@us...> - 2006-05-17 06:51:13
|
Update of /cvsroot/frontierproject/frontierproject/src In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv8865/src Modified Files: gui_mainscreen.cpp Log Message: Set zoom to 3, looks much better. Index: gui_mainscreen.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/gui_mainscreen.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** gui_mainscreen.cpp 16 May 2006 22:42:17 -0000 1.13 --- gui_mainscreen.cpp 17 May 2006 06:51:08 -0000 1.14 *************** *** 307,311 **** shipdesigner->create();//Do creation for shipdesigner. playarea->create(); ! playarea->setZoom(1); //1:1 zoom playarea->update(); CLOG("MAINSCREEN: READY!\n"); --- 307,311 ---- shipdesigner->create();//Do creation for shipdesigner. playarea->create(); ! playarea->setZoom(3); //Looks good with the test data. playarea->update(); CLOG("MAINSCREEN: READY!\n"); |
|
From: Brandon B. <bdr...@us...> - 2006-05-17 06:41:12
|
Update of /cvsroot/frontierproject/frontierproject/src In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv5024/src Modified Files: widget_painter.cpp Log Message: Make font sizes more sane in painter. Make setting packet destination behave in a better manner. (by flagging the screen dirty and returning, instead of changing the selection) Index: widget_painter.cpp =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/src/widget_painter.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** widget_painter.cpp 16 May 2006 20:47:08 -0000 1.17 --- widget_painter.cpp 17 May 2006 06:41:09 -0000 1.18 *************** *** 582,589 **** //Determine which font to use, depending on zoom. //@@@Sometime, do this more scientifically. ! if(zoom<1) dc.setFont(tinyFont); ! else if(zoom < 1.5) dc.setFont(smallFont); ! else if(zoom < 2) dc.setFont(normalFont); ! else if(zoom < 2.5) dc.setFont(largeFont); else dc.setFont(largestFont); } --- 582,590 ---- //Determine which font to use, depending on zoom. //@@@Sometime, do this more scientifically. ! const double mult = 2; ! if(zoom<1*mult) dc.setFont(tinyFont); ! else if(zoom < 1.5*mult) dc.setFont(smallFont); ! else if(zoom < 2*mult) dc.setFont(normalFont); ! else if(zoom < 2.5*mult) dc.setFont(largeFont); else dc.setFont(largestFont); } *************** *** 785,788 **** --- 786,791 ---- CLOG("Painter: Setting packet dest! %s's new destination is %s!\n", p->GetName().c_str(), d->at(0)->InOrbit()->GetName().c_str()); dynamic_cast<FreeStars::Planet*>(mLastSelected->at(mpLastSelected))->SetPacketDest(d->at(0)->InOrbit()); + update(); + return 1; } } |
|
From: Brandon B. <bdr...@us...> - 2006-05-17 04:59:40
|
Update of /cvsroot/frontierproject/frontierproject/data/xml In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv30948/data/xml Modified Files: resources.xml Log Message: Modified vTemplate a lot. Now the repositioning buttons can be shown/hidden to leave more room for the titles. Index: resources.xml =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/data/xml/resources.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** resources.xml 21 Jul 2005 16:00:30 -0000 1.3 --- resources.xml 17 May 2006 04:59:35 -0000 1.4 *************** *** 44,47 **** --- 44,48 ---- <image filename="/icons/gui/Left.gif" format="GIF" name="/gui/left" transparency_mode="IMAGE_ALPHAGUESS"/> <image filename="/icons/gui/Right.gif" format="GIF" name="/gui/right" transparency_mode="IMAGE_ALPHAGUESS"/> + <image filename="/icons/gui/Star.gif" format="GIF" name="/gui/star" transparency_mode="IMAGE_ALPHAGUESS"/> <image filename="/icons/debug/16.gif" format="GIF" name="/debug/16" transparency_mode="IMAGE_OPAQUE"/> <image filename="/icons/debug/32.gif" format="GIF" name="/debug/32" transparency_mode="IMAGE_OPAQUE"/> |
|
From: Brandon B. <bdr...@us...> - 2006-05-17 04:59:39
|
Update of /cvsroot/frontierproject/frontierproject/include In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv30948/include Modified Files: vTemplate.h v_FIO.h v_Fleet.h Log Message: Modified vTemplate a lot. Now the repositioning buttons can be shown/hidden to leave more room for the titles. Index: v_FIO.h =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/include/v_FIO.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** v_FIO.h 14 May 2006 03:28:10 -0000 1.3 --- v_FIO.h 17 May 2006 04:59:35 -0000 1.4 *************** *** 1,4 **** /***************************************************************************** ! * Copyright (C) 2004-2005 Brandon Bergren * * * * This file is part of The Frontier Project. * --- 1,4 ---- /***************************************************************************** ! * Copyright (C) 2004-2005,2006 Brandon Bergren * * * * This file is part of The Frontier Project. * *************** *** 20,71 **** ****************************************************************************/ - - //2004 - - #ifndef V_FIO_H #define V_FIO_H - #include "FrontierClient.h" - class v_FIO: public vTemplate { FXDECLARE(v_FIO) - public: ! void create(); ! ! v_FIO(FXComposite* p,FXObject* target=NULL,FXSelector sel=0,FXuint opts=FRAME_SUNKEN|FRAME_THICK); ! ! ///Message map. ! enum ! { ! ID_FOO = vTemplate::ID_LAST, ! ID_LAST ! }; - //Handlers - long onFoo(FXObject*,FXSelector,void*); ! void setPlanet(FreeStars::Planet *planet); protected: ! //Disable default and copy ctors. ! v_FIO(){}; ! v_FIO(const v_FIO&){}; ! ! FXButton *btnGoto; ! FXButton *btnCargo; ! FXListBox *lstFleets; }; - #endif - --- 20,59 ---- ****************************************************************************/ #ifndef V_FIO_H #define V_FIO_H #include "FrontierClient.h" class v_FIO: public vTemplate { FXDECLARE(v_FIO) public: ! v_FIO(FXComposite* p,FXObject* target=NULL,FXSelector sel=0,FXuint opts=FRAME_SUNKEN|FRAME_THICK); ! void create(); + ///Message map. + enum + { + ID_FOO = vTemplate::ID_LAST, + ID_LAST + }; ! //Handlers ! long onFoo(FXObject*,FXSelector,void*); + void setPlanet(FreeStars::Planet *planet); protected: ! //Disable default and copy ctors. ! v_FIO(){}; ! v_FIO(const v_FIO&){}; ! FXButton *btnGoto; ! FXButton *btnCargo; + FXListBox *lstFleets; }; #endif Index: v_Fleet.h =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/include/v_Fleet.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** v_Fleet.h 15 Aug 2005 21:24:51 -0000 1.2 --- v_Fleet.h 17 May 2006 04:59:35 -0000 1.3 *************** *** 1,4 **** /***************************************************************************** ! * Copyright (C) 2004-2005 Brandon Bergren * * * * This file is part of The Frontier Project. * --- 1,4 ---- /***************************************************************************** ! * Copyright (C) 2004-2005,2006 Brandon Bergren * * * * This file is part of The Frontier Project. * *************** *** 20,70 **** ****************************************************************************/ - //2004 - - #ifndef V_FLEET_H #define V_FLEET_H - //#include "vTemplate.h" - //#include "FrontierTypes.h" - //#include "Fleet.h" - class v_Fleet: public vTemplate { FXDECLARE(v_Fleet) - public: ! void create(); ! ! v_Fleet(FXComposite* p,FXObject* target=NULL,FXSelector sel=0,FXuint opts=FRAME_SUNKEN|FRAME_THICK); ! ! ///Message map. ! enum ! { ! ID_FOO = vTemplate::ID_LAST, ! ID_LAST ! }; ! ! //Handlers ! long onFoo(FXObject*,FXSelector,void*); ! void setFleet(const FreeStars::Fleet *fleet); protected: ! //Disable default and copy ctors. ! v_Fleet(){}; ! v_Fleet(const v_Fleet&){}; ! ! FXButton *btnNext; ! FXButton *btnPrev; ! FXButton *btnRename; ! ! FXImageView *planetimage; }; --- 20,57 ---- ****************************************************************************/ #ifndef V_FLEET_H #define V_FLEET_H class v_Fleet: public vTemplate { FXDECLARE(v_Fleet) public: ! v_Fleet(FXComposite* p,FXObject* target=NULL,FXSelector sel=0,FXuint opts=FRAME_SUNKEN|FRAME_THICK); ! void create(); + //Message map. + enum + { + ID_FOO = vTemplate::ID_LAST, + ID_LAST + }; ! //Handlers ! long onFoo(FXObject*,FXSelector,void*); + void setFleet(const FreeStars::Fleet *fleet); protected: ! //Disable default and copy ctors. ! v_Fleet(){}; ! v_Fleet(const v_Fleet&){}; + FXButton *btnNext; + FXButton *btnPrev; + FXButton *btnRename; + FXImageView *pic; }; Index: vTemplate.h =================================================================== RCS file: /cvsroot/frontierproject/frontierproject/include/vTemplate.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** vTemplate.h 20 Jul 2005 02:34:37 -0000 1.1 --- vTemplate.h 17 May 2006 04:59:35 -0000 1.2 *************** *** 66,69 **** --- 66,70 ---- long onUpBtnPress(FXObject*,FXSelector,void*); long onDownBtnPress(FXObject*,FXSelector,void*); + long onStar(FXObject*,FXSelector,void*); ///Message map. *************** *** 75,78 **** --- 76,80 ---- ID_UPBUTTON, ID_DOWNBUTTON, + ID_STARBUTTON, ID_LAST }; *************** *** 86,93 **** ! FXPacker *pacTop; FXLabel *lblHeader; //FXButton *btnSizer; FXToggleButton *btnSizer; FXPacker *pacClient; --- 88,97 ---- ! FXHorizontalFrame *pacTop; FXLabel *lblHeader; //FXButton *btnSizer; FXToggleButton *btnSizer; + + FXHorizontalFrame *buttonFrame; FXPacker *pacClient; |