summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
AgeCommit message (Collapse)AuthorFilesLines
2024-01-29Apply C++11 fixitsThorbjørn Lindeijer1-19/+13
modernize-loop-convert modernize-deprecated-headers
2024-01-29Fixed another crash due to incomplete SDL2 upgradeThorbjørn Lindeijer1-1/+1
SDL_GetKeyboardState array needs to be indexed by scan codes.
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-14/+14
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2024-01-25Ported to SDL2Thorbjørn Lindeijer1-1/+1
2012-08-02Add a checkbox to the debugging window to show being ids.Stefan Beller1-1/+21
Reviewed-by: Ablu
2012-03-18Fixed issues with rendering very small mapsjurkan1-24/+38
Added a black background for maps that are smaller than the screen resolution and centered them on screen. Reviewed-by: Thorbjørn Lindeijer Mantis-issue: 193
2012-02-03Simplified and made generic the way the pickup is handled.Yohann Ferreira1-2/+7
I also made the range be taken from the server type as for the pickup and npc talk ranges. Last but no least, I fixed the parameters sent with PGMSG_PICKUP to send the (item) position where to pickup at as described in the manaserv protocol. The pickup is still not 100% functional due certainly to two problems: 1. The client item coordinates might not be the exact same as in the server. 2. The client seems to try to pick up the item a bit too soon, probably for the reason given in 1. I'll investigate this in another patch. Reviewed-by: Thorbjørn Lindeijer, Erik Schilling.
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2012-01-16Renamed some file names for consistency with the class namesThorbjørn Lindeijer1-1/+1
This was already done by ManaPlus. It's a good idea anyway and it makes comparing the code a little easier. Reviewed-by: Yohann Ferreira
2012-01-10player_node -> local_playerYohann Ferreira1-20/+20
Reviewed-by: Ablu
2011-09-16Renamed Map::DebugFlags enumeratorsThorbjørn Lindeijer1-5/+5
Their name is a bit more clear with DEBUG prefix rather than MAP prefix. They're already scoped in the Map class anyway. MAP_NORMAL was changed to DEBUG_NONE to represent no debug flags. Acked-by: Bertram
2011-08-30Made the popup-menu work again for equip/unequip processes.Yohann Ferreira1-2/+2
I disabled the drop from equipment window since it was more simple to implement, and because it seemed useless or even bad for the user experience to me.
2011-06-17First pass on removing tile hard coded values.Yohann Ferreira1-1/+2
Every files has been checked against the hard coded 32 values except the map.cpp file. I also added convenience functions in the Game class, centralized the default item icon size, and removed two unused defines in being.cpp.
2011-05-25Refining switches in the debug viewStefan Dombrowski1-63/+68
Reviewed-by: Bjorn
2011-05-20Removing KEY_PATHFIND and moving its function into the debug windowStefan Dombrowski1-7/+3
* The f-key is no longer used. That means new players are less likely to get into trouble by accidentally activating the debug mode. * The debug mode can now be activated in a new tab in the debug window. * The main advantage of using a gui is its extensibility. At the moment the debug mode does show too much information at once. In a follow-up patch the user should get more choices. Reviewed-by: Bjorn
2011-05-04Made the client show much more path debug information.Yohann Ferreira1-31/+68
First of all, the mouse path is only computed when necessary, This will save a bit of CPU when in debug view. Secondly, every being paths, collision radius, and position are graphically represented now. This will help code and content developers when checking their sprite offsets. Reviewed-by: CodyMartin.
2011-04-26Made the client use a unique kind of movement code.Yohann Ferreira1-78/+56
This is fixng many issues and (hopefully) will make the movement rendering much smoother. Merge branch 'master' of gitorious.org:~bertram/mana/mana-movement-code-merge Conflicts: src/being.cpp src/net/manaserv/beinghandler.cpp Resolves: TMW-Mantis #946. Reviewed-by: Thorbjorn.
2011-04-09Removed the Mana namespaceThorbjørn Lindeijer1-7/+7
It's just an annoyance when it's only applied to a few classes. Either we place everything in this namespace or nothing, and at the moment I don't see any rationale for placing everything in a Mana namespace. Acked-by: Jared Adams
2011-04-09Moved Channels to Mana::Event::ChannelThorbjørn Lindeijer1-5/+5
Acked-by: Jared Adams
2011-04-09Moved Events to Mana::Event::TypeThorbjørn Lindeijer1-2/+3
Acked-by: Jared Adams
2011-03-17Now the client centers the pixel positions when using tA.Yohann Ferreira1-6/+33
I made it so that the behaviour can be changed with only a boolean setting in the playerhandler.
2011-03-15Implemented a screen shake effect system in the viewport class.Philipp Sehmisch1-1/+37
The screen can either be "nudged" in a random direction with a specific intensity or you can define an exact x and y intensity, decay factor and duration. On a tmwAthena server an effect is triggered when the player character dies. A method for stopping all shake effects is also implemented, but not used yet. I added a netcode message for Manaserv to trigger an effect server-sided. Because our protocol has currently no way to transport floating point values, the decay is transported as a fixed point value with 4 decimals which is entirely sufficient for this purpose.
2011-03-15Basically merged the two movement algorithms into one.Yohann Ferreira1-84/+35
This was made in favour of the manaserv way of doing things. I also added a way to keep the original server speed value so the pixel value can be recomputed at each map change, as this was necessary since the speed is given before the first map is loaded. The code is much more simpler now about movement handling, and we can already see improvements on other characters movements in The Mana World with this. Everything can't be perfect the first time; here are bugs identified so far: - Monsters direction isn't updated on TmwAthena for obscure reasons. - Remote players walking animation is sometimes reset on each steps. - When changing map, the local player sometimes walks randomly until the player reacts. Stay tuned!
2010-11-13Replace config listeners with the event systemChuck Miller1-9/+11
Reviewed-by: Jared Adams
2010-11-11Replace Event names with enums instead of stringsChuck Miller1-1/+1
2010-11-11Have the event system channels use enums instead of stringsChuck Miller1-3/+3
Reviewed-by: Freeyorp
2010-11-07Convert the emote system to use particlesChuck Miller1-1/+0
Reviewed-by: Jared Adams
2010-11-01Merge branch '0.5' of gitorious.org:mana/manaYohann Ferreira1-4/+14
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-08Remove the following systemStefan Dombrowski1-1/+0
Removed due to unresolved social issues. In master it had been already removed by Kage in commit 89f192b9039f9c000515f0a12f4bb9fb55c4691c.
2010-10-06Fixing movement with the mouseStefan Dombrowski1-4/+2
When a player clicked on a tile in order to go to it, then he went to the wrong tile. Trivial fix.
2010-10-04Remove the following systemChuck Miller1-1/+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-10-03Fixing segmentation fault and updating the cursor type after mouse pressStefan Dombrowski1-0/+13
Until now the being was only set after a mouse move. If the mouse was pressed after the being was out of sight or dead, then a segmentation fault happened. Furthermore, pressing the mouse now updates the cursor type and sets the being popup invisible. Reviewed-by: Thorbjorn
2010-08-16Move more to the event systemJared Adams1-11/+12
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-02Fix some bugsJared Adams1-2/+4
Trivial fixes.
2010-08-02Remove non-GUI references to MiniStatusWindowJared Adams1-3/+7
Reviewed-by: Freeyorp
2010-08-01Remove isActive methods from buy/sell windowsJared Adams1-1/+2
Uses a state variable in PlayerInfo instead. Moves isTalking from Being to PlayerInfo. Also some small cleanups. Reviewed-by: Chuck Miller
2010-07-28Centralized configuration default values using the VariableData system.Yohann Ferreira1-6/+6
Please note that I didn't turned all the getValue() call into new ones, simply because I have to have config object initiated which is not forcefully the case the branding file. Resolves: Manasource Mantis #170.
2010-07-22Add two debug map modes and improve slightly map drawing.Andrei Karas1-1/+1
Reviewed-by: Bertram
2010-06-10Merge BeingManager and FloorItemManager as ActorSpriteManagerJared Adams1-13/+19
No need for two different classes to manage ActorSprites. Reviewed-by: Chuck Miller
2010-06-09Fix dead Beings not being removed using tmwAthenaJared Adams1-2/+2
Rename mWalkTime to mActionTime in Being and have Being manage death. Reviewed-by: 4144
2010-05-17Remove Monster, Player, and NPC classesJared Adams1-32/+12
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-04-17Changed eAthena protocol name to TmwAthena and changed the config files ↵Bertram1-2/+2
accordingly. This makes room for the actual eAthena protocol future inclusion.
2010-04-12Added the player collision rectangle and tweaked colorsBertram1-2/+9
2010-04-12Added a more trusty path debug view for ManaServ.Bertram1-14/+56
2010-03-27Fix crash with showing BeingPopupJared Adams1-1/+1
Reviewed-by: Freeyorp
2010-03-26Replace most dynamic_casts with static_castsJared Adams1-2/+3
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-20Initialize missed variables in vieportAndrei Karas1-1/+3
2010-03-12Fix some issues with Being deletionJared Adams1-0/+6
Clear the Viewport's hover being when it gets removed and make sure LocalPlayer's target pointer get's cleared. Reviewed-by: Freeyorp
2010-03-02Forgot a method callJared Adams1-4/+0
2010-03-02Remove some unused membersJared Adams1-15/+5
Reviewed-by: Chuck Miller