Commit Graph

256 Commits (544c1cbb4bb6da97d30571ff28772660c7ad5969)

Author SHA1 Message Date
Sven Eberhardt 5b90f2f39f Fix sequence combo key assignments so they don't break when mouse movment is assigned to a control 2012-10-28 17:47:02 +01:00
Philipp Kern e037300801 Fix spelling mistake: ressource -> resource. 2012-10-21 22:20:43 +02:00
Armin Burgmeier b4aafdd874 Remove build number aka C4XVER4 2012-10-18 23:54:50 +02:00
Sven Eberhardt a6d9690afa Fix Win32/MSVC builds losing sync to due to different order of parameter evaluation when multiple calls of Random() were done in the parameters 2012-10-14 21:02:27 +02:00
Sven Eberhardt ec22028640 Some DebugRec fixes 2012-10-14 14:39:22 +02:00
Sven Eberhardt db84b849b1 /sound reenabled. Sound-creating client now shown in client list box (F4). No sounds played when client is ignored. 2012-10-13 13:37:59 +02:00
Tobias Zwick 86cbc2f650 replace boolean Group property in assignments with GUIGroup property 2012-10-09 23:59:32 +02:00
Tobias Zwick 48012aa91d add GUIDisabled property for key assignments 2012-10-09 22:24:48 +02:00
Sven Eberhardt 8bdd761027 PlayerControls: Allow usage of keyboard scan codes instead of virtual key names using $%x format (Win32 only)
Also re-resolves keys if the keyboard layout changed at runtime.
2012-10-09 00:54:34 +02:00
Sven Eberhardt 22c744f72e PlayerControls: Allow GUIName and GUIDesc in assignments. 2012-10-08 22:29:15 +02:00
Sven Eberhardt 08b495e43d PlayerControls: When the user changes a key assignment in his local config, all derived key assignments (Key=CON_*) change as well (#807).
The "CON_" prefix is now mandatory when referencing other key assignments. Updated PlayerControls.txt to reflect that.
2012-10-08 20:45:04 +02:00
David Dormagen e7ab0bd936 changed assert that was incorrectly triggered by script players 2012-07-07 16:58:52 +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
Günther Brammer f3854e87f8 Replace C4AulScript::GetFunc with C4PropList::GetFunc/Call 2011-10-15 22:07:45 +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
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
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
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
Felix Wagner af699844de Removed some old mouse control related stuff 2012-01-29 02:13:55 +00: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
Felix Wagner 9c82958fa1 Little tweaks for the player options dialogue 2012-01-25 04:53:59 +00:00
Armin Burgmeier 1eff3d7661 Add another DebugRec for the Definition() call 2011-12-29 17:02:26 +01:00
Sven Eberhardt c2ccf20509 Some new debugrecs 2011-12-29 00:12:21 +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
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
Günther Brammer dfc799aa27 Rename C4Group_GetFileCRC/SHA1 to GetFileCRC/SHA1
These functions aren't used for files in groups and
consequently broken for them. Remove the dead code.
2011-09-15 20:16:00 +02:00
Nicolas Hake e0610576bd Return NULL instead of ((T*)false) from some functions 2011-09-28 00:48:46 +02:00
Günther Brammer ee5c3e469a CreateScriptPlayer sets the player color (#417) 2011-09-23 01:41:25 +02:00
Günther Brammer a3ade134fe Savegames: Do not clear player control data immediately after loading (#596) 2011-09-22 20:00:17 +02:00
Günther Brammer f8702a4ff8 Savegames: Dead code removal 2011-09-19 21:00:55 +02:00
Günther Brammer 9bc61db360 copyright notices update 2011 2011-09-01 16:58:52 +02:00
Nicolas Hake fe747db554 Clean up copyright notices
Use real names for copyright attribution wherever they are known,
drop duplicates
2011-09-01 12:47:54 +02:00
Tobias Zwick f025edb4a9 removed Portraits
+ CustomMessage now uses a normal picture of a definition/object
+ BigIcon is now the small (and only) "Portrait" the player chan choose
+ In future, one could of course make the max size of the BigIcon bigger
2011-08-05 14:58:16 +02:00
Sven Eberhardt 36644a1287 Synchronization fixes for Record/DebugRec/Network 2011-07-17 21:23:32 +02:00
Sven Eberhardt 76aacc9564 Debugrecs: Store text ID of created objects 2011-07-17 16:07:44 +02:00
Peter Wortmann af1146c126 Fixed writing of debug-record
It's a bit verbose and probably slow, but I suppose that's acceptable
for debug code...
2011-07-17 15:01:12 +01:00
Sven Eberhardt 3a8ce9b25e player control defs: ClearPrevious flag for player control overloading 2011-07-16 11:58:38 +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 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 17265be0aa Remove some dead savegame code 2011-05-01 13:50:37 +02:00
Günther Brammer 2133ed2cd8 Add missing move constructors to StdCopy*Buf 2011-04-02 18:09:46 +02:00
Günther Brammer 6768614feb Silence various warnings 2011-03-28 20:58:42 +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 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
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 6c2a89eaf8 Replace timeGetTime with a platformneutral GetTime wrapper 2011-03-13 17:25:35 +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 2e0b00a5e0 Change .c4b extension to .ocb 2011-03-13 17:06:23 +01:00
Armin Burgmeier 2a2408f9a8 Change .c4p extension to .ocp 2011-03-13 16:39:48 +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
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 81d64df737 Do not use Windows' RGB macros for BGR colors 2011-03-11 03:37:27 +01:00
Günther Brammer e80a39dd09 Remove some dead code 2011-03-09 23:30:23 +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 8ff6ae847c C4Group::LoadEntry takes pointer instead of non-const reference 2011-03-05 02:44:26 +01:00
Günther Brammer 45620c2b85 Move some C4AulDebug code into C4AulDebug 2011-03-03 00:58:43 +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 e4ef7e3d98 Replace C4VID with C4VPropList
Most callsites use C4Id2Def instead, but for some a def->id->def
indirection could be removed.
2011-02-05 23:09:09 +01:00
Armin Burgmeier 58d3682678 Fix a crash when script players join the game (#571) 2011-01-27 01:12:56 +01:00
Günther Brammer d3ddc171ee editor/win32: Remove Components menu in favour of external editors 2011-01-19 02:14:59 +01:00
Günther Brammer 3ef004506c editor: Store the selected objects only in EditCursor 2011-01-12 23:40:22 +01:00
Günther Brammer 6d3feabe69 Reduce #includes so that C4Include.h doesn't include C4Value.h
This should avoid many complete rebuilds.
2011-01-08 17:04:20 +01:00
Armin Burgmeier 9f74506e9b Support loading game data from system path 2011-01-06 21:18:13 +01:00
Maikel de Vries 5f7da0b35a Revive the possibility for rivalry in the round evaluation dialogue
Had been removed in a024744ab449
2011-01-06 22:34:23 +01:00
Maikel de Vries 32993624c0 C4Id: Removed some deprecated defitions
These are not used anymore in openclonk, if there is any need for the functionalitiy at all, it can be implemented in C4Script. To remove the other definitions some more work is required.
2011-01-06 18:12:34 +01:00
Nicolas Hake 5db69dd5e0 Remove some remains of Rnd3 2011-01-02 13:51:09 +01:00
Julius Michaelis eb6d3db1f4 Log to record file, too, when recording 2010-12-25 16:00:59 +01:00
Günther Brammer be342d4a51 copyright notices update 2010
This time with more manual checking and using git blame -M -C, so that
a few cases of copied code get a copyright notice corresponding to
their initial introduction.
2010-12-23 01:01:24 +01:00
Peter Wortmann 0c8bac0140 StdCompiler: Removed "compatibility" hack to have RCT_Escaped fallback to RCT_All.
RCT_Escaped is meant to be used when embedding a string into a custom encoding of a structure. That's why it has a terminator symbol and escapes anything that could be interpreted as a seperator. Falling back to RCT_All completely destroys this safeness, as it just blindly copies everything. In case this kind of functionality is really needed, introduce RCT_EscapedAll or something similar.
2010-12-19 01:43:40 +00:00
Günther Brammer 719ed39632 Remove FairCrew and permanent Physicals 2010-12-10 01:06:38 +01:00
Tobias Zwick 24847bb014 fixed #536: Gamepad: zooming with buttons needs several clicking 2010-12-15 02:16:24 +01:00
Günther Brammer b946751f36 Fix problems found by z33ky with g++ 4.6 2010-11-25 15:24:49 +01:00
Günther Brammer 25d74134c7 Support subpixel object movement in the editor
This also converts internal usage of ForcePosition to C4Real. For the
attach procedure, this should only result in smoother movements, but the
consequences for flight are less clear.
2010-10-10 18:46:23 +02:00
Günther Brammer 93a1e82907 Split out viewport stuff from C4GraphicsSystem to a new C4ViewportList 2010-09-29 03:44:05 +02:00
Günther Brammer 17016a6695 Version: Reduce version number from five numbers to four
Removing C4XVER4 and renaming C4VERBUILD to C4XVER4. Also, make the
Makefile.am read the version from the Version.txt and generate C4Version.h.
2010-09-25 00:43:30 +02:00
Günther Brammer fbdc799ae5 Each player can only control one Clonk simultaneously
Switching between multiple Clonks is still supported, and
Script could issue Follow commands to simulate the old
behaviour.
2010-07-30 22:38:21 +02:00
Sven Eberhardt e0db866aee Silent reset of down controls if release control was handled by a higher priority control 2010-07-30 22:30:54 +02:00
Armin Burgmeier 99f0a43cff Create records and savegames at user path (#250) 2010-05-22 20:49:42 +02:00
Sven Eberhardt 65b73b7177 SendCursorPos controls issue CON_CursorPos (#289) 2010-05-07 15:57:56 +02:00
Nicolas Hake e27ecd59b5 Rename FIXED to C4Real
There's already a typedef struct _FIXED FIXED; in wingdi.h, which conflicts
with the definition of FIXED in OpenClonk.
2010-05-04 17:35:18 +02:00
Sven Eberhardt 142cb65658 Do not issue disabled controls into queue (#269) 2010-04-29 00:46:38 +02:00
Armin Burgmeier 9f65838ae8 Fix a couple of compiler warnings 2010-04-28 23:43:25 +02:00
Günther Brammer 0f4e88db87 Improve the default Zoom and Zoom changes
The default Zoom should now show a piece of the landscape about the size of
one Clonk's vision.
2010-04-27 01:32:45 +02:00
Martin Plicht 4902679b56 DirectExec and C4ControlScript support executing script expressions that access variables and parameters of the parent context (used for watch expressions while debugging) 2010-04-26 22:16:45 +02:00
Martin Plicht faffb26b95 C4ControlScript::Execute informs the debugger about evaluated scripts 2010-04-26 20:13:36 +02:00
Benjamin Herr 56ce8fd83f C4PlayerControl: ctor-initializer in init order 2010-04-22 15:11:05 +02:00
Sven Eberhardt 6158aec581 Removed internal score counting by player wealth/owned objects
Unified and renamed all Points/Value/Score functions/field names into Score
Some MSVC warning fixes
2010-04-21 21:12:49 +02:00
Günther Brammer 46640c4442 Clean up SolidMask code
The temporary removals for landscape saving purposes now use the temporary
removal code of the solidmasks. SolidMasks remove themselves from the
landscape when deleted. A now superfluous argument to Remove() is removed.
2010-04-20 22:38:18 +02:00
Nicolas Hake 5dc0d3b4cb Reduce value truncation warnings 2010-04-20 18:20:24 +02:00
Sven Eberhardt 4ee3f9d011 Fix player color alpha after /plrclr change command (#254) 2010-04-18 10:18:16 +02:00
Sven Eberhardt b8b97ce42c Fix alpha of team colors and random player colors 2010-04-15 15:25:42 +02:00
Sven Eberhardt 7e1a041b32 fix crash on cursor coordinate send if a control is issued without a player viewport open 2010-04-11 13:42:07 +02:00
Sven Eberhardt 0767e3608e Implement optional cursor position as parameter to controls (#216) 2010-04-10 22:44:00 +02:00
Armin Burgmeier c2924041c9 Fix seperate->separate everywhere 2010-04-01 23:08:06 +02:00
Benjamin Herr 4378de147c Rerun astyle with missing \ added 2010-03-28 20:58:01 +02:00
Benjamin Herr 27287b981f Reformat everything according to style guidelines
as per http://forum.openclonk.org/topic_show.pl?tid=208
and http://wiki.openclonk.org/w/Style_Guidelines
via astyle
  --brackets=break
  --indent=tab=2
  --keep-one-line-statements
  --keep-one-line-blocks
  --indent-namespaces
  --convert-tabs
  --recursive
  --exclude=zlib
  --exclude=tinyxml
  src/\*.h src/*.cpp
2010-03-28 19:58:21 +02:00
Benjamin Herr 01db6c5ec7 C4PlayerControl: put members in ctor-initializer in initialization order 2010-03-28 18:49:06 +02:00
Sven Eberhardt 35d439951e Allow Modifier+CON_* as player control assignment
ControlSet merging overrides only if OverrideAssignments is set to true
2010-03-27 19:08:01 +01:00
Günther Brammer b4e37b070b Change all indentation with spaces to use tabs instead
This is a whitespace-only patch. Hopefully, it'll only affect rarely-changed
parts of the engine, since all regularly maintained pieces should already
use tabs.
2010-03-27 17:05:02 +01:00
Benjamin Herr 649640688f fix warning in C4PlayerControl.cpp
---
 src/control/C4PlayerControl.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
2010-03-26 23:51:52 +01:00
Sven Eberhardt e8aaa703fc implement DefaultDisabled for PlayerControls (#206) 2010-03-26 14:48:28 +01:00
Sven Eberhardt 6fcf569c42 fix ghost player menu on close by CDA_Menu player control (#202), fix key to work as toggle as intended 2010-03-25 13:55:12 +01:00
Tobias Zwick b99b782089 removed id from C4RCExecObj struct 2010-03-21 22:24:54 +01:00
Peter Wortmann fe8d566580 Backing out of some unwanted changes 2010-03-21 19:34:22 +01:00
Sven Eberhardt dda34d3897 send perioic gamepad axis change callbacks even if direction didn't change 2010-02-24 00:18:07 +01:00
Tobias Zwick 16c20cff1a cleaned up obsolete scenario.txt options, enabled peter-scroll 2010-02-19 00:03:53 +01:00
Asmageddon f3fcf7e80e fix key release event not being triggered if shift state changed during key hold (#134) 2010-02-18 18:43:38 +01:00
Günther Brammer a16df97a95 Various cleanups in the platform code 2010-02-16 02:54:02 +01:00
Peter Wortmann 1aff82edb7 Quick test scenario for 50% Clonk. 2010-02-12 19:08:05 +01:00
Sven Eberhardt feaa68cbe5 reimplement object menu controls (#77) 2010-02-08 21:52:46 +01:00
Martin Plicht be2fa8a321 Resolve Objective-C++/C++ ambiguity 2010-02-06 16:52:08 +01:00
Benjamin Herr f3b35227ea avoid lots of gcc warnings 2010-01-25 05:00:59 +01:00
Nicolas Hake ed6f9424d7 Allow IDs longer than 4 characters
All C4IDs are now stored in auto-created global constants with the same name
as the ID itself. There is no special parsing of IDs anymore; this means that
you need to use the C4Id function if you aren't sure whether an ID exists.

IDs in portrait strings aren't working, since I expect portrait support to be
removed from the engine.
2010-01-25 16:57:57 +01:00
Nicolas Hake a41f896921 Replace global C4ID consts with member consts 2010-01-25 04:14:52 +01:00
Günther Brammer e592ca643c Move prototypes back to C4Prototypes.h 2010-01-02 01:19:42 +01:00
Günther Brammer 69acebe64a Add missing includes to C4PlayerControl.cpp
Before, it only compiled with MSVC by accident.
2010-01-02 01:12:35 +01:00
Sven Eberhardt 23a206ccdd implement *Mouse*Wheel1Up/Down for player controls
implement mouse wheel viewport zoom as async PlayerControl
2009-12-31 18:20:45 +01:00
Sven Eberhardt f0e361e302 fix CID_PlrControl in network 2009-12-30 01:56:52 +01:00
Sven Eberhardt 46b39ce80f fix PSF_PlayerControl lookup in global namespace only 2009-12-30 00:44:43 +01:00
Sven Eberhardt 21590e58c3 + MouseSelectionAlt: Callback for right-click on C4D_MouseSelect objects 2009-12-29 18:54:39 +01:00
Sven Eberhardt b80ae6daf5 fix GameMouse*Button* in DownKeys
add scenario local player controls
2009-12-28 14:36:06 +01:00
Sven Eberhardt e53332b446 + FnSetControlEnabled 2009-12-27 19:11:14 +01:00
Sven Eberhardt 69c0d1f92a fix right mouse button player control event 2009-12-22 21:16:08 +01:00
Nicolas Hake 1c11c4dd34 Merged PlrCtrl into default 2009-12-17 14:06:24 +01:00
Tobias Zwick ef778d631a removed ConvertGoals() (backward compatibility with Clonk4) 2009-12-14 22:46:10 +01:00
Tobias Zwick edec15d64f merge 2009-11-30 17:24:14 +01:00
Armin Burgmeier 49e607bab0 Added includes and forward declarations, fixing the build 2009-10-26 00:09:34 +01:00
Nicolas Hake 52bde5a579 Remove BIG_C4INCLUDE define 2009-10-20 06:21:12 +02:00
Sven Eberhardt f0582c8300 mouse game coordinate fix 2009-10-17 22:40:11 +02:00
Sven Eberhardt 448bba9ff5 scripted mouse control fixes 2009-10-17 22:20:36 +02:00
Sven Eberhardt 9be7a2724a added mouse support for scripted player controls 2009-10-17 17:53:26 +02:00
Sven Eberhardt 1c941adddc fix gamepad control 2009-10-16 16:23:17 +02:00
Sven Eberhardt 4237837bb3 experimental gamepad config 2009-10-14 23:29:27 +02:00
Sven Eberhardt 87e0548bd0 PrefControl switched to new player control method 2009-10-14 18:46:22 +02:00
Sven Eberhardt 8098b31bce player control init: fallback to existing control sets if selected control set not found 2009-10-13 22:02:44 +02:00
Sven Eberhardt 15c95d5c57 allow local game player join from unpacked player file 2009-10-13 20:42:20 +02:00
Tobias Zwick f584896446 merge 2009-10-08 20:51:31 +02:00
Armin Burgmeier e2c68254a5 Added includes and forward declarations to headers
So that they can be included individually
2009-09-21 00:01:55 -04:00
Armin Burgmeier 809c2234cd Merged alphafix into default
This reverts the meaning of alpha components everywhere in engine and script.
alpha=0 means transparent, and alpha=255 means opaque.
2009-09-19 12:08:09 -04:00
Günther Brammer dddf9ef00a Change all lineendings to LF (except in planet/) 2009-09-16 03:29:20 +02:00
Armin Burgmeier 9269c2c79d merge 2009-08-27 20:59:30 -04:00
David Dormagen cde2718611 Changed behavior of settlement points in evaluation dialogue
The game does not display the settlement points in melee rounds anymore.
This behavior can be toggled ingame with HideSettlementScoreInEvaluation(bool fHide)
2009-08-26 14:17:41 +02:00
Armin Burgmeier 4573315d42 Reverted meaning of alpha: Now 255 is opaque and 0 is transparent
Shader and D3D remains to be adapted yet.
2009-08-23 17:46:56 -04:00