David Dormagen
55db5fa98a
helper object for floating messages added
2011-04-14 18:36:20 +02:00
David Dormagen
a9b5fc9c95
fix
2011-04-14 18:23:09 +02:00
Günther Brammer
1e28504cde
Optimize the script interpreter a bit
...
Integer and boolean constants aren't wrapped in a temporary C4Value. The
overflow check is reduced to one subtractions and comparison to a compile
time constant. C4Value::Set(const C4Value&) doesn't duplicate the check for
the setting to the same value in C4Value::Set(C4V_Data, C4V_Type).
2011-04-10 02:00:27 +02:00
Günther Brammer
5596a57d83
Do not check for stack underflow in release builds
...
Unlike overflows, underflows can only occur when the parser is faulty. In
release builds they just slow the interpreter down.
2011-04-10 17:52:20 +02:00
Günther Brammer
dbe7c37db0
Script: Only debug if the debugger was present before compilation
...
This saves a lot of AB_DEBUG bytecodes in the normal case.
2011-04-10 03:40:55 +02:00
Günther Brammer
435ed78cd9
Script: Remove unimplemented Par(n)=foo
2011-04-10 02:05:11 +02:00
Günther Brammer
a3fab0234e
Create PropLists with one bytecode instead of one per property
2011-04-09 21:35:16 +02:00
Günther Brammer
71f42d7d8f
Correct assert checking that the bytecodepointer is still in the function
...
Previously, if the first byte code of the function was an AB_FUNC, the
assert would erroneously fail.
2011-04-12 00:10:51 +02:00
Günther Brammer
4575f28605
Log call stack when using a deleted object
2011-04-13 15:38:49 +02:00
Günther Brammer
4ae204e2fb
Remove unnecessary includes pulling C4GUI into the script engine
2011-04-13 15:37:12 +02:00
Felix Wagner
989f1925f1
Forgot to remove the foo, bar crap
2011-04-11 22:31:48 +02:00
Maikel de Vries
d515df6055
Objects: Some fixes to cable network
...
Removed some erroring code from the libraries.
2011-04-11 18:08:57 +02:00
Maikel de Vries
5da93528c6
Objects: Introduced delivery system for the cable network
...
Based on the concept of automatic production in buildings, and the current network capacities. Cable cars receive requests from producers and try to fulfill these request by transporting objects in the network.
2011-04-07 16:04:29 +02:00
Maikel de Vries
1ce2c16c36
Objects: Enhanced Producer library and adapted tool workshop
2011-04-07 16:02:35 +02:00
Maikel de Vries
ad15a6ed4f
Objects: Library for object production
...
Adapted foundry to library, should ultimately interact with cable network.
2011-04-02 18:17:24 +02:00
Felix Wagner
b425cf71da
Reworked the pathfinding data assembly, various name changings in the variables
...
I did not made some benchmarks...old system still exists
Removing of cables missing but working on that
2011-04-11 13:43:46 +02:00
Felix Wagner
f45799fd16
Removed some crossing specific code from the lib, more shifting to come
2011-04-05 17:56:53 +02:00
Günther Brammer
9b3afcef04
Remove IDS_LANG_CHARSET and supporting code, everything is in UTF-8 now
2011-04-09 02:51:57 +02:00
Günther Brammer
21e28a4689
Script: Use Unicode instead of Byte strings
...
Internally, strings are UTF-8 as before, but GetChar returns an
Unicode code point instead of a byte from the UTF-8 encoded string,
and Format("%c") takes an Unicode code point as well.
2011-03-10 00:26:31 +01:00
Günther Brammer
e537296829
editor: Change FileSelect abstraction to use StdStrBuf
...
Of course, windows still uses a buffer on the stack, but at least the other
versions don't.
2011-04-08 23:52:40 +02:00
Nicolas Hake
05608a3edd
CStdFont: Assert UTF-8 conformance before drawing or measuring text
2011-04-05 21:03:15 +02:00
Nicolas Hake
fea8b6ee9f
C4Gui::Edit: Enable correct cursor movement and text selection on UTF-8 strings
2011-04-05 21:00:02 +02:00
Nicolas Hake
c4276e84c4
Split UTF-8 validation out of StdStrBuf
2011-04-05 20:58:40 +02:00
Nicolas Hake
5e2e25cc74
win32: Fix StdCompilerConfigRead::ReadString
2011-04-05 18:04:32 +02:00
Nicolas Hake
ab2be9b53f
win32/msvc: Fix build
2011-04-05 18:03:27 +02:00
Nicolas Hake
25f41d6e9f
Remove StdConfig.cpp from CMake c4group project
2011-04-05 18:03:03 +02:00
Günther Brammer
3f7e879ffe
win32: Use Unicode APIs for the user interface
2011-04-03 15:47:02 +02:00
Günther Brammer
0abe1bb633
win32: Use Unicode registry APIs
2011-04-02 18:48:01 +02:00
Günther Brammer
702dc65b83
win32: Add helper functions to convert UTF-8 to UTF-16
...
They mostly add automatic memory management to MultiByteToWideChar.
2011-04-02 16:48:54 +02:00
Günther Brammer
2133ed2cd8
Add missing move constructors to StdCopy*Buf
2011-04-02 18:09:46 +02:00
Günther Brammer
6e30f2b7e8
win32: Remove unused StdConfig class and associated Registry APIs
...
It has long since been replaced by the StdCompilerConfig* classes. A few
of the Registry functions are still used in other code, and a few are now
implementation details.
2011-04-02 17:49:55 +02:00
Günther Brammer
bd051a972d
win32: Remove duplicate file type association code from the engine
...
The installer already does this, and on newer windows versions the engine
isn't able to do this anyway.
2011-04-02 17:31:01 +02:00
Günther Brammer
b46b827cdc
Add a few virtual destructors
...
This ensures that classes that inherit from these have their destructors
called even if they are deleted with a pointer to the base class.
Though at the moment, this just silences a warning.
2011-04-02 00:18:14 +02:00
Günther Brammer
ce6f2c9fe0
editor/gtk: Use "draw" instead of "expose-event" signal with GTK+ 3.0
...
Since the event resp. cairo context isn't used, both events can share a
handler for now.
2011-03-31 00:48:47 +02:00
Günther Brammer
6768614feb
Silence various warnings
2011-03-28 20:58:42 +02:00
Günther Brammer
1c43f9dd76
sdl: fixes inspired by compiler warnings
2011-03-30 21:18:16 +02:00
Günther Brammer
b2b4176745
Undeprecate the Melee rule
...
The Melee rule is the interface to distinguish Melee- and Cooperative
scenarios for various purposes. Using a separate flag might be cleaner, but
would violate the do-not-repeat-yourself-rule.
2011-03-30 21:17:57 +02:00
Günther Brammer
c6751e1620
Undeprecate C4ID::Clonk
...
The Clonk C4ID is used as a default for scenarios that do not specify a
crew.
2011-03-30 21:15:16 +02:00
Günther Brammer
4f62dac0bc
Rewrite C4Group::View a bit for clarity
2011-03-30 21:13:47 +02:00
Günther Brammer
5d0df4f028
win32: Miscellanous fixes inspired by compiler warnings
2011-03-30 21:06:30 +02:00
Günther Brammer
259c4aa30a
Fix DirectoryIterator::DirectoryIterator(const DirectoryIterator &)
...
Thankfully, this copy constructor is unused, so nothing relied on the
previously broken behaviour.
2011-03-30 21:11:37 +02:00
Günther Brammer
3bbf7c6c38
Add DirectoryIterator & DirectoryIterator::operator = (const DirectoryIterator &)
...
Because every class with pointer members should have one.
2011-03-30 21:04:42 +02:00
Günther Brammer
24fe22faff
Remove redundant check for AB_FUNC bytecode having a function
...
AB_FUNC always has a function.
2011-03-28 20:57:51 +02:00
Günther Brammer
5b808be269
Remove some unused variables
...
gcc 4.6 finds variables that are write-only.
2011-03-28 19:31:28 +02:00
Günther Brammer
881e883ecc
Script: Remove Bubble engine function in favor of the script implementation
2011-03-30 21:10:05 +02:00
Günther Brammer
3844dc8740
Script: PlayerObjectCommand only takes ints as Tx parameter
...
C4Object::ObjectCommand was not updated for the C4Value-in-C4Command change
and still exposed the raw pointer values. Given that SetCommand works just
fine for "Call" commands, simply change the Tx parameter to int.
2011-03-28 18:43:59 +02:00
Günther Brammer
7fa761a2a6
Script: AddMenuItem any parameter only accepts object and definition proplists
2011-03-27 18:17:18 +02:00
Günther Brammer
303359f4ab
Particles: Remove the unused target coordinates from Face
...
Particles were always drawn centered around their position, and the
"used because stup" comment explaining the use of C4TargetRect instead of
C4Rect is probably outdated.
2011-03-28 18:36:16 +02:00
Günther Brammer
e31e2351c6
Do not update waypoints before transfer zones
...
Unused variable noticed by gcc 4.6.
2011-03-28 18:38:44 +02:00
Günther Brammer
0c5f1be59d
Fix network connection error messages after OSTR removal
...
Using const char * as an out parameter doesn't work. Finally noticed by
gcc 4.6.
2011-03-28 18:29:19 +02:00