summaryrefslogtreecommitdiff
path: root/src/utils/xml.cpp
AgeCommit message (Collapse)AuthorFilesLines
2024-09-27Replaced for_each_xml_child_node macro with helper classThorbjørn Lindeijer1-1/+1
The new XML::Children class enables using a C++11 range-based for loop to iterate over the children of an xmlNodePtr.
2024-03-28Fixed compile against libxml2 2.12ewew ukek1-23/+21
Quote from Fedora mailing lists: The latest released versions of libxml2 have a couple of important changes in header files that have unintentionally caused some packages to fail to build without modification, including: * several functions now accept or return a const xmlError struct * cyclic dependencies in header files were fixed (by dropping some includes)
2024-02-29Re-download updates when their checksum no longer matchesThorbjørn Lindeijer1-1/+1
The Mana World currently likes to just update its "TMW.zip" file, whereas updates were always given unique names in the past. With this change, the client checks the Adler32 checksum to know when it should re-download an update file. This matches the behavior of ManaPlus commit 96150f1aeacf55d311c41ffe12d9e754b1cda001.
2024-02-02Restored support for setting monster ID offset on monsters tagThorbjørn Lindeijer1-0/+5
Apparently this was supported before, but support for that was lost in bd1fdd87eed48ba3ffcc413936d6a6a60a429a97. Fixes #46
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-7/+7
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2012-02-03Clear tile flags from the gid before further processingThorbjørn Lindeijer1-1/+1
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-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
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
2010-09-27Centralized String to bool conversion into the client.Yohann Ferreira1-4/+8
The former XML::getBoolProperty() had a potential memleak and was unsafe when dealing with unknown values. Reviewed-by: CodyMartin. Resolves: Mana-Mantis #213.
2010-08-15Remove the logToChat optionChuck Miller1-1/+1
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-15Merge branch '1.0'Chuck Miller1-26/+51
Conflicts: mana.cbp mana.files src/CMakeLists.txt src/Makefile.am src/utils/xml.cpp
2010-08-13Simplify handling of compressed filesJared Adams1-22/+3
ResourceManager will now check for ".gz" and act appropriately (unless told not to). Compression handling functions are now in new utils/zlib files, along with a function to load a file from drive, uncompressing it if it ends in ".gz". Reviewed-by: Freeyorp
2010-08-05Add better XML error logging and do some related cleanupJared Adams1-5/+46
Error details from libxml2 are no longer ignored and are properly logged now. XML initialization code is now in the XML namespace. The XML::Document constructor that took a data pointer was removed because it wasn't being used and it would make the new logging less useful (no filename). Signed-off-by: Chuck Miller
2010-07-10Moved parsing of specials.xml from gui/specialswindow.cpp to separate source ↵Philipp Sehmisch1-0/+10
files. Restored functional recharge bars in specials window. Individual specials are only shown after the server informed the client about their status. Made level label, use button and progress bars optional. Their use is controlled through specials.xml. The special window button is again shown even when the player has no specials. This problem needs to be solved differently now for architecture reasons. Reviewed-by: Jaxad0127
2010-03-03Fix possible memory corruption.Andrei Karas1-1/+1
Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
2010-02-07Updated Copyright year to 2010!Bertram1-1/+1
Also added the update copyright tool from the Wormux Team. ( And not forgetting credit's due. :P )
2010-01-10Change code styleAndrei Karas1-5/+11
2009-12-20Fixed an uninitialized pointerPhilipp Sehmisch1-1/+1
2009-12-19Added support for resources.xml from update server... Also added option to ↵Chuck Miller1-3/+32
download music optionally I had to edit the XML wrapper a bit, basicilly its constructor can now take a optional thrid arguement which will tell it to use a resman or open the file directly Also I added fallback support for the old resouce2.txt so servers don't have to upgrade if they do not want to
2009-03-26Changed includes in utils/ dictory to new guidelinesBjørn Lindeijer1-3/+3
2009-02-09Merged with Aethyra master as of 2009-01-27Bjørn Lindeijer1-0/+2
Conflicts: Almost everywhere.
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-6/+3
the function names should no longer be around. Signed-off-by: Ira Rice <irarice@gmail.com>
2008-12-07Some code reformattingBjørn Lindeijer1-8/+7
2008-11-18Pedantic fixes to the client, where I alphabetized all of the include Ira Rice1-2/+2
statements, as well as removing the new skill dialog, which we do not, nor will we use (if we do, it'd be a new one that we'd make). WARNING!!! This, and all other previous builds have a linker error for the Gnome libraries version 4.3.2 on my setup. It's assumed that this is also the case for other users of this library as well. I'm currently assuming that there's a bug in the compiler itself, and will look into reporting this, but in the mean time, it doesn't build for these users, unfortunately. Sorry about this.
2008-11-16Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer1-2/+0
I don't know why we dealt with these things for so long. Did we ever get anything out of it?
2008-07-18Import of client treeLloyd Bryant1-1/+1
2008-05-21Merged revisions 4013,4027,4043,4174,4250,4254 via svnmerge from Philipp Sehmisch1-0/+36
https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/trunk ........ r4013 | crush_tmw | 2008-04-01 01:18:19 +0200 (Di, 01 Apr 2008) | 1 line Implemented NPC XML database which maps NPC IDs to one or more animation files and thus enables animated NPCs. ........ r4027 | crush_tmw | 2008-04-02 01:34:14 +0200 (Mi, 02 Apr 2008) | 1 line misspelled filename ........ r4043 | b_lindeijer | 2008-04-07 10:37:23 +0200 (Mo, 07 Apr 2008) | 3 lines Added XML::Document class which simplifies parsing an XML document and automatically cleans it up again. ........ r4174 | b_lindeijer | 2008-04-23 14:57:45 +0200 (Mi, 23 Apr 2008) | 2 lines Fixed svn:keywords properties and added header to guild.h. ........ r4250 | crush_tmw | 2008-05-19 18:18:38 +0200 (Mo, 19 Mai 2008) | 1 line Added the possibility to add particle effects to NPCs in npcs.xml. ........ r4254 | crush_tmw | 2008-05-20 15:58:26 +0200 (Di, 20 Mai 2008) | 1 line fixed some filename confusion messup in the last commit. ........ NOTE: This was my first commit using svnmerge. Please check if I did everything correctly.
2007-05-04Merged particle engine into main eAthena branch.Philipp Sehmisch1-0/+23
2006-11-15Added missing Id keyword property to recently added files.Bjørn Lindeijer1-1/+1
2006-11-15Separated getProperty method to an XML utility namespace.Bjørn Lindeijer1-0/+54