Commit Graph

1057 Commits

Author SHA1 Message Date
TheSumm 26fb35fd4d Fixed major bug 2015-01-18 23:57:19 +01:00
Eduardo Bart f6fb785cea Use -O2 in release build 2014-11-05 10:45:28 -02:00
Dominique Verellen 682694cc07 Update graphicalapplication.cpp 2014-09-29 11:28:13 -05:00
BenDol 09d830d02e Fix build error 2014-08-03 10:10:33 +12:00
BenDol d7429c201c Started 1050 implementation and fix ups:
* Dat now loads (new animations aren't yet functional).
* Fixed the way we reference client versions.

TODO: Write new animation functionality & find out protocol changes.
2014-08-03 10:02:28 +12:00
BenDol 9e0ddb08e3 More debug prints and avoid null pointer. 2014-07-14 01:56:17 +12:00
BenDol 0f362f80e3 Added easy menu hooking, fixed terminal default size/pos & more:
* Added autowalk style option to Minimap style.
* Added onCreate for setting up variables before styling is applied etc.
2014-07-13 22:27:09 +12:00
BenDol 07ac5c27ca Added some missing lua functions. 2014-07-12 01:03:21 +12:00
Henrique Santiago 72b3403728 Fix filestream read 2014-05-09 18:56:15 -03:00
BenDol 45b41b88bd Merge branch 'master' of https://github.com/edubart/otclient 2014-04-06 15:29:23 +12:00
BenDol 1baad726ae Just use g_configs.unload(config) to unload config files.
Avoids concurrent modification errors.
2014-04-06 15:29:02 +12:00
Nail 41b2f9b911 Per-pixel transparency. 2014-04-04 12:58:12 -03:00
BenDol a02c091376 Fix stop crashing with UIWidget::moveChildToIndex. 2014-04-04 11:33:17 +13:00
BenDol 01e6169cfb Fix to setText method. 2014-04-04 04:49:44 +13:00
BenDol 1074b6b787 Provide the option to suppress lua call in setText 2014-04-03 05:20:35 +13:00
BenDol 3ce37dacbd Removed onUnload from corelib and added more lua bindings for resources. 2014-04-02 05:20:18 +13:00
BenDol 166eb7614f Fix accidental cmake changes. 2014-04-02 03:04:10 +13:00
BenDol 8b3f3b11f0 Can now unload a Config by config:unload() 2014-04-02 02:34:12 +13:00
BenDol 2d84fae2c8 Can now create new configs on the fly using: local config = g_configs.create(file) 2014-04-02 01:54:13 +13:00
BenDol 5204e3ac03 Proper termination and initialization of the ConfigManager. 2014-04-02 00:30:17 +13:00
BenDol 547b18db9a Update copyright for 2014 2014-04-01 18:36:42 +13:00
BenDol 37f9d3e200 Fix building issues. 2014-04-01 18:09:25 +13:00
BenDol b295053662 Finished stable implementation (as far as tested), still requires more testing. 2014-04-01 16:27:33 +13:00
BenDol 61059e66ec Started implementing ability to load custom config files (currently unstable).
Feel free to help out with this if you like :)
2014-04-01 05:43:31 +13:00
Shawak d20c263912 Ability to get buffer from inputmessage 2014-03-22 18:09:11 +01:00
Shawak 07e40afa3d Ability to get buffer from inputmessage 2014-03-22 18:07:13 +01:00
Shawak 8179915e06 Ability to get buffer from inputmessage 2014-03-22 18:05:32 +01:00
Henrique Santiago b7b8fdfd0c Fix BinaryTree skip, small otb changes 2014-02-13 00:42:06 -02:00
Ahmed Samy c8b4566194 TextEdit: If cursor pos reaches end, move to start, and the opposite 2014-02-10 08:05:45 +02:00
Sam 67c2453c82 savePNG method for Image 2014-01-20 23:04:49 +01:00
Sam 455000c02d Fix save_png definition / New UISprite function 2014-01-20 22:48:50 +01:00
Jacek Wielemborek e6c9e78935 Get rid of trailing whitespace.
Commit generated by command:

find -type f ! -path '*.git*' ! -path '*.png' ! -path '*.ico' ! -path \
    '*.ogg' | xargs -I '{}' sed -i '{}' -e 's/\t*$//g' -e 's/ *$//g'
2014-01-18 15:09:26 +01:00
Ahmed Samy 6745bff132 Introduce g_resources.getDirectoryFiles
This can recursively find files in a directory that's not in physfs search
path, this is needed for mapeditor needs, esp the file browser.

We do not want to limit users to the application run directory
so we have to use this.

This function uses boost filesystem.
Prototype:
	g_resources.getDirectoryFiles(directory STRING, filenameOnly BOOL,
	recursive BOOL)

filenameOnly is there if we want to just get the filenames in the
directory.
recursive if we want to loop directories in the directory.
2013-12-25 21:32:49 +02:00
Henrique Santiago 1e17919a26 Use of createTable on containers 2013-12-22 17:36:43 -02:00
Ahmed Samy df3546b073 lua: now we have a function to static allocate an array
lua_newtable() definition:
	#define lua_newtable(L) 	lua_createtable(L, 0, 0)

This simply allocates space for 0 fields, meaning, if we push any
values into this array, it will re-allocate the array, which is bad.

This function statically allocates an array, so it's ready to have
X fields into it.

Performance tests:

lua_newtable
1428161
1426992
1413513

lua_createtable
2004544
1974117
1957533

These tests were done on an AMD 8350fx CPU, single thread used.

narr: This is for fields that just have an index, e.g. arr[0] etc.
nrec: For fields which needs like arr.a, arr.b etc.

This is how many times each of the functions can run per second, as
you can see about 1.7x the calls to lua_newtable.

All credits goes to @dalkon, he was too lazy to do it by himself, and
asked me to do it for him.
2013-12-21 16:13:24 +02:00
Sam 863bece70b VC12 fixes by @dalkon 2013-12-15 19:09:03 +01:00
conde2 ba091c9f5b Indentation 2013-12-01 01:30:48 -02:00
conde2 3288711d16 Mistake 2013-12-01 01:25:34 -02:00
conde2 8b0509a5c3 Try to fix compilation 2013-12-01 01:19:29 -02:00
conde2 4dcb30110f Use of clamp 2013-12-01 00:48:36 -02:00
conde2 7ff73d1064 Fix indentation 2013-11-30 23:34:21 -02:00
conde2 ca2fe9cf45 Fix compilation under MSVC
Use template for std::min and std::max
2013-11-30 23:08:43 -02:00
Ahmed Samy 25d3019d1a force use of template version of std::min/max 2013-11-14 00:02:47 +02:00
Ahmed Samy 1711d8bdaf Revert "replace all std::min/std::max with just min/max"
This reverts commit 28d967ccce.
2013-11-13 23:53:54 +02:00
Ahmed Samy 28d967ccce replace all std::min/std::max with just min/max
This errors out in MSVC since the inclusion of winsock2.h, CL uses the
macro not the template version.
2013-11-13 23:48:10 +02:00
Eduardo Bart 28786a3570 Update make_snapshop.sh 2013-11-13 14:33:29 -02:00
Eduardo Bart b07a77f705 Changes to compile for Win64 2013-11-13 13:55:34 -02:00
Eduardo Bart 1060c6f78c Compilation for MSVC2013, thanks @dalkon
OTclient now compiles in "Microsoft Visual Studio 2013 Express for Windows Desktop"
All the needed libraries you can download at https://www.dropbox.com/s/2yfb1c763io8efy/otclient-msvc13-libs.zip
NOTE: You have to change VC++ Directories to the properly directories
NOTE: Latested MSVC 2013 or greated is required
2013-11-12 16:32:39 -02:00
dalkon c9597d6682 Visual Studio 2013 Compatibility 2013-11-12 16:32:39 -02:00
Eduardo Bart 0938e22eb9 Fixes in stdext::format 2013-11-11 23:07:25 -02:00