Commit Graph

1350 Commits (26ff41185e33d8a92670755b2ad3a2954b63dced)

Author SHA1 Message Date
Nicolas Hake 02416caec5 IsValidUtf8: Obey string length parameter when checking continuation bytes
This fixes a bug where sequences were incorrectly accepted when they ended with
a multibyte sequence, the end of which was beyond the passed string length.
2011-05-17 17:55:27 +02:00
Nicolas Hake 1ba02a610b IsValidUtf8: Correctly mask start byte before calculating code point value
This fixes a bug where valid sequences were incorrectly rejected as having
a value beyond the valid Unicode codepoint range.
2011-05-17 17:53:21 +02:00
Günther Brammer c70013b208 editor: File/Save Game As correctly preserves the Origin 2011-05-15 19:40:14 +02:00
Günther Brammer 3c943479ab editor: File/Save creates a savegame when the original scenario was one 2011-05-15 19:38:47 +02:00
Günther Brammer 8bb2afc477 editor: Remove File/Save Game in favor of File/Save Game As
Overwriting a non-savegame scenario with a savegame is too seldomly useful
to feature prominently in the menu.
2011-05-15 18:07:26 +02:00
Günther Brammer 35a8667672 Savegames: Include *.ocf directories in Origin, not *.c4f 2011-05-15 19:32:39 +02:00
Günther Brammer c857c1770b Do not put folder local defs into Game.DefinitionFilenames
Instead, rely on Origin pointing to them in savegames.
2011-05-15 19:51:34 +02:00
Günther Brammer 9271365b18 Use GetRelativePathS in C4SDefinitions::SetModules
This might deal better with doubled path separators, but mostly it's about
using a common library function instead of duplicating logic.
2011-05-09 17:32:14 +02:00
Günther Brammer b1e3eeb32d Savegames: Do not assert() that all C4Values are unenumerated
Only C4V_Any never makes it into the Type field of a C4Value.
2011-05-15 19:30:53 +02:00
Nicolas Hake 34aa95562d Allow resolution change with mismatching display refresh rates
Removing the DM_DISPLAYFREQUENCY flag from the DEVMODE::dmFields
member lets Windows choose its own preferred frequency.
2011-05-15 16:24:26 +02:00
Nicolas Hake e791b14af9 Fix #600 (Unable to change resolution and Fullscreen fails)
MultiByteToWideChar doesn't do anything when it gets a buffer length of 0,
so it doesn't nullterminate the memory, so EnumerateDisplayModes fails because
of an invalid monitor id.
2011-05-15 16:06:14 +02:00
Günther Brammer 432cae134f Remove unused C4DefList::LoadFolderLocal and C4DefList::LoadForScenario 2011-05-15 14:11:12 +02:00
Günther Brammer 06cfc6e4fc Remove unused C4SDefinitions::AssertModules 2011-05-15 14:10:22 +02:00
Günther Brammer 2d9d0d8596 Reduce verbosity of backtraces with object parameters 2011-05-09 23:19:31 +02:00
Günther Brammer 273acfff80 win32: Make vfw32 optional
The features it was used for are very seldomly used, and some build
environments don't have the import library.
2011-05-12 17:13:38 +02:00
Günther Brammer f7d29fab61 Hardcode savegame and demo folder names (#594)
Previously, they were stored in the configuration and written to the
config file by default. So they still had the old .c4f file extension and
weren't displayed in the scenario selection dialog. Approximately nobody
changed this configuration, and those that do can simply use symlinks
instead.
2011-05-09 17:35:44 +02:00
Günther Brammer f2d2cd098b Correct is-current-code-in-function assertions 2011-05-08 19:28:48 +02:00
Günther Brammer f97cde74c3 Split C4V_Any into C4V_Nil for the data type and C4V_Any for the typecheck 2011-05-09 14:37:28 +02:00
Günther Brammer fed6d6a0de Script: Debug output for proplist contains all properties 2011-05-05 22:27:22 +02:00
Günther Brammer af52109912 Small parser cleanups 2011-05-02 23:52:41 +02:00
Günther Brammer 9c4dabc810 Maintain a pointer to the last added bcc, instead of one after that 2011-04-13 02:16:55 +02:00
Günther Brammer e3bcd14db0 Simplify Parse_FuncHead 2011-04-18 01:50:33 +02:00
Günther Brammer baeffbc67f Let script functions have less than 10 parameters
Script functions using ... or Par() still take all 10
parameters, but those are the exceptions now. This makes
calling functions with few parameters faster.
2011-04-18 01:48:37 +02:00
Günther Brammer 63a3b546d5 Use bytecode to push variables onto the stack 2011-04-17 23:52:55 +02:00
Günther Brammer 50b6fcf47a Use AB_DUP instead of AB_PARN 2011-05-02 21:39:52 +02:00
Günther Brammer 0b8c2bba37 Use AB_DUP instead of AB_VARN 2011-05-02 21:53:58 +02:00
Günther Brammer 76376ee7bb Remove unused C4AulFunc::GetLocalSFunc
ResortObjects was the only user, and that's gone now.
2011-05-03 00:56:49 +02:00
Günther Brammer 177b085271 Script: SetPlrExtraData and SetCrewExtraData can store strings 2011-05-02 23:01:19 +02:00
Günther Brammer 1583ad603b Scenario.txt: Definition1 defaults to Objects.ocd
Every scenario in the repository uses that, so it should be the default.
2011-05-03 00:16:20 +02:00
Nicolas Hake a6429bad54 c4group: Remove timestamps from groups, use checksums only 2011-05-01 13:37:36 +02:00
Günther Brammer 17265be0aa Remove some dead savegame code 2011-05-01 13:50:37 +02:00
Günther Brammer e2c495e274 Do not append a \0 to the Scenario.txt 2011-04-29 18:16:48 +02:00
Günther Brammer fadacd3bb4 Move StrToI32 to lib/ 2011-05-01 18:55:02 +02:00
Günther Brammer 117cbe2b81 Script: Add warnings against wrong operator parameter types 2011-05-01 18:53:50 +02:00
Günther Brammer 90a8fa356c Remove some unused script callback names 2011-04-28 20:27:36 +02:00
Günther Brammer 5a64272e3b Optimize multiple Find_AtRect criteria
Find_Or(Find_InRect(), Find_AtRect()) still needs to search the whole
object list, and Find_And(Find_InRect(), Find_AtRect()) simply uses one
of the two bounds to limit the search, though.
2011-04-28 20:24:21 +02:00
Günther Brammer 7b640daedb Script: Add "\t" escape for tabulator 2011-04-13 23:51:35 +02:00
Günther Brammer 82f6b180e1 Split C4Value typecheck into two variants, one not permitting nil
Previously, the typecheck callers often separately checked for
null pointers. This is superfluous since C4Value already checks
for null pointers.
2011-04-11 23:33:11 +02:00
Günther Brammer 51d75e891b Move script operator parameter types from a table into the code
This makes the target type visible to the compiler.
2011-05-01 17:16:02 +02:00
Günther Brammer 7eedece257 Replace C4Value typecheck table with switch statements
This has the advantage that the compiler can simplify the check when the
target type is known at compile time.
2011-04-10 03:46:59 +02:00
Günther Brammer c21248d322 Decrease the initial size of hash tables
At the moment, the majority of hash tables has at most one element, so
allocating more is wasteful. There needs to be at least one unused bucket
in the table, so the initial size is 2.

Also, increase the maximum load factor to 3/4.
2011-04-14 16:16:59 +02:00
Günther Brammer b1a76adb62 Fix debug build 2011-04-14 15:36:31 +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
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
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
Günther Brammer 38ee07e7fc Remove unused third StdStdBuf::ReplaceChar parameter
C4InputValidation tried to use it but obviously couldn't. Validation of
absolute windows filepaths remains as broken as before.
2011-03-28 18:27:01 +02:00
Günther Brammer 2031fb0644 Do not enumerate pointers before saving
Instead, retrieve the number on demand during serialization. This saves
lots of unnecessary code and makes serialization actually not modify the
objects. At least with the exception of nInfo, but that should be save.
2011-03-28 00:15:06 +02:00
Günther Brammer 8a17593c99 Fix StdMeshInstance deserialization
The BitfieldAdapt had a builtin default of 0 for serialization, so it needs
that default when deserializing. Also remove that builtin default.

When AnimationNodes were loaded out of order, some of them were thrown away
when their vector was shortened. Don't shorten the vector during load.
2011-03-31 01:25:27 +02:00
Günther Brammer b403fc61c1 Reduce code duplication a bit 2011-04-01 00:03:02 +02:00
Günther Brammer e6e5b801d6 Check proplist reference lists in debug builds
This should help find the next added-to-list-twice bug.
2011-03-31 22:53:07 +02:00
Günther Brammer 38e9926c12 Do not add a C4Value to a proplist reference list it already is on
This could happen when nType was PropList or Object and Type was the other.
2011-03-31 22:26:07 +02:00
Günther Brammer f3365ab73b Arrays with multiple references are stored just once
This is done with the new C4ValueNumbers class. Every array and proplist
with the exception of objects, definitions and effects gets a number
when the game is saved and is restored via that number on load.
2011-03-27 18:14:41 +02:00
Günther Brammer c8ad0228b2 Store Objects in the Game.txt instead of a separate Objects.txt 2011-03-27 16:51:14 +02:00
Günther Brammer f582a97998 Add C4ValueNumbers helper class and pass it through to C4Value::CompileFunc
In preparation of using that class to enumerate and denumerate various
pointers.
2011-03-26 23:59:35 +01:00
Günther Brammer 5fd6770edd Re-add entry in player menu to save the game 2011-03-27 18:22:55 +02:00
Sven Eberhardt b01cddc560 control config dialog improvements 2011-03-31 16:26:59 +02:00
Sven Eberhardt 269c7b208c control config dialog 2011-03-30 22:11:47 +02:00
Günther Brammer b5dea20dae Remove some dead code 2011-03-27 18:15:10 +02:00
Günther Brammer 69d161bdbb editor: Go into startup mode if the first scenario failed to load (#592)
Previously, the application would try to go into startup because the
editor was active, but then try to start a scenario because the startup
mode flag wasn't set. Check both the start flag and the editor flag in both
places.
2011-03-27 17:58:41 +02:00
Julius Michaelis bf161543b7 Fix 1aab98cfd1e2 2011-03-22 16:42:36 +01:00
Günther Brammer 0f44b39ab9 Split CStdApp out of StdWindow.h into StdApp.h 2011-03-19 22:09:10 +01:00
Günther Brammer 1b361bbcb7 win32: Remove some unnecessary CStdApp helper functions 2011-03-21 17:54:34 +01:00
Günther Brammer 513dd9b252 A simple priority mechanism for the StdScheduler
Everything is more important than the next game tick: network activity,
user input or editor redraw.

On windows, the ordering is still delegated to (Msg)WaitForMultipleObjects.
2011-03-19 13:59:56 +01:00
Günther Brammer fe1ea5c5a3 linux: remove inotify support on glibc < 2.4 2011-03-17 02:33:56 +01:00
Günther Brammer cacceef1c6 linux: use eventfd for CStdNotifyProc 2011-03-17 02:26:37 +01:00
Günther Brammer 03b3678050 Remove unused CStdNotifyProc::Check 2011-03-17 02:22:33 +01:00
Günther Brammer 8036211c30 linux: Use timerfd instead of poll timeouts 2011-03-15 17:27:10 +01:00
Günther Brammer acac8a01d4 Store the name of an effect in its proplist 2011-03-16 19:07:18 +01:00
Günther Brammer 487ccfd762 Remove unused C4Effect::iNumber 2011-03-16 17:59:25 +01:00
Günther Brammer 682319cc2b Remove unused Get-Effect-by-number function 2011-03-16 17:51:30 +01:00
Günther Brammer b533c8b8fc Split C4Effect construction into static function and constructor
This way, the function can return the effect that absorbed the new effect.
2011-03-16 17:51:03 +01:00
Julius Michaelis 7827f60775 Fix 3f4fcad06cfd 2011-03-21 23:26:21 +01:00
Julius Michaelis 9e1bff2e17 Save IRC clients joined channels 2011-03-21 22:39:36 +01:00
Günther Brammer 58e4e3aa6b Blame the first group in a groupset if no group had the desired file 2011-03-14 21:53:55 +01:00
Günther Brammer 2465c05afc Don't crash trying to display stringtable-not-found error message (#588) 2011-03-14 21:04:27 +01:00
Martin Plicht 2eb7a7c3e2 mac: Remove old c4 icons and replace by low-res oc icons, adjust file types understood by app 2011-03-14 21:54:56 +01:00
Julius Michaelis 61d93c39cf Fixed some files which didn't include C4Include properly (all except C4Globals.cpp caused by 17d0ceb9ef2f) 2011-03-14 16:32:01 +01:00
Armin Burgmeier 0f85881ce9 Fix starting the engine with a scenario with a trailing slash 2011-03-14 20:56:03 +01:00
Martin Plicht bbbe2ace49 mac: Use new file extensions 2011-03-14 20:12:00 +01:00
Günther Brammer 492ae967fc win32: include windows.h before GL/glew.h
The GL/glu.h from mingw64 needs the WINAPI macro and is included by glew.h.
2011-03-14 16:19:29 +01:00
Nicolas Hake 35745ed2a3 MinGW: Fix pointer output format on crash reporter 2011-03-13 20:36:20 +01:00
Günther Brammer 4a9fb459d2 fix CSurface::ClearBoxDw size calculations 2011-03-13 23:33:52 +01:00
Günther Brammer 2d1ea830ec win32: Do not include windows header from PlatformAbstraction.h 2011-03-13 22:21:16 +01:00
Günther Brammer 16538864f6 win32: Remove unused function C4Facet::Draw 2011-03-13 22:11:04 +01:00
Günther Brammer 05146718c0 Remove RECT structure from platformindependant code 2011-03-13 20:45:30 +01:00
Günther Brammer 6dafb53c15 Replace RECT with C4Rect in CSurface 2011-03-13 20:32:21 +01:00
Günther Brammer 2a1db87698 Replace RECT CStdWindow::GetSize argument with C4Rect 2011-03-13 20:00:03 +01:00
Günther Brammer d5ab5d31bb Replace RECT PageFlip arguments with C4Rect 2011-03-13 17:41:42 +01:00
Günther Brammer 6c2a89eaf8 Replace timeGetTime with a platformneutral GetTime wrapper 2011-03-13 17:25:35 +01:00
Nicolas Hake d2070b8aa3 win32: Fix build 2011-03-13 20:30:33 +01:00
Armin Burgmeier 884809e8f2 Merge filename extension changes 2011-03-13 17:15:40 +01:00
Günther Brammer e56a5b0136 Correctly use the C4RGB macro
C4RGB sets the alpha channel to 0xFF instead of 0x00 like RGB did.
2011-03-13 17:09:47 +01:00
Armin Burgmeier c1f340a74a Change .c4u extension to .ocu 2011-03-13 17:09:17 +01:00
Armin Burgmeier 8ff1667533 Change .c4l extension to .ocl 2011-03-13 17:08:02 +01:00
Armin Burgmeier b33bc157bd Change .c4v extension to .ocv 2011-03-13 17:07:19 +01:00
Armin Burgmeier 2e0b00a5e0 Change .c4b extension to .ocb 2011-03-13 17:06:23 +01:00
Armin Burgmeier 3a9556f1a3 Change .c4m extension to .ocm 2011-03-13 17:01:53 +01:00
Armin Burgmeier c61e92ec98 Change .c4i extension to .oci 2011-03-13 16:56:26 +01:00
Armin Burgmeier 675c077ed2 Change .c4d extension to .ocd 2011-03-13 16:55:00 +01:00
Günther Brammer b0dab9283c Fix initialization order of C4Game causing a crash (oops) 2011-03-13 16:46:18 +01:00
Armin Burgmeier 2a2408f9a8 Change .c4p extension to .ocp 2011-03-13 16:39:48 +01:00
Armin Burgmeier eaf62f71f9 Change .c4f extension to .ocf 2011-03-13 16:38:33 +01:00
Armin Burgmeier 41a1b5867d Change .c4g extension to .ocg 2011-03-13 16:16:45 +01:00
Armin Burgmeier e282bf9a9c Change .c4s extension to .ocs 2011-03-13 16:11:55 +01:00
Armin Burgmeier 085acf3d9a Remove .c4k icon 2011-03-13 16:01:34 +01:00
Armin Burgmeier c69e2c9248 Remove .c4x icon 2011-03-13 16:01:34 +01:00
Günther Brammer c49f8b32d5 win32: wrap all windows.h-includes to always undef troubling macros 2011-03-13 15:48:45 +01:00
Günther Brammer 7bc20a8dc3 win32: add some missing #include <windows.h> 2011-03-13 02:03:45 +01:00
Günther Brammer 01c4845bb5 win32: add includes missing for some windows header versions 2011-03-13 01:15:52 +01:00
Günther Brammer 226eb9b366 win32: work around wingdi.h macros harder 2011-03-13 01:15:22 +01:00
Günther Brammer 81b9297498 win32: include windows.h before dbghelp.h 2011-03-12 23:45:04 +01:00
Günther Brammer 506466ef2e Remove the jpeglib.h versus windows.h/rpcndr.h boolean workaround 2011-03-11 14:37:51 +01:00
Günther Brammer 21a8f337d5 win32: avoid winbase.h in PlatformAbstraction.h 2011-03-12 15:29:21 +01:00
Günther Brammer 62bcf4d5c2 win32: move StdStrBuf(const wchar_t*) to StdBuf.cpp to avoid winnls.h 2011-03-12 15:26:35 +01:00
Günther Brammer 6912b118e5 If boost uses static_assert, do not make static_assert use boost 2011-03-11 14:58:58 +01:00
David Dormagen e30811c7c2 removed obsolete FnIncinerate 2011-03-12 22:10:28 +01:00
David Dormagen fa733be978 FirePhase fix and further performance improvements on the fire effect
that means it looks sooo GWE now.
2011-03-12 20:49:36 +01:00
David Dormagen 5577766ab1 line endings fixed 2011-03-12 19:29:25 +01:00
David Dormagen 3bd3a1fcbb most of the fire stuff removed from the engine 2011-03-12 18:38:47 +01:00
Armin Burgmeier 52c2227cef Merge 2011-03-12 14:12:14 +01:00
Armin Burgmeier fd2b981547 Backed out changeset: b019ea52537e
Breaks build with more recent jpeglib such as used by nightly builds
2011-03-12 14:12:04 +01:00
Armin Burgmeier 68c214dd98 Make player file saving work again 2011-03-12 13:55:05 +01:00
Armin Burgmeier 6e025ee4ec Remove C4Group sort order for files no longer used in OC 2011-03-12 13:55:01 +01:00
Günther Brammer 8569eaab8c win32: Do not include windows.h from PlatformAbstraction.h
A few windows headers are still included, but not the big offenders
rpcndr.h, wingdi.h and winuser.h. Unfortunately, the latter two need to be
included from StdWindow.h, so still wind up in a lot files, which means
some of the #defines in them need to be undone. To avoid doing that in
multiple places, a few more files include StdWindow.h now.
2011-03-11 03:48:25 +01:00
Günther Brammer 23eedce46a Make RECT use int32_t instead of long 2011-03-12 15:31:37 +01:00
Günther Brammer 040ebfa612 Replace ZeroMemory(p,l) with memset(p,0,l) 2011-03-12 14:59:41 +01:00
Günther Brammer 2820716057 Include fewer headers from C4Game.h so C4NetIO.h isn't included from there 2011-03-11 03:43:38 +01:00
Günther Brammer ee355a7bc9 Do not include C4Network2IRC.h from C4Application.h 2011-03-11 03:41:05 +01:00
Günther Brammer 81d64df737 Do not use Windows' RGB macros for BGR colors 2011-03-11 03:37:27 +01:00
Julius Michaelis 0d804cad50 Workaround a jpeglib 6b weirdness 2011-03-09 00:01:27 +01:00
Nicolas Hake 894fefa8c9 Remove unconditional infinite loop in C4GameObjects 2011-03-08 17:54:12 +01:00
Nicolas Hake b332e73ba3 C4Group: Fix FindNextEntry
The char* parametered FindNextEntry didn't pass the last found
filename to its implementation, so it always found the first file
matching the wildcard
2011-03-08 17:53:30 +01:00
Günther Brammer c009851ce2 Script: Remove unused category parameter from GetDefinition
While at it, also remove it from the internal function and a bunch of dead
code from C4IDList.
2011-03-07 21:26:56 +01:00
Günther Brammer 8323f6c01d Add a standalone C4Script interpreter 2011-03-05 17:40:22 +01:00
Günther Brammer 89413fcd6e Move some code out of C4ScriptHost.cpp 2011-03-05 17:36:16 +01:00
Günther Brammer de626b18aa Script: Only show error messages in the Log 2011-03-05 16:50:22 +01:00
Günther Brammer 39276c6fd1 Check all pointers to PropLists in c4values in debug engines
This can find some refcounting errors by verifying that the proplist did
not get deleted before it is used.
2011-02-06 22:30:31 +01:00
Günther Brammer 75dc49e746 Replace Objects.ObjectNumber with C4PropListNumbered::CheckPropList
There's no need to go through the entire object list to get an object
number, so convert most usages of ObjectNumber(obj) with obj->Number. Add a
new method to check proplist pointers for debugging purposes to
C4PropListNumbered.
2011-02-06 01:59:49 +01:00
Günther Brammer a7615ddced Make C4PropListNumbered global data static members of the class
Previously, this was in ::Game and ::Objects. Both classes still work on
that data, but not as much as before.
2011-03-05 03:32:51 +01:00
Günther Brammer f4ee636072 Remove some redundant Default methods
Using the same method for the constructing and clearing an instance just
leads to leaks and subtle bugs.
2011-03-05 03:24:11 +01:00
Günther Brammer 01e9dce9ce Store C4ComponentHost filenames in StdCopyStrBufs 2011-03-05 02:45:27 +01:00
Günther Brammer 8ff6ae847c C4Group::LoadEntry takes pointer instead of non-const reference 2011-03-05 02:44:26 +01:00
Günther Brammer 28a154dcdf Drop unused third C4LangStringTable::ReplaceStrings parameter 2011-03-05 01:05:36 +01:00
Günther Brammer 609b9bbe93 Fold C4ComponentHost::Default() into C4ComponentHost::C4ComponentHost() 2011-03-05 01:03:09 +01:00
Günther Brammer 6eebaeaac8 Fold C4AulScript::Default() into C4AulScript::C4AulScript() 2011-03-04 15:20:21 +01:00
Günther Brammer 60dcd65708 Languages.GetPackGroup creates a new GroupSet containing the original group
Just moves some code from C4ComponentHost to C4Language.
2011-02-07 03:37:35 +01:00
Julius Michaelis 98717a4051 C4Script: Remove obsolete function GetSystemTime 2011-03-05 14:25:37 +01:00
Günther Brammer 374d8e743b C4Group: Error message for Open failing due to filename on the ignorelist 2011-03-04 03:49:39 +01:00
Günther Brammer 111df0392c Split C4Script.cpp into game functions and C4Script support functions 2011-03-04 13:49:41 +01:00
Nicolas Hake d82815087e win32/g++: Silence some format warnings 2011-03-04 00:40:17 +01:00
Nicolas Hake 73ec989261 win32: Avoid build error when using old SDK headers 2011-03-04 00:08:11 +01:00
Nicolas Hake 0800b3a209 StdBuf: change member order to silence g++ warnings 2011-03-04 00:02:43 +01:00
Günther Brammer 60ce34ad52 Remove redundant global pConfig 2011-03-03 17:11:03 +01:00
Günther Brammer 264009060c Script: Remove Method from function descs 2011-03-03 02:25:01 +01:00
Günther Brammer 45620c2b85 Move some C4AulDebug code into C4AulDebug 2011-03-03 00:58:43 +01:00
Günther Brammer 8749395a18 Use Nillable<void>() instead of C4VNull as the always-nil return value 2011-03-03 00:57:38 +01:00
Günther Brammer bdbe3beabf Optimize the template engine script function wrappers slightly 2011-03-02 23:42:34 +01:00
Günther Brammer e250312c26 Move C4DefList class into from C4Def.cpp/h to new C4DefList.cpp/h 2011-03-03 17:10:22 +01:00
Günther Brammer ed86af5f29 Script: Proplists with Object prototypes are also Objects 2011-03-02 14:12:06 +01:00
Günther Brammer 78c2c98dce c4group: new command "Pack To" which takes a target filename
This allows creating packed groups in a build directory without copying
the source files first.
2011-03-01 22:56:05 +01:00
Julius Michaelis 530a70f43c Create a log file for each instance of clonk on UNIXes (cmake only) 2011-03-02 18:54:28 +01:00
Sven Eberhardt 37b630a472 load additional player control defs from definition local System.c4g files
adjust invalid video mode bit depth values
2011-03-02 18:13:43 +01:00
Sven Eberhardt c6c3af0e1b fix wrong video mode selection in ApplyResolutionConstraints() 2011-03-02 17:35:52 +01:00