summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
AgeCommit message (Collapse)AuthorFilesLines
2009-10-24REplace instances of TMW with ManaJared Adams1-3/+3
2009-10-16Made the keyboard walking pixel exact again.Bertram1-0/+1
What's left is working on player corner handling and directions while walking.
2009-09-21Fix an unused variableJared Adams1-2/+2
2009-09-22Mostly fixed the mouse movement in TMWserv client.Bertram1-8/+2
The only case left in mouse movement is that the client doesn't check for walkability of the destination point when you click on a unwalkable point. Let me explain this NASTY bug: The bug remained in the Being::SetDestination() function, when recalculating the path from tiles to pixels. The changeX and changeY variables went crazy when (endX - startX) gave a negative value. That why the given path became random, and the player went anywhere. This didn't happened to monsters, NPCs, and when walking using the keyboard because the patnodes system isn't used for movement up to 1 tile at a time. I removed some dead code (in viewpoint.cpp), made the keyboard navigation a little bit more bearable, and fixed this client bug. Now, I'll be up to finish fixing the movement system using mouse (What's remaining is a joke next to what I had to do to discover this...), and I'll look at a third time to the keyboard system which is a bit raw, just for now... Regards, P.S.: Kage, I'd like to get a three-cheese pizza!
2009-07-27Makes mX and mY in the being class privateChuck Miller1-10/+0
2009-05-29Some movement fixes for TMWServ build.Chuck Miller1-2/+0
Looked pretty good so I removed annoying debug information. Also should note that movement between two players is still off.
2009-05-25Merge branch '0.0.29'Bjørn Lindeijer1-22/+29
2009-05-25Handle map not found gracefullyBjørn Lindeijer1-22/+29
Instead of shutting down, the client will now draw a gray background. This allows the player to still contact a GM in order to be helped out of the situation. It also helps me warp out of the non-existing map I accidentally warped myself onto. ;)
2009-05-19Fixed targeting and warn on attack-range not being found in itemdb.David Athay1-10/+2
Tried to make the client continue attacking (it does not need to send attack packets, but just continue playing attack animation and sounds). Now logs a warning when a weapon is found without an attack-range (I keep finding weapons with an attack-range of 0 which makes it hard to target monsters).
2009-05-18Added target combatDavid Athay1-6/+2
2009-05-17Enable and fix path drawing for athena.Dennis Friis1-3/+3
Notice that in Being::Logic() we call Being::setPosition() with the added offset of x+16, y+32, this makes both the Vector Being::mPos and Being::mPx / Being::mPy not mean the same as pre-merge client. Thus some effects and code dividing these members with 32 to get the tile coords get wrong results. Perhaps this all these methods of getting x,y on beings should be cleaned up so we have 1 method we settle on and store the sprites' fixed x,y offset on the sprite itself. so we have x + fixed_offset + animation_offset and not all these magic numbers floating around. (cherry picked from commit fc6b38d113e7f78af1075a37e1853e00294742e9)
2009-05-17Enable and fix path drawing for athena.Dennis Friis1-3/+3
Notice that in Being::Logic() we call Being::setPosition() with the added offset of x+16, y+32, this makes both the Vector Being::mPos and Being::mPx / Being::mPy not mean the same as pre-merge client. Thus some effects and code dividing these members with 32 to get the tile coords get wrong results. Perhaps this all these methods of getting x,y on beings should be cleaned up so we have 1 method we settle on and store the sprites' fixed x,y offset on the sprite itself. so we have x + fixed_offset + animation_offset and not all these magic numbers floating around.
2009-05-05Fix the context menu for the storage windowJared Adams1-2/+2
2009-05-01Changed the way beings are handled when clicked on with a TMWServ buildChuck Miller1-8/+16
(mainly talking to NPCs, and attacking Monsters / Players. Though combat is still broken.)
2009-04-15Some PopupMenu cleanups/fixes and additions.Tametomo1-2/+7
Signed-off-by: Tametomo <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
2009-04-09Made BeingManager methods const where appropriateBjørn Lindeijer1-2/+3
2009-04-09QOAL's do not walk with the mouse while sittingMadCamel1-0/+4
2009-03-27Fixed some positioning issuesBjørn Lindeijer1-1/+1
Started with not being able to click NPCs properly, and I ended up correcting the draw positions of overhead text, targets and sprite ordering. It's now a bit more straight-forward. The position of a being is simply in the middle of the sprite at the bottom. When drawing the sprite, an offset remains because all the sprites are compensating for getting drawn half a tile to the left and one tile up.
2009-03-25Merge branch 'eathena/master'Bjørn Lindeijer1-30/+29
Conflicts: A lot of files.
2009-03-22Merged the tmwserv client with the eAthena clientBjørn Lindeijer1-34/+124
This merge involved major changes on both sides, and as such took several weeks. Lots of things are expected to be broken now, however, we now have a single code base to improve and extend, which can be compiled to support either eAthena or tmwserv. In the coming months, the plan is to work towards a client that supports both eAthena and tmwserv, without needing to be recompiled. Conflicts: Everywhere!
2009-03-06Merge branch 'aethyra/master'Bjørn Lindeijer1-21/+14
Conflicts: src/being.cpp src/being.h src/floor_item.cpp src/floor_item.h src/flooritemmanager.cpp src/gui/inventorywindow.cpp src/gui/inventorywindow.h src/gui/itemcontainer.cpp src/gui/popupmenu.cpp src/net/beinghandler.cpp src/npc.cpp
2009-03-05Made some optimizations based on some profiling done by Octalot, as wellIra Rice1-21/+14
as some other optimizations that I could see that cut down on some unneeded redraws, which in turn improved frame rates slightly. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-26Merge branch 'aethyra/master'Bjørn Lindeijer1-10/+19
Conflicts: data/graphics/images/login_wallpaper.png src/being.cpp src/beingmanager.cpp src/engine.cpp src/game.cpp src/gui/buysell.cpp src/gui/buysell.h src/gui/gui.h src/gui/npc_text.cpp src/gui/npc_text.h src/gui/npcintegerdialog.cpp src/gui/npclistdialog.cpp src/gui/npclistdialog.h src/gui/npcstringdialog.cpp src/gui/sell.cpp src/gui/shop.cpp src/gui/table.cpp src/net/beinghandler.cpp src/net/npchandler.cpp src/net/playerhandler.cpp src/npc.cpp src/npc.h src/shopitem.cpp src/shopitem.h src/utils/stringutils.cpp src/utils/stringutils.h src/utils/trim.h
2009-02-24Cleaned up some code, as well as removed redundant talk client requestingIra Rice1-10/+19
(which would happen from using the keyboard instead of the mouse). Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-20Restore old middle click behaviorJared Adams1-1/+2
2009-02-18Introduced a toLower method and grouped string utilsBjørn Lindeijer1-1/+1
The string utility methods are now grouped together in the stringutils.h header. Also, a toLower method was added for convenience.
2009-02-18Introduced a toLower method and grouped string utilsBjørn Lindeijer1-1/+1
The string utility methods are now grouped together in the stringutils.h header. Also, a toLower method was added for convenience.
2009-02-15Removed unnecessary parenthesis at constructorsBjørn Lindeijer1-1/+1
When not passing any parameters to constructors, there is no reason for using parenthesis.
2009-02-10Fixed header files, as well as removed the unused buddy list class (notIra Rice1-2/+3
useful since buddy lists are tracked through the player relation interface instead) Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-09Mostly whitespace fixesBjørn Lindeijer1-4/+5
Removed tab characters and trailing spaces and added spaces between "if(", "for(", "while(" and "switch(".
2009-02-09Merged with Aethyra master as of 2009-02-09Bjørn Lindeijer1-7/+1
Conflicts: A lot of files...
2009-02-09Mostly whitespace fixesBjørn Lindeijer1-4/+5
Removed tab characters and trailing spaces and added spaces between "if(", "for(", "while(" and "switch(".
2009-02-09Merged with Aethyra master as of 2009-01-27Bjørn Lindeijer1-170/+65
Conflicts: Almost everywhere.
2009-02-08Mostly fixed a few field values to behave better in Windows, as well asIra Rice1-1/+1
removed the need for sending graphics to the setSpeech function (since it isn't needed) and started actually using the time variable which it's passed (could be set to show the speech longer if the dialog is longer, for example). Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-07Some more include cleanups.Ira Rice1-1/+0
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-04Went through the gui folder and revised the include statements to notIra Rice1-5/+0
include anything not needed by that specific widget or window. This appears to have cleaned up system performance a bit on my current setup, where it went from idling on 45% in game with opengl down to 30% now. Also moved iptostring to the tostring header, as importing all of network.h is a little overkill to use that function, and it goes along with the basic functions that are in that header file anyways. TODO: find out a way to get rid of warnings when a class doesn't use this function. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-23Removed unnecessary references to The Mana World in code headersBjørn Lindeijer1-4/+4
This dates back to the old days of TMW, but the usage instructions of GPLv2 don't mention this being necessary. Since it doesn't add anything, avoid the branding in these sections.
2009-01-23Removed unnecessary references to The Mana World in code headersBjørn Lindeijer1-4/+4
This dates back to the old days of TMW, but the usage instructions of GPLv2 don't mention this being necessary. Since it doesn't add anything, avoid the branding in these sections.
2009-01-15Style cleanups throughout most of the code. Splitting function type fromIra Rice1-2/+0
the function names should no longer be around. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-09More code style cleanupsIra Rice1-4/+2
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-09Added the ability to see your own name in game.Ira Rice1-0/+11
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-06Added support for unicode charset in textfields and chat.Guillaume Melquiond1-2/+0
Conflicts: src/Makefile.am src/game.cpp src/gui/browserbox.cpp src/gui/gui.cpp src/gui/textfield.cpp src/main.cpp (cherry picked from mainline commit 7b67e852086ad3ccd98a622f890b245ab6a0a321)
2009-01-06Added support for unicode charset in textfields and chat.Guillaume Melquiond1-2/+0
Conflicts: src/Makefile.am src/game.cpp src/gui/browserbox.cpp src/gui/gui.cpp src/gui/textfield.cpp src/main.cpp (cherry picked from mainline commit 7b67e852086ad3ccd98a622f890b245ab6a0a321)
2009-01-06Fixed the windows cbp file, deleted some files which we don't use, andIra Rice1-1/+1
fixed a few compiler warnings noticed from building in windows. Signed-off-by: Ira Rice <irarice@gmail.com>
2008-12-14Tweaked some configuration defaultsBjørn Lindeijer1-2/+2
Scrolling is now a bit less lazy and the scroll radius is 0. In my opinion this is a better default. Framerate limiter is now off by default, since it makes the game appear a bit choppy. It's basically only useful for laptops anyway, and not too hard to find. (cherry picked from eAthena branch, commit c56bc78b5f5676784265dff8ed5334884e8dcc39) Conflicts: src/main.cpp
2008-12-08Fixed speech bubbles, which broke on the last merger.Ira Rice1-0/+1
Signed-off-by: Ira Rice <irarice@gmail.com>
2008-12-07Tweaked some configuration defaultsBjørn Lindeijer1-2/+2
Scrolling is now a bit less lazy and the scroll radius is 0. In my opinion this is a better default. Framerate limiter is now off by default, since it makes the game appear a bit choppy. It's basically only useful for laptops anyway, and not too hard to find.
2008-12-07Merge commit 'a7c21e6f8add37af7412449742ec55c8daa8571a'Ira Rice1-4/+5
Conflicts: AUTHORS CMakeLists.txt ChangeLog INSTALL README aethyra.cbp configure.ac data/help/changes.txt data/help/commands.txt data/help/header.txt data/help/support.txt src/Makefile.am src/aethyra.rc src/being.cpp src/being.h src/equipment.cpp src/equipment.h src/floor_item.h src/game.cpp src/gui/buddywindow.cpp src/gui/char_select.cpp src/gui/char_server.cpp src/gui/chat.cpp src/gui/chat.h src/gui/equipmentwindow.cpp src/gui/equipmentwindow.h src/gui/gui.cpp src/gui/inventorywindow.cpp src/gui/inventorywindow.h src/gui/itemcontainer.cpp src/gui/itemcontainer.h src/gui/minimap.cpp src/gui/ministatus.cpp src/gui/newskill.cpp src/gui/npc_text.cpp src/gui/npclistdialog.h src/gui/ok_dialog.cpp src/gui/setup_video.cpp src/gui/skill.cpp src/gui/skill.h src/gui/status.h src/gui/table_model.h src/gui/updatewindow.cpp src/gui/viewport.cpp src/inventory.cpp src/inventory.h src/keyboardconfig.cpp src/keyboardconfig.h src/localplayer.cpp src/localplayer.h src/logindata.h src/main.cpp src/map.cpp src/monster.cpp src/monster.h src/net/beinghandler.cpp src/net/beinghandler.h src/net/buysellhandler.cpp src/net/equipmenthandler.cpp src/net/loginhandler.cpp src/net/loginhandler.h src/net/network.h src/net/npchandler.cpp src/net/playerhandler.cpp src/net/protocol.h src/net/tradehandler.cpp src/npc.cpp src/npc.h src/particleemitter.cpp src/particleemitterprop.h src/player.cpp src/player.h src/player_relations.cpp src/resources/imageset.cpp src/resources/imageset.h src/resources/itemdb.cpp src/resources/mapreader.cpp src/resources/monsterinfo.h src/text.cpp src/text.h src/textmanager.cpp src/textmanager.h src/tileset.h src/utils/fastsqrt.h src/utils/strprintf.cpp src/winver.h tools/tmxcopy/Makefile tools/tmxcopy/base64.cpp tools/tmxcopy/base64.h tools/tmxcopy/tostring.h Signed-off-by: Ira Rice <irarice@gmail.com>
2008-12-07Some code reformattingBjørn Lindeijer1-1/+1
2008-12-07Tweaked some configuration defaultsBjørn Lindeijer1-2/+2
Scrolling is now a bit less lazy and the scroll radius is 0. In my opinion this is a better default. Framerate limiter is now off by default, since it makes the game appear a bit choppy. It's basically only useful for laptops anyway, and not too hard to find.