Commit Graph

147 Commits (19caa65b7b6432605e2ee12cf508680ed2688ca3)

Author SHA1 Message Date
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
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
Günther Brammer afe5411709 linux: Replace Application.Location with readlink("/proc/self/exe") 2012-03-11 23:01:21 +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
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
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
Günther Brammer 3c41310fa3 Remove C4ConfigShareware to reduce OpenSSL dependency 2011-11-02 00:07:29 +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
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
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
Günther Brammer 1cafba4be8 Rename files implementing C4AbstractApp and C4Window 2011-10-03 17:19:24 +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
Günther Brammer 7edb33642f win32: Use Unicode APIs for ExePath and TempPath 2011-04-02 22:50: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
Maikel de Vries eb530c6017 Removed Defcore:Prey and OCF_Prey
Had no use in the engine, should therefore be defined in C4Script if deemed necessary.
2011-07-05 13:40:40 +02:00
Maikel de Vries 248f85c2eb Removed Defcore:Edible and OCF_Edible
Had no use in the engine, should therefore be defined in C4Script if deemed necessary.
2011-07-05 13:10:56 +02:00
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 6e30f2b7e8 win32: Remove unused StdConfig class and associated Registry APIs
It has long since been replaced by the StdCompilerConfig* classes. A few
of the Registry functions are still used in other code, and a few are now
implementation details.
2011-04-02 17:49:55 +02:00
Günther Brammer 5b808be269 Remove some unused variables
gcc 4.6 finds variables that are write-only.
2011-03-28 19:31:28 +02:00
Sven Eberhardt 269c7b208c control config dialog 2011-03-30 22:11:47 +02:00
Armin Burgmeier eaf62f71f9 Change .c4f extension to .ocf 2011-03-13 16:38:33 +01:00
Armin Burgmeier e282bf9a9c Change .c4s extension to .ocs 2011-03-13 16:11:55 +01:00
Günther Brammer 60ce34ad52 Remove redundant global pConfig 2011-03-03 17:11:03 +01:00
Sven Eberhardt 37b630a472 load additional player control defs from definition local System.c4g files
adjust invalid video mode bit depth values
2011-03-02 18:13:43 +01:00
Günther Brammer cde66b249f C4Include.h: Do not include C4Gui.h
The two dialogs in headers included in C4Game.h are only used by classes in
those headers, and do not need to be defined in the headers.
2011-01-24 01:15:58 +01:00
Nicolas Hake d1b2f1a325 win32: Default to current desktop display settings (#484, #493)
Previously, the graphics code tried to set a refresh rate as close to
85 Hz as possible. This led to black screens when the display driver
would report a refresh rate that was not actually supported by the
monitor.
This change also uses the currently set monitor orientation, instead
of always selecting a non-rotated display mode.
2011-01-20 15:43:19 +01:00
Günther Brammer ec7e35a25a Script: Optional warnings about deprecated functions and 0->nil conversion 2011-01-16 21:26:18 +01:00
Günther Brammer f10e01a01c config: Remove unused General.Record 2011-01-16 17:21:48 +01:00
Günther Brammer 4e75f2a134 Merge Plane branch
Conflicts:
	src/C4Game.cpp
	src/C4Game.h
2011-01-08 17:39:59 +01:00
Armin Burgmeier 9f74506e9b Support loading game data from system path 2011-01-06 21:18:13 +01:00
Günther Brammer 846e707134 objects: Remove OCF_Living in favor of OCF_Alive 2011-01-02 19:40:48 +01:00
Günther Brammer 877dfee49e objects: Remove Chop command, OCF_Chop, CHOP procedure, Chop defcore val, FX_Call_DmgChop 2011-01-02 01:18:45 +01:00
Maikel de Vries 8a200ba706 Engine: Removed all specific line behaviour
This can be implemented in C4Script very easily.
Removed OCF_LineConstruct, ObjectComLineConstruction, Defcore LineConnect, Line types, Line related IDs.
Changed LineAttach, is now a property of the object to which the line should be attached.
Updated documentation.
2010-12-21 19:22:06 +01:00
Armin Burgmeier f814708a9c Implement Anti-Aliasing (#518) 2010-12-29 15:19:46 +01:00
Martin Plicht cc95f8231f Add IsGermanSystem as forward declaration to PlatformAbstraction.h and implement IsGermanSystem, OpenURL and EraseItemSafe in platform-specific files (StdWindow.cpp/StdGtkWindow.cpp etc) 2010-12-27 03:19:19 +01:00
Armin Burgmeier 1967d914c2 Add a compile-time option to disable automatic update 2010-12-26 21:39:52 +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
Maikel de Vries 53e507d2c5 Engine: Removed Power system including all components
Removed power lines, power connects, energy rule, power OCFs, Energy command, C4Script CheckEnergyNeedChain and EnergyCheck, Action EnergyUsage and documentation.
2010-12-15 21:02:50 +01:00
Günther Brammer 719ed39632 Remove FairCrew and permanent Physicals 2010-12-10 01:06:38 +01:00
Maikel de Vries 96048e02c4 IRC: changed default channel to #openclonk
There are no people in #openclonk-lobby at all, therefore we´d rather invite people to a filled channel, if there is too much spam in #openclonk we can always decide to make a special moderated lobby channel.
2010-12-11 16:12:37 +01:00
Maikel de Vries ba6b41c058 Engine: Removed FIGHT procedure and all related stuff.
This is obsolete with new melee implementation and other authors should either use that or make something unique themselfs. Removed DFA_FIGHT, C4Script FnFightWith, ObjectActionFight, NoFight, OCF_FightReady, Fight Physical
2010-12-07 18:57:27 +01:00
Martin Plicht 07a7aa1ddd C4Config: Save & Load -> same file 2010-08-09 14:52:32 +02:00
Martin Plicht 62b85fe51c Remove Kbd*Key* configuration 2010-12-07 02:21:20 +01:00
Charles Spurrill d0d1452664 Default control rate in network games is 3, not 1 2010-12-03 21:20:23 -08:00
Tobias Zwick d6778782be default: no runtime join = 1 2010-12-04 00:56:58 +01:00
Sven Eberhardt fee6ea0b87 fix crash on config reset (#500) 2010-12-02 20:59:59 +01:00
Tobias Zwick 9f8fa02b8e new update system 2010-12-01 21:37:47 +01:00
Tobias Zwick 499582d543 removed some obsolete variables in C4Object once used by the engine-HUD 2010-11-25 13:39:39 +01:00
Günther Brammer cd68d6ceb3 Remove the last traces of Clonk Rage from comments
Also treat every regkey as valid. It's just a bonus for old Clonk owners,
no reason Clonk Endeavour owners shouldn't get it as well.
2010-10-10 17:44:26 +02:00
Günther Brammer 8723dc9fbd Change the update mechanism to load an URL based on the current version
Also open the download page in a browser when the update package download
fails.
2010-10-10 18:43:22 +02:00
Günther Brammer c4a5039561 Move the last remnants of CDDrawCfg to Config.Graphics 2010-09-28 19:07:47 +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
Julius Michaelis dcd3065243 add #openclonk* to allowed IRC-client channels (#381)
change default channel to #openclonk-lobby
2010-09-16 23:22:38 +02:00
Günther Brammer 2126851f87 config: Remove General/Definitions 2011-01-04 17:39:52 +01:00
Peter Wortmann 904138bae2 Moved version information to Version.txt, including the HG revision. From there it gets inserted into all relevant files by CMake. Used it to for properly setting up the Mac application bundles. 2010-08-01 14:49:51 +01: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
Tobias Zwick 5c44c466e0 disabled MouseAutoScroll (PeterW-Zoom) again. Set it to 1 in the config to continue to test it 2010-04-25 03:37:37 +02:00
Nicolas Hake 8a6370e434 Allow arbitrary resolutions when windowed (#277) 2010-04-28 14:06:17 +02:00
Sven Eberhardt bad8a3f3d3 Win32 build fix (#280) 2010-04-28 12:51:33 +02:00
Günther Brammer 824c69e94b Simplify messageboard code, remove bottom border 2010-04-28 03:24:16 +02:00
Günther Brammer 349e463abd Fall back to the default font if the configured one doesn't load 2010-04-27 02:54:37 +02:00
Günther Brammer 4b503d3bea Remove editor configuration 2010-04-27 03:20:38 +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
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
Günther Brammer 164ce843cd Consolidate computername and network nick into one
The distinction was arbitrary and useless.
2010-03-22 16:18:03 +01:00
Günther Brammer 8d81513c40 OpenGL: Clean up the context handling
Instead of sprinkling calls to select the right context throughout the code,
store the context to use in the CSurface, and create a CSurface for every
window that's drawn to, and use that as the target parameter for the drawing
calls. D3D is probably even more broken now, but it should work just fine with
the right surface creation incantation.
2010-03-06 15:07:30 +01:00
Günther Brammer e30ff99d6a Remove all superflous #include <Standard.h>
Standard.h is included by C4Include.h, and every file includes that.
2010-03-04 22:11:12 +01:00
Tobias Zwick cb2a4f3e04 #67 Cleanup: Old HUD 2010-02-22 18:35:51 +01:00
Günther Brammer 86b1ff47e6 Clean the windowed mode configuration switch
Instead of doing the resolution switch deep inside the OpenGL initialisation
code, the Application does it on startup, and the code responsible for
runtime resolution switches is responsible for the resolution-dependant
initialisations.

Unfortunately, the D3D code uses two different but similar pieces of code
for both cases, which need to be merged.
2010-02-18 21:19:04 +01:00
Günther Brammer f7a7dd41d1 Remove blitoffset option
It's only use was to compensate for the 0.5 pixel offset d3d applies to
everything. Do that directly in d3d specific code instead.
2010-02-18 21:11:14 +01:00
Tobias Zwick 16c20cff1a cleaned up obsolete scenario.txt options, enabled peter-scroll 2010-02-19 00:03:53 +01:00
Günther Brammer ff8d950e85 Remove C4ENGINE define
Most files using it weren't used by c4group-the-application anymore, and
the remaining stuff can be dealt with by using stubs or the same code in
both cases.
2010-02-17 22:59:46 +01:00
Peter Wortmann 777ce66b5d Reimplemented Soldat-like mouse scroll. Most likely needs a lot of additional works before it's usable. 2010-02-09 19:04:04 +01:00
Julius Michaelis d402d1b9ef Changed default masterserver 2010-02-08 22:33:21 +01:00
Tobias Zwick c55caabed8 opengl as default 2010-01-30 16:49:03 +01:00
Benjamin Herr f3b35227ea avoid lots of gcc warnings 2010-01-25 05:00:59 +01:00
Tobias Zwick edec15d64f merge 2009-11-30 17:24:14 +01:00
mizipzor a53dae0c1b Fixed compilation in MSVC2010 2009-11-25 19:38:54 +01:00
Nicolas Hake 52bde5a579 Remove BIG_C4INCLUDE define 2009-10-20 06:21:12 +02:00
Nicolas Hake f0fdf5e992 Prepare for precompiled headers 2009-10-20 05:39:24 +02:00
Sven Eberhardt fa01fbfb0c config: portrait saving in player file disabled by default 2009-10-13 22:21:33 +02:00
Tobias Zwick 025eec0e78 merge 2009-10-11 21:57:31 +02:00
Sven Eberhardt acca4a204d merge 2009-08-16 17:13:42 +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
Günther Brammer 9e2564a4c3 C4Object: Remove Base functionality
The various effects being a base had are now handled by script.
2009-09-03 22:27:23 +02:00
Günther Brammer 9a8b5dd739 Replace BOOL by bool, TRUE by true, FALSE by false 2009-08-15 20:50:32 +02:00
Günther Brammer a28a6621da shuffle the #includes around a bit
This reduces the dependencies from src/lib to the rest of the code a bit.
2009-08-12 22:03:50 +02:00
Martin Plicht 08479b6cfd Put Mac-specific stuff into MacUtility namespace 2009-08-12 14:13:16 +02:00
Günther Brammer 572d00c32e Move all source files
This might make stuff easier to find.
2009-08-10 17:59:18 +02:00