Commit Graph
430 Commits
Author SHA1 Message Date
Bastien Bouclet f4e3bd0424 GRIM: Take adventage of kFeatureFullscreenToggleKeepsContext 2017-09-01 09:26:57 +02:00
Vincent Pelletier 707a48c8c5 GRIM: Remove redundant ConfMan.registerDefault calls
These are already declared in base/commandLine.cpp .
2017-05-03 16:52:36 +00:00
Vincent Pelletier eb192cda0d ALL: Document GRIM's engine-speed command line argument
Also, move it in the ENABLE_GRIM section.
2017-05-03 16:52:36 +00:00
Vincent Pelletier 0de4acbd48 GRIM: Do not draw when flipping is forbidden.
Fixes
"Allocator out of memory: couldn't allocate more memory from linear allocator."
error with TinyGL in GRIM in several places:
- at the beginning of Year 2, after Meche boards the boat (does not happen
  when skipping cutscene)
- when loading set bi
And likely in other places.
The issue is that TinyGL queues draw calls in a fixed-size structure
(linear allocator used to quickly queue vertices), and it emits this error
when running out of space. This queue is not flushed for as long as
_flipEnable is false, and this value is controlled by game scripts.
The longer flipping is forbidden, and the more complex the scene is (more
vertices, like in bi), the more likely it is to run out of space and cause
residualvm to error out.

In set bi, missing one flip is enough to exceed buffer space.
In set lm (the one after meche boarding the boat), it takes 5 missed flips
to exceed buffer space (simpler scene), but it still happens in a split
second.

My initial thought was to empty the queue without drawing, but there is no
way to do this with OpenGL and I prefer to avoid TinyGL-only shortcuts.

It seems likely OpenGL to have larger draw operation buffers (maybe
dynamically extended ?), and/or to forcibly stall caller and execute draw
operations when running out of space. In any case, this would add
complexity to residualvm and use more CPU and GPU time for no purpose.
So instead just skip drawing until flipping is allowed again.
2017-05-02 09:53:46 +00:00
Vincent Pelletier bad3de8a12 GRIM: Drop off-screen buffers
These were present to implement actor freezing in software rendering mode
in the way original engine was intended for performance reason.
In residualvm, software rendering will generalise the principle through
dirty-rectangles management, so off-screen buffers should not be needed.

Also, properly implementing them requires invasive changes (move previous
draw call list from global OpenGL context to individual off-screen buffers,
along with associated linear vertex allocator, adding a new draw call to
track requested buffer changes until final on-screen frame buffer
presentation).
So instead of such added complexity, lie to lua API about actor not being
in set but keep it in so it is part of normal redraw sequence.

Fixes disappearing actors in cn, bi.
Likely also fixes at, ly, sh, mn, dd which uses free/thaw lua API, but
which I did not check.
2017-05-02 09:51:47 +00:00
Vincent Pelletier b8ae5c5bcf GRIM: Use already-stored display for save screenshot
Instead of storing display again and using it.
2017-04-26 13:11:00 +00:00
Bastien Bouclet 43d50064d6 GRIM: Don't override the global ResidualVM menu using the game main menu 2016-07-21 21:20:30 +02:00
Vincent Pelletier e1b414e50a GRIM: Convert save game image to original pixel format.
Pixel format does not seem to be stored in save game, so when loading a
save game produced in 32 bits mode it appears corrupted. So, to preserve
backward compatibility, convert to 16bits format before storing.
2016-07-21 16:31:09 +02:00
Vincent Pelletier 72217813c6 GRIM: Do not crash on extreme FPS values.
Easily triggered with disabled FPS limit and staying for a few seconds in
the F1 menu.
2016-07-18 17:33:53 +02:00
Vincent Pelletier 0de75f613a GRIM, EMI: Disable FPS limit when engine_speed is 0.
Also, only set engine_speed to config file when forcing 60fps.
2016-07-18 16:32:03 +02:00
Bastien Bouclet 62bf521944 GRIM: Fix memory leaks related to the emergency built-in font 2016-07-12 06:16:35 +02:00
Bastien Bouclet 3f295ec773 GRIM: Check at runtime that shaders are available 2016-02-06 08:53:42 +01:00
Bastien Bouclet 8a4bada6b9 ENGINES: Also build the legacy OpenGL renderer when enabling shaders 2015-12-29 08:05:49 +01:00
Bastien Bouclet 8d5406720c ENGINES: Add a new 'renderer' option to replace 'soft_renderer'
'soft_renderer' was a bool and was not useful to select a renderer
in a list with more than two values.
2015-12-29 07:55:27 +01:00
Dries Harnie 07f2025764 GRIM: Do not call ->free on null pointer 2015-09-21 10:04:11 +02:00
Dries Harnie d14a6c0d6a L10N: Add 'problems found' dialog from Grim 2015-09-09 13:44:37 +02:00
Dries Harnie ae4601c303 JANITORIAL: Code style fixes 2015-08-17 13:25:46 +02:00
Dries Harnie 73ef15d05f GRIM: Use system->suggestSideTextures 2015-08-17 13:25:46 +02:00
Dries Harnie 147ba6ecbb GRIM: Search for widescreen textures in widescreen directory 2015-08-17 13:25:46 +02:00
Dries Harnie a07c8ce0ac GRAPHICS: Pass Graphics::Surface* to setSideTextures 2015-08-17 13:25:45 +02:00
Dries Harnie f7244925c3 GRIM: Enable side textures in postCamChangeHandler 2015-08-14 15:24:56 +02:00
David Cardwell 9b1bbd61dc EMI: Change the file-extension of PS2 saves
Prevent conflicts with incompatible save files by changing the
file-extension of PS2 saves to “*.ps2”.
2015-02-14 14:18:09 -05:00
Joel Teichroeb b37fcc8bc6 Send mouseup 2015-02-05 07:45:01 -08:00
Joel Teichroeb e3b19c5b48 Handle some mouse stuff 2015-02-04 20:53:33 -08:00
Einar Johan Trøan Sømåen d0ce1eb788 Parse the commentary data, and print it to console when triggered for now. 2015-02-04 16:48:09 +01:00
Einar Johan Trøan Sømåen c9d4f37c13 Stub a class for handling commentary 2015-02-04 15:52:11 +01:00
Einar Johan Trøan Sømåen 9acbc7c6cc Implement a beginning of savegame handling for remastered, this has the side effect of breaking the savegame menu, unless GetTextObjectDimesnions returns bitmapWidth (but that breaks Special Features). Leaving it broken for now. (Save game format is modified for remastered from this commit). 2015-02-03 16:59:04 +01:00
Einar Johan Trøan Sømåen 7ff408def0 Implement enabling/disabling of special feature cutscenes/concept art gallery. 2015-02-03 14:33:32 +01:00
Einar Johan Trøan Sømåen 00cc0ad867 Move the handling of language-prefixes to GrimEngine, and let Actor atleast ask for the correct voice file. 2015-02-03 14:08:03 +01:00
Einar Johan Trøan Sømåen c113ae1731 Add a (rather hacky) way to enable live language-switching. 2015-02-02 20:47:40 +01:00
Joel Teichroeb b80b243ff7 Move remastered lua 2015-02-01 16:11:40 -08:00
Joel Teichroeb 875c4b09a5 Improve overlays 2015-01-31 13:36:01 -08:00
Joel Teichroeb 28fbf84855 Detect remastered 2015-01-31 12:33:03 -08:00
Joel Teichroeb 1afe52dcf9 Add overlays. Colour is currently wrong" 2015-01-28 20:44:27 -08:00
Einar Johan Trøan Sømåen 23401502af GRIM: Force the demo-flag on for grim-demos, thus enabling the english demo with intro video to run 2015-01-18 16:37:51 +01:00
Ingo van Lil 3d39e63da7 GRIM/EMI: Add Joystick/gamepad support 2015-01-12 19:45:18 +01:00
Christian Krause 316b2595e3 EMI: Avoid calling luaUpdate in poll event loop
- this avoids the issue that _frameTime is set to 0 if a consecutive
  luaUpdate() happens in the same millisecond and so getPerSecond()
  would return 0 for any given rate
- this fixes the issue that Guybrush would walk erratically
  when residualvm is built with optimization
2015-01-01 20:50:59 +01:00
Einar Johan Trøan Sømåen 223c81b144 EMI: Add code for one-shot playing the Aspyr logo on EMI Mac
This needs to be separate from the other videos, since the logo
is encoded as QuickTime. This solution replicates logic from
mainLoop to avoid adding any further special cases in engine code.
2014-12-02 17:01:39 +01:00
Einar Johan Trøan Sømåen 4b6d21d690 EMI: Add code for loading local.m4b from the german EFMI Installer file. 2014-09-17 21:14:22 +02:00
Joel Teichroeb e77f599f1c Merge pull request #1026 from Akz-/emi-sortorder-fix
EMI: Sort order fixes
2014-08-19 15:22:13 -07:00
Joni Vähämäki 0909de720b EMI: Do not reset sort order when the set changes.
The original game doesn't reset the sort order. This fixes, for example, the voodoo anklet being visible through walls after leaving the jail set.
2014-08-14 18:32:16 +03:00
Stefano Musumeci d0ce4482f9 GRIM: Changed the way strings are rendered. 2014-08-13 15:39:03 +02:00
Stefano Musumeci 8abb5b008c Merge branch 'master' into tinygl-dirty-rects
Conflicts:
	graphics/tinygl/zbuffer.cpp
	graphics/tinygl/zbuffer.h
2014-08-13 14:06:34 +02:00
Joel Teichroeb 5a06111056 GRIM: Fix a crash when the debugger comes up before g_movie has been initialized 2014-08-09 12:05:07 -07:00
Stefano Musumeci 4ec96c515e Merge branch 'master' into tinygl-dirty-rects 2014-08-07 18:11:22 +02:00
Joel Teichroeb dc57920d53 Merge pull request #995 from klusark/smushprim
GRIM/EMI: Simplify primitive drawing, and don't draw primitives over movies.
2014-08-06 09:55:18 -07:00
Joni Vähämäki d9e2b2057c EMI: Do not free sound tracks in the audio thread. 2014-08-06 19:43:11 +03:00
Joni Vähämäki 9ee420b0d0 EMI: Explicitly initialize g_imuse/g_emisound to null. 2014-08-06 19:43:09 +03:00
Joni Vähämäki a03a06b0f6 EMI: Initialize EMISound instead of iMuse at engine startup. 2014-08-06 19:16:54 +03:00
Joel Teichroeb 6627af4000 GRIM/EMI: Do not draw primitives in SmushMode. Fixes #990 2014-08-03 12:01:34 -07:00