summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-02-10Include .c files in the Qt Creator projectThorbjørn Lindeijer2-2/+11
Reviewed-by: Erik Schilling
2012-02-10Corrected two spelling mistakesjurkan2-2/+2
Reviewed-by: Erik Schilling
2012-02-09Fixed wallpaper prescaling issuesThorbjørn Lindeijer9-90/+174
Image::SDLgetScaledImage was changed so that it tries to find an existing scaled version of the image first, and generates it when none exists. When it needs to generate one, this resource is added to the resource manager, partly to avoid duplicating the work later but mainly to keep memory management straightforward. This function also used to leak the scaled SDL_Surface since it wrongly assumed that Image::load would free it. To avoid filling up the memory with scaled wallpapers that are waiting 30 seconds until they will be deleted, the Resource::decRef function was extended with a parameter that allows telling it what to do with orphans. Calling decRef with Resource::DeleteImmediately will delete the resource immediately in case the resource is orphaned. Reviewed-by: Yohann Ferreira
2012-02-09Allow changing fullscreen resolution without restartThorbjørn Lindeijer6-123/+145
Unified Graphics:setFullscreen and Graphics:resize into a single Graphics:changeVideoMode function that tries to restore the existing mode when changing to the new mode didn't work, and exists with an error when that also fails. Split up handling of SDL_VIDEORESIZE and the adapting to new resolution in the Client class, so that the second part could also be called when changing resolution fullscreen mode. The Video tab in the Setup window now also filters out any modes smaller than 640x480 since the game won't properly adapt to that resolution anyway. Reviewed-by: Yohann Ferreira
2012-02-09Setting y-offset back to 3 for status effect iconsStefan Dombrowski1-1/+1
This is broken with current TMW client-data, so it has to be fixed there.
2012-02-09Avoid a crash after selecting one's character linked to emotes.Yohann Ferreira1-3/+3
This happened when the emote shortcut config has got too high ids in it, i.e. when testing different client version on the same host. Reviewed-by: Erik Schilling
2012-02-09Show status effect icons again and position adjustStefan Dombrowski1-2/+3
The icon for #betsanc is still shown too high. Reviewed-by: Ablu, Bertram
2012-02-09Updated help to upcoming releaseErik Schilling2-1/+34
TODO: Update the date when actually releasing. Reviewed-by: Bertram.
2012-02-08Reorganized Video settings so that labels have more spaceThorbjørn Lindeijer1-21/+22
I think it also looks a bit more organized overall. Reviewed-by: Erik Schilling
2012-02-08Updated German translationErik Schilling1-22/+28
Reviewed-by: jurkan.
2012-02-08Updated translationsErik Schilling29-55446/+64029
Reviewed-by: Bertram.
2012-02-07Made BrowserBox use the recommended line skip for its fontThorbjørn Lindeijer4-48/+73
SDL_ttf provides a separate function for getting the recommended line skip, or the spacing between two lines of text. When rendering multiple lines of text this should be used rather than the visual height of the font. Since the information is only available for TrueTypeFont, a dynamic_cast was used with a fallback on gcn::Font::getHeight. Also made some small tweaks but nothing that really affects performance. Reviewed-by: Yohann Ferreira
2012-02-07Fixed debug window not saving its position and sizeErik Schilling1-2/+2
Spotted-by: cody. Reviewed-by: bjorn.
2012-02-07Fixed color updates of magic barErik Schilling3-0/+22
Resolves: Mana-Mantis #457. Reviewed-by: Bertram.
2012-02-07Added cmake status messages on compile options used.Yohann Ferreira1-0/+4
Reviewed-by: Erik Schilling
2012-02-07Fixed the server type selected when modifying a custom server.Yohann Ferreira1-2/+2
Reviewed-by: Erik Schilling
2012-02-07Hopefully fixed two issues in the go and attack playflowYohann Ferreira2-13/+34
- Fixed the player attacking when clicking on a monster, and then walking near using the keyboard. - Fixed the walking glitch seen in tile path mode by letting the character reach its nearest tile path node. Reviewed-by: Thorbjørn Lindeijer
2012-02-06Some cleanups in the initialization of wallpaper pathsThorbjørn Lindeijer3-28/+33
The 'paths' configuration in client-data now overrides any configuration in 'branding', so that it will apply after the updates for a certain server have been downloaded. Also, some isDirectory checks have been removed. When the configuration is wrong, it's probably better to see that there is a problem. Reviewed-by: Yohann Ferreira
2012-02-06Fixed searching for wallpapers on 64-bit machinesThorbjørn Lindeijer1-4/+2
The check whether a filename contains any '%' character was failing because the 'unsigned int separator' was too small to hold std::string::npos. Reviewed-by: Yohann Ferreira
2012-02-06Updated NEWS file for 0.6.0 releaseThorbjørn Lindeijer1-0/+34
Reviewed-by: Yohann Ferreira
2012-02-05Fixed spreading over tabs not spamming too muchErik Schilling1-16/+4
Now announcements will only get displayed on the current tab + on the local tab Reviewed-by: Thorbjørn Lindeijer
2012-02-05Fixed some layout issues with the chat windowThorbjørn Lindeijer2-31/+22
One pixel of the scroll bar wasn't visible since the mWidgetContainer is shifted by one pixel by gcn::TabbedArea::adjustSize, which wasn't being taken into account by our custom mWidgetContainer sizing code. Fixed that by just letting Guichan handle it. Another issue was that the tab scroll arrows were appearing before they were needed, since they took into account their own size when checking whether the tabs had enough space. Finally, a Layout has a default padding of 6 pixels but this is a little much for the chat window. I reduced it to 3 pixels now. Reviewed-by: Erik Schilling
2012-02-05Fixed crash when the map couldn't be loadedThorbjørn Lindeijer1-0/+3
Ignore LocalPlayer::setDestination calls in this case, because it relies on the tile size of the current map. Reviewed-by: Erik Schilling
2012-02-05Revert "Checking being positions send by the server"Thorbjørn Lindeijer3-36/+0
This reverts commit 92fd074aa85e2357bfe1ab642209dd5a0d87e4d5. Reverting because these checks should be done server-side and because having them in the client would currently require wrapping them up in checks if there is even a current map due to the reliance on tile size (we need to handle the case where the current map didn't load properly without crashing). Conflicts: src/map.cpp src/net/manaserv/beinghandler.cpp Reviewed-by: Erik Schilling
2012-02-04Removing password from memoryStefan Dombrowski1-1/+2
If the player switches login, then the password field in the login window should be empty. This was not the case after registering or password change. Reviewed-by: Ablu, Bertram
2012-02-03Clear tile flags from the gid before further processingThorbjørn Lindeijer5-11/+23
Better to show non-rotated/flipped tiles than no tile at all. This also fixes interpretation of collision tiles that happen to be flipped. Also interpret the gid as an unsigned number, since that's how they are written in the TMX file since the introduction of these flags. Reviewed-by: Yohann Ferreira
2012-02-03Fixed the go and attack mouse clickYohann Ferreira2-24/+51
I first removed the keep attacking and pickup targetting unset statements in the setdestination() function since it was messing with all the rest of the logic, and put those targetting logic where they belonged more. I also changed the gotoTarget function to properly call the setTarget function which permitted to properly unset the previous target in that case. I also finished the logic built around the mGoingToTarget member (until then actually unused) to make it all work again. At last, I also removed a now false comment in the startWalking() function. Reviewed-by: Erik Schilling
2012-02-03Fixed the player character's direction update when clicking on a monster.Yohann Ferreira1-0/+1
The direction is updated in those case only when the engine knows it's the mouse requesting the destination. Reviewed-by: Erik Schilling
2012-02-03Simplified and made generic the way the pickup is handled.Yohann Ferreira11-32/+68
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-02-03Changed the setup button at login stage to use the icon.Yohann Ferreira3-5/+9
I also made the button not readjust its size when deleted to avoid a crash. Reviewed-by: Erik Schilling
2012-02-02Fixed player's character direction.Yohann Ferreira2-4/+4
Made the player's character look at where it is going even when using the keyboard, by setting its direction after getting the actual destination, and not before. I also used the lookAt() function to avoid yet another custom way of setting the direction. Reviewed-by: Erik Schilling
2012-02-02Fixed diagonal walking to be much more smooth.Yohann Ferreira1-72/+65
The character used to stick to both corners of an obstacle it encountered when walking diagonally. Now it simply go back to the straight moving mode when encountering an obstacle in one of the two direction used. This also simplifies the function logic. The character direction bug left is still there, and will be dealt in a separate patch with. Reviewed-by: Erik Schilling
2012-02-02Remove duplicate direction computation by a call to lookAt()Yohann Ferreira1-19/+1
It simply does the same thing, in better. Reviewed-by: Erik Schilling
2012-02-02Fix to the hair colors and styles handling.Yohann Ferreira15-126/+269
- I made the charCreatedialog handle a possible max permitted color Id and a minimum hair style id for tA. - Added a foundation to later load the styles and colors from the same file, to handle the Mana-issue #224 for manaserv. - Support for non-contiguous hair color and style ids has also been added. - I also replaced the < and > arrow signs with images. Reviewed-by: Ben Longbons, Thorbjørn Lindeijer
2012-02-02Fixed the use of custom particle effects for attacks.Yohann Ferreira2-7/+7
The tA beingmanager was wrongly using the attack type in the Being::handleAttack() function, which is in fact used to set the attack id. Thus, breaking the attack id given and all its attack parameters. I noticed that while updating the client data for TMW. Reviewed-by: Thorbjørn Lindeijer
2012-01-31Fixed saving the selected server at server connection level.Yohann Ferreira2-3/+5
I also change the serverInfo to use a deque to permit the use of the push_front function. Spotted and reviewed-by: Erik Schilling
2012-01-31Added missing copyright notices.Yohann Ferreira29-1/+52
Reviewed-by: Erik Schilling
2012-01-31Upgrade the update_copyright.sh script.Yohann Ferreira1-1/+9
It is now listing possible source files lacking the copyright notice. I also made the copyright notice text easily configurable. Reviewed-by: Erik Schilling
2012-01-30Add default offsets in imageset tag for all animations.Andrei Karas3-3/+24
Reviewed-by: Bjorn.
2012-01-30Keep a single blank line between NPC textsThorbjørn Lindeijer1-0/+1
Makes it easier to see what was added during a conversation. Reviewed-by: Yohann Ferreira
2012-01-29Removed Sprite::getCurrentFrame and Sprite::getFrameCountThorbjørn Lindeijer6-96/+1
They are apparently no longer being used. Reviewed-by: Erik Schilling
2012-01-29Removed inheritance from std::vector by CompoundSpriteThorbjørn Lindeijer2-45/+47
In my opinion, the code is clearer when using aggregation. For performance it makes no difference. This also fixes a memory leak in CompountSprite::clear, which forgot to delete any existing sprites. Reviewed-by: Erik Schilling
2012-01-28Moved mTrading into the TradeHandlerThorbjørn Lindeijer8-43/+14
Really only the trade handler is concerned about whether the player is currently in a trade or not. Reviewed-by: Erik Schilling
2012-01-28Make command line choose character only work onceThorbjørn Lindeijer1-0/+4
Previously it was interfering with the 'switch character' functionality. Reviewed-by: Erik Schilling
2012-01-27Removed two outdated "documentation" filesThorbjørn Lindeijer2-84/+0
More cleanup can be done here, but these are the ones I read and verified to not contain any valuable information anymore.
2012-01-27Updated docs/HACKING.txtThorbjørn Lindeijer1-2/+2
It's kind of hopeless trying to keep these files up-to-date, but whatever.
2012-01-27Fixed loading of the server listThorbjørn Lindeijer1-1/+0
A wrong (and duplicate) default entry for the 'onlineServerList' option for branding files was causing it to malfunction. The problem only showed up after the initialization of defaults was changed in commit b856e8b47ab2dfd393e3c2720c5647eb66393931. Before that, branding config file defaults were not being set when no branding file was used. Reviewed-by: Yohann Ferreira
2012-01-27Random hacking cleanups in the LocalPlayer classYohann Ferreira3-49/+35
- Renamed mLastTarget to mLastTargetTime, and mLastAction to mLastActionTime to clarify their use. - NULL -> 0. - Removed the unused mLocalWalkTime member. + Change requested by bjorn. Reviewed-by: Thorjørn Lindeijer
2012-01-26Remove "> Next" from NPC dialogsAndrei Karas1-2/+0
Reviewed-by: Thorbjørn Lindeijer
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer487-487/+487