Commit Graph

734 Commits

Author SHA1 Message Date
niczkx 5abf8622e5 rewrite some parts of otbm saving and uncomment it for testing later 2012-08-05 05:26:27 -06:00
Henrique Santiago fb7ab21e71 Move RSA class to Crypt 2012-08-04 10:54:35 -03:00
Eduardo Bart fa27210d7f Remove lockWalks from game 2012-08-03 12:12:18 -03:00
Eduardo Bart 9e917ece88 Fix glitch caused by grounds with speed 1 2012-08-03 04:42:49 -03:00
Eduardo Bart ec1d5aa260 Minor changes
Update hovered widget when moving widget
Remove lockWalk from g_game.follow()
2012-08-03 03:16:14 -03:00
Eduardo Bart 325b711181 Fix some issues in battle 2012-08-03 02:58:48 -03:00
Eduardo Bart f397e6319c Reimplement battle using new events, no more scheduleEvents 2012-08-03 02:05:09 -03:00
Eduardo Bart 06388c5673 Fix compability with some servers fly systems 2012-08-03 00:05:29 -03:00
Eduardo Bart ea2fa55a25 Fix protocol 860 stackpos regression 2012-08-03 00:05:29 -03:00
Eduardo Bart 11387eb08f Fix floor change stackpos bug? 2012-08-02 11:47:32 -03:00
Eduardo Bart a64ebc7e7b Stop walk animation after changing floors 2012-08-02 10:39:08 -03:00
Eduardo Bart b9dfc7784c Fixed push of creatures in 9.6 2012-08-02 09:13:01 -03:00
Eduardo Bart ee4f155b92 Minor fix in std::packed_any 2012-08-02 06:27:16 -03:00
Eduardo Bart 57785d2001 More walk changes and creature events
Improve walking, no more random cancelWalks
Add 3 new creatures events onAppear/onDisappear/onWalk
Add algorithm that calculates walk ping
Fix paralyze animation while walking
2012-08-02 05:17:46 -03:00
Eduardo Bart c9eaa73df5 Improve clicking on walking creatures 2012-08-01 22:47:55 -03:00
Eduardo Bart daea7cab65 Check walk collisions in client side 2012-08-01 22:34:19 -03:00
Eduardo Bart 773d58da01 Optimize lua object pushing 2012-08-01 22:34:19 -03:00
BeniS cadf07974a Fix to market module reloading, Changed the walk lock period when colliding with a block path object. 2012-08-02 11:04:29 +12:00
Eduardo Bart 3bac3dcbb4 Rework stdext classes
Implement new classes:
* stdext::any => ligher replacement for boost::any
* stdext::packed_any => like any but optimized to use less memory
* stdext::shared_object => ligher replacement for std::shared_ptr
* stdext::shared_object_ptr => replacement for boost::intrusive_ptr
* stdext::fast_storage => for storing dynamic data
* stdext::packed_storage => same but with less memory
* stdext::packed_vector => std::vector with less memory

Compiling should be a little faster now because global boost including
is not needed anymore
2012-08-01 09:23:35 -03:00
Eduardo Bart 1dc7dc0cfc Fix tile skipping in 9.6 2012-07-31 19:29:33 -03:00
Henrique 3c1a5f24e8 Fix to protocolgame 2012-07-31 14:23:52 -03:00
Eduardo Bart 614d1544c0 Fix market reload and a crash when exiting 2012-07-31 11:42:26 -03:00
Eduardo Bart 90312965bc Avoid spr loading freeze when logging 2012-07-31 01:09:55 -03:00
Eduardo Bart 49a8c750f9 Fix opened channels saving 2012-07-31 00:53:15 -03:00
Eduardo Bart c879ed8642 Prevent a protocol warning caused by a server side bug 2012-07-30 22:03:34 -03:00
Eduardo Bart 3db0ae06a7 Add swedish language 2012-07-30 20:52:31 -03:00
niczkx 4c369bc823 fix compiling on gcc 4.6 (too early to use 4.7.1...) 2012-07-30 18:52:30 -06:00
Mark Samman 39db801f93 Fixed 9.6 otb loading 2012-07-30 18:38:23 +02:00
Eduardo Bart 03b8241bbc Rename stdext::shared_object_ptr to compile in gcc 4.6 2012-07-30 12:08:21 -03:00
Eduardo Bart 8e437e27c7 Fix walk interval calculation 2012-07-30 11:03:58 -03:00
Eduardo Bart 59b6abfa09 Implement message modes for 9.6
Fix possible crash when closing otclient
Fix private messages
Fix messages in 9.6
2012-07-30 09:33:52 -03:00
Eduardo Bart 52f81c53f9 More fixes for 9.6
And add ping bindings :D
2012-07-30 07:59:08 -03:00
Eduardo Bart 05436e135a Fix some bugs 2012-07-30 05:51:03 -03:00
Eduardo Bart 68ebcb559f Fixes for compiling with clang 2012-07-29 09:04:47 -03:00
Eduardo Bart 73769c62e4 Just some refactoring 2012-07-29 07:32:54 -03:00
Eduardo Bart 29a4d467af Optimize map tile storage
Tiles are stored in blocks of 32x32 now, improving tile allocation and access speed
2012-07-29 03:23:27 -03:00
Eduardo Bart e0431021b5 Huge engine change, replace all std::shared_ptrs
Create a new shared pointer type stdext::shared_object_ptr and stdext::shared_obj
using boost::intrusive_ptr

Advantages:
 * half memory usage
 * faster and lightweight

Disadvantages:
 * using weak_ptr is not supported anymore
 * compiling seems slower
2012-07-29 00:34:40 -03:00
Eduardo Bart 3ca6494343 Remove unused func 2012-07-28 20:45:16 -03:00
Eduardo Bart 17dd08d983 More compatibility with OS X in CMake
Optimize Tile
2012-07-28 16:04:40 -03:00
Eduardo Bart d85dd3e20f Normalize source code
Add .gitattributes
Remove trailing whitespaces
2012-07-28 02:07:57 -03:00
niczkx a240429cb8 Fix possible gcc optimizations to binary reading 2012-07-28 02:54:25 -06:00
niczkx 26e20da938 Fixes to creatures 2012-07-28 02:06:16 -06:00
Eduardo Bart a88e9f9e0f Avoid crashs of invalid item ids in otb files 2012-07-27 18:25:41 -03:00
Eduardo Bart 564463fa01 Minimize talk messages spam on screen 2012-07-26 19:56:46 -03:00
Eduardo Bart 5f1e58c138 Fix sending os type, bind some functions 2012-07-26 13:41:13 -03:00
Eduardo Bart f5c97c8e8b Remove protocol config from cmake 2012-07-26 12:58:35 -03:00
Eduardo Bart 9ad9d88e10 Fix npc trade and npc chat 2012-07-26 12:42:15 -03:00
Eduardo Bart 619305cc6d Fix creatures with item outfits 2012-07-26 10:48:35 -03:00
Eduardo Bart 0eb7c166c0 Fix console blue messages 2012-07-26 09:19:30 -03:00
Eduardo Bart 657640c270 Mounts
Show creature mounts
Fix outfit window
Fix some 9.6 protocol issues
2012-07-26 09:19:30 -03:00
Eduardo Bart 36c029fc69 Multiprotocol 8.1-9.6 finally working
Still have many minor issues, tests are needed
No recompilation needed anymore
9.60 messages is not fully implemented
2012-07-26 06:12:20 -03:00
Eduardo Bart 98c279c10b Fix a stackpos bug in 9.6 2012-07-26 03:19:22 -03:00
Eduardo Bart c795eb91ab More multiprotocol support 2012-07-26 03:10:28 -03:00
BeniS 19dd96fd02 Market item filtering improvements and other some minor improvements
* Can now filter market items by vocation, level, slot type, and depot items.
* Added new bitwise lib for handling flag operations.
* Can now get/set local player vocation/premium (TODO: spell list).
2012-07-24 03:11:53 +12:00
Eduardo Bart 253a22db3d Bind Creature::getDirection 2012-07-22 19:29:21 -03:00
niczkx 3461761739 comment out & remove untested stuff 2012-07-20 21:18:03 +02:00
niczkx 8a49d09b75 stop using pairs instead of index loops, please, it's so much slower 2012-07-20 20:56:08 +02:00
BeniS 483487ab09 More work on Market functionality and UI
* Now loads all market items.
* Can filter market items.
* Will load market offers on items.
* Edited some UI images.
2012-07-21 06:20:06 +12:00
Eduardo Bart 49f4c1c94b Fix market tradeAs/showAs reading 2012-07-20 03:32:17 -03:00
Eduardo Bart a11d6e501e More refactoring and some changes
* Move protocol safeSend() to send()
* Bind some new functions
* Refactor lots of enums
2012-07-20 02:52:57 -03:00
Eduardo Bart a6d53532d2 Rename ThingType classes 2012-07-19 22:25:55 -03:00
BeniS 6293a49f8f More on Market (far from done), Minor Fixes, Edited Outfits Module, Some Cosmetics.
* Started building the market UI.
* More work on the market functionality.
* Fixes to the market protocol. (Known issue: if I use safeSend method from Market (like so: MarketProtocol.send~) is thinks it is a bot).
* Fixes to the market offer class.
* Outfit window will no longer display the mount box if you are using protocol < 870.
* Added getFeature to playermount module.
* Added isMarketable and getMarketData to the lua binding.
* Added lua casts for MarketData.
* Fixed typo in the module manager.
* Added new 'light flat panel' for more variation (can change later) will require some graphics for market.
* Added new functions to table lib.
* Fixed some styling issues from previous commits.
2012-07-20 06:54:24 +12:00
niczkx 9dc88de6b0 missed something in last commit 2012-07-19 17:28:40 +02:00
niczkx f74b013da2 ignore this 2012-07-19 15:55:10 +02:00
Eduardo Bart f289db3a9e Module sandboxing system
Sandboxing makes module scripts run inside an isolated lua environments,
making more easier and secure to script

Move and rework TextMessage using the new sandbox system
2012-07-19 06:15:23 -03:00
Eduardo Bart e2921c6407 Optimize map view zoomout performance 2012-07-19 03:36:04 -03:00
niczkx aef3a5b8db more work on xml stuff (prolly done for today) 2012-07-18 16:36:46 +02:00
niczkx 5015ced156 update houses/monsters/items xml readers 2012-07-18 13:46:58 +02:00
Eduardo Bart b0e6b3b8fb Update item OTBM attributes reader
* Fix some lua errors generated by playMusic
* Fix possible crash when starting otcliet without dat loaded
2012-07-18 05:34:17 -03:00
Eduardo Bart cf9f57736f More multiprotocol progress 2012-07-18 03:04:57 -03:00
niczkx c8d1d5ecf2 rewrite xml stuff #2 - will be testing the monsters xml code soon 2012-07-18 02:58:28 -03:00
Eduardo Bart cb1848d48d Fix error in start/stop music 2012-07-17 22:22:21 -03:00
Eduardo Bart eb24d6776e Multi-protocol
Lots of chagnes to add multi protocol flexibility, not really
completed yet, still have to rework text messages opcodes and other stuff,
so this still a working in progress feature

* Rework dat reader, the dat reader can now
* dinamically detect dat version
* Split game into gamelib and game_interface
* Lots of other minor changes
2012-07-17 20:53:19 -03:00
BeniS 6fc11d2fa9 Forgot to make private functions local. 2012-07-18 11:31:32 +12:00
niczkx 28825a3298 lalala 2012-07-18 00:03:46 +02:00
niczkx 02f89dd8be fixes 2012-07-17 16:12:29 -03:00
BeniS b7ac6ce6d5 Added Market/MarketProtocol module to begin the construction of the Market! Fixed some Minor Issues, and Some Cosmetics
* Added new protocol lib.
* Added missing Game Features to game/const.lua
* Added new Market module that will handle the market/market protocols too.
* Finished Market protocol and begun on the market structure (MarketOffer etc).
* Removed any traces of market protocol in the core (I think).
* Moved minimap images to /images.
* Removed old zoom images for minimap.
* Fixed a bug with randomize outfit.
2012-07-18 02:36:27 +12:00
niczkx 12d30f7355 monsters 2012-07-17 12:00:22 +03:00
BeniS 09425eba31 Fixed crash issue with outfit window with protocols <= 860 2012-07-17 02:39:08 +12:00
BeniS 92e3c2cbd6 Fixes to mounting, outfit randomizing, and added creature getSpeed to the lua binding. 2012-07-16 11:08:27 +12:00
Eduardo Bart f47a947bf3 Fixes for last commits 2012-07-15 11:29:05 -03:00
Eduardo Bart 7a08fed689 Optimize overall memory usage
* Fixes in otbm loader
* Rework BinaryTree
2012-07-15 10:30:39 -03:00
BeniS 03ca792dbd * Missed in last commit. 2012-07-15 23:58:51 +12:00
BeniS 81e6cf210e Merge remote-tracking branch 'origin/master' 2012-07-15 23:50:36 +12:00
BeniS 5520501673 Implemented the mount interface, Fixed some interface stuff, Some cosmetics, and Updated the outfits window
* Added new arrow buttons.
* Fixed the vertical separator.
* Added new game_playermount module to handle player mounting.
* Moved the battle icons to /images.
* Outfit window accommodates for mounts, loads addons more efficiently and keeps addons set on update, added new Outfit.randomize function that allows you to randomize your outfit colors, and set up a new layout.
2012-07-15 23:49:28 +12:00
niczkx 3db6217b7c trolol 2012-07-15 20:54:44 +03:00
Eduardo Bart 1b0c527ad6 Fix Thing::getTopThing 2012-07-15 03:17:31 -03:00
Eduardo Bart 98c4240446 Changes for the mapeditor 2012-07-15 03:17:31 -03:00
niczkx 7ffb760368 trolo 2012-07-15 21:12:03 +03:00
Eduardo Bart 36e5a5a92f Remove if spaces 2012-07-14 14:29:42 -03:00
Eduardo Bart 70115e391d Merge fallen changes 2012-07-14 14:22:18 -03:00
niczkx 5e0f18ab5b missing files 2012-07-14 16:34:24 -07:00
niczkx 992cbf9d1d mapeditor changes 2012-07-14 16:20:38 -07:00
Eduardo Bart e3298d561c Rework application class and framework
Make otclient's framework flexible enough to run console apps like
servers, so this mean is possible to build otclient versions without
graphical interface and use it's framework to code servers
2012-07-13 22:23:11 -03:00
BeniS 8850528091 Updated Top Menu, Health Info, Combat Controls, Console (Channels), Game Toggle Buttons, Minimap Layout, Game Interface Prompts, and Creature Draw Info.
* Added new left and right game button panels.
* Relocated main game toggle buttons to the right side of the screen to make it easier to toggle miniwindows.
* Added table.empty(t) function to table lib.
* Renamed module game_healthbar to game_healthinfo.
* Combat controls now save per character (e.g. Fight mode, chase mode, safe fight mode)
* Last channels open now save per character.
* Fixed typo in containers.lua.
* Added logout prompting window message when you logout via the logout button.
* Added exit promting window message when you attempt to exit the client.
* Repositioned some minimap buttons.
* Fixed so when creatures health percent is < 1 it will not draw the creature information.

Known Issues:
* If you move a container widget into the map rect if you move an item onto itself it will allow this to execute still dropping the item on the ground.
* The server is calling to open channels after onGameStart is executed causing it to focus the last tab opened. Fix: Don't save channels to the settings that are opened by the server.
2012-07-13 04:45:22 +12:00
Kamil 8f492f7e06 Fixed bug with adding Vip from console or map, who is already on viplist. 2012-07-12 13:21:51 +02:00
Henrique 962e9c7d16 Allow logger usage on console applications 2012-07-12 00:21:26 -03:00
Eduardo Bart e7691b873b Add error code to onError protocol event 2012-07-09 19:45:34 -03:00
BeniS 902ce06e88 Fixed an issue with the battle list filter.
More work on the minimap, interface changes, fixed direction controls, fixed reseting, fixed some draw things (needs some more work to finish).
Fixed a bug in the battle list causing Battle.onFollow(creature) to execute when there was no follow.
2012-07-09 09:19:02 -03:00
otfallen c8d9833444 woops, added new type to gitignore aswellas commit changes to init.lua 2012-07-09 08:56:18 +02:00
otfallen 42971b10f8 backing up at OTBM loading, if someone can continue working on it until I'm available again, I would appreciate it much, here is current progress: http://pastebin.com/qEfC9ftv 2012-07-09 08:46:11 +02:00
Eduardo Bart 4ac3ec8344 Minor fixes for releasing otclient 2012-07-08 13:46:09 -03:00
BeniS 4453242bee Adjusted chase modes to work correctly, added new option for auto chase override. Fixed NPC speak messages to appear in the correct position. 2012-07-08 02:09:50 +12:00
Henrique Santiago 6a85c31a77 Some particle stuff, far from done 2012-07-06 02:01:13 -03:00
Eduardo Bart 6bce0bd680 Imrove lua engine
* Allow bound C++ functions to return multiples values to lua with tuples
2012-07-05 09:38:48 -03:00
Henrique Santiago 0b98dca50f Changes to autowalk position on different floors, move its functions to game interface 2012-07-05 02:40:31 -03:00
Eduardo Bart 2c6b83b476 Fix issue #14, pre animate autowalks 2012-07-05 01:10:01 -03:00
Henrique Santiago cfd31ef4c0 Change uiitem draw 2012-07-02 17:30:15 -03:00
Eduardo Bart 16d4729f06 Check wrong slot/skill to avoid leaks 2012-06-25 20:48:36 -03:00
Eduardo Bart 472e78d368 Make C++ exception works for lua
* Throw exception when open a file fails
2012-06-25 19:42:38 -03:00
Eduardo Bart 98a1b611bf Refactor for documentation 2012-06-25 19:19:17 -03:00
Eduardo Bart 2c7ae6e521 Now otb reader is properly working 2012-06-24 12:44:33 -03:00
Eduardo Bart e65a8456e9 Add binary tree class for reading otb 2012-06-24 10:06:02 -03:00
Eduardo Bart eec6114b2d Optimize lua object push
* Optimize position hash
* Fix minimap reload
2012-06-24 08:20:39 -03:00
Eduardo Bart 79532cd612 Optimize minimap save/load 2012-06-23 18:30:54 -03:00
Eduardo Bart fcd6d3cfe9 Minimap fixes
* Fix infinite loop while loading minimap
* Fix errors in FileStream class
* Remake OTCM map format
* Fixes in UIMap
2012-06-23 12:03:28 -03:00
Eduardo Bart 139f389d88 fix infinite loop while saving empty minimap 2012-06-22 14:26:12 -03:00
Eduardo Bart d39cf361ab improve minimap 2012-06-22 02:26:22 -03:00
Eduardo Bart aed779a2c8 doc and luabinder changes 2012-06-22 00:14:13 -03:00
Eduardo Bart c5674d10ba some refactoring 2012-06-21 20:58:18 -03:00
Eduardo Bart 96c363d997 changes for otb compability 2012-06-21 14:54:20 -03:00
Eduardo Bart f3499efe83 Adjust fallen changes
* Restore old map load() used in minimap
* Change tabs to 4 spaces
* Add missing cmake file
2012-06-21 00:05:44 -03:00
otfallen 6b0d922dd9 missing files 2012-06-21 04:39:40 +02:00
otfallen d139c3738b map stuff 2012-06-21 04:31:29 +02:00
Eduardo Bart eb457bf9cd Fix error when exiting in win32 2012-06-20 02:41:00 -03:00
Eduardo Bart 8761220deb Refactoring and flexibility changes
* Split game module into game and game_interface
* Move core_lib to corelib
* Move miniwindow to corelib
* Introduce init.lua script for initializing the client, giving much more flexibility
* OTClient is no longer Application derived and is much simpler
2012-06-19 21:16:52 -03:00
Henrique Santiago 4bdcae2f8b improvements to skins 2012-06-19 05:46:49 -03:00
Eduardo Bart 1c7bbaea89 Fix memory leaks
* Fix recursive reference memory leak in UIWidget
* Make Event/ScheduledEvent memory-leak safe
* Fix exit crashs by freeing graphics resources before destroying GL context
* Add many asserts to avoid any leak regression
2012-06-18 05:13:52 -03:00
Eduardo Bart f650b0e5bb Restore and fix compile warnings 2012-06-17 18:47:05 -03:00
Eduardo Bart ad04043a88 Lua binder compability changes
* A lot of changes in lua binder to compile with clang's libc++
* Add more portability to luabinder
* Remove const keyword from bound lua functions
* Deprecate std::bind usage with luabinder replace its usage with registerSingletonClass/bindSingletonFunction for binding singleton classes
* Fix a bug in lua binder where calling functions with bil object would make the client crash
* More fixes to compile with clang
2012-06-17 12:21:46 -03:00
Eduardo Bart 10b33c6124 Compile with clang and add cotire
* Add cotire cmake module to speedup compilation https://github.com/sakra/cotire
* Fix clang error and warnings
* Rename Font to BitmapFont to fix conflict with Xlib.g Font typedef
* Remove legacy PCH support
* Improve Position hash
2012-06-16 20:20:22 -03:00
Eduardo Bart 4813b7eb4b many changes
* Fixes in WIN32 platform
* Remove unused files
* Make StaticText work more like tibia
* Fix WIN32 compilation
* Fix regression in framebuffers that caused battle to disappear
* Shader fixes for DX9
* Add two new shaders: noise and heat
2012-06-15 21:46:36 -03:00
Eduardo Bart 0a6470eac4 ... 2012-06-14 20:51:11 -03:00
Eduardo Bart fb36ff2da3 fix freezes from server talks spam 2012-06-14 19:27:57 -03:00
Eduardo Bart 83f86eac64 experimental map shaders 2012-06-14 15:26:55 -03:00
Eduardo Bart 318109158a changes to make development easier in QtCreator 2012-06-12 13:50:43 -03:00
Eduardo Bart 72f569c250 improve walk animation on low end hardware 2012-06-11 16:03:36 -03:00
Eduardo Bart e91f822f62 fixes in WIN32-EGL 2012-06-10 20:48:53 -03:00
Henrique Santiago db59c73ed2 changes to progressrect 2012-06-10 04:46:00 -03:00
Henrique Santiago 52333f5d28 progress rect 2012-06-10 03:09:37 -03:00
Eduardo Bart 1a2e97bb5e show private message on screen
* disable GL blending in some situations to speedup on older hardware
* fix wrap size in CachedText
2012-06-09 10:00:08 -03:00
Eduardo Bart 95cf7eb788 graphics optimizations/fixes/features
* cache text vertex for StaticText, AnimatedText and Creature names
* improved outfit rendering
* fully compatible with OpenGL 1.1
* enable mipmaping for game sprites again
* Ctrl+W hotkey clean game texts
2012-06-08 21:40:41 -03:00
Eduardo Bart 1a7f2a44fc graphics fixes and improvements 2012-06-08 21:40:41 -03:00
Henrique Santiago 587db0d89f changes to uiitem 2012-06-08 00:02:06 -03:00
Eduardo Bart 486837a61d minor fixes
* change chase mode while walking and attacking
* avoid lua errors in frame counter when starting
2012-06-07 08:52:17 -03:00
Eduardo Bart bb1fb939c4 just fixes
* fix battle rendering
* fix rendering glitch when following creatures
* properly throw exceptions from C++ to lua and avoid exception crashs
* fixes rendering states in framebuffer
2012-06-06 11:10:35 -03:00
Eduardo Bart 2dde63d2bc more changes in container API 2012-06-06 00:44:17 -03:00
Henrique Santiago 86cade0aa9 waiting list, u16 effects feature, protocolsend uses clientversion 2012-06-05 20:46:36 -03:00
Henrique Santiago 3cb5216858 protocol login working 2012-06-05 18:27:37 -03:00
Henrique Santiago 6b9943447a protocol login at lua 2012-06-05 16:16:57 -03:00