Commit Graph

15 Commits

Author SHA1 Message Date
Bruno Minervino 882be286d9 Update copyright year for 2017 2017-01-13 08:47:07 -02:00
Ranieri Althoff 2f1f62a916
Update copyright year for 2016 2016-07-09 22:11:34 -03:00
Gabriel Pedro 04b516a1a0 Update copyright for 2015 2015-03-04 10:36:51 -04:00
BenDol 547b18db9a Update copyright for 2014 2014-04-01 18:36:42 +13: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
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
BeniS e062562888 Added sublime text 2 project file.
* Changed the order of the dofiles params.
2013-05-12 21:16:43 +12:00
BeniS 18d23653c4 Added some control params to dofiles lua method.
* File name contains string.
* Recursive file checking for deep searches.
2013-05-12 17:00:52 +12:00
Henrique Santiago b1bab32618 Fixes to lua 2013-02-10 02:05:02 -02:00
Eduardo Bart 122577a916 Just rename some files
* Fix a server ping issue
2013-01-08 16:32:05 -02: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 1c3e630237 Improve modules and sandbox system 2012-07-23 21:22:38 -03:00
Eduardo Bart c9dce51458 Update otml and casts
Improve casts performance
OTML can now understand value escaped sequences
Use long instead of int for lua integer
2012-07-23 01:33:37 -03: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 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