Commit Graph

420 Commits (426e6c659ae90872ce17b4714908f81521609619)

Author SHA1 Message Date
Nicolas Hake e0dc30c59a Update copyright notices
As discussed in http://forum.openclonk.org/topic_show.pl?tid=2917, I
have merged all copyright notices into a single file and referenced that
merged file from each source file.

For the updated source files, the timeline has been split into three
parts:
 1. Pre-RWD code (before 2001)
 2. RWD code (2001 through 2009)
 3. OpenClonk code (2009 and later)
All pre-RWD copyright notices have been left intact, as have RWD-era
copyright notices where the file did not have a RedWolf design copyright
notice but only individual author ones. All copyright notices of the
OpenClonk era have been replaced by a single notice ranging from the
first recorded year to the current year (2013). Mape code did not get a
OpenClonk Team copyright notice because it is somewhat separate from the
main OpenClonk codebase and has only been touched by Armin Burgmeier.
2013-12-23 13:03:19 +01:00
Sven Eberhardt a9a2470ace Fix accelerator hotkeys.
They were broken since keys aren't passed as VK-codes but as scancodes now. Tested under Windows only.
2013-12-14 12:24:07 +01:00
Tobias Zwick dd3de2f0c9 Merge branch 'issue-251' 2013-12-09 21:45:54 +07:00
Tobias Zwick b73eabd4fd add infinity-field to C4TimeMilliseconds, add linker error (*cough*) 2013-12-08 19:11:28 +07:00
Tobias Zwick fe2a400c02 replace global function GetTime() with class function C4TimeMilliseconds::Now() 2013-12-07 21:27:01 +07:00
Tobias Zwick 3c4ba7f494 do not lazy-initialize C4GUI::tLastChange time 2013-12-07 14:04:35 +07:00
Tobias Zwick 95c3b0b75a fix scrollbar drawing and remove code duplication (#1004) 2013-12-05 10:40:17 +07:00
Tobias Zwick 94c618d153 add new type C4TimeMilliseconds for time measurements to solve problems when GetTime() overflows (#251)
The new type C4TimeMilliseconds behaves for the most part like a uint32_t but is overflow-proof in comparisons.
In some places, a 0-value (or uint_max) of the variable storing the time had the special meaning "not set yet". This has been resolved by having it as a pointer to C4TimeMilliseconds with NULL meaning that it has not been set yet.
2013-12-04 19:35:07 +07:00
Tobias Zwick 666a51b3d9 update documentation around DefCore, remove some obsolete fields 2013-11-30 14:14:18 +07:00
Tobias Zwick 7b9c1d5a9e refactor: consistently use time_t t... variables for times in network system, scheduler, gui
The network used to cast GetTime() to int, but GetTime() is an unsigned long. This might cause problems if GetTime() returns big integers (see #251). To solve this, the StdSchedulerProc interface had to be extended with another function in order to eliminate the magic return value -1 of GetNextTick for "no scheduled execution".
2013-11-29 17:28:04 +07:00
Nicolas Hake ca09a74241 Remove some silent conversion from integer 1/100ths to float 1/1s (#994)
4e875f4 didn't quite catch all instances of C4BltTransfor::SetRotate
being called, and silent conversion from int to float meant that those
rotations were incorrect by a factor of 100.
2013-11-11 00:23:01 +01:00
Tim Blume 240193ad5a Remove remains of Direct3D support
Direct3D hasn't worked for more than a year now, and there don't seem to
be any efforts to revive it. Remove it and concentrate on better OpenGL
support.
2013-11-02 21:39:34 +01:00
Nicolas Hake 4ebf67754c Move C4ComponentHost::LoadEx to C4Language
To make C4ComponentHost more reusable, move C4Language dependencies out
of the class.
LoadEx isn't really suited to reside in C4Language, but it's better to
have it there, since all C4Language consumers also use C4ComponentHost;
the reverse isn't true.
2013-10-29 21:32:21 +01:00
Nicolas Hake e753bf8168 Replace ResTable with a proper dictionary
ResTable (the main system string table) was a home-grown hashmap that
did not cope with collisions at all. Since we already have a proper
dictionary in C4LangStringTable, use that instead.
2013-10-19 19:28:54 +02:00
Nicolas Hake c55888f7c3 CStdFont: Encapsulate iLineHgt 2013-10-18 22:30:02 +02:00
Sven Eberhardt d976802ca8 Allow copying of message boxes (Ctrl+C). 2013-09-22 16:30:55 +02:00
Nicolas Hake 8e0535dd7d Network: Disallow re-enabling debug mode via faked control packet
Instead of taking the data parameter of the C4ControlSet packet at face
value, ignore it entirely and only allow disabling debug mode.
2013-09-21 15:10:39 +02:00
Julius Michaelis b67109df8a Add /screenshot [zoom] to /help 2013-09-21 01:08:12 +02:00
Sven Eberhardt e31a207330 Added message board command: /screenshot zoom
Creates a whole map screenshot at given zoom level. Use carefully; files can become pretty large!
2013-09-20 23:50:19 +02:00
Nicolas Hake cb1cb213fe Keep Color Picker drag state outside of its own bounds (#976)
The HSV color picker would only handle mouse input inside of its bounds
when moving the picker cursors around. This changes it so that it does a
proper drag operation, meaning it will keep moving the color cursor that
was dragged until the user releases the mouse button.
2013-09-15 15:43:30 +02:00
Nicolas Hake 66a2cfc655 Remove some magic constants from the HSV color picker 2013-09-15 15:35:48 +02:00
Nicolas Hake 7e260aa9de Remove C4ControlScript::fInternal
fInternal basically acted as a reverse "evil bit" as in RFC 3514: when
set, the engine would not do any checks on the script contained in the
control packet, nor log the script (visibly in game; the packet log
would of course contain the packet). A malicious game client thus would
be able to inject arbitrary script without people (immediately) noticing
anything was amiss.

As of this patch, only the host is able to execute arbitrary scripts,
and those will be shown in the message board for all players to see.
This privilege can be irrevocably disabled in network games by any
client by using the "/nodebug" message board command.

Closes #936.
2013-09-04 20:18:06 +02:00
Nicolas Hake 9b82abb8a0 Use control packet for mouse drag/drop and hover
This removes some more pre-assembled C4Script code going across the
network unchecked.

Part of #936.
2013-09-04 19:58:57 +02:00
Nicolas Hake 9604753e93 Player self-management: Use dedicated control packets
Instead of sending pre-composed C4Script code across the network, make
player self-management (surrendering, team changes etc.) send a
dedicated control packet. This means less network traffic, and also a
smaller attack vector for malicions C4Script injection.

Part of #936.
2013-09-02 22:22:29 +02:00
Nicolas Hake f2dba4a6b3 MsgBoard commands: Handle and assemble on clients
MsgBoard commands used to be evaluated on the issuing client. Malicious
clients would be able to insert arbitrary C4Script code to be executed
instead of the scenario-defined command; other clients would not be able
to tell the difference.

Instead, we now only send the command identifier, issuing player and
command parameter. This is still not perfect because clients can
insert any player they want, but it's better than before.

Part of #936.
2013-09-02 20:47:03 +02:00
Nicolas Hake f920e853e0 MsgBoard replies: Remove detour via C4Aul
Instead of having message board replies synced via script calls, send a
dedicated control packet.

Part of #936.
2013-09-02 20:19:37 +02:00
Julius Michaelis 69c5d12f4c Fix C4ChatDlg::ToggleChat: Do not close the network connection. 2013-06-30 19:43:54 +02:00
Martin Plicht 405453aed3 Merge branch 'debugrecoption' 2013-05-31 14:39:16 +02:00
Tobias Zwick 61ee6d393f Correct the scancode numbers for windows
Also reduce the duplication of these numbers in C4Window.h and C4KeyboardInput.cpp.
2013-05-26 18:07:09 +02:00
Günther Brammer 92a8ca5a79 Crop the background wallpapers instead of stretching them 2013-05-26 17:56:43 +02:00
Günther Brammer 030c249f87 Draw the paper dialog background separately from the background wallpaper
Drop the paper in the player selection dialog entirely, use transparent
black instead. Adjust the widget sizes in the scenario selection dialog
slightly.
2013-05-26 17:56:42 +02:00
Martin Plicht eaf93d6a0e Also check for DebugRec flag in #ifdef DEBUGREC_* blocks 2013-05-25 23:01:41 +02:00
Tobias Zwick 003e29f223 enable loading Title.jpg for scenario (folders) 2013-05-25 20:48:14 +02:00
Martin Plicht 1d829361f7 mac: Minimal fix after scancode merge 2013-05-24 19:55:56 +02:00
Günther Brammer 9506c5ad97 Merge branch 'scancodes' 2013-05-24 17:47:59 +02:00
Günther Brammer 50eb1b6a76 Since internal keycodes are now scancodes, they do not need to be resolved 2013-05-24 17:41:14 +02:00
Sven Eberhardt 6250ff1766 Silence a few MSVC warnings 2013-04-01 12:48:02 +02:00
Günther Brammer 346842470d Clean up some superfluous includes 2013-03-24 18:33:01 +01:00
Oliver Schneider 582e75d3da Use scancodes instead of localized key (#729)
The options dialog still shows localized keys, but the config files use US-Layout keys (when loading default files) and scancodes when saving player changes.
2013-02-09 01:05:27 +01:00
Günther Brammer 1e67a6fb24 Fix missing mouse cursor in fullscreen without resolution change
The mouse cursor was about the only thing affected by fZoom, and fZoom
should have been always 1 at the moment anyway.
2013-01-24 19:36:59 +01:00
Günther Brammer 864c5c7ea8 copyright notices update 2012 2013-01-12 16:31:40 +01:00
Günther Brammer 6a6190564f Remove some forward declarations that are already in C4Prototypes.h 2012-12-31 22:03:12 +01:00
Günther Brammer a1589a48b6 Make network lobby command line processing available to the editor and dedi
Most of the processing was already done by C4MessageInput::ProcessInput and
C4MessageInput::ProcessCommand. Simply move the Lobby-only commands there,
too, and make them work without a Lobby MainDlg. This required almost only
cosmetic changes.
2012-11-30 22:20:15 +01:00
Günther Brammer f13df38ec1 update: Log an error message when extracting the update program fails 2012-11-19 22:45:19 +01:00
Günther Brammer 7967d94a59 Merge StdFont.cpp and C4Fonts.cpp 2012-11-12 02:30:16 +01:00
Tobias Zwick 348fb8c7a9 clean up mouse controls, reduced cursor graphics to the used ones 2012-11-16 17:29:42 +01:00
Armin Burgmeier db31b53b6c Use floating point numbers for C4Facet coordinates
This fixes the lightbulb symbol from floundering around back and forth when
zoomed in and scrolling. Since C4Facets can be used to specify a target area
to draw into (such as in C4DefGraphics::Draw), and since this area can be
zoomed, sub-pixel precision can be achieved this way in such drawing
operations.
2012-10-28 15:33:58 +01:00
Tobias Zwick d45d767a39 icon button text shall not overlap with icon image (#767) 2012-10-27 18:55:21 +02:00
Tobias Zwick a69c7a3e11 remove some obsolete control-related comments 2012-10-27 18:54:11 +02:00
Philipp Kern e037300801 Fix spelling mistake: ressource -> resource. 2012-10-21 22:20:43 +02:00