summaryrefslogtreecommitdiff
path: root/src/game.cpp
AgeCommit message (Collapse)AuthorFilesLines
2010-11-11Replace Event names with enums instead of stringsChuck Miller1-11/+11
2010-11-11Have the event system channels use enums instead of stringsChuck Miller1-11/+11
Reviewed-by: Freeyorp
2010-11-01Merge branch '0.5' of gitorious.org:mana/manaYohann Ferreira1-9/+21
Conflicts: src/being.cpp src/client.cpp src/commandhandler.cpp src/gui/setup_video.cpp src/gui/socialwindow.cpp src/gui/viewport.cpp src/gui/widgets/browserbox.cpp src/gui/widgets/itemcontainer.cpp src/imageparticle.cpp src/localplayer.cpp src/localplayer.h src/map.cpp src/net/tmwa/beinghandler.cpp src/particle.cpp src/particle.h src/player.cpp src/player.h
2010-10-31Using tile coordinates for pick-upStefan Dombrowski1-7/+2
Since the tile coordinates are already avaible the calculation is not needed. Furthermore this avoids the correction of the tile, which was needed because the pixel coordinates are meant as coordinates for drawing the being. This resolves http://bugs.manasource.org/view.php?id=249 Reviewed-by: Thorbjorn
2010-10-14Disable showing of IP addresses while taking a screenshotMadCamel1-0/+15
This could potentially leak confidential information. Reviewed-by: cody
2010-10-08Remove the following systemStefan Dombrowski1-4/+0
Removed due to unresolved social issues. In master it had been already removed by Kage in commit 89f192b9039f9c000515f0a12f4bb9fb55c4691c.
2010-10-04Remove the following systemChuck Miller1-4/+0
The implamentation is poor, and this is something that would be better handled by the addon engine later down the road. Reviewed-By: Freeyorp < Freeyorp101@hotmail.com >
2010-09-25Merge branch '1.0'Thorbjørn Lindeijer1-8/+13
Conflicts: src/actorspritemanager.h src/beingmanager.cpp src/game.cpp src/gui/beingpopup.cpp src/gui/chat.cpp src/gui/chat.h src/gui/inventorywindow.h src/gui/itempopup.cpp src/gui/socialwindow.cpp src/gui/statuswindow.cpp src/gui/widgets/chattab.cpp src/gui/widgets/chattab.h src/net/tmwa/inventoryhandler.cpp src/net/tmwa/partyhandler.cpp src/party.cpp src/sound.cpp src/utils/stringutils.cpp src/utils/stringutils.h
2010-09-13Avoid loading non-existing music and minimapsStefan Dombrowski1-1/+6
Reviewed-by: Thorbjorn
2010-09-07Fixing reconnection after lost connectionStefan Dombrowski1-4/+4
An orderly disconnect of the map-server does work fine. Then in Game::logic() an OkDialog is created, which triggers an event that set the state to STATE_CHOOSE_SERVER. Upon an unexpected disconnect the same OkDialog is created, but the player does not see it. That is because the state gets changed to STATE_ERROR, which creates another OkDialog. It changes the state to STATE_CHOOSE_SERVER as well, but the ServerDialog does not take any input. Reviewed-by: Jaxad0127
2010-08-29Changing order in which windows are createdStefan Dombrowski1-2/+2
The mini status window is higher than its visible area. Creating it first makes sure that it does not overlap other windows. For example put the equipment window right below the mini status window. After a restart you cannot use the close button nor drag it, because you are actually clicking on the mini status window. Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2010-08-21Fixing segmentation fault and improving gui for partyStefan Dombrowski1-1/+1
* Segmentation fault happened if a player left a party while other party members are offline. * While creating a party the key input is not anymore reused for game play. * The vertical scrollbar is only shown when needed. * The default height was raised, because before much of the functionality was hidden. Signed-off-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
2010-08-16Move more to the event systemJared Adams1-0/+4
Most of Net::InventoryHandler is now done through events. The ActorSpriteManager was also replaced by events. A few odds and ends were taken care of too. Reviewed-by: Bertram
2010-08-15Remove the logToChat optionChuck Miller1-6/+0
This is a very old legacy option. Today its not very useful because the logger had become quite verbose that using it during run-time is not helpful. Reviewed-By: Jared Adams Reviewed-By: Freeyorp
2010-08-12Simplify working with the event systemJared Adams1-10/+10
EventManager has been merged into Event, with some new convinience methods added. Reviewed-by: Chuck Miller
2010-08-10Remove NpcDialog references from netcodeJared Adams1-0/+2
Reviewed-by: Chuck Miller
2010-08-01Remove isActive methods from NPC dialogs and InventoryWindowJared Adams1-1/+1
Uses counts in PlayerInfo instead. Reviewed-by: Chuck Miller
2010-08-01Remove isActive methods from buy/sell windowsJared Adams1-1/+1
Uses a state variable in PlayerInfo instead. Moves isTalking from Being to PlayerInfo. Also some small cleanups. Reviewed-by: Chuck Miller
2010-08-01Reduce localChatTab presence replacing it with the event systemChuck Miller1-8/+4
Reviewed-By: Jared Adams
2010-07-19Merge branch '1.0'Yohann Ferreira1-1/+2
Conflicts: src/gui/itempopup.cpp src/item.cpp src/monster.cpp src/net/manaserv/playerhandler.cpp src/net/tmwa/partyhandler.cpp src/npc.cpp src/player.cpp src/resources/itemdb.cpp src/resources/monsterdb.cpp src/resources/monsterinfo.cpp src/resources/npcdb.cpp src/resources/spritedef.cpp
2010-07-18Add event.h to eventmanager.h and listener.h to reduce total number of includesChuck Miller1-1/+0
You'll have to include it anyways 99% of the time
2010-07-18Replace some state-related netcode methods with eventsJared Adams1-9/+16
Also move the virtual destructors of the Net handler base classes to the top of their method lists. Reviewed-by: Chuck Miller
2010-07-18Move more from LocalPlayer to PlayerInfoJared Adams1-2/+10
Also cleanup PlayerInfo a bit. Reviewed-by: Chuck Miller
2010-07-11Made the different hard-coded paths and files be now taken from theYohann Ferreira1-1/+2
data/paths.xml configuration file. Also added default gui theme path in branding and default wallpaper path and file searched respectively in the branding and paths.xml files. Hard-coded values are still used as fallbacks. Resolves: Manasource Mantis #148. Reviewed-by: jaxad0127.
2010-06-10Merge BeingManager and FloorItemManager as ActorSpriteManagerJared Adams1-22/+16
No need for two different classes to manage ActorSprites. Reviewed-by: Chuck Miller
2010-05-17Remove Monster, Player, and NPC classesJared Adams1-11/+10
Instead of having these three subclasses with minor differences, this commit merges them back into Being. In the future, we can make Beings that are talkable to some, attackable by others, etc. This also puts back support for monster equipment. Also changes remaining references to Being::Type and the constants to refer to ActorSprite::Type. Reviewed-by: Freeyorp
2010-05-09Move target cursor management into ActorSpriteJared Adams1-0/+2
This simplifies handling of target cursors, centralizing their logic into a single class, instead of two. Also make them more flexible and move the image files outside of the theme so servers can can control them and give them better names. Reviewed-by: Thorbjørn Lindeijer
2010-05-06Add support for floor item spritesJared Adams1-0/+1
This commit adds a sprite hierarchy (Sprite->ImageSprite,AnimatedSprite,CompundSprite; CompoundSprite,Actor->ActorSprite;ActorSprite->Being,FloorItem) to collect common functionailty into new base classes which will make other Mantis tickets easier to do. Also allows monsters to use particle effects. Reviewed-by: Bertram
2010-04-19Add afk mode for player.Andrei Karas1-0/+2
Add variable cur_time for current time. Add command /away [text] Reviewed by: Bertram
2010-04-12Add support for map-server switching under eAthenaJared Adams1-17/+12
Also do some cleanup that's been needed for a while. Reviewed-by: Bertram
2010-03-26Replace most dynamic_casts with static_castsJared Adams1-1/+1
The remaining instances can't easily or safely be changed as the classes involved don't have type information like Being does. Reviewed-by: Freeyorp
2010-03-25Remove the type boolean from InventoryWindowJared Adams1-1/+1
This moves inventory/storage type into the Inventory class, having size default to a call to the netcode to get the sive for the given type. Reviewed-by: Chuck Miller
2010-03-25Merge StorageWindow into InventoryWindowJared Adams1-2/+1
Reviewed-by: Chuck Miller
2010-03-02Fix crash after viewport has been deletedJared Adams1-14/+9
2010-03-02Revert "Merge WindowContainer into Viewport and remove extra members"Jared Adams1-1/+12
This reverts commit 67e678094b9fddd21fb3c690130e772937ab2746. Conflicts: src/gui/gui.cpp src/gui/viewport.cpp
2010-03-01Merge WindowContainer into Viewport and remove extra membersJared Adams1-12/+1
Reviewed-by: Chuck Miller
2010-02-28Fix item pickupJared Adams1-2/+6
Reviewed-by: Freeyorp
2010-03-01Check and create screenshot directory only when a screenshot is madeBernd Wachter1-1/+11
2010-02-27Use appShort in screenshot nameJared Adams1-1/+2
Reviewed-by: http://pastebin.ca/1815165
2010-02-27No point in calling Viewport::setMap(0) before deleting itThorbjørn Lindeijer1-3/+0
Reviewed-by: Jared Adams
2010-02-26Fix calling setMap on deleted viewportAndrei Karas1-1/+1
Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2010-02-24Fix talk request flood.Andrei Karas1-1/+2
Fix talk request flood from keyboard. Fix duplicate lines in NPC dialogs. Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2010-02-24Move StorageWindow to instancing intead of globalJared Adams1-3/+0
Also make storage under eAthena more flexible. Reviewed-by: Dennis Friis
2010-02-23Fixed compile on WindowsThorbjørn Lindeijer1-2/+0
Reviewed-by: Bernd Wachter
2010-02-21Made tick counter and framerate limiter work during login sequenceThorbjørn Lindeijer1-141/+22
Much code was moved from main() to the new Client::exec(). This new event loop now integrates with the Game class, so that the tick counter and framerate limiter apply universally. The Client class is also responsible for some things that used to be global variables. Mantis-issue: ...
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
2010-02-14Fixed windows appearing below the viewport when opened before getting inTametomo1-0/+1
game. Signed-off-by: Tametomo <irarice@gmail.com>
2010-02-14Don't create the viewport until it's really needed.Tametomo1-0/+10
Signed-off-by: Tametomo <irarice@gmail.com>
2010-02-13Make NPC dialogs instance instead of globalJared Adams1-46/+17
This change allows players to talk to multiple NPCs at a time (if the server agrees). Manaserv's netcode allows multiple commerce instances too. eAthena's is limited to one commerce instance, due to protocol limitations.