I got the minimap resized to 128x128 relatively smoothly, and I changed a
couple of things in the way the panel buttons were repositioned to make it
easier.
The one thing I didn't get done was removing the anti-aliasing code, since I
still have no clue where that is.
I attached the diff for all to see, feel free to test it out! :)
diff -r a33a1bc041bb SConstruct
--- a/SConstruct Tue Oct 21 19:14:00 2008 +1300
+++ b/SConstruct Sat Oct 25 15:30:10 2008 -0400
@@ -197,8 +197,9 @@ def configure(env):
print "NOTE: Disabling PortAudio in this build (you will be unable to use Voice Chat ingame)."
print "--------"
else:
- configfile.add("HAVE_PORTAUDIO ", "Defined when Port Audio support is present and compiled")
- env.Append(LIBS=['portaudio'])
+ pass
+ #configfile.add("HAVE_PORTAUDIO ", "Defined when Port Audio support is present and compiled")
+ #env.Append(LIBS=['portaudio'])
if missing:
for t in missing:
diff -r a33a1bc041bb src/GameGUI.cpp
--- a/src/GameGUI.cpp Tue Oct 21 19:14:00 2008 +1300
+++ b/src/GameGUI.cpp Sat Oct 25 15:30:10 2008 -0400
@@ -62,7 +62,7 @@
#define TYPING_INPUT_BASE_INC 7
#define TYPING_INPUT_MAX_POS 46
-#define YPOS_BASE_DEFAULT 160
+#define YPOS_BASE_DEFAULT 190
#define YPOS_BASE_BUILDING YPOS_BASE_DEFAULT
#define YPOS_BASE_FLAG YPOS_BASE_DEFAULT
#define YPOS_BASE_STAT YPOS_BASE_DEFAULT
@@ -134,7 +134,17 @@ void InGameTextInput::onAction(Widget *s
GameGUI::GameGUI()
: keyboardManager(GameGUIShortcuts), game(this), toolManager(game, brush, defaultAssign, ghostManager),
- minimap(globalContainer->runNoX, (globalContainer->runNoX ? 0 : globalContainer->gfx->getW()-RIGHT_MENU_WIDTH), 0, RIGHT_MENU_WIDTH, 128, (RIGHT_MENU_WIDTH-100)/2, 14, Minimap::HideFOW),
+ minimap(globalContainer->runNoX,
+ (globalContainer->runNoX ?
+ 0 :
+ globalContainer->gfx->getW()-RIGHT_MENU_WIDTH-10), //x position
+ 0, //y position
+ RIGHT_MENU_WIDTH+28, // width
+ 156, //height
+ (RIGHT_MENU_WIDTH-100)/2, //left border
+ 14, // top border
+ Minimap::HideFOW), // minimap mode
+
ghostManager(game)
{
}
@@ -1956,7 +1966,8 @@ void GameGUI::handleMenuClick(int mx, in
moveParticles(oldViewportX, viewportX, oldViewportY, viewportY);
}
}
- else if (my<128+32)
+ // Check if one of the panel buttons has been clicked
+ else if (my<YPOS_BASE_DEFAULT)
{
int dec = (RIGHT_MENU_WIDTH-128)/2;
int dm=(mx-dec)/32;
@@ -2511,7 +2522,7 @@ void GameGUI::drawChoice(int pos, std::v
int x, y;
x=((i % numberPerLine)*width)+globalContainer->gfx->getW()-RIGHT_MENU_WIDTH;
- y=((i / numberPerLine)*46)+128+32;
+ y=((i / numberPerLine)*46)+YPOS_BASE_BUILDING;
globalContainer->gfx->setClipRect(x, y, 64, 46);
Sprite *buildingSprite;
@@ -2542,7 +2553,7 @@ void GameGUI::drawChoice(int pos, std::v
globalContainer->gfx->setClipRect(globalContainer->gfx->getW()-RIGHT_MENU_WIDTH, 128, RIGHT_MENU_WIDTH, globalContainer->gfx->getH()-128);
- // draw selection if needed
+ // draw building selection if needed
if (selectionMode == TOOL_SELECTION)
{
int sw;
@@ -2551,10 +2562,10 @@ void GameGUI::drawChoice(int pos, std::v
else
sw = globalContainer->gamegui->getW(23);
-
+
assert(sel>=0);
int x=((sel % numberPerLine)*width)+globalContainer->gfx->getW()-RIGHT_MENU_WIDTH;
- int y=((sel / numberPerLine)*46)+128+32;
+ int y=((sel / numberPerLine)*46)+YPOS_BASE_BUILDING;
int decX = (width - sw) / 2;
@@ -3509,8 +3520,8 @@ void GameGUI::drawPanel(void)
arrowPositions.push_back(HilightArrowPosition(globalContainer->gfx->getW()-RIGHT_MENU_WIDTH-36, globalContainer->gfx->getH()/2, 38));
}
- // draw the buttons in the panel
- drawPanelButtons(128);
+ // draw the panel selection buttons
+ drawPanelButtons(YPOS_BASE_DEFAULT-32);
if (selectionMode==BUILDING_SELECTION)
{
_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel