Commit Graph

2033 Commits (e91d4a42789bfa23945bf7c6aeaefdac48d3b1bb)

Author SHA1 Message Date
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
Julius Michaelis d7afaccb11 Fix Fx*Stop being called with reason==nil instead of C4FxCall_Normal 2012-04-15 16:06:04 +02:00
Nicolas Hake 7efd9a9b9a Aul: Add new nil-coalescing operator ??
This short-circuiting operator will evaluate to its first operand if the operand
is not nil, or to its second operand otherwise. Its intended use is to simplify
defaulting expressions that may evaluate to nil to a valid value.
2012-04-15 15:44:01 +02:00
Nicolas Hake 368692b7d8 GTK: Build fix 2012-04-15 13:32:13 +02:00
Nicolas Hake cbbcf200cf win32: Build fix 2012-04-15 13:22:58 +02:00
Tobias Zwick 46156e3f1c show tooltip for C4D_MouseSelect using the property "Tooltip"
+ remove references to the old and obsolete "help mode"
2012-04-15 12:09:54 +02:00
Günther Brammer 456bf32a93 Merge branch 'gtk' 2012-04-15 01:35:00 +02:00
Günther Brammer e125003aa9 gtk: Deactivate the resize grip on the OpenGL-drawn windows 2012-04-15 01:17:50 +02:00
Julius Michaelis 57a07a95ab Add forgotten string for function type values to GetC4VName 2012-04-14 16:53:35 +02:00
Günther Brammer f89f19b2cb Script: No #appendto in Defs or global functions in #appendtos (#734)
So the only thing #appendtos may contain are lokal functions and variables,
which are only reachable via the Definition the script is appended to, and
global constants and variables, which only need to be parsed once. Thus,
#appendto scripts can skip being parsed without a definition, and the
errors that sometimes produces are gone.
2012-04-13 21:43:43 +02:00
Günther Brammer ac02380b58 Script: this->RemoveObject() changes this to nil (#722) 2012-04-13 20:28:30 +02:00
Günther Brammer fe261ffca0 Script: GetType returns C4V_C4Object for objects again 2012-04-13 18:38:30 +02:00
Günther Brammer f245af8972 Rename C4AulParseState to C4AulParse 2012-04-12 21:03:14 +02:00
Günther Brammer 05ef63bf64 Script: Make 0==nil false again
This was probably broken by the C4V_Any/C4V_Nil separation. Also clean
the function up a bit and add an assert that should catch similar stuff in
the future.
2012-04-11 02:25:24 +02:00
Felix Wagner 6aa5050fb0 Disabled /sound (#719) 2012-04-10 14:53:24 +01:00
Julius Michaelis 335a6e0598 Fix C4ValueArray 2012-04-09 22:04:03 +02:00
Armin Burgmeier 6238c1d5be Fix mesh rendering crash when previous GL operation enabled color array (#739) 2012-04-09 22:03:55 +02:00
Julius Michaelis 939f4c69ca Fix array slice setting 2012-04-08 12:44:17 +02:00
Julius Michaelis dcf59a4d61 Disallow cyclic prototyping 2012-04-08 12:43:19 +02:00
Armin Burgmeier 7efd7f9df5 Replaced glInterleavedArrays by gl*Pointer 2012-04-07 16:47:23 +02:00
Felix Wagner cce5d109ef no_dig2objects parameter for DigFree / DigFreeRect 2012-04-05 16:49:47 +01:00
Felix Wagner c7f5e11ac8 DigFree & DigFreeRect return amount of pixels dug free 2012-04-05 02:59:45 +01:00
Martin Plicht 20343b4628 mac: Fix mouse movement. Again 2012-04-04 08:44:37 +02:00
Maikel de Vries 7b8800356a Removed Precipitation from engine
Will be implemented through clouds and definition calls.
2012-04-01 23:03:52 +02:00
Benjamin Herr b7e8ca9263 move logic from OnOwnerRemoved to C4Player
This avoids a previous assert() on player elimination from GetFunc()
being unable to handle the tilde in "~OnOwnerRemoved". FnOnOwnerRemoved
is gone so that shouldn't happen anymore.
2012-04-01 22:06:43 +02:00
Benjamin Herr cf0069a3e2 C4MouseControl: don't reset "Drag" before UpdateCursorTarget() 2012-04-01 19:48:11 +02:00
Martin Plicht 26fec4ca89 mac: Lion: More fullscreen/mouse movement fixes, hopefully the mouse now actually works in-game and moving mouse into screen corners does not trigger mission control or whatever else is set as hot corner actions. Remaining problem is that when activating mission control with the clonk window active, the user cannot move the mouse cursor since it's still stunned by CGAssociateMouseAndMouseCursorPosition(FALSE) 2012-03-29 00:43:03 +02:00
Martin Plicht 397557f1e1 mac: Gamma: Don't maintain conversion table (what was I thinking?) 2012-03-29 13:30:36 +02:00
Martin Plicht c02f334d15 mac: Switch to game window when application activated 2012-03-28 22:38:33 +02:00
Martin Plicht 50e6e497b1 mac: Lion: Fix mouse movement when scrolling (grunt) 2012-03-28 15:03:25 +02:00
Martin Plicht e25351ed04 mac: Lion: More mouse shenanigans to suppress hot corner actions when in fullscreen mode 2012-03-28 14:50:50 +02:00
Martin Plicht f1c7ceeb75 mac: Lion: Restore not redrawing the window when in fullscreen mode and inactive 2012-03-24 19:43:50 +01:00
Felix Wagner 2416fa98fb + FnCheckConstructionSite 2012-03-27 19:09:55 +01:00
Martin Plicht ef289a0c60 mac: le typo 2012-03-25 12:52:48 +02:00
Martin Plicht 01530ea3b1 mac: Add key codes for "Backslash", "Comma_US" and "Less" 2012-03-23 18:11:46 +01:00
Martin Plicht db6009d8b1 mac: Fix exclusive dialogs not clickable in game mode 2012-03-25 12:08:06 +02:00
Günther Brammer 40de33ca3c win32: Make sdl-mainloop option work
As it doesn't have the editor, this is only useful for compiling
more of our code on more platforms.
2012-03-23 22:53:56 +01:00
Günther Brammer 25bbaef7d2 sdl-mainloop: Draw things again 2012-03-25 01:54:07 +01:00
Günther Brammer 378029168b Re-enable keyboard configuration dialog (#624) 2012-03-21 21:17:39 +01:00
Martin Plicht 160e214196 mac: Silly pinch gesture in mainmenu to toggle fullscreen mode Lion-compatible 2012-03-23 00:21:03 +01:00
Martin Plicht aaa5a71e4b mac: Support Lion FullScreen 2012-03-23 00:03:05 +01:00
Martin Plicht 30840696c6 C4AulScriptEngine::Clear: Don't create GlobalPropList just to Clear() it 2012-03-22 21:49:55 +01:00
Martin Plicht 62f7540b2d mac: Turns out, shift+mouse actions were never properly processed. Whoops 2012-03-22 21:08:19 +01:00
Martin Plicht 9177c3e515 mac: Fix some Xcode warnings 2012-03-22 01:19:10 +01:00
Bernhard Bonigl 03729bdbf1 Experimental: Added Interaction-Hotkeys on <> to . (the row below the home row).
Made the Keys <> on German Keyboards an \| and ;: on US Keyboards usable
2012-03-21 21:52:32 +01:00
Martin Plicht db73b6ab67 mac: ConsoleWindow.xib: Remove Script Counter display (again) 2012-03-21 11:46:19 +01:00
Bernhard Bonigl 7ab6dde1b3 Fixed Apostrophe beeing mapped to VK_OEM_5 (\| on US) to VK_OEM_7 ('" on US) 2012-03-20 15:14:47 +01:00
Martin Plicht 6d21e74dab elsif shmelsif 2012-03-20 18:32:21 +01:00
Martin Plicht da7b38c263 C4EditCursor.h: Definition of ObjselItemDt contains platform specific thingies again 2012-03-20 17:30:41 +01:00
Martin Plicht a8cadb8723 Amazing fixes to make it compile for Mac again 2012-03-20 16:38:45 +01:00
Günther Brammer ca7c284c85 gtk: Rename C4AppX to C4AppGTK 2012-03-05 00:38:23 +01:00
Günther Brammer 15ebf70ab1 win32: Move C4GUI::DialogWindow platform code to C4WindowWin32.cpp 2012-04-01 22:16:59 +02:00
Günther Brammer 52e0b52ba9 gtk: Remove some obsolete X11 code 2012-04-10 23:39:16 +02:00
Günther Brammer 31b4c1f2fa gtk: Use gtk X11 display connection for glX 2012-04-10 23:39:49 +02:00
Günther Brammer 05cc1490ea gtk: Reimplement C4Window's GetSize, SetSize, SetTitle 2012-04-04 21:05:48 +02:00
Günther Brammer 0a6c9df7f3 gtk: Move the FindInfo functions to C4WindowGtk.cpp 2012-04-01 22:30:55 +02:00
Günther Brammer c102fe19d8 gtk: Use gtk functions to make a window fullscreen 2012-04-10 03:36:09 +02:00
Günther Brammer c865021716 gtk: Fold C4GtkWindow into C4Window 2012-04-11 04:15:33 +02:00
Günther Brammer dc41afded5 gtk: Replace some X11 input event handling
This regresses because IMs aren't used anymore. GTK+ has its own
IM implementations we should use instead, but for now event->string
is simpler.
2012-04-09 01:10:21 +02:00
Günther Brammer 5f93869978 gtk: Replace C4FullScreen.cpp X11 code with gtk in C4WindowGTK.cpp 2012-04-10 01:56:20 +02:00
Günther Brammer feb13288fa gtk: Replace C4GUI::DialogWindow XLib with gtk calls 2012-04-04 03:42:33 +02:00
Günther Brammer 86a99ce458 C4Window: Introduce a separate WindowKind for the console window 2012-03-28 19:37:13 +02:00
Günther Brammer 85a75577e3 gtk: Move some C4ViewportWindow gtk code to C4WindowGTK.cpp 2012-04-09 01:15:30 +02:00
Günther Brammer c5f3cf88ae gtk: Use gtk clipboard functions instead of our own code 2012-03-26 00:43:09 +02:00
Günther Brammer a7330097f6 win32: Move parts of WM_ACTIVATE handling from CStdGL to C4Window 2012-04-07 21:33:39 +02:00
Armin Burgmeier 644f97efd3 GObectify MapeTextureMap; add functions to get texture mapping entry 2012-02-18 21:10:07 +01:00
Martin Plicht 379836f32c cmake: mac: Don't require rt library 2012-02-14 16:25:23 +01:00
Armin Burgmeier 81e04899dc Merge default into mape 2012-02-12 19:41:48 +01:00
Nicolas Hake 08d71bcd74 Drop PIF_HasRes flag from player info read from replays
C4PlayerInfo stores the PIF_HasRes flag for savegames and network synch. The
resource system isn't used in replays however, so the flag is wrong there. Clear
it when loading a replay, so a later assertion in the cleanup code doesn't fail.
2012-02-12 14:01:12 +01:00
Armin Burgmeier f349a97919 Correctly honor game speed if delay is below MaxRefreshDelay (#260) 2012-02-12 13:49:02 +01:00
Armin Burgmeier 06dc47cb09 Make sure sector list order always matches main list order
So actually be29346165d6 turned out to be an incorrect fix. The actual
problem is much more subtle: the ordering of objects within the same
plane by their ID could cause the sector list order to not match the
main list order anymore. This has been fixed by re-arranging the code in
question.

I hope this really fixes #711.
2012-02-12 04:26:33 +01:00
Armin Burgmeier b16fc0ccf3 Ignore Status==0 objects in C4ObjectList::CheckSort 2012-02-12 04:21:42 +01:00
Armin Burgmeier 612f14016e Also check order of last list entry in C4ObjectList::CheckCategorySort 2012-02-12 04:21:18 +01:00
David Dormagen b359373f5d clearing of landscape is now done in C4Landscape::MapToLandscape instead of MapToSurface 2012-02-11 23:24:53 +01:00
David Dormagen 2a53b55a45 added parameter for DrawMap and DrawDefMap to retain old material if sky is drawn 2012-02-10 21:48:48 +01:00
Günther Brammer 286a32f47d Remove C4GroupEntryCore::(Has)CRC, calculate the CRC on demand
The CRC was basically only used to decide which files to include in update
groups, but calculated for every group and then stored in the file on disc.
And for some unknown reason, updates themself didn't produce the right
numbers in the file.

This means that c4groups with this change cannot reproduce groups written
by older c4groups and vice versa, but this isn't necessary for updates, and
reading is compatible both ways.

Except for the ways that C4Update fails to remove the CRCs.
2012-02-08 00:12:44 +01:00
Armin Burgmeier 2092baaa18 Fix possible double close when attempting to open uncompressed files 2012-02-05 20:00:47 +01:00
Armin Burgmeier fb27b9c1c3 Reset Unsorted flag only after sorting has been fully finished
This not only seems more correct but might also fix #711
2012-02-05 17:28:55 +01:00
Armin Burgmeier f50ebf6441 Update C4Group packing order
This speeds up loading of packed files significantly. It's not optimal,
though, because the order in which textures are loaded by the engine
is not known by c4group (it depends on their occurence in the Scene.material
file). This could be fixed by specifying custom packing orders for every
object we have. But then again maybe switching to a different format which
allows for random access might be more worth it.
2012-02-04 22:08:38 +01:00
Armin Burgmeier 8e5b9262df Fix a possible file leak in CStdFile::Open
This happened if open() worked but c4_gzdopen failed. This bug prevented
Objects.ocd being packed because of "Too many files open."
2012-02-04 21:28:17 +01:00
Armin Burgmeier 139184c540 Set system data path to exepath for binaries with automatic updates
Updates work only when the game data is at the same location as the binary.
If this is not the case then the game was probably installed differently,
for example via the distribution or with make install. In this case we
cannot do automatic updates but we also want to use a different system path.

This fixes the linux development snapshots and release tarballs. They were
broken in the sense that they didn't find their game data.
2012-02-03 23:43:18 +01:00
Nicolas Hake f3ae992f33 Fix dangling pointer on temporary pack of player file on join (#706)
I hate StdStrBuf. It's just close enough to any sane string class that you think
it does reasonable things, then when you don't look it will turn around and stab
you in the back with a rusty fork.
2012-02-03 14:36:17 +01:00
Günther Brammer fea377f196 win32: Fill in Games Explorer XML data from Version.txt 2011-10-31 01:31:56 +01:00
Günther Brammer d995490137 win32: register with the Game Explorer 2011-10-30 16:16:14 +01:00
Sven Eberhardt 95582747db Fix random team distribution when a player leaves during lobby time
Also allow random/random surprise teams in AutoGenerateTeam mode
(always creates two teams)
2011-11-08 17:27:32 +00:00
Sven Eberhardt 05e7aa1568 Fix EliminatePlayer(..., true) inactive client activation 2011-11-08 16:16:31 +00:00
Martin Plicht 12af060162 ClonkAppDelegate: Config.Load without parameters 2011-10-16 16:25:38 +02:00
Martin Plicht e147248036 C4Reloc: missing method implementation signature change 2011-10-16 16:25:23 +02:00
Martin Plicht 5b67e90830 mac: Game window: Zoom to actual backing store size 2011-10-16 16:14:35 +02:00
Martin Plicht d86b7d36b0 Mac: Handle various quit messages gracefully
*Not quitting immediately when in a game but just showing the Exit dialog
*React to Dock Quit menu item and Tab-Switcher Cmd+Q
2011-10-16 16:12:37 +02:00
Martin Plicht e7878038c8 mac: Use standard localization facility for addon installation dialogs + put addons into preferred installation location (Library/Application Support) 2011-10-16 16:09:05 +02:00
Martin Plicht a62486044e C4Reloc: Each path is associated with a path type, specifying whether a path is a preferred installation location 2011-10-16 16:07:13 +02:00
Peter Wortmann fec07accd7 Save more minimal players on remote clients 2011-08-15 09:25:37 +00:00
Peter Wortmann 8b9ace23c9 Fixed the surrender dialog showing after declined kick vote 2011-05-08 22:36:48 +02:00
Armin Burgmeier 0749dcdb9d Replace std::sort by timsort for Face ordering
The usage of timsort instead of std::sort at this point is twofold.  First,
it's faster in our case where the array is already sorted in many cases
(remember this is called at least once a frame). And it's not just a bit
faster either but a lot. I have measured a factor of 7 on my system.

Second, in our Windows autobuilds there is a crash within std::sort which is
very hard to debug because it's hardly reproducible with anything other than
the autobuilds (I tried hard). If the crash goes away with timsort then
great, if not then maybe it's easier to debug since the code is in our tree.
2012-02-01 22:11:46 +01:00
Armin Burgmeier 18c96d4987 C4MouseControl: Don't set TargetObject to non-selectable objects in crosshair mode
This makes mouse click controls not being delivered to MD_NoClick objects.
2012-01-31 23:46:15 +01:00
Julius Michaelis 9b781f9882 Fix ForPolygon scanlining to exclude pixels on right bound 2012-01-30 20:54:17 +01:00
Julius Michaelis b4dba5b255 Add an option to select an arbitrary object under the cursor via context menu to gtk console mode 2012-01-27 23:01:37 +01:00
Armin Burgmeier dc2ee736d1 Build fix 2012-01-29 14:38:18 +01:00
Felix Wagner c92ca7d766 Typo 2012-01-29 02:17:11 +00:00
Felix Wagner 5a28794482 +GetPlrClonkSkin(iPlr) 2012-01-29 02:17:00 +00:00
Felix Wagner d468862159 Player options dialogue, let the player choose a clonk skin 2012-01-29 02:16:22 +00:00
Felix Wagner af699844de Removed some old mouse control related stuff 2012-01-29 02:13:55 +00:00
Armin Burgmeier b032b6c3e3 Use std::sort again instead of a custom implemantion for debugging purposes
This was committed accidentally. I blame hg for having a crappy ui.
Fixes the display of trees again.
2012-01-28 21:48:07 +01:00
Armin Burgmeier 86bc3ac417 Don't print an error message for ERROR_PATH_NOT_FOUND in DirectoryIterator::Read
We do the same already for ERROR_FILE_NOT_FOUND. This fixes a harmless warning
when running the engine in a release directory where there is no planet/
directory.
2012-01-28 18:15:51 +01:00
Armin Burgmeier a1370c2954 Rename our custom gz* functions to avoid conflicts with zlib.dll
This fixes the build with native mingw for me.
2012-01-28 17:02:37 +01:00
Armin Burgmeier f4bc45c4a3 Don't do wildcard matching and other fancy stuff in C4DefList::Load
Instead just attempt to load the filename given. This function is only
used from two places: C4Game::InitDefs and C4Game::DropFile. In both
cases segments and wildcard matching is neither needed nor desired.

This fixes a problem with loading definitions when the Clonk installation
resides in a directory with paretheses, such as C:\Program Files (x86)\.
This might well fix the problem in http://forum.openclonk.org/topic_show.pl?tid=905.
2012-01-28 00:33:28 +01:00
Armin Burgmeier b2e26700cf Win32: Allow forward slash as separator when loading local definitions
This leads to an obscure error otherwise where local definitions are skipped
from loading when running the scenario as clonk.exe Tutorial.ocf/Tutorial01.ocs.
The scenario loads fine as such but some definitions are missing and therefore
it doesn't work properly. See also http://forum.openclonk.org/topic_show.pl?tid=905.
2012-01-27 23:21:03 +01:00
David Dormagen 42e5c6cbec The mass mover clears its data when loading fails
Happened in some cases when changing a scenario section.
2011-07-16 21:57:14 +00:00
Felix Wagner 9c82958fa1 Little tweaks for the player options dialogue 2012-01-25 04:53:59 +00:00
Peter Wortmann 790b9d6af6 Ensure that even with workarounds #version is always first directive in shader
This fixes workarounds for some drivers. Most notably mine. Now if only
it wouldn't fail silently...
2012-01-24 00:17:37 +00:00
Peter Wortmann 70de47bc1c Cap material store once objects can't be collect any more
This means that if the Clonk digs Earth but has a full inventory at the time
(so we can't generate Earth chunks), digging another material later can never
yield more than one Earth chunk.
2012-01-21 17:33:00 +00:00
Armin Burgmeier 23d54ea2c9 Implement UPnP for Linux using libupnp 2012-01-21 02:04:14 +01:00
Nicolas Hake 3738069ecd MinGW: Define UPnPNAT CLSID/IID values 2012-01-15 23:22:01 +01:00
Nicolas Hake 33b8fa83d3 Correct file path capitalization 2012-01-15 22:45:04 +01:00
Nicolas Hake cca86151fd Move #include to .h to avoid defining a function with an incomplete type parameter 2012-01-15 22:36:27 +01:00
Nicolas Hake 067456d213 Remove superfluous includes 2012-01-15 22:35:22 +01:00
Nicolas Hake 683800c33c win32: Add UPnP port mapping support 2012-01-15 21:27:16 +01:00
Armin Burgmeier 687c1f4920 Print the location of the mesh in the error message when failing to load a mesh 2012-01-13 23:44:05 +01:00
Armin Burgmeier c46f406943 Smoother movements on objects on moving solidmasks
The behavior is still not perfect yet since the attachment of the object
to the SolidMask may re-position the object by 1 pixel. I am not sure
this can be solved correctly since there are three coordinates involved
who can be (and, generally, are) different on a sub-pixel level. These
are the object's position itself the position of the solidmask object
and the position of the solidmask (which is constrained to pixel boundaries).
However, the attachment code only knows the object and the solidmask, not
the solidmask object, so it possibly cannot properly account for this.
2012-01-12 00:49:12 +01:00
Armin Burgmeier 6afadc6397 Allow mesh graphics images in messages 2012-01-10 22:40:46 +01:00
Nicolas Hake bf89f9531d C4FO: Make sure object has an action before testing its properties (#704) 2012-01-10 16:17:37 +01:00
Armin Burgmeier 5195cbe6d4 Fix build against recent zlib 2012-01-09 21:28:07 +01:00
Maikel de Vries d6f936850e Removed all senseless font sizes
These font sizes don't work well ingame and are too ugly to show to the player, all remaining font sizes work well enough with resolutions ranging from 800x600 to 1920x1080.
2012-01-08 20:03:09 +01:00
Nicolas Hake faf62abf9c Aul: Make sure CreateConstruction id parameter is valid (#702) 2012-01-03 21:57:55 +01:00
Armin Burgmeier 98f4b6f1c6 Print a warning instead of a failed assertion if C4Network2IO broadcast fails 2011-12-29 21:51:52 +01:00
Armin Burgmeier c17e272b38 Allow PID_ConnRe packets from not-yet-accepted connections
This fixes joining games in local networks where the PID_ConnRe
packet can arrive earlier than the main thread manages to flag
the connection as accepted.
2011-12-29 19:39:25 +01:00
Maikel de Vries 241315762d LandscapeRender: fixed off by one for shader warning
By PeterW
2011-12-29 18:24:55 +01:00
Armin Burgmeier b63adda52f Synchronize the order of Definition() calls 2011-12-29 17:04:57 +01:00
Armin Burgmeier 1eff3d7661 Add another DebugRec for the Definition() call 2011-12-29 17:02:26 +01:00
Armin Burgmeier 7e532c2bd6 Split math functions into StdMeshMath.{h,cpp} 2011-12-29 15:41:52 +01:00
Armin Burgmeier 1f8cd31fa2 Fix a crash when enabling a non-mesh definition picture for drag+drop 2011-12-29 17:32:40 +01:00
Sven Eberhardt c2ccf20509 Some new debugrecs 2011-12-29 00:12:21 +01:00
Armin Burgmeier cc62b169c8 Add "MouseDrag" property for finer control of script-implemented drag+drop 2011-12-28 19:33:19 +01:00
Günther Brammer c49ef4abf9 Add a few missing "new"s to "throw NeedObjectContext" statements
The catch in C4AulExec only catches pointers, so without the new the
exception isn't caught.
2011-10-14 02:51:20 +02:00
Günther Brammer 4830eb4162 reloc: Exepath should not override the planet folder
The planet folder is used to develop the game data and should come first.
The pure exepath is only used on windows, where it is the system data path
and should come last.
2011-12-28 18:39:20 +01:00
Armin Burgmeier fa9654c4e8 Enable dragging of mesh pictures in mouse control 2011-12-25 19:16:50 +01:00
Armin Burgmeier 9682cec2ed Make MOD2 rendering for meshes work properly
It will still fail for multi-textured meshes or textures with special
drawing options. This could be fixed eventually using a shader or
applying colormod/MOD2 in an additional texture unit.
2011-12-25 18:55:45 +01:00
Sven Eberhardt c287c093cc PlayerControl: Mouse coordinate space (viewport vs landscape) is now a control property; not an assignment property.
This is in preparation for proper custom control assignments
2011-11-20 21:49:38 +01:00
Armin Burgmeier dda29e2dcd Remove some dead code 2011-11-20 20:50:23 +01:00
Armin Burgmeier 934637f8f0 Linux: Obtain local addresses by enumerating network devices
Instead of resolving local hostname. This makes network work with erroneous
or missing entries in /etc/hosts.
2011-11-20 20:45:58 +01:00
Nicolas Hake 0dcfe72148 MSVC: Build all binaries directly in build dir
With this change, MSVC will build binaries in ${CMAKE_CURRENT_BINARY_DIR}
without adding any more subdirectories. It will also expect its data in a
directory called "planet" immediately below the binary directory.
Since MSVC allows building multiple configurations from the same input file,
the resulting binaries will be suffixed by the configuration type. An exception
is RelWithDebInfo, which will have no suffix; this was chosen over plain Release
to aid in debugging.

Building OpenClonk will work out of the box for in-source builds, but
out-of-source builds will have to create a symlink or a directory junction.
We consider this an acceptable drawback; it was proposed that if you use the
non-default option of an out-of-tree build, you will also know how to create a
link or a junction to, or copy the planet directory.

This changeset also revives looking for game data in the same directory as the
binary, which was part of c3fc1ee1ec8c [Peter Wortmann].
2011-11-10 02:01:21 +01:00
Nicolas Hake 74620be240 Backed out changeset: c3fc1ee1ec8c 2011-11-10 02:17:00 +01:00
Peter Wortmann d5c075ade8 Yet another variant on how to find data files
This time, the relocation code checks for a "System.c4g" in either
the executable path or a "data" folder directly below. CMake makes
sure that this points somewhere sensible for normal builds.

TODO:
* Check whether this actually works under Unixes. Can "ln -sf"
  delete important stuff? Is there a safe alternative?
* Further unify with the Mac Os solution. Other platforms might
  auto-pack for release builds too, for example - and it might
  be a good idea to have a proper data subdirectory in Mac bundles
  as well.
2011-11-09 00:45:07 +00:00
Peter Wortmann 638cb919d4 Fixed line drawing coordinate rounding 2011-11-08 16:22:39 +00:00
Günther Brammer 91e3a0ca07 Remove unused EraseFiles and EraseItems functions 2011-11-02 21:34:04 +01:00
Günther Brammer cb3ae45c2f c4group -t: remove destination before packing group 2011-11-02 21:33:38 +01:00
Günther Brammer ccbf4d1d45 Consolidate duplicated simple Log functions
The various small utilities do not use the engine Log implementation but
one that simply prints to stdout. Instead of duplicating that one, link a
common one into the utilities.
2011-11-02 21:36:39 +01:00
Martin Plicht 318d69ac62 mac: Add ocs bundle type so ocs directories will be recognized as Clonk scenarios as well 2011-03-17 12:00:26 +01:00
Martin Plicht 12f2ca9c2e mac: Restore addon-installation behaviour + Open scenarios contained in Reloc paths 2011-03-20 07:04:49 +01:00
Martin Plicht 72c12d33e0 config: Add General.OpenScenarioInGameMode so one can double-click scenarios to open them in regular game mode. 2011-03-15 04:44:32 +01:00
Julius Michaelis a1d8a465da Fix C4Viewport::SetZoomLimits and #259 2012-03-19 15:10:12 +01:00
Julius Michaelis 489255f7b5 Editor mode: Allow moving objects which are selected but covered by other objects 2012-03-17 18:10:36 +01:00
Sven Eberhardt 6b203c2fe1 MSVC compile warning fix 2012-03-18 17:25:27 +01:00
Sven Eberhardt fa2b8489fa Fix menu to scenario script callbacks 2012-03-17 14:26:58 +01:00
Julius Michaelis dee0811b23 Add an option to select an arbitrary object under the cursor via context menu to windows console mode
Follow-up for 73a05d70b206
2012-03-15 13:58:56 +01:00
Günther Brammer 9f0370f26c win32: fix infinite recursion in editor viewport initialization
Even the most trivial of code moving can result in bugs.
2012-03-15 15:58:32 +01:00
Julius Michaelis bb78ea79e7 Fix typo previous rev c18fa35abd02 + conditionally exclude C4UpdateDlg.h/cpp from build 2012-03-14 23:28:44 +01:00
Julius Michaelis 14251a7a31 Fix erroneous use of C4UpdateDlg 2012-03-14 22:53:05 +01:00
Günther Brammer 67cc074f95 C4Include: Include platform headers before our headers which depend on them 2012-03-14 01:13:11 +01:00
Günther Brammer b895bbad31 Consolidate some random platform abstraction functions into a single file
That way, the windows variants can be used without requiring the Win32
C4Window implementation.
2012-03-12 20:43:27 +01:00
Günther Brammer 1929e8d779 linux: add CLOEXEC flag to miscellaneous calls 2012-03-05 02:48:27 +01:00
Günther Brammer 3755a36dd1 linux: Add SOCK_CLOEXEC to socket calls 2012-03-11 00:50:51 +01:00
Günther Brammer b4fd8fcd15 linux: Add O_CLOEXEC to various open calls
This should prevent some file descriptor leakage from forks that
some libraries we use do.
2012-03-05 01:33:02 +01:00
Günther Brammer 4bc309122d Refactor C4Viewport::Init and C4ViewportWindow::Init a bit 2012-03-04 22:45:00 +01:00
Günther Brammer ea66890086 win32: Move fullscreen and viewport WndProcs to C4WindowWin32.cpp 2012-03-04 22:41:35 +01:00
Günther Brammer 8e8e965b8b win32: #define _UNICODE
We apparently do not use any of the C library function this affects, so
this only silences some warnings some versions of some windows headers
produce when only UNICODE is defined.
2012-03-04 19:16:30 +01:00
Günther Brammer 3ec624bb7a win32: Clean up some leftover old frontend User Messages 2012-03-04 19:15:16 +01:00
Günther Brammer 3b9dd7b487 win32: Remove some cruft from the c4group resource.rc 2012-02-14 22:49:26 +01:00
Günther Brammer ae322aa847 Remove some dead code 2012-03-04 21:44:20 +01:00
Günther Brammer 89bf0fc35a Remove obsolete C4ConsoleGUI::SetCaption wrapper
The old windows editor is gone and doesn't need to find the engine with
FindWindow anymore.
2012-02-29 23:49:45 +01:00
Günther Brammer 9c186de23c Version.txt and C4Version.h cleanup
Removed unused C4SHORTVERSION and C4EDITORCAPTION, replaced unset C4XVERBUILD
with C4XVER4, and more clearly separated the configuration from the derived
values.
2012-02-29 23:47:32 +01:00
Günther Brammer 19eefbc777 Move Gammaramp code from CStdGL to C4AbstractApp
The windows code now has to delegate to StdD3D like it does for the
resolution setting, but for the other ports the code fits much better in
the app source files.
2012-02-28 20:40:19 +01:00
Günther Brammer b7f7c933b1 Remove unused Application.DoNotDelay 2012-03-11 23:06:23 +01:00
Günther Brammer afe5411709 linux: Replace Application.Location with readlink("/proc/self/exe") 2012-03-11 23:01:21 +01:00
Günther Brammer b4439ac1b7 Remove unused C4AbstractApp::ClearClipboard 2012-02-28 01:37:26 +01:00
Günther Brammer 6126df616c Make engine compile with debugrecs again 2012-03-11 17:52:00 +01:00
Armin Burgmeier 6a0b0d95b7 Treat embedded images as one entity for text progress 2012-03-13 21:28:09 +01:00
Armin Burgmeier e0d56c48a0 Fix a crash when showing umlauts in menu items with text progress
Multibyte UTF-8 sequences were torn apart but the text progress advancement.
2012-03-13 21:24:24 +01:00
Armin Burgmeier 462574f681 Remove debug log in C4ValueProviderLinear::CompileFunc 2012-03-12 23:41:34 +01:00
Armin Burgmeier 86af00a313 Fix the build 2012-03-12 23:41:07 +01:00
Armin Burgmeier 2de0a031c4 Fix loading mesh animations in scenario saves 2012-03-11 22:49:59 +01:00
Armin Burgmeier 97cfd81133 Support mesh graphics and ingame objects as menu item graphics 2012-03-11 00:06:44 +01:00
Günther Brammer 5c235cc23e Savegames: Fix loading of global variables (#726)
The global variables ended up with the temporary name list created during
load that didn't necessarily contain all variables or even in the right
order. As far as I can tell, this happened since 2005, but nobody noticed
because the list of global variables didn't tend to change between save and
load.
2012-03-10 22:45:42 +01:00
Günther Brammer dfea0914a9 Merge the functions pointer branch 2012-03-09 17:42:48 +01:00
Julius Michaelis 5716bb1e47 C4AulScript::DirectExec: Throw on parsing errors, too, when fPassErrors is set. 2012-03-09 11:45:25 +01:00
Julius Michaelis ed5d615aab Check for OpenGL Version 1.2 and two functions from 1.3 instead of requiring full 1.3 (#692) 2012-03-03 23:25:50 +01:00
Günther Brammer 71e108f16a Start of a C4Script API third party programs could use
This is very experimental, subject to change, and the single function not
at all useful yet.
2012-03-04 21:23:11 +01:00
Armin Burgmeier fa7e922321 Fix rendering of mesh pictures to non-square target rectangles
This is still not perfect yet, but I suppose to get better we'd need
to compute the bounding box of the transformed mesh.
2012-03-03 01:45:46 +01:00
Maikel de Vries d1b8057382 Fix build for 8ac3339bf901 2012-03-02 22:48:25 +01:00
Julius Michaelis cb6eb060cc Add a dialogue for windows which can be displayed when the graphics engine initialisation failed
The dialogue has fields for resolution and a checkbox for fullscreen mode
2012-02-28 18:28:16 +01:00
Armin Burgmeier 893fb4bbed Make overlays on picture graphics work again
This was partly broken by 427cf61d729a. However, already before that,
the size of the overlay was depending on the ingame size of the object
on whose picture the overlay was being drawn. This didn't make much sense
and now the size of the overlay is equal to the area on which the picture is
drawn in the first place.
2012-02-26 21:44:00 +01:00
Armin Burgmeier fea6209365 Fix drawing of non-default graphics in picture overlays
This was broken by 427cf61d729a.
2012-02-26 21:09:42 +01:00
Armin Burgmeier 7f5f916e76 Draw only partial set of faces for buildings in construction 2012-02-26 01:09:42 +01:00
Armin Burgmeier de67769065 Fix crash when C4Draw::Blit was called with NULL source surface (#721) 2012-02-26 01:01:55 +01:00
Armin Burgmeier 8f7f5cc1f1 Allow dragging of objects from FoW if they have C4D_IgnoreFoW set (#720) 2012-02-25 22:15:39 +01:00
Günther Brammer 6486ea9e19 Script: Disallow "new Clonk {}" for now
Eventually, "new Clonk {}" will create a C4Object. Prevent anyone from
using it before then.
2012-02-25 22:10:03 +01:00
Armin Burgmeier 09e0e48290 When starting to drag an object, use the object at mouse down time
and not at the time the drag is started, which is a bit later, after the mouse
has been moved a few pixels in order. This makes it easier to start dragging
when hitting the drag object on an edge.
2012-02-25 22:05:47 +01:00
Armin Burgmeier 7f5b7bcdd6 Make a MouseHover callback when the object being hovered by the mouse changes 2012-02-25 21:56:11 +01:00
David Dormagen 4169a9232c swapped parameters of GetIndexOf 2012-02-25 21:57:39 +01:00
Armin Burgmeier 9d94b1da6e For scaled sprite graphics, don't interpret Picture coordinates as scaled
Otherwise an object with a scale of 5 and a picture of 64x64 (such as the
Metal and the GoldBar objects) cannot properly set the picture rectangle.
2012-02-25 17:35:24 +01:00
Armin Burgmeier 8eb76cef8c Unify overlay drawing of pictures
Instead of having custom code drawing the picture in C4DefGraphics.cpp,
re-use C4Def::Draw().

This changeset changes the coordinate system on which draw transformations
are applied to sprite picture overlays. The transformation is no longer
applied in the frame of the overlay picture but in the frame of the object on
which the overlay is drawn. This was already the case before for mesh
graphics, so this change unifies the interpretation of draw transformations
for sprite and mesh graphics.

The Tools Workshop has been changed accordingly so that object is production
are properly displayed on the sign. This also fixes the pictures of some
objects being off the sign.
2012-02-25 16:54:51 +01:00
Sven Eberhardt bdd053e2dc Fix compilation with zlib 1.2.6
Include zlib.h instead of just copying the definition for gzFile
2012-02-21 17:12:00 +01:00
Armin Burgmeier 94f552bbb8 Fix earth material initialization to work when texture is given
This fixes misplaced InEarth objects when the Material= option in Scenario.txt
contains a material-texture combination instead of a material only.
2012-02-19 19:33:35 +01:00
Armin Burgmeier e8e1c4b9d8 Check only 3 version numbers when checking whether an update exists 2012-02-19 18:31:09 +01:00
David Dormagen 5341ec1c3d removed the ignore_sky parameter of Draw*Map - now always ignores sky 2012-02-19 17:57:33 +01:00
Armin Burgmeier f710c68b9a Reset AlphaToCoverage GL state after having rendered a mesh 2012-02-19 17:49:02 +01:00
Armin Burgmeier 9dc9ad4ca7 Fix initialization of AlphaToCoverage material property 2012-02-19 17:45:01 +01:00
Günther Brammer ce27d42ac7 Remove unused C4AulScript::Owner
C4AulScript::Translate referenced it, but used it only when called from
eval, which is not done.
2012-02-17 01:04:05 +01:00
Günther Brammer 464d372034 Make C4GameScriptHost save to call again for (c4script standalone) 2012-02-17 00:30:00 +01:00
Günther Brammer cd46cf9914 C4SimpleLog defaults to on 2012-02-17 00:25:20 +01:00
Günther Brammer 1b5ee016d4 Fix build without OpenGL 2012-02-16 22:58:45 +01:00
Nicolas Hake db9ff85116 Binary mesh loader: Do not reject meshes with multi texturing
We don't support multi texturing in the rendering code, so emit a warning when
this happens
2012-02-16 00:45:48 +01:00
Nicolas Hake ac8edd6e20 Binary mesh loader: Support animations without tracks 2012-02-16 00:34:31 +01:00
Armin Burgmeier 8dae8c111d Implement XML loading support for geometry shared between submeshes
The new OGRE blender exporter (2.6) creates meshes which make use of this
feature.
2012-02-15 23:04:19 +01:00
Armin Burgmeier c09b24125c linux: Fix a crash when getifaddrs returns NULL for an address (#713) 2012-02-14 21:17:26 +01:00
Günther Brammer acee9242f0 Log some savegame errors instead of crashing with an uncaught exception 2012-02-14 00:17:07 +01:00
Armin Burgmeier e52d914638 Read but ignore some more "pass" options in material scripts
These are the ones that the blender 2.6 exporter sets automatically. We don't
support them yet but we want to be able to load the material script
nevertheless. Many of the additional options are set to their default values
anyway.
2012-02-13 23:40:47 +01:00
Günther Brammer 90f4f7f77b Work around crash bug in SDL_mixer 1.2.12
See http://bugzilla.libsdl.org/show_bug.cgi?id=1418 for details
2012-02-12 21:28:17 +01:00
Günther Brammer 67d8ac47e9 Keep functions across script reloads
For functions that are not appended/included, this is done by reusing them.
Functions that are not in the new script version are left with their code
raising and error. Appended/included functions are handled by a reference count.
2012-02-02 01:16:14 +01:00
Günther Brammer 1e7f32af48 Move C4AulFunc to its own header file
This is necessary since C4Value.h will call a function from C4AulFunc.
2012-02-13 18:00:35 +01:00
Günther Brammer 8091dff419 Clean up C4AulScriptFunc API 2012-02-01 03:49:50 +01:00
Günther Brammer 65801a5188 Remove C4AulFunc::LinkedTo
The parser doesn't need it to find the functions it has to parse anymore.

And the global proplist can be cleared before removing the functions,
instead of having engine functions deregister themselves and script
functions being deregistered when their linked function is removed.
2012-02-13 22:20:10 +01:00
Günther Brammer 30c843925f Script: Include each script at most once
If a script includes two others which each include the same fourth, the
script only gets one copy. Which one is arbitrary and subject to change.
2012-01-25 03:50:24 +01:00
Günther Brammer 42679e48fb Script: Inherit local variable initialization from #included scripts
This is done by creating their values in the parser. Global constants are
still created in the preparser so that they are available to the parser.
2012-01-25 00:36:11 +01:00
Günther Brammer 378e502c85 C4Script parser goes through the entire script instead of only functions
This should not change anything about which functions are created
by include/appendto and what inherited calls.
2012-01-27 00:42:41 +01:00
Günther Brammer 18038f45d3 Implement the function overload tree using the proplists
Instead of carefully inserting functions at the start or end of the list,
build the list just before the parser runs, at the same time as filling
the proplist where the functions are looked up.

This way, the overloaded function is simply the one that was previously in
the proplist, is not needed outside of the overloading function, and can thus
be replaced in the proplist.
2012-01-27 00:20:55 +01:00
Günther Brammer f61ebfc453 Replace C4AulScript tree structure with a list 2012-01-25 04:15:39 +01:00
Günther Brammer a7008e8a77 Script: Add "new p {}" syntactic sugar for "{ Prototype = p }" 2011-11-07 01:39:43 +01:00
Günther Brammer 4a3e692962 System.ocg scripts have a proplist for parsing purposes 2011-10-24 17:02:27 +02:00
Günther Brammer 24031a94bd Simplify the C4Script tokenizer a bit
This shouldn't change any user-visible behaviour.
2012-01-24 18:35:21 +01:00
Günther Brammer d07cc0c168 Some slight parser refactoring 2011-12-22 21:57:17 +01:00
Günther Brammer dc7ca92936 Some parser code cleanups 2011-10-24 01:00:29 +02:00
Günther Brammer ae11dfd1e4 Remove #strict infrastructure
The next incompatible changes to C4Script will probably use something else
anyway.
2012-01-25 04:15:53 +01:00
Günther Brammer f3854e87f8 Replace C4AulScript::GetFunc with C4PropList::GetFunc/Call 2011-10-15 22:07:45 +02:00
Günther Brammer 497cd5cffc Script: '->' also works with proplists 2011-10-15 02:30:30 +02:00
Günther Brammer 04e512fe00 Replace C4AulScript::GetFuncRecursive with C4PropList::GetFunc/Call 2011-10-15 02:27:02 +02:00
Günther Brammer b6fb634bd3 Replace the other C4AulScript::GetSFunc with C4PropList::GetFunc/Call 2011-10-15 02:06:21 +02:00
Günther Brammer db926e3f53 Replace C4AulScript::GetSFunc with C4PropList::GetFunc/Call 2011-10-15 02:05:10 +02:00
Günther Brammer f7b3642bc6 Replace C4DefScriptHost::Call with C4PropList::Call 2011-10-15 02:03:04 +02:00
Günther Brammer f8f588f641 Replace C4Object::Call with C4PropList::Call 2011-10-15 02:00:56 +02:00
Günther Brammer a01bb2cf9c Remove function cache from C4DefScriptHost 2011-10-15 01:59:15 +02:00
Günther Brammer bb3861d4f1 Replace C4AulScript::GetSFuncWarn with C4PropList::GetFunc 2011-10-15 02:11:57 +02:00
Günther Brammer 406b7c4eca Savegames: (De)serialize functions in c4values 2012-02-13 18:12:08 +01:00
Günther Brammer 38c1bb3976 Add C4PropList::GetFunc and C4PropList::Call 2011-10-04 23:04:06 +02:00
Günther Brammer 0403bed306 Put functions into their proplists 2011-10-15 01:38:59 +02:00
Günther Brammer a684ab4aba Script: Infrastructure for functions as a value type 2011-09-25 01:20:18 +02:00
Günther Brammer 35a16421f1 Always compare C4Set entries with C4Set::Equals 2011-10-18 21:57:52 +02:00
Günther Brammer 34b8d2c8e7 Add C4Set::C4Set(const C4Set&) and C4Set::C4Set& operator=(const C4Set&) 2011-10-18 21:56:10 +02:00
Günther Brammer f52b0d248f Hash properties to c4string pointer, not the contents of the string
this might even make a difference, as the strings shouldn't have to be
dereferenced anymore.
2011-10-05 21:38:42 +02:00
Günther Brammer bf86e81aa7 Clean category code up a tiny bit 2011-12-29 15:56:51 +01:00
Günther Brammer b3aff643f3 Script reloading does not clear local variable defaults
The defaults are filled in by the preparser, which is only invoked for
changed scripts.
2011-10-04 22:16:27 +02:00
Günther Brammer 8185d318bf Script: Add a proplist representing the global scope, named "Global" 2011-10-04 22:12:45 +02:00
Günther Brammer f166fdaed7 Move Parser from C4AulScript to C4ScriptHost 2011-10-13 18:01:02 +02:00
Günther Brammer 843642271d Script: local variables work for the Scenario and definition calls
This requires replacing C4AulScript::Def with C4AulScript::GetPropList() and
C4DefScriptHost::Def, and making C4GameScriptHost::GetPropList return the
scenario proplist prototype.

Definition calls won't be able to change the local variables, of course.

Other proplists will be able to use local variables once they can have
functions.
2011-09-29 03:49:21 +02:00
Günther Brammer 769c1083b6 Store C4AulFunc::Name in a C4String 2011-09-25 21:09:16 +02:00
Günther Brammer ca4da88137 Script: Scenario functions get the Scenario proplist in "this" 2011-09-25 23:25:13 +02:00
Günther Brammer a24ebc4936 Script: Add a proplist representing the scenario, named "Scenario"
The proplist is accessible from script via a global constant.
2011-09-25 23:24:29 +02:00
Günther Brammer 9f180dffee Script: Remove ScriptGo, ScriptCounter, goto and the ScriptN callbacks
No scenario uses them, and ScheduleCall provides an alternative.
2011-09-19 21:33:05 +02:00
Günther Brammer 6f1057c69f Script: this returns the definition in a definition call 2011-09-25 23:48:06 +02:00
Günther Brammer b4021015f7 Make C4AulFunc::Exec take a proplist instead of an object 2011-09-25 23:49:17 +02:00
Günther Brammer d723d43d92 Make C4AulContext::Def a proplist 2011-10-13 23:39:35 +02:00
Günther Brammer 2afeb25df6 Script: remove redundant check for 0 in object call
0 is neither object nor definition, so the ordinary typecheck suffices.

Also change the error message to use '->' instead of object or definition
call.
2011-09-26 20:29:32 +02:00
Günther Brammer c63b66e909 Script: Add def and effect parameter types 2011-09-24 18:37:28 +02:00
Günther Brammer dbaa638166 Clean up C4Value::CompileFunc 2011-09-26 21:57:25 +02:00
Günther Brammer 32e7eb2904 Only use C4V_C4Object as typecheck target, tag the values with C4V_Proplist
This simplifies a few places which had to check for both tags before.
2011-09-26 20:22:31 +02:00
Günther Brammer 0fa37ef35d Optimize if(!...) from two bytecodes to one 2011-10-14 00:28:32 +02:00
Günther Brammer a9e1af7226 unix: Use clock_gettime(CLOCK_MONOTONIC, ...) instead of gettimeofday
gettimeofday returns wall clock time, which can jump around, which is bad for
our purposes. clock_gettime(CLOCK_MONOTONIC, ...) does exactly what we need - a
stable measurement of time since an arbitrary point.
2011-06-27 01:52:39 +02:00
Armin Burgmeier de4a93cfc5 win32: Actually use the new delay when the timer delay is updated
Instead of just re-creating the timer with the old value. This fixes using
/speed to make the game faster than the default.
2012-02-12 15:54:36 +01:00
Armin Burgmeier 70a67204cb win32: Scheduler runs timeouted procs also when flooded by event inputs (#256) 2012-02-12 15:15:03 +01:00
Günther Brammer 283876696d Optimize away STACK 0 bytecodes
They got created for this without parentheses.
2011-05-07 00:18:00 +02:00
Günther Brammer 0c2ea0b6b5 C4AulParseState::AddBCC returns the position of the added chunk 2011-10-14 00:28:29 +02:00
Günther Brammer c1d1424a56 Annotate Bytecode debug output with jump target labels 2011-05-07 00:19:01 +02:00
Günther Brammer 0cd46a2ebc Wrap C4AulFunc::Name in C4AulFunc::GetName() 2011-10-14 00:40:55 +02:00
Günther Brammer 725f0e0f5a Remove GuessType from a comment 2011-08-21 17:10:45 +02:00
Günther Brammer 8758e35255 Remove redundant C4Value::GetTypeInfo 2011-08-21 14:40:29 +02:00
Günther Brammer 39ba48ee54 Rename C4Value::ConvertTo(NoNil) to C4Value::Check(Par)Conversion
The NoNil variant thus has the shorter name, because most code should
use it. Conversion checks mostly secure code that uses the value and would
crash with a nullpointer. The exception are function parameters, which all
also accept nil and 0 and check for nullpointers in the function itself.
2011-08-21 01:47:38 +02:00
Günther Brammer c82debf5f1 Remove almost unused C4AulScript::GetSFunc(int)
This also transforms a O(n^2) loop into a O(n) one. Though the n were small
and the loop seldomly called.
2011-09-30 01:39:12 +02:00
Günther Brammer b80315b182 Script: Remove unused PrivateCall and ProtectedCall 2011-09-30 01:47:06 +02:00
Günther Brammer 65a11ef1c3 Script: Remove unused function "descs" 2011-09-29 02:46:26 +02:00
Günther Brammer b911630578 Replace OpenSSL SHA1 implementation with one copied from boost/uuid
Although the code already uses boost, boost/uuid hides the sha1
implementation in a deeply nested namespace, which is just too bizarre to
use. Also the name of that namespace suggests that it is just an
implementation detail that could go away without notice.
2011-01-10 21:30:40 +01:00
Günther Brammer 3c41310fa3 Remove C4ConfigShareware to reduce OpenSSL dependency 2011-11-02 00:07:29 +01:00
Günther Brammer 7a63fc0ade C4ChatDlg: Use EnsureUnicode() instead of a custom half-implementation 2011-11-01 23:19:03 +01:00
Günther Brammer 5f2f995852 Unify the #include blocks a little bit
One line for C4Include.h, one for the .h corresponding to the .cpp, one
empty line, the other C4* includes, another empty line, external headers.
2011-11-01 23:17:41 +01:00
Nicolas Hake 7c34fa9121 Replace RGB player color selection with an HSV chooser (#679) 2011-10-30 20:43:45 +01:00
Nicolas Hake af8cc1320f Do not throw from DirectoryIterator::Read (#681) 2011-10-29 01:16:13 +02:00
Günther Brammer 5f5f2f3975 Fix definition drag-n-drop from file manager to editor viewport 2011-10-21 22:56:26 +02:00
Armin Burgmeier e44b216230 Enable face ordering individually for all submeshes 2011-10-15 21:35:39 +02:00
Julius Michaelis 926e251931 Fix SoundSystem, attempt #4 2011-10-15 14:43:18 +02:00
Julius Michaelis eda64786fc Fix Windows build (C4VidePlayback vs f1202c46e544) 2011-10-15 12:55:24 +02:00
Julius Michaelis 74af3071e3 C4SoundSystem: Load all sounds statically
Enable true wildcards in sound names
Fix #680 / 115b63d14d54
2011-10-13 17:05:40 +02:00
Günther Brammer 4aa119af21 Make C4SoundSystem.cpp utf-8 again 2011-10-13 02:09:50 +02:00
Julius Michaelis 0f12b3485e Find sounds with all extensions instead of only wav, so Sound() does no longer require .ogg extensions
Do not replace * with ? in sound name wildcards anymore, adjust scripts
2011-10-12 23:09:22 +02:00
Armin Burgmeier f67b20f3f2 Fix a crash when a mirrored animation has a track for only one pair of bones 2011-10-12 21:13:13 +02:00
Günther Brammer 469eb4ddbc editor: Do copy the scenario before saving as a scenario
The deletion only happened when saving as a savegame.

C4Console::SaveScenario also is a much more natural place to do the
copying, since it already contained the part where the new path was copied
to Game.ScenarioFilename.
2011-10-12 20:47:08 +02:00
Armin Burgmeier 8b3a96dcdb Apply animation mirror to bone translation of all keyframes 2011-10-12 20:50:27 +02:00
Maikel de Vries 8e27ffd5c7 Engine: PlaceVegetation now respects bounding box for C4D_Place_Surface 2011-10-12 17:17:04 +02:00
Günther Brammer 52b87fa64f Do not change the working directory
Build and release engines in either installed or uninstalled locations
should find the game data without this now.
2011-10-11 02:08:04 +02:00
Günther Brammer f1cedd5420 Look in the planet folder for game data, too
This replaces the BUILD_TO_PLANET option and makes in-tree Makefile builds
run without further work. Out-of-tree builds need a symlink to planet from
the build directory.
2011-10-11 15:15:41 +02:00
Günther Brammer 8da7abc12f Mac: Use the SystemDataPath for the "GameDataPath" like the other platforms 2011-10-11 15:14:05 +02:00
Günther Brammer fa1cab4896 Clean up some obsolete Config.General.ExePath usages 2011-10-10 23:28:01 +02:00
Peter Wortmann 1388591644 Landscape: Dig2ObjectCollect shouldn't stop other materials from spawning [#678]
Thanks to Maikel for the accurate report.
2011-10-10 20:25:35 +01:00
Nicolas Hake 5ae60485fc Make OC build again 2011-10-09 20:52:13 +02:00
Peter Wortmann 6835b7939d Fixed some warnings, security 2011-10-08 13:02:15 +01:00
Sven Eberhardt e22049c245 Fix writing of Record.log 2011-10-09 20:11:39 +02:00
Sven Eberhardt 452f34ffd9 Debug: Add thread checking for CStdFile 2011-10-09 20:11:18 +02:00
Martin Plicht d5c94ae089 Mac: Fix some compiler errors caused by class renamings (C4AbstractApp etc) 2011-10-09 19:33:14 +02:00
Armin Burgmeier 326442474d Change back the path reordering in C4Reloc.cpp
Mainly to avoid unexpected side effects this short before the release
2011-10-09 18:36:25 +02:00
Peter Wortmann ad79ece074 Mac: Put game data into bundle
This makes it possible to ship the bundle stand-alone. Also
note that CMake will automatically pack the game data for
release builds, but sym-link the game data for debug builds.

Note this means you will only see the parts of planet/ that
are mentioned in OC_C4GROUPS in CMakeList.txt! This is equivalent
to the behaviour of the shipped build, so I don't see this as
a problem.
2011-10-09 17:09:48 +01:00
Armin Burgmeier b532e77872 Fix the build when building against libpng 1.5 2011-10-09 11:15:02 +02:00
Sven Eberhardt 76c2943579 Fix debugrec false alarm on some uninitialized memory 2011-10-08 23:47:07 +02:00
Sven Eberhardt 8ba09ad857 Fix floating point related sync loss in GetAnimationLength 2011-10-08 21:55:12 +02:00
Felix Wagner 1fb605e384 PlaceVegetation now accept C4D_Place_Subsurface for underground placement and
C4D_Place_BothSurface for above- and underground placement.
2011-10-02 23:11:00 +01:00
Günther Brammer 20b71f030a Clean up StdDDraw2.h a little 2011-10-03 17:19:51 +02:00
Günther Brammer 1cafba4be8 Rename files implementing C4AbstractApp and C4Window 2011-10-03 17:19:24 +02:00
Günther Brammer c2908d5bd5 Rename CStdDDraw to C4Draw 2011-10-03 16:34:08 +02:00
Günther Brammer 2b6f4432de Rename lpDDraw to pDraw 2011-10-03 16:30:18 +02:00
Günther Brammer ad89e12a2c Rename CTexMgr and CTexRef to C4TexMgr and C4TexRef 2011-10-03 16:16:38 +02:00
Günther Brammer 68d6b34f72 Replace SURFACE with C4Surface * 2011-10-03 16:07:07 +02:00
Günther Brammer 55f6bc8d0f Replace CSurface and C4Surface with just C4Surface
The methods that previously were on C4Surface still are in a separate
file.
2011-10-03 16:06:41 +02:00
Günther Brammer d835ab002a Rename CStdWindow to C4Window 2011-08-27 23:12:01 +02:00
Günther Brammer eac2ce9034 Rename CStdAppPrivate to C4X11AppImpl 2011-08-27 22:05:22 +02:00
Günther Brammer efed250aa7 Rename CMarkup to C4Markup 2011-08-27 21:13:15 +02:00
Günther Brammer 6700bff4de Replace CFacet with C4Facet
The latter is almost a superset of the former.
2011-08-27 17:47:49 +02:00
Günther Brammer 156a502289 Rename CClrModAddMap to C4FogOfWar 2011-08-27 16:41:26 +02:00
Günther Brammer f4ff47239f Rename CBltTransform, CBltVertex, CBltData, CPattern and CGammaControl 2011-09-30 22:15:51 +02:00
Günther Brammer 08dacd878d Rename CBitmap(256)Info to C4BMP(256)Info 2011-08-27 16:32:15 +02:00
Günther Brammer 8039a35791 Rename CStdApp to C4AbstractApp 2011-08-27 16:20:39 +02:00
Armin Burgmeier b2af6314cb mape: Don't dynamically allocate memory for each pixel to draw 2009-10-06 20:30:54 -04:00
Armin Burgmeier bc980ebc12 GObject-ified MapeMaterialMap 2009-09-30 22:54:10 -04:00
Armin Burgmeier ba740c4296 Actually committed new MapeGroup code 2009-09-30 22:53:29 -04:00
Armin Burgmeier 7b586338ef Increased version number to 1.3.90, and added license text to about dialog 2009-09-26 23:14:51 -04:00
Armin Burgmeier 12dce39aa1 Changed license headers of a few more files to ISC
They have been left out in e3b05cfc2145 for some reason.
2009-09-26 22:47:01 -04:00
Armin Burgmeier 45e79a3299 Removed mape/ include path, include by "mape/foo.h" instead 2009-09-26 22:43:09 -04:00
Armin Burgmeier 2d580e99d0 Follow GTK+'s single-include policy 2009-09-26 22:08:40 -04:00