summaryrefslogtreecommitdiff
path: root/src/map.cpp
AgeCommit message (Collapse)AuthorFilesLines
2010-10-22Turned the OpenGL and disable transparency options as static members.Yohann Ferreira1-1/+1
- Now OpenGL and the transparency disabling are set at startup and not read again for displaying graphics, preventing graphic errors before startup. - We also agreed long time ago that SDL specific functions should have a SDL prefix. The header has been rearranged a bit to do so. - Also fixed a possible discrepancy in the hasAlphaChannel() function. Reviewed-by: CodyMartin. Resolves: Mana-Mantis: #260.
2010-10-17Added Low CPU Mode toggle in video setup. Defaults to On.madcamel@gmail.com1-10/+14
This disables the Image::setAlpha() function, which uses 60% of the client's CPU cycles. When enabled, visual quality is slightly decreased, especially with the particle system. Toggling this setting On from an Off state requires a client restart or the graphics look quite funny. Bertram's addition: - Renamed 'Low CPU' to 'Disable transparency (Low CPU)' in the gui for better understanding. - Removed the sprite display with 30% opacity when disabling transparency since it made monsters and drops be drawn above all layers at full opacity. - Made the OpenGL mode disable the 'low CPU mode'. - Fixed the GUI logic as much as possible. Please note that the GUI opacity slider stays enabled when transparency is disabled even if told to be disabled in that case. Reviewed-by: CodyMartin, 4144, MadCamel.
2010-07-09Fix tileset gid handling to better match TiledJared Adams1-16/+6
This change allows extending tilesets without causing issues. Reviewed-by: Freeyorp
2010-06-05Fix memory leak in minimapAndrei Karas1-5/+2
Reviewed-by: Thorbjørn Lindeijer
2010-04-12Completely ignore eAthena job 45Jared Adams1-3/+1
These are warps. Reviewed-by: Bertram
2010-04-12Reviewed the LocalPlayer::nextTile() function. The ManaServ movement system ↵Bertram1-2/+2
is functional!! Introduced LocalPlayer::getNextWalkPosition(unsigned char dir) which takes care about the player next position while moving using keyboard. I removed the pixel scaler thing because it couldn't handle all the noticed cases and was rather heavy. There is still a bug in the movement system (nothing's perfect) but it's very rare and this is here in eAthena, too. So, I'll give a try at taking care of it once I'll have polished all of this a bit. Please try and give feedback!!
2010-04-12Move path finding related code to the Map class and small fixes.Bertram1-11/+125
It permits two things: 1. It simplifies and demystifies Being::SetDestination() code. 2. It will permit to show the *real* calulated path when using the drawDebugPath feature for ManaServ.
2010-03-08Fix properties bug.Andrei Karas1-2/+2
Fix Random crushes and valgrind memory errors. Reviewed-by: thorbjorn
2010-03-04Fixed crash when a map-based particle effect can't be loadedPhilipp Sehmisch1-1/+1
2010-03-04Implemented markers for warp portals defined in map files in form of ↵Philipp Sehmisch1-2/+11
particle effects. Reviewed-by: Jared Adams <jaxad0127@gmail.com>
2010-02-24Some code cleanupsThorbjørn Lindeijer1-1/+2
Reviewed-by: Jared Adams
2010-02-21Made tick counter and framerate limiter work during login sequenceThorbjørn Lindeijer1-6/+4
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-09Got successfully rid of tile width/height fallback values as asked by Jaxad.Bertram1-6/+0
But I added some logs when speed and other actions where refused due to game/map uninitialized. This could help.
2010-02-09Separated fallback defaults for tile width and height.Bertram1-1/+2
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-27Added mutators/accessors to being.h and smal cleanups.Bertram1-1/+2
2010-01-23Chaning the method name Map::getMapId() to map::getFilename()Blue Sans Douze1-1/+1
2010-01-23Autoload a minimap is no minimap info is givenBlue Sans Douze1-0/+12
Looks for "graphics/minimap/MAPID.png"
2010-01-12Standardize header orderJared Adams1-2/+2
Also remove some extra new lines and fix eAthena's PartyTab define guards.
2010-01-10Change code styleAndrei Karas1-3/+6
2010-01-10Fix initialization order in Being and MapJared Adams1-2/+2
2010-01-09Add special map mode.Andrei Karas1-5/+11
This mode hide big map objects and show collisions.
2009-12-25Always draw the first background image - even when ambient effects are off - ↵Philipp Sehmisch1-2/+2
to avoid graphic errors.
2009-12-25Added support for map background images which work exactly like overlays, ↵Philipp Sehmisch1-23/+86
just that they are drawn before the tiles instead of afterwards. Renamed overlays to foregrounds (but kept backward compatibility intact)
2009-12-03Remove some unneeded _SUPPORt ifdefsJared Adams1-4/+0
2009-10-15Speed code unification part 3: Made the client handle the speed in tiles per ↵Bertram1-0/+5
second in TMWserv. While I was on it, I tweaked the default speed value to its final 6 tiles per second value, which seems to be nice to me. Another notice, the server does already send speed value to the player. The keyboard movement protocol is one step ahead Release Candidate, enjoy ;)
2009-10-04Introduced Net::LoginHandler::SetEmailOnRegisterThorbjørn Lindeijer1-14/+9
This "optional action" specifies whether the server expects to get an email address during registration. It is used now instead of having the general handlers of eAthena and tmwserv set a pointer to an email string on the GUI dialogs (to keep things understandable, the dependency should preferably go one way).
2009-09-23Fixed some glitches in Equipment and Inventory window, and made the code ↵Bertram1-1/+2
more logical... Now, the setAlpha() function is called with less changing numbers which can help increasing FPS a bit...
2009-09-17Partially (but mainly) resolved Mantis #753 by making monsters, NPC, and ↵Bertram1-0/+18
Floor Items visible even covered. Next Step would be to add a caching system for multi-layered sprites + copy functions for SDL and OpenGL. Then, I'll be able to finish this, by making also players visible when covered... But Kage asked me (each and every hour) to do something else first ;)
2009-08-13Clean up Being and it's derivativesJared Adams1-4/+4
Move stuff only needed for Players into Player (like slots and sprite limits). Move name handling into Being (no need for three copies of this code). Clean up terminology (including Map terminology). Remove hair-related variables.
2009-08-01Remove some unused movement methodsChuck Miller1-44/+0
2009-07-27Makes mX and mY in the being class privateChuck Miller1-1/+1
2009-07-27Added the ability to ask a ambient layer to keep its ratio when the ↵Bertram1-1/+2
resolution isn't the default. You'll have to add this in map properties, for instance if you're want to keep ratio on overlay 0: <map version="1.0" orientation="orthogonal" width="128" height="128" tilewidth="32" tileheight="32"> <properties> ... <property name="overlay0keepratio" value="true"/> ... </properties> </map>
2009-07-01Remove complex path finding for players. Add a simple path finding algorithm ↵Roderic Morris1-0/+44
to map.
2009-06-08Reintroduced the 'occupied' check for eAthena movement codeBjørn Lindeijer1-2/+21
Makes sure the player walks around other players and beings when reasonably possible. This was meant to be based on the blockmask stuff, but I half removed that a few months ago.
2009-06-08Fixed the problem where the player would skip cornersBjørn Lindeijer1-5/+5
Skipping corners is only allowed around other beings (you can even walk through them), but not for collision tiles. The server doesn't allow this, so allowing it client-side leads to synchronization problems. Mantis-issue: 730
2009-06-08Attempt to clear some of the block/walkmask confusionBjørn Lindeijer1-1/+1
2009-05-25Handle map not found gracefullyBjørn Lindeijer1-0/+13
Instead of shutting down, the client will now draw a gray background. This allows the player to still contact a GM in order to be helped out of the situation. It also helps me warp out of the non-existing map I accidentally warped myself onto. ;)
2009-04-29Some random cleanupsBjørn Lindeijer1-5/+5
2009-04-15Moved tile animations outside of the clock time polling loop. There's noTametomo1-5/+5
need to poll the CPU for them, when they already can compensate for missed clock ticks. Signed-off-by: Tametomo <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
2009-03-27Moved the inventory and storage offset handling into netcodeBjørn Lindeijer1-1/+3
No need to complicate the item containers and inventory classes with a silly offset used by the eAthena server. Also fixed the logToStandardOut option by reading it from the config after the configuration has been initialized.
2009-03-27Clean up some ifdefs and start cleanup of partiesJared Adams1-4/+0
2009-03-27Fixed some positioning issuesBjørn Lindeijer1-1/+1
Started with not being able to click NPCs properly, and I ended up correcting the draw positions of overhead text, targets and sprite ordering. It's now a bit more straight-forward. The position of a being is simply in the middle of the sprite at the bottom. When drawing the sprite, an offset remains because all the sprites are compensating for getting drawn half a tile to the left and one tile up.
2009-03-25Merge branch 'eathena/master'Bjørn Lindeijer1-7/+7
Conflicts: A lot of files.
2009-03-23Merge branch 'aethyra/master'Bjørn Lindeijer1-6/+6
Conflicts: Many files.
2009-03-22Merged the tmwserv client with the eAthena clientBjørn Lindeijer1-30/+132
This merge involved major changes on both sides, and as such took several weeks. Lots of things are expected to be broken now, however, we now have a single code base to improve and extend, which can be compiled to support either eAthena or tmwserv. In the coming months, the plan is to work towards a client that supports both eAthena and tmwserv, without needing to be recompiled. Conflicts: Everywhere!
2009-03-17Added an image merge feature loosely based on a merge function found inIra Rice1-6/+6
the open source project Wormux. To improve SDL performance, the number of layers that are pushed out to the hardware or software buffers should be reduced, which is where this function comes into play, as it combines two surfaces together so that the number of blit operations is reduced. This function is currently not used, but will be used once a good way to link each of the target systems is determined so that it only initiates when SDL is enabled, as well as making sure that each hook that uses this function is benefiting from it sufficiently. At the moment, it's suspected that the particle engine will likely be the most likely to benefit from this function, followed by tile drawing, then sprite drawing. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-10Remove some tabs and trailing whitespaceJared Adams1-1/+1