bluap Report post Posted May 17, 2008 Submited a patch, which allows to easily resize the mapI've applied the patch, thanks kibora, it looks much better smaller IMHO. The bar looks silly there by itself with nothing on it anyway. Also is it just me or does it look too big?How about if the title bar and other controls-to-be automatically hide themselves until the mouse is over the minimap window? I did a quick change and it works fine that way. Alternatively, positioning the window could be done by ctrl+leftclick & drag. Just some thoughts. Share this post Link to post Share on other sites
Roja Report post Posted May 17, 2008 Autohide sounds good bluap, thanks Edit: another thing that can be done? Would be to make it so if you click/drag on the border graphic it will drag the map? And to hover your mouse over the map and zoomin/out that way? I noticed the game doesn't zoomin/out when your mouse is over the minimap, so if you need zoom maybe that can be done. Then there wouldn't be a need for a bar or extra buttons unless there's something else that's necessary. Another thing, if there's no map, can it be filled in with black? Share this post Link to post Share on other sites
bluap Report post Posted May 17, 2008 Autohide sounds good bluap, thanks I committed the simple title bar hiding change so you can see it in action; it can easily be removed. I agree the other ideas you mention sound better than title bars and zoom buttons. If we need any further controls for options, we can use the context menus; right-click anywhere on the map for the menu etc. kibora, I presume you going to be working on this feature some more now? Taking a back seat and helping you when needed is my preferred options here Share this post Link to post Share on other sites
kibora Report post Posted May 18, 2008 http://developer.berlios.de/patch/index.ph...p;group_id=1256 Adds black background when there is no map and zooms in/out with the mouse wheel Share this post Link to post Share on other sites
bluap Report post Posted May 18, 2008 http://developer.berlios.de/patch/index.ph...p;group_id=1256Adds black background when there is no map and zooms in/out with the mouse wheel Patch committed to CVS. Thanks. Share this post Link to post Share on other sites
Florian Report post Posted May 18, 2008 The minimap seems to cycle through all loaded textures http://www.eternal-lands.com/forum/index.p...=si&img=611 http://www.eternal-lands.com/forum/index.p...=si&img=612 http://www.eternal-lands.com/forum/index.p...=si&img=613 Share this post Link to post Share on other sites
kibora Report post Posted May 18, 2008 (edited) Works okay here with clean CVS copy Edit: Anyway i think a glLineWidth(1.0f); should be added after glEnable(GL_TEXTURE_2D); in the display_minimap_handler function. And perhaps the glDisable(GL_TEXTURE_2D); should be moved before the drawing of the black background, not sure @Florian: Was it happening before the last update? Edited May 18, 2008 by kibora Share this post Link to post Share on other sites
kibora Report post Posted May 19, 2008 Could someone add the following things to minimap.c: elwin_mouse=CURSOR_ARROW; in the mouseover_minimap_handler function and #include "cursors.h" on top of the file Share this post Link to post Share on other sites
Florian Report post Posted May 19, 2008 @Florian: Was it happening before the last update? I didn't test it then. Now the minimap is plain white btw. I guess it's a mac framebuffer issue. Share this post Link to post Share on other sites
kibora Report post Posted May 19, 2008 (edited) I didn't test it then.Now the minimap is plain white btw. I guess it's a mac framebuffer issue. Aha, could you try adding glEnable(GL_TEXTURE_2D); before draw_into_minimap_fbo(zoom_multip, px, py); Edited May 19, 2008 by kibora Share this post Link to post Share on other sites
bluap Report post Posted May 19, 2008 Could someone add the following things to minimap.c: elwin_mouse=CURSOR_ARROW; in the mouseover_minimap_handler function and #include "cursors.h" on top of the file OK, done. Share this post Link to post Share on other sites
kibora Report post Posted May 19, 2008 Another one. Could someone add this patch. I hope it fixes florian's problem and some other things cvs diff -u -p2 -- minimap.c (in directory D:\CVS\elc\)Index: minimap.c =================================================================== RCS file: /cvsroot/elc/elc/minimap.c,v retrieving revision 1.37 diff -u -p -2 -r1.37 minimap.c --- minimap.c 19 May 2008 17:38:20 -0000 1.37 +++ minimap.c 19 May 2008 18:09:14 -0000 @@ -1109,4 +1109,5 @@ static __inline__ int draw_framebuffer() if(use_frame_buffer && minimap_fbo > 0 && minimap_fbo_texture > 0) { + glEnable(GL_TEXTURE_2D); bind_texture_id(minimap_fbo_texture); @@ -1377,4 +1378,5 @@ static __inline__ void draw_map(float zo glTranslatef(sx, sy, 0.0f); + glEnable(GL_TEXTURE_2D); //draw the minimap bind_texture_id(minimap_texture); @@ -1570,5 +1572,5 @@ int display_minimap_handler(window_info glTranslatef(0.0f, 16.0f, 0.0f); glPushMatrix(); - + glDisable(GL_TEXTURE_2D); //draw black background glColor3f(0.0f,0.0f,0.0f); @@ -1582,5 +1584,4 @@ int display_minimap_handler(window_info glEnd(); - glDisable(GL_TEXTURE_2D); glColor3f(1.0f, 0.0f, 0.0f); glLineWidth(3.0f); @@ -1591,6 +1592,5 @@ int display_minimap_handler(window_info glVertex2f(radius_shift*float_minimap_size/2 + float_minimap_size/2,-radius_shift*float_minimap_size/2 + float_minimap_size/2); glEnd(); - - glEnable(GL_TEXTURE_2D); + glLineWidth(1.0f); glPopMatrix(); draw_compass(); @@ -1620,4 +1620,5 @@ int display_minimap_handler(window_info glTranslatef(0.0f, 16.0f, 0.0f); + glDisable(GL_TEXTURE_2D); //draw black background glColor3f(0.0f,0.0f,0.0f); ***** CVS exited normally with code 1 ***** Share this post Link to post Share on other sites
Florian Report post Posted May 20, 2008 Another one. Could someone add this patch. I hope it fixes florian's problem and some other things Applied & commited. My minimap is still completely white, though. Well not completely, the background texture is missing, actors, NPCs, creatures and the "walk to" cross are there. Share this post Link to post Share on other sites
kibora Report post Posted May 20, 2008 Interesting. I tried a couple things and i see white circle when drawing a texture and GL_TEXTURE_2D is disabled. I have a couple questions for you: 1. Was the old rectangular minimap working for you? 2. Does the rotatin minimap work with framebuffer disabled? Share this post Link to post Share on other sites
Florian Report post Posted May 20, 2008 I just recompiled without MINIMAP2, the old minimap still works normally. Disabling the framebuffer makes the minimap2 rectangular, but does not draw the background image. Share this post Link to post Share on other sites
kibora Report post Posted May 20, 2008 (edited) Considering you can see the actor points, obviously the problem is not in the frame buffer so it has to be in the draw_map() function. Perhaps you have some glEnable function enabled which doens't work with GL_TEXTURE_2D and screws up the whole thing. Are you biulding a clean CVS copy or some sort of merge? Could you try editing your draw_map function to look like this: glPushMatrix();glEnable(GL_TEXTURE_2D); bind_texture_id(minimap_texture); glColor4f(1.0f,1.0f,1.0f,1.0f); glBegin(GL_QUADS); glTexCoord2f(0.0f, 0.0f); glVertex2f(-128.0f, +128.0f); glTexCoord2f(1.0f, 0.0f); glVertex2f(+128.0f, +128.0f); glTexCoord2f(1.0f, 1.0f); glVertex2f(+128.0f, -128.0f); glTexCoord2f(0.0f, 1.0f); glVertex2f(-128.0f, -128.0f); glEnd(); glPopMatrix(); and tell me if you see anything Edited May 20, 2008 by kibora Share this post Link to post Share on other sites
Florian Report post Posted May 20, 2008 Could you try editing your draw_map function to look like this: Um, where should I change that? Which lines are new, which lines get thrown out? Share this post Link to post Share on other sites
kibora Report post Posted May 20, 2008 Comment the whole body of the existing function and add this. It's what the old minimap was doing Share this post Link to post Share on other sites
Florian Report post Posted May 20, 2008 (edited) The map texture is drawn, but not rotated. (I guess that's intended) /EDIT commenting out draw_compass(); in the current CVS file repairs the minimap. No flickering of other textures, background texture there, perfect. (I don't have the compass.bmp file ...) This fixes it for me: ### Eclipse Workspace Patch 1.0 #P elc Index: minimap.c =================================================================== RCS file: /cvsroot/elc/elc/minimap.c,v retrieving revision 1.38 diff -u -r1.38 minimap.c --- minimap.c 20 May 2008 02:27:58 -0000 1.38 +++ minimap.c 20 May 2008 22:37:23 -0000 @@ -1454,9 +1454,11 @@ glPopMatrix(); - //draw the compass texture - - draw_compass(); + if (compass_tex) + { + //draw the compass texture + draw_compass(); + } } static __inline__ void draw_into_minimap_fbo(float zoom_multip, float px, float py) (that check should be there anyway) Edited May 20, 2008 by Florian Share this post Link to post Share on other sites
Roja Report post Posted May 21, 2008 Ok, another addition, can an X button be put on the border that pops up on mouse over, so you can close the map without the hotkey? Also can that big red X be removed if there is no map showing? It just looks ugly like that. I think it's fine enough to leave the circle filled with black. I found a bug: When you change resolutions, from big to small, the minimap can get stuck on the part of the screen where the bigger EL window used to be, and you can't drag it back into view. Share this post Link to post Share on other sites
kibora Report post Posted May 22, 2008 https://developer.berlios.de/patch/index.ph...p;group_id=1256 Added close button, big X removed, the bug with resolution change is fixed Share this post Link to post Share on other sites
Roja Report post Posted May 26, 2008 Can you make it so that "show minimap" comes up as an option on the right click menu of the right HUD bar? Good job with the other stuff, seems to be working fine now Share this post Link to post Share on other sites