summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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
2012-01-26Updated update-copyright.sh scriptThorbjørn Lindeijer1-2/+2
2012-01-26Removed 'inline' keyword where it's not of any valueThorbjørn Lindeijer11-51/+51
Members that are implemented inline are already inline, there is no need to mark them as such. Made two inline members of OpenGLGraphics private since because they are marked as inline, they can't be used from other classes. Reviewed-by: Erik Schilling
2012-01-26Remember the window size after resizingThorbjørn Lindeijer1-0/+5
Makes sure that the client starts up again in the same size. Reviewed-by: Erik Schilling
2012-01-26Fixing C::BStefan Dombrowski1-0/+4
Reviewed-by: Bjorn
2012-01-24Fixed the crash in setupSpriteDisplayThorbjørn Lindeijer7-20/+20
This happened when an NPC, monster or item couldn't be found and it had to fall back on Being::Unknown. This instance was bugged since it had a 0 pointer in its sprites list, because when the Being::Unknown was created, the SpriteDef::Empty was not initialized yet (since both were global static variables, the initialization order was not well defined). Fixed it by removing SpriteDef::Empty and instead creating it in the BeingInfo constructor. I've also changed the SpriteReference instances to be inline values rather than instances on the heap, since they're quite small. That also fixed a leak since those instances were never getting deleted. Reviewed-by: Yohann Ferreira
2012-01-24Stream music files directly from the archivesThorbjørn Lindeijer6-115/+59
Use Mix_LoadMUS_RW to stream music files directly from PhysFS. I kept around ResourceManager:copyFile for now, since it may have other uses. Also cleaned up some initialization of configuration defaults. Reviewed-by: Yohann Ferreira
2012-01-24Removed unused function Image::SDLmergeThorbjørn Lindeijer2-87/+0
Reviewed-by: Yohann Ferreira
2012-01-24Use SDL_RWops directly on top of PhysFSThorbjørn Lindeijer12-52/+316
This avoids the creation of a temporary buffer containing a complete file for the sole purpose of wrapping it up in an SDL_RWops. The necessary wrapper is by Ryan C. Gordon and is included in the PhysFS repository under 'extras'. Reviewed-by: Yohann Ferreira
2012-01-22Prevented looking at item when picking up while movingErik Schilling5-28/+24
+ Fixes from Bjorns review. Reviewed-by: Bjorn.
2012-01-22Allow resizing of the game in windowed modeThorbjørn Lindeijer13-75/+178
Window positions are semi-smartly corrected as a result of the resize. Not supported when using OpenGL on Windows for now. Reviewed-by: Yohann Ferreira
2012-01-22Synced manaserv_protocol file with serverErik Schilling1-12/+19
Reviewed-by: Bertram.
2012-01-21Updated Qt Creator project filesThorbjørn Lindeijer2-3/+3
The #include "../config.h" no longer works since we're not using configure anymore. Just define USE_OPENGL so that this part of the code is parsed at least.
2012-01-21Clientside fix of switching from /announce to @announceErik Schilling3-7/+6
- Added support for senders of announcement Reviewed-by: Bjorn.
2012-01-20Fixed mouse cursor offset againThorbjørn Lindeijer1-0/+0
The pointer was in the wrong place after the positioning fixes done in commit dc0097631ff092660e2249d7001ec339a090698d. Now it is restored to where it was before, but keeping the relative offset changes from that commit.
2012-01-20Made the update window bigger and resizableThorbjørn Lindeijer1-6/+7
Also made it remember its size and position. Reviewed-by: Erik Schilling
2012-01-20Made the ignore record parameter usefulErik Schilling1-1/+1
Reviewed-by: Bjorn.
2012-01-20Fixed a bug with hurt sounds volume and simplified codeThorbjørn Lindeijer3-24/+17
The hurt sound volume was being played based on the distance in tiles, even though Sound::playSfx was expecting pixels. This would cause hurt sounds of other players to play too loud. There were also several conversions between pixel and tile coordinates that could be simplified. Reviewed-by: Yohann Ferreira
2012-01-19Fixed handling of problems with loading the initial mapThorbjørn Lindeijer1-7/+8
This can always happen, either due to mismatching local data or a server-side error. The client displays a pop-up in this case, but it's not possible to read that when it crashes as well. Reviewed-by: Yohann Ferreira
2012-01-19Fixed the click area for NPCs and other playersThorbjørn Lindeijer1-8/+17
By taking into account that the sprite is drawn half a tile lower than the position of the being (that is messy on its own, but hard to fix while supporting both pixel and tile based movement). It also makes sure that the click area is at least 32x32 pixels, no matter how small the being. This fixes the lack of a clickable area for NPCs without a sprite (like some chests or signs) and makes small monsters like maggots easier to hit. Reviewed-by: Yohann Ferreira
2012-01-18ColorDB -> HairDB.Yohann Ferreira12-36/+38
This will ease the reading of the next patch about hair handling at character creation time in tAthena. As requested by bjorn. Reviewed-by: bjorn
2012-01-18Found a better way to fix the movement glitches on both servers.Yohann Ferreira7-70/+26
The patch also takes care of not spamming the different servers, when the servers are setting the being speed correctly. The most problems were coming from the keyboard movement functions handling 1 tile paths. To void the issues seen in #405, #439, and #440, I simply prevented to set a new path before reaching the destination of the former one, when using the keyboard. The mouse path system remains unchanged. I also made some functions private (or here protected) to show they shouldn't be called by something else than the localplayer object. And I removed the nextTile() function, since it was obsolete, unused, and replaced by the nextTile(direction) function. That patch was tested on both servers with mouse/keyboard mixed use. Resolves: Mana-Mantis #405, #439, #440. Reviewed-by: bjorn
2012-01-17Fix update error if file line is empty, like in aethyra updatesAndrei Karas1-1/+2
Reviewed-by: Thorbjørn Lindeijer Reviewed-by: Yohann Ferreira
2012-01-16Fixed adminhandler being not initializedErik Schilling4-1/+19
This fixes a segfault when trying to do /announce on manaserv servers. Reviewed-by: Bertram, bjorn.
2012-01-16Renamed some file names for consistency with the class namesThorbjørn Lindeijer46-115/+119
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-16Increased the default font sizeThorbjørn Lindeijer1-1/+1
Just to make everything a bit more readable on modern screen resolutions. Reviewed-by: Yohann Ferreira
2012-01-16Restore GL_PACK_ALIGNMENT after creating screenshots in OpenGL modeAndrei Karas1-0/+4
Reviewed-by: Thorbjørn Lindeijer Reviewed-by: Yohann Ferreira
2012-01-15Remove dead beings from the minimapStefan Dombrowski1-0/+4
Reviewed-by: Bertram
2012-01-15Show item quantity in the shop listThorbjørn Lindeijer1-23/+40
Rather useful when selling items to quickly see what you have in abundance, rather than only seeing the quantity of the selected item. Reviewed-by: Yohann Ferreira
2012-01-15Don't leak the XMLContext that is created while loading an XML documentThorbjørn Lindeijer1-4/+4
The XMLContext is only relevant while an XML file is being parsed. So rather than allocating it on the heap and forgetting to delete it again, it's now allocated on the stack and thrown away automatically. Reviewed-by: Yohann Ferreira
2012-01-15Removed a strange if check on an uninitialized variableThorbjørn Lindeijer1-3/+2
The 'inflated' pointer wasn't initialized, but included in the if check for some reason (caught by valgrind). This would have caused support for .gz compressed maps to break sometimes, but since we don't use such maps anymore, maybe support for it should actually be dropped. Reviewed-by: Yohann Ferreira
2012-01-15Center the CustomServerDialog on its parent windowThorbjørn Lindeijer6-7/+8
Also shortened the title of the Custom Server dialog to "Custom Server" since it is also used for editing an existing custom server and not just for adding a new one. And used Window::center() in a bunch of places just to reduce code size. Reviewed-by: Yohann Ferreira
2012-01-14Fixed the chat bubbles position.Yohann Ferreira2-5/+14
This issue was much nastier than it first sounded. The issue was happening when using a long weapon (like the scythe) with the SDL backend. The algorithm computing the sprite compound frames into one would then update the sprite height to a high value (127 in my case), leading to put the bubble too far away from the player. The algorithm not being in cause about the needed height, I noticed that the simplest way to set a good Y position of the text bubbles was to simply set a maximum. A config option can be added later. I also unified the way the position is computed in the being class. + Function description sentence removal requested by bjorn. Resolves: Mana-Mantis #447. Reviewed-by: bjorn.
2012-01-14Avoid compiler warnings when using MinGWThorbjørn Lindeijer1-37/+16
Replaced the switch statements with static lookup arrays. Reviewed-by: Yohann Ferreira
2012-01-14Don't lose the active target when pushing the target&attack key while moving.Yohann Ferreira1-2/+2
1st part of Mana-Mantis #441. Reviewed-by: Bjorn
2012-01-14Removed the auto-untargeting code for the local player.Yohann Ferreira1-8/+0
This was an annoyance in long lasting battles. Resolves: Mana-Mantis #445. Rewiewed-by: Ablu, bjorn
2012-01-13Improved the layout of the custom server dialogThorbjørn Lindeijer1-10/+10
Reviewed-by: Yohann Ferreira