Commit Graph

2619 Commits

Author SHA1 Message Date
Nailson d41fe195f4 Add 'GameKeepUnawareTiles' feature.
Remove tiles that we are not aware anymore by default.
2015-10-06 00:37:50 -03:00
Konrad Kuśnierz 1686d8081b Merge pull request #680 from ottools/master
Add a flag for idle animation game feature.
2015-08-28 10:07:14 +02:00
Nailson f1fdbd56e9 Add a flag for idle animation game feature. 2015-08-26 19:49:43 -03:00
Konrad Kuśnierz ae25dbf6a5 Merge pull request #678 from ranisalt/fix-deprecated-openssl
Replace deprecated function
2015-07-25 02:37:50 -05:00
Ranieri Althoff 058b926a94 Replace deprecated function 2015-07-24 20:52:31 -03:00
Konrad Kuśnierz 4591a37844 My bad, wrong function name. 2015-07-19 10:33:55 +02:00
Konrad Kuśnierz 8abefb1505 Fix #601, fix #599 2015-07-19 10:27:06 +02:00
BenDol 0afbfd58ce Proper gameinterface load sequence, thanks @Quintinon
https://github.com/edubart/otclient/pull/677
2015-07-19 07:08:21 +12:00
BenDol 6c5549dd46 This was already fixed. 2015-07-19 06:48:05 +12:00
Ben Dol 0e0da9ecbf Merge pull request #654 from crackcomm/market-myoffers
Market myoffers + NPC start block
2015-07-19 06:46:33 +12:00
BenDol 7a7f63586f Fix serverlist issues from previous commit.
Was referencing a 'global' variable so a simple check will do.
2015-07-19 06:34:21 +12:00
BenDol 07a2995285 Fix NPC static text and missing SpeakType. 2015-07-19 06:03:19 +12:00
TheSumm b822e92c0e Fixed serverlist to ignore invalid settings when loading 2015-07-17 11:22:31 +02:00
Henrique Santiago 0ecf2229e6 Merge pull request #674 from kenfal/master
Fix missing loop counter, fixes #673
2015-07-10 21:45:48 -03:00
kenfal 47272519b5 Fix missing loop counter 2015-07-10 21:41:53 -03:00
Konrad Kuśnierz 481adcdc21 Merge pull request #672 from diath/patch-motd
Fix last motd number saving
2015-07-06 09:53:50 +02:00
Kamil Chojnowski 78bdf20603 Fix last motd number saving 2015-07-06 07:38:01 +02:00
Sam 0642fb66cd Merge pull request #671 from ottools/master
Fix #664
2015-07-05 18:34:54 +02:00
Nailson 5ef55307f5 Fix #664 2015-07-05 13:05:12 -03:00
Konrad Kuśnierz b9848f360c Check for Otc::GameAttackSeq feature 2015-06-21 12:44:19 +02:00
Konrad Kuśnierz b5a14ddb68 Add context menu option "Select all" for channel 2015-06-04 22:10:05 +02:00
Eduardo Bart e4302562ff Change new line from CR LF to LF when copying console text 2015-06-04 12:10:32 -03:00
Konrad Kuśnierz 471b8362e2 ConsoleLabel should not be focusable
Avoid scrolling by ensureChildVisible of UIScrollArea
2015-06-04 15:31:15 +02:00
Konrad Kuśnierz a33fcd19b4 Improve multi-line selection (find bouding children) 2015-06-03 23:00:39 +02:00
Konrad Kuśnierz 7f2f70e1a6 Change signalcall to protectedcall in console
Even though they kind of do the same (calling function in protected
mode), @edubart suggested to use a different function for the sake of
readability.
2015-06-03 17:03:49 +02:00
Konrad Kuśnierz f9d183837a Add option to save messages from channel 2015-06-03 16:46:49 +02:00
Eduardo Bart 02c6b1b6c7 Missing changes for multiline text 2015-06-03 10:59:28 -03:00
Eduardo Bart 0c1540e531 Improve multiline text selection, closes #507 2015-06-03 10:51:39 -03:00
Konrad Kuśnierz 6893a5e98a Optimize UITextEdit rendering 2015-06-03 14:56:43 +02:00
Konrad Kuśnierz 559e545e36 Few more minor fixes to selection in game console 2015-06-02 22:46:33 +02:00
Konrad Kuśnierz cf90bb9807 Fix selection
Perhaps it would be wise to move widget local variables to some sort of
global variable for each tab.
2015-06-02 20:04:34 +02:00
Konrad Kuśnierz f35c939fc3 Start working on multi-line selection for console
Unfortunately UITextEdit is really bad in terms of performance. It
cannot be used as overlying widget (just like in terminal). On the other
hand we could optimize it by rewriting (unfortunately) the whole widget.

There still is a lot of things to do, but for now it is possible to
select several lines of text and copy it using CTRL + C. In order to
make text copyable in context menu it will be required to override
onMousePress (return true).
2015-06-02 19:16:41 +02:00
Konrad Kuśnierz 34e2fa1d49 Merge pull request #665 from ranisalt/master
Use native optimizations instead of hardcoded defaults
2015-05-27 11:12:12 -05:00
Ranieri Althoff 944b220c90 Use native optimizations instead of hardcoded defaults 2015-05-25 00:59:39 -03:00
Konrad Kuśnierz c5ea8c98fb Add cn option to struct
"cn" a sequence of exactly n chars corresponding to a single lua string.
2015-05-19 18:50:02 +02:00
Konrad Kuśnierz 02ab50d8dd Minor mistake in unpacking string 2015-05-19 13:41:40 +02:00
Konrad Kuśnierz 48fefb03cb Add float and double support for struct
@edubart suggested it would be still better to have it done within C as
extra module (just like lbitlib).

"f" a float (4 bytes).
"d" a double (8 bytes).

http://en.wikipedia.org/wiki/IEEE_floating_point
2015-05-19 13:13:14 +02:00
Konrad Kuśnierz 7ea6c46b2c Add binary operations for lua
This is something I was always missing - posibbility to operate on
binary files or streams in pure lua. In most cases we do only need to
read simple variables from files such as integers with different amount
of bytes. This "class" will provide that ability.

It's a simple implementation of following C module for lua:
http://www.inf.puc-rio.br/~roberto/struct/

It has much less, though. Following elements have been implemented:

">" flag to set mode to big endian.
"<" flag to set mode to little endian.
"b" a signed char.
"B" an unsigned char.
"h" a signed short (2 bytes).
"H" an unsigned short (2 bytes).
"i" a signed int (4 bytes).
"I" an unsigned int (4 bytes).
"l" a signed long (8 bytes).
"L" an unsigned long (8 bytes).
"s" a zero-terminated string.

An example how to use it:

```lua
local packed = Struct.pack('<LIhBsb', 123456789123456789, 123456789,
-3200, 255, 'Test message', -1)
-- packed is now a lua string we can save to file as binary data
local L, I, h, B, s, b = Struct.unpack('<LIhBsb', packed)
print(L, I, h, B, s, b)
```

You can use g_resources.readFileContents as function to read binary
files and parse them via this class.
2015-05-18 21:38:05 +02:00
Konrad Kuśnierz 0597ded1d3 Merge pull request #648 from Shawak/Shawak-b_vc12
fix visual studio include paths
2015-05-13 06:32:47 -05:00
Konrad Kuśnierz c3c2ac80e7 Fix drawing creatures in UICreature
I will leave this ugly hack for the time being, but I do encourage to change it later on. The whole "resize" boolean makes no sense since the outfit is resized by the destination rectangle anyway. I believe we should give it a try with a real size of the object defined in dat by the user for creatures bigger than 32x32.

Please keep in mind that we did cut bigger creatures to 48x48 (2*Otc::TILE_PIXELS*0.75f) before as well, so nothing really changed besides ability to properly draw bigger creatures than 64x64 on battlelist.
2015-05-12 23:44:10 +02:00
Konrad Kuśnierz 6bd0e37670 Correctly draw creatures bigger than 64x64
Battlelist icon
2015-05-12 10:16:14 +02:00
Konrad Kuśnierz 11990815a6 Correctly load corrupted otmm file, should fix #606 2015-05-10 22:31:10 +02:00
Konrad Kuśnierz ded8fef16b Change bitter badge and made it inline with travis 2015-05-10 22:25:46 +02:00
Konrad Kuśnierz 53dbbd2ba3 Decrease RAM usage by at least 200MB
This was quite ridiculous.

TILESTATE_LAST = 1 << 24

Basically we were creating 2^24 Color structures within the array, each
of them has 4 floats (16 bytes) resulting in about 256 MB of extra
wasted memory.
2015-05-09 20:27:04 +02:00
Eduardo Bart e4cdb3834b Merge pull request #661 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-05-08 11:28:17 -03:00
The Gitter Badger 86dd7958e1 Added Gitter badge 2015-05-07 21:42:02 +00:00
TheSumm fe98efdc21 Fix modal dialog auto sizing, fixes #556 2015-04-20 19:22:50 +02:00
TheSumm 8e5bbcd3a1 Add tab-spacing tag to MoveableTabBars 2015-04-20 03:32:32 +02:00
TheSumm f936ab9aab fix #638 2015-04-19 13:59:45 +02:00
TheSumm 84f6cdec86 Fix #576, PopupMenus close when leaving the game 2015-04-19 13:56:03 +02:00