Commit Graph

1349 Commits (c02354f56c518d6521426dd0b7092da11a36621a)

Author SHA1 Message Date
Sven Eberhardt 339cceb6d4 MinGW fix for swprintf 2011-07-16 12:56:41 +02:00
Sven Eberhardt 6fadd97438 MSVC fix: length parameters for swprintf 2011-07-16 12:08:00 +02:00
Sven Eberhardt 3a8ce9b25e player control defs: ClearPrevious flag for player control overloading 2011-07-16 11:58:38 +02:00
Maikel de Vries e2db1bc85a Actions default to COMD_Stop, Decel for float and swim procedures
With this change everything should behave as normal, still not a fan of these numerous float hacks.
2011-07-06 19:11:12 +02:00
Maikel de Vries d550f7c7da Differentiate between COMD_None and COMD_Stop
Was necessary after 267ebb600481 and current abuse of FLOAT procedure. None keeps the current motion, Stop halts the current motion of a procedure.
2011-07-06 18:13:39 +02:00
Maikel de Vries eb530c6017 Removed Defcore:Prey and OCF_Prey
Had no use in the engine, should therefore be defined in C4Script if deemed necessary.
2011-07-05 13:40:40 +02:00
Maikel de Vries 248f85c2eb Removed Defcore:Edible and OCF_Edible
Had no use in the engine, should therefore be defined in C4Script if deemed necessary.
2011-07-05 13:10:56 +02:00
Maikel de Vries cb1490297a Implemented COMD_Stop for FLOAT procedure
Used the equivalent of the swimming procedure.
2011-07-05 12:47:07 +02:00
Tobias Zwick 1958e1f959 got rid of SkyPar_Keep (now: nil). See docs. 2011-07-02 23:44:53 +02:00
Tobias Zwick 75da7fdc18 removed references to function "Activate" 2011-07-02 22:58:06 +02:00
Günther Brammer 6e5332517d editor: File/Save (As) again uses Game.ScenarioFile for saving (#611)
This should make it work again without having to understand what exactly
went wrong.
2011-06-24 14:25:30 +02:00
Peter Wortmann 0a8aa19939 Even more complicated other detection.
Probably the best I can do without having the shader recognize
even more special cases.
2011-06-20 00:15:15 +01:00
Nicolas Hake 7cd06269e9 win32: Don't truncate viewport titles (#608) 2011-06-19 00:59:36 +02:00
Maikel de Vries a10d1ad5ac Script: Removed obsolete Completion callback
Already marked obsolete in the docs for quite a time.
2011-06-10 16:31:00 +02:00
Armin Burgmeier 5cba420382 Make sure [ChildInstance] named section always exists
Otherwise loading a savegame with an attached def mesh fails if the mesh
has neither attached meshes or animation nodes since the [ChildInstance]
section ends up empty in which case StdCompilerIniWrite does not write the
section at all.
2011-06-05 14:12:02 +02:00
Armin Burgmeier 369aa5591e Fix wrong assertion when saving attached def meshes (#602) 2011-06-05 14:10:37 +02:00
Peter Wortmann 96df6a9c95 Fixed SAppend string recursion in C4Language.cpp 2011-06-04 21:08:54 +01:00
Nicolas Hake 23f67b4c8d #606: Accept CSM_Mesh_Bone_Assignment chunks in CSM_Mesh 2011-06-03 21:41:39 +02:00
Maikel de Vries 173a95a878 Tutorials: Fixed AI movement for swordman 2011-06-02 17:15:58 +02:00
Peter Wortmann c70bf4b355 Also fallback through workarounds on shader link failure
Apparantly a lot of drivers don't tell you that they don't like your
shader until you try linking.
2011-05-31 22:39:03 +01:00
Peter Wortmann b44a980d5d Honor texture GL 3D texture size limits
For now this will just crop the texture. In theory, we could try to
reduce the size in future, maybe by scaling the texture down? We'll
have to see what works best.
2011-05-31 22:22:42 +01:00
Tobias Zwick 6ce8ab3aac Cleaned up C4Landscape.cpp, fixed bug that pickaxe does not produce any materials 2011-05-31 03:04:38 +02:00
Tobias Zwick 1dad7b2a1e Segfault fix: resize vertices instead of reserve 2011-05-31 00:46:11 +02:00
Tobias Zwick 8c490dca05 Implemented free shapes (=polygons) to be added or cleared from the landscape:
+ Refactored the ShakeFree, BlastFree, DigFree, DrawQuad etc. functions and
  removed unused functions ClearRectDensity, DigFreeMaterial,...
+ Moved the polygon fill algorithm from StdSurface8.cpp to C4Landscape.cpp
+ Clearance functions which used to subtract a circle now subtract something
  that looks more like a chunk
+ Pickaxe works with BlastFree now
+ Removed Dig2ObjectRequest
2011-05-31 00:33:35 +02:00
Tobias Zwick e07761a195 Classic landscape render is not that dark anymore 2011-05-30 21:21:25 +02:00
Tobias Zwick fceefae785 new function DrawMaterialPolygon 2011-05-29 22:37:40 +02:00
Peter Wortmann 1ea024f8c6 Use green color channel for scaler ("JPEG" part 2)
Look at 34f1315bc0b9 for the explanation but the wrong fix.
2011-05-29 16:27:12 +01:00
Peter Wortmann 5738bdb86f Use texture2DLod again, fallback to texture2D
Using the walkaround mechanism we can now safely try whether the
driver has a problem with texture2DLod getting used in the
fragment shader. It might be against the standard, but I see no
reason why I shouldn't try - it did improve things for my old
driver.
2011-05-29 16:13:01 +01:00
Peter Wortmann 30836199de Fixed "JPEG" artefacts
They were actually caused by the scaler texture only rarely truly
reaching RGB(255,255,255), instead maxing out somewhere in the
RGB(248,252,248) region. This caused pixels that had only remote
contact with another material still taking over about 3% of the
material's texture. That was obviously most noticable for high-
contrast edges like Sky.

For now this tries to fix it in pre-processing of the scaler. Might
want to look into the scaler generation sooner or later though. Still
no idea where that color error came from.
2011-05-29 16:07:42 +01:00
Peter Wortmann 3c0c99e553 Fixed sky getting corrupted by mipmapping 2011-05-28 18:24:45 +01:00
Peter Wortmann 7075f00c62 Improved edge handling
Now using the best algorithms I could think of, meaning that quite
a lot of information is stashed into the scaler texture in order to:

1. Reliably find the "other" pixel to interpolate towards using the
   scaler. The approximation used before would use invalid texture
   coordinates when interpolating.

   This now allows us to calculate the shading for this "other"
   pixel as well, which actually caused even more visible artifacts.

2. Decide how to calculate the shader for the point rendered. In
   case we are in the middle of a material, we want GL to interpolate
   the normal so we get a nice smooth sub-pixel gradient. On the
   edges, however, we would get interpolation between normals of
   different materials, which looks ugly.
2011-05-28 18:22:56 +01:00
Peter Wortmann 8204c8d644 Introduced a woraround for missing array support. Some major clearnups.
Now especially has a few debugging options that make it easier to
spot when texture coordinates are not calculated accurately. Use
DEBUG_SEPERATOR_TEXTURES to add nasty stripe textures that should
(in theory) never be visible. Set DEBUG_SOLID_COLOR_TEXTURES on top
of that to replace all materials with dark solid colors to make the
stripes more clearly visible.
2011-05-28 15:18:40 +01:00
Peter Wortmann d672211ef5 Use power-of-two depth for material 3D texture
Otherwise the addressing using floats will not be entirely exact,
maybe leading to some bad implementations trying to interpolate
between 3D texture layers. That would be a very hard-to-spot
performance hog, therefore let's play it safe in exchange for having
to allocate a bit more texture memory.
2011-05-27 20:11:38 +01:00
Peter Wortmann ffc1463b69 Improved mip-map calculation
At least some site on the Internet claims that this is better. I
don't see a difference, but it's probably a bit less blurry, which
should be the right direction.
2011-05-27 01:53:03 +01:00
Peter Wortmann b22fed7364 Choose texture for dead PXS by surroundings where possible 2011-05-27 01:51:07 +01:00
Peter Wortmann 923efaf6f5 Landscape textures mip-mapping
Implemented manually, as 3D textures didn't work here properly with
automatic mip-mapping ones. That's no loss, as we can easily swap out
the full texture set for each drawing call.
2011-05-26 20:27:33 +01:00
Günther Brammer 68cda827f9 Do not disable GL_BLEND
This is generally assumed to be enabled. Code that doesn't need it needs to
disable and re-enable it, not the other way around.
2011-05-26 15:03:31 +02:00
Günther Brammer a533b93f10 Do not print a deleted-object-warning while warning about that object 2011-05-25 20:09:12 +02:00
Peter Wortmann ab618f9d3a Implemented sky - as in stop the shader from drawing over it 2011-05-24 22:00:02 +01:00
Nicolas Hake 15309e1829 GLSL landscape renderer: Tile/crop non-fitting textures 2011-05-24 22:32:24 +02:00
Günther Brammer e5c994b36c Use biggest possible textures for classic landscape renderer
This might speed it up a little bit, and reduces artifacts at the seems.
2011-05-24 19:43:35 +02:00
Günther Brammer 643399c960 Do not delete effects while they still might be in use
For example, deleting an object in an effect callback for that object would
delete the effect, causing some usage of freed memory. Instead, let the
effects get deleted together with the object in ~C4Object(), and only mark
them as dead in AssignRemoval.
2011-05-24 13:23:25 +02:00
Peter Wortmann bfb0849fe5 Fixed Mac build 2011-05-21 16:38:54 +01:00
Peter Wortmann 27d3869ca3 Shader now only requires GLSL 1.10 instead of 1.30 2011-05-24 01:32:20 +01:00
Günther Brammer 0b8d25eb30 Solidmasks can also move floating objects 2011-05-24 01:46:29 +02:00
Peter Wortmann a02ccafc4d Shader landscape rendering, first simple version (scaler, shading) 2011-05-24 00:12:19 +01:00
Peter Wortmann c84458f451 Fixed parameter naming for AccessNextEntry 2011-05-22 23:02:10 +01:00
Günther Brammer 37242503df Read old nil C4Values from player files for compatibility with 5.1 2011-05-21 23:13:49 +02:00
Günther Brammer e0f49b4cca Handle unknown C4Value type tags in player files or save games 2011-05-21 23:12:43 +02:00
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