166 Commits

Author SHA1 Message Date
Max Horn
3d4e9fe674 BACKENDS: Allow various files to use stuff from time.h 2011-05-03 11:27:44 +02:00
Max Horn
59e77ed667 ALL: Mark printf and various other symbols as forbidden
Right now, a few places in the frontend code still use printf and
consorts. We mark the affected files with a FIXME for now, and
add a dedicated exception for each. To be fixed!

Also tweak FORBIDDEN_SYMBOL_REPLACEMENT to hopefully really always
enforce a compiler error
2011-05-02 16:31:31 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Eugene Sandulenko
ce0cc0ee85 COMMON: Partial fix for #3087922: COMMON/BASE/BACKENDS: Code analysis warnings 2011-04-17 15:25:06 +03:00
Klaus Reimer
91e43bb136 WEBOS: Correct indentation of WEBOS preprocessor check 2011-04-12 11:11:18 +02:00
Klaus Reimer
72d206dc73 WEBOS: Add WEBOS define
Using SDL_INIT_VIDEO flag for WebOS because without it the application
won't start.
2011-04-12 11:05:07 +02:00
Johannes Schickel
f3ea868cf6 SDL: Prevent graphics manager hotswapping on startup. (This time for real) 2011-02-24 23:04:34 +01:00
dhewg
273a324a71 SDL: Prevent unnecessary gfx manager hotswap 2011-02-24 20:24:58 +01:00
Johannes Schickel
39aad6ece7 SDL: Move createLogFile implementions to the OSystem_SDL subclasses.
svn-id: r54581
2010-11-29 18:30:23 +00:00
Max Horn
4bed2b3ff5 SDL: Trying to cleanup the FORBIDDEN_SYMBOL situation
svn-id: r54575
2010-11-29 16:35:29 +00:00
Max Horn
f0fdff21f6 SDL: Revert r54554, and add explanatory comment (fix for bug #3121841)
svn-id: r54574
2010-11-29 16:22:04 +00:00
Max Horn
df05ed1a46 BACKENDS: Include scummsys.h at top of all .cpp files, *before* any #ifdefs
svn-id: r54573
2010-11-29 16:18:43 +00:00
Max Horn
460a65d2aa SDL: Reduce redundant deletes from OSystem_SDL destructor
svn-id: r54554
2010-11-28 22:05:05 +00:00
Max Horn
8f37f6634c SDL: Merge deinit() into OSystem_SDL destructor and overload fatalError
svn-id: r54526
2010-11-28 15:44:34 +00:00
Johannes Schickel
11b254a938 SDL: Fix compilation on Windows too.
svn-id: r54524
2010-11-28 15:11:27 +00:00
Johannes Schickel
27016b303f SDL: Make SDL backend compile again.
svn-id: r54523
2010-11-28 15:06:36 +00:00
Max Horn
7760077cf5 Merging the gsoc2010-opengl branch
svn-id: r54518
2010-11-28 14:56:31 +00:00
Johannes Schickel
1ad63b431e BACKEND: Switch OSystem::getSystemLanguage return type to Common::String.
This is done as discussed on -devel.

svn-id: r54516
2010-11-28 02:12:33 +00:00
Jordi Vilalta Prat
10476048f8 I18N: Fix language detection in UNIX (not everyone speaks German yet)
svn-id: r54494
2010-11-26 10:40:19 +00:00
Johannes Schickel
03df495563 SDL: Hook up file logger to log on Windows.
For now the log file will be either "%APPDATA%/ScummVM/Logs/scummvm.log" or
"%USERPROFILE%/Application Data/ScummVM/Logs/scummvm.log" to match the
location of the default ScummVM configuration file.

svn-id: r54490
2010-11-26 00:52:04 +00:00
Johannes Schickel
425f284050 SDL: Hook up file logger to log on UNIX-like systems.
As discussed on -devel this always logs to ~/.scummvm/logs/scummvm.log.

svn-id: r54489
2010-11-26 00:51:42 +00:00
Johannes Schickel
189c9bf216 OSYSTEM: Add API to query the system locale.
I also adapted the SDL backend to implement the API.

svn-id: r54479
2010-11-25 18:40:56 +00:00
Johannes Schickel
e1030e53a5 BACKENDS: Implement logging API proposed by Max on -devel.
This commits a slightly modified patch from my patch tracker item #3104630
"OSYSTEM: Add logging API as proposed by Max on -devel".

I was not able to test compilation on Android and SamsungTV, since there is no
toolchain for those on buildbot (or I was too blind to find them).

svn-id: r54339
2010-11-18 19:12:14 +00:00
Max Horn
82e473bc3b BACKENDS: Partial merge of gsoc2010-opengl: Audio CD changes only
This commit contains the AudioCDManager changes from the gsoc2010-opengl
branch. The other changes in that branch are restricted to the backends
directory only (plus configure).

The Nintendo DS and Dreamcast ports still need to be ported over to
the new Audio CD system, but that should be fairly easy to do.

svn-id: r54147
2010-11-08 22:53:36 +00:00
Max Horn
44393b2dc8 ALL: Add code to help stop people from accidentally using "bad" APIs
A new header file common/forbidden.h is included by scummsys.h and it
re-#defines numerous symbols like fopen(), fread(), system(), etc. with
garbage, in order to provoke compile errors in any code using them.

If a .cpp file really *must* use any of these (e.g. because it is a
backend file), then these redefinitions can be disabled by #defining
FORBIDDEN_SYMBOL_ALLOW_ALL as the first thing in the .cpp file. Whenever
this is done, an explanatory comment should be added.

Note that this system cannot catch all "bad" usages (notably the Lua
code in the sword25 engine), as it can only work if scummsys.h is
included.

svn-id: r53961
2010-10-30 21:27:42 +00:00
Martin Kiewitz
27ee12e6a5 SDL/win32: fix lf, thx msvc
svn-id: r53768
2010-10-24 19:04:35 +00:00
Martin Kiewitz
c9c9eafbbb SDL/w32: add ability to hide console
feature is currently commented out - waiting till discussion has ended

svn-id: r53767
2010-10-24 18:34:08 +00:00
Johannes Schickel
b713beed18 OPENGL: Add an SdlEventSource member to OSystem_SDL instead of subclassing SdlEventSource.
Derived backends are allowed to overwrite that member in case they need special
handling of SDL events.

svn-id: r53675
2010-10-21 18:13:13 +00:00
Johannes Schickel
54f559dc51 OPENGL: Cleanup.
svn-id: r53436
2010-10-13 15:43:08 +00:00
Johannes Schickel
34302765ca OPENGL: Get rid of one ugly cast.
svn-id: r53435
2010-10-13 15:42:53 +00:00
Johannes Schickel
a2b96a2516 OPENGL: Replace SdlEventManager by SdlEventSource.
Formerly SdlEventManager was a subclass of DefaultEventManager but did not
really have anything in common with the idea of our EventManager interface.
Now I made a new object SdlEventSource which only subclasses EventSource
and which is responsible for obtaining events from SDL (and processing them).

svn-id: r53433
2010-10-13 15:42:16 +00:00
Johannes Schickel
48ee83b889 OPENGL: Properly initialize the graphics manager again.
Starting with r52503 the graphics manager's only initialize their event
observer when initEventObserver is called. It seems like it was an
oversight that this was not done in OSystem_SDL::setGraphicsMode, when a new
graphics manager was initialized.

This should fix window resizing with the OpenGL graphic's manager and mouse
movement.

svn-id: r52506
2010-09-03 15:52:31 +00:00
Alejandro Marzini
9136724110 SDL/OPENGL: Fix backend initialization when building with ENABLE_VKEYBD.
svn-id: r52503
2010-09-03 04:23:01 +00:00
Alejandro Marzini
5c392df447 SDL/OPENGL: Fix segfault when using -g command line option.
svn-id: r52307
2010-08-23 19:44:39 +00:00
Eugene Sandulenko
26dc4c2425 DINGOO: new port. Patch #3039277
svn-id: r52210
2010-08-19 12:43:37 +00:00
Alejandro Marzini
7dbe257da8 OPENGL: Add support for BGR and rgb(a) reversed formats (Not available for GLES). General cleanup and commenting.
svn-id: r51559
2010-07-31 22:54:10 +00:00
Alejandro Marzini
7b070bbef8 SDL/OPENGL: Add ability to switch between SDL and OpenGL graphics managers.
OSystem_SDL will create a merged list of all graphics modes from SDL and OpenGL. When the user changes the graphics mode in options and restarts ScummVM should switch to that graphics mode in the corresponding graphics manager.

svn-id: r51493
2010-07-30 03:31:05 +00:00
Alejandro Marzini
0e748c5a97 Added basic cursor drawing.
svn-id: r50954
2010-07-16 23:50:46 +00:00
Alejandro Marzini
9ef2fc4744 Fixed doing OpenGL calls before a graphical context was created.
svn-id: r50905
2010-07-15 04:01:41 +00:00
Alejandro Marzini
84ceae9328 Check if USE_OPENGL is defined for compiling OpenGL code.
svn-id: r50842
2010-07-13 05:38:10 +00:00
Max Horn
dcd520ce31 Get rid of yet another global object with constructor
svn-id: r50835
2010-07-12 23:19:56 +00:00
Alejandro Marzini
4dca7c7e02 Moved getGraphicsManager() from OSystem_SDL to ModularBackend. Moved public SDL graphics manager functions to graphics manager (Allowing OpenGLSdlGraphicsMaanger to be used with other SDL managers easily). Removed BaseSdlGraphicsManager. Implemented in the opengl manager basic screen functions.
svn-id: r50796
2010-07-11 04:32:24 +00:00
Alejandro Marzini
85034dc730 Added BaseSdlGraphicsManager. Added GLTexture.
svn-id: r50795
2010-07-10 22:47:29 +00:00
Alejandro Marzini
fd77e4b09c Modularized Linuxmoto port.
svn-id: r50474
2010-06-29 01:08:36 +00:00
Alejandro Marzini
936f558579 Improved getDefaultConfigFileName(). Code cleanup.
svn-id: r50364
2010-06-27 05:12:37 +00:00
Johannes Schickel
09b4f7cbed Define WIN32_LEAN_AND_MEAN before including windows.h.
This will cause our code to include less functionality, but might on the other hand fasten up the compilation.

svn-id: r50346
2010-06-26 21:55:52 +00:00
Alejandro Marzini
70e9a5b951 Removed DEFAULT_CONFIG_FILE define in favor of new getConfigFileNameString function.
svn-id: r50301
2010-06-26 03:44:47 +00:00
Alejandro Marzini
307d7aeb4f Added a init function to OSystem_SDL for early backend setup, and so allowing better sub classing.
svn-id: r50224
2010-06-24 17:37:09 +00:00
Alejandro Marzini
d89cb33bcb Refactored SDL mixer manager. Created a SdlMixerManager subclass for Mac OSX.
svn-id: r50198
2010-06-24 04:11:54 +00:00
Alejandro Marzini
04dce6a106 Fixed AudioCDManager not having a public inheritance. Backend code cleanup.
svn-id: r50189
2010-06-23 19:34:07 +00:00