Commit Graph

1751 Commits (15b07ca7171bb80ab12d6023a9dd52866bb85f63)

Author SHA1 Message Date
Günther Brammer 15b07ca717 Start counting lines and columns in text files with 1
I checked two text editors, and they did that, too.
Also implement the special rules for tab stops, assuming a tab width of 8.
2012-05-16 23:21:14 +02:00
Günther Brammer 065b100dad Script: eval throws an exception when the script does not end after the expression 2012-05-08 01:03:29 +02:00
Günther Brammer ceb9c45984 Fix Script runtime reload
Just removing the right amount of functions from the proplists is
somewhat tricky, unfortunately.
2012-05-25 17:25:53 +02:00
Günther Brammer 20577f8575 GL: Identifiers starting with GL_ are reserved for the implementation
Some compilers are less strict about this than others, unfortunately.
The Gallium one complains with

preprocessor error: Macro names starting with "GL_" are reserved.
2012-05-30 23:34:08 +02:00
Nicolas Hake a029737811 Display VCS revision instead of build number for pre-release builds (#782)
This assumes that pre-release versions will always have a x.y.90 version (or
higher), and will in those cases display the revision in place of the fourth
version segment.
2012-05-28 16:28:49 +02:00
Nicolas Hake e0bde2256a GL: Make max uniform count available to shader and work around low limits (#786)
beliar reports that his driver doesn't support the number of fragment shader
uniforms that we're using in the landscape scaler. By making the reported limit
available to the GLSL code, it can use a workaround using a 1D texture to
transfer data.
2012-05-28 16:05:30 +02:00
Nicolas Hake 59b48f5069 Win32: Accept dropped definition files
Viewport windows had the required code to hande dropped files, but didn't tell
the window manager they'd accept drag & drop messages.

Also pull a loop invariant out of the loop (drop point can't change while we're
processing the drop message) to save function calls in cases with more than one
dropped file.
2012-05-23 22:37:07 +02:00
Julius Michaelis 9166c770ef <Ringwaul> Soooo I was thinking [\n] The Savegames folder should have the floppy disk icon instead of the standard book 2012-05-22 23:20:01 +02:00
Felix Wagner 918c7cd201 Real fix for GetPlrClonkSkin 2012-05-12 19:49:53 +01:00
Felix Wagner 36e55443e1 GetPlrClonkSkin returns nil on NO_OWNER, fixed clonk's gender setting. 2012-05-12 15:56:41 +01:00
Günther Brammer 830d6093a9 Fix Call error message 2012-05-07 21:28:43 +02:00
Günther Brammer 1a5653d468 Script: Remove DefinitionCall. Use Call instead.
No scripts in the repository use DefinitionCall, but in the unlikely case
that it's needed again, one can now use def->Call() instead.
2012-05-07 21:12:51 +02:00
Günther Brammer 93169c7d33 Script: Make Call() throw again if neither function nor ~ is present
And skip a ~ in the function name again.
2012-05-07 20:49:08 +02:00
Günther Brammer 16f87bbc50 Avoid an assert on Call("") 2012-05-06 18:33:31 +02:00
Günther Brammer 099cd15e56 Script: Remove unused OnBlastIncinerationDamage callback
Scenarios that want to override the default behaviour of BlastObject should
overload the BlastObject function itself. Objects can simply use the Damage
callback and/or set BlastIncinerate to nil.
2012-05-06 15:37:43 +02:00
Günther Brammer 2510734ad3 Script: Damage callback changed to Damage(Change, Cause, CausedByPlr) 2012-05-06 14:45:35 +02:00
Günther Brammer 752e945b8d Call C4PropList::Freeze in Link, remove now empty AfterLink functions
AfterLink was otherwise only used for the TimerCalls, which are now gone.
2012-05-06 00:06:33 +02:00
Günther Brammer 46fd427224 Simplify Fn_this
cthr->Obj is now 0 or == cthr->Def.
2012-04-28 22:02:35 +02:00
Günther Brammer 5e60806439 Move GetNeededMatStr to the other object functions 2012-04-28 22:01:47 +02:00
Günther Brammer fb4bac65be Remove C4AulContext::Caller 2012-04-28 21:32:29 +02:00
Günther Brammer 815d5a895a Replace remaining functions in ObjectScript table with template AddFunc 2012-04-28 22:04:43 +02:00
Günther Brammer 8a4181a3be Replace C4AulObjectContext* with a simple C4Object* parameter 2012-04-28 22:04:36 +02:00
Armin Burgmeier e8a7dc0478 Fix a crash when rendering an untexturized mesh 2012-05-05 23:04:35 +02:00
Maikel de Vries 6fcc0f6d2e Removed TimerCall in favour of AddTimer script implementation 2012-05-05 12:09:44 +02:00
Nicolas Hake 1711b72baf Return U+FFFD REPLACEMENT CHARACTER instead of question mark for invalid utf8
Since U+003F QUESTION MARK is a potentially valid character in a unicode string,
have the text iterator return U+FFFD if it can't decode its input instead. This
way the caller can be certain that the input isn't a proper question mark and
doesn't accidentally use it, e.g. as a wildcard.
2012-05-04 18:12:35 +02:00
Armin Burgmeier 04af38622d Use 64 bit integers to multiply fixpoint numbers
gcc 4.6 generates better code for FIXED_EMULATE_64BIT disablen for both
32 and 64 bit. It properly recognizes that the 32,32->64 multiplication
instruction of the x86 is the right choice for the job whereas the more
complicated FIXED_EMULATE_64BIT version requires multiple multiplications

Thanks Günther for checking this! :)
2012-05-01 23:05:40 +02:00
Armin Burgmeier 5d96ca83c9 Fix overflow in C4Fixed multiplication
This would happen when the product of the lower significant part, which is
between 0 and 65535 (even though C4Fixed is a signed data type!) exceeds
2^31, for example for val=36864, fVal2=61440.
2012-05-01 22:59:55 +02:00
Martin Plicht daabc5be16 mac: Fix compilation 2012-05-01 15:05:43 +02:00
Günther Brammer 133e987902 Script: Throw instead of silently using nil for this after RemoveObject 2012-04-29 16:53:29 +02:00
Maikel de Vries 7857da2c50 Check object rather than def for fire related properties 2012-04-29 10:21:16 +02:00
Günther Brammer 2e9ae057ad Remove obsolete assertion from FnTranslate (#746)
The rules for ctx->Obj and ctx->Def changed recently. The latter is now the
real this pointer, and Obj is Def->GetObject(). There's no need to check
this in FnTranslate.
2012-04-28 20:25:04 +02:00
Günther Brammer 1995b59adc win32: C4Window::SetSize calls AdjustWindowRectEx, GUI::Dialog doesn't need to 2012-04-28 15:09:35 +02:00
Günther Brammer 1a29f8625d Reorder engine source file organization a bit
This mostly consists of flattening the hierarchy, splitting the
graphics stuff out of platform, and a few smaller cleanups.
2012-04-27 19:04:43 +02:00
Maikel de Vries 4a56f8d7c1 Replaced defcore values related to fire with properties 2012-04-28 16:17:38 +02:00
Armin Burgmeier e11e9845d1 Fix Windows build 2012-04-23 21:45:01 +02:00
Martin Plicht cd4db8ebaf mac: Remove KeyMask assignment and inline HandleNSEvent 2012-04-23 20:14:42 +02:00
Armin Burgmeier 206f90adbc Pass through key state handling from event callbacks (#745)
This gets rid of Application.IsAltDown() and friends which was used for
this purpose in C4MouseControl and C4EditCursor. In case non-event
callbacks need to access the state of the modifier keys the state is
now cached in these classes (if it wasn't already).

This new solution is supposed to be more robust, since the key modifier
state comes always directly from the input event. This fixes #745, where
Application.IsAltDown was stuck for some reason.

I updated the Windows and Mac code as well, but wasn't able to test it,
it might not compile and/or not work, in which case please someone fix it :)
2012-04-22 22:09:06 +02:00
Armin Burgmeier 90dc9abbcd Add Anim_R as a AVP for mesh animations 2012-04-22 00:22:05 +02:00
Bernhard Bonigl 705b19fefd Merged Controls into default 2012-04-21 17:18:37 +02:00
Günther Brammer 075bc3b866 gtk: fix build with glib older than 2.30 2012-04-20 21:09:17 +02:00
Julius Michaelis 185a338819 Change first parameter of PlaceVegetation and PlaceAnimal, so they accept "overloaded" definitions like PlaceVegetation({Prototype=Mushroom, Placement=1}) 2012-04-18 15:23:35 +02:00
Günther Brammer 7632c823fe gtk: Drop compatibility with GTK versions older than 2.18 2012-04-18 00:37:31 +02:00
Günther Brammer f0c545d773 gtk: Fix build with GTK versions older than 3.4 2012-04-18 00:31:48 +02:00
Günther Brammer 3596daad22 gtk: Make mousewheel scroll again 2012-04-17 22:45:11 +02:00
Bernhard Bonigl 293b3f80e8 Merged diverged Controls branches 2012-04-17 18:36:14 +02:00
Bernhard Bonigl 63f0a49614 Added new blitmode: GFX_BLIT_Wireframe 2012-04-17 17:29:29 +02:00
Sven Eberhardt 80d5f01642 Added FnGetPlayerControlAssignment: Get key/button assigned to a control.
To be used by tutorial messages explaining controls.
2012-04-17 17:06:16 +02:00
Maikel de Vries 16fa9cf341 Placement is now a property instead of DefCore value 2012-04-16 22:17:05 +02:00
Günther Brammer bc5e77d9d0 Simplify C4Game::FindObject
It isn't exposed to script anymore, and the internal users don't use most
features. This might even speed up lava-in-oil a bit.
2012-04-15 23:32:37 +02:00
Julius Michaelis d93384beb6 Add forgotten C4Value::operator== case for C4V_Function 2012-04-15 16:33:39 +02:00