Commit graph

354 commits

Author SHA1 Message Date
sietschie
98e9b41010 EMI: Implement GetBoundingPos for EMIModel
Added the ability to compute the bounding boxes of models so that the
text can be correctly placed near the actors.
2013-12-10 17:19:07 +01:00
Dries Harnie
46e7cf29cd EMI: Rotate overworld sprites again 2013-12-04 14:31:12 +01:00
Dries Harnie
b1a910c800 GRIM/EMI: Refactor GfxBase::startActorDraw 2013-12-04 14:31:06 +01:00
Christian Krause
15d134f2c1 EMI: Fix display of "dock" video
During the run of the "dock" video (first arrival at melee island) only
a black screen was displayed although the sound did work.
The lua code dims (_dimLevel = 1) the scene before showing a video so
that only the video is visible. GfxOpenGL::drawBitmap sets the current
color according to the dim level before it starts drawing the bitmap:

glColor3f(1.0f - _dimLevel, 1.0f - _dimLevel, 1.0f  - _dimLevel);

If there is no other glColor* call before drawing the video, the current
color stays (0, 0, 0) and the video won't be visible.

The bug fix resets the color to (1.0, 1.0, 1.0) after the drawing of the
bitmap at the end of GfxOpenGL::drawBitmap.
2013-11-26 20:58:19 +01:00
Ingo van Lil
09466c556a EMI: Rotate sprite actors to face camera
Sprite actors, e.g. ships of the balloon in the Scumm bar, should
always face the camera, so the rotation part of their matrix has
to be reset before rendering. The code already exists for Grim, but
appears to work for EMI as well.
2013-11-24 15:24:04 +01:00
Joel Teichroeb
42bbcc6ddb GRIM: Fix scaling text on different aspect ratios with OpenGL 2013-11-10 10:01:04 -08:00
Dries Harnie
43fcfa765f GRAPHICS: Pass Mesh* to GfxBase::drawModelFace 2013-11-05 07:29:30 -08:00
Joel Teichroeb
c0cb2f1f9c GRIM: Use a consitent style for constructor initializers 2013-10-26 13:57:55 -07:00
Pawel Kolodziejski
790db038c0 ALL: sync with scummvm 2013-10-13 11:30:34 +02:00
Andrea Corna
a0d9f46f31 GRIM/EMI: Break up global config keys from Grim registry and turn off it in EMI 2013-09-09 19:38:10 +02:00
Dries Harnie
92f5deadc5 EMI: Allow sprites to rotate
The clock in mot.set depends on rotating sprites.
2013-08-07 20:05:48 +02:00
Dries Harnie
1b8e815c1d Revert "EMI: Enable GL_BLEND when drawing EMI-model-faces"
This reverts commit 5769dffca2.
2013-07-30 20:51:16 +02:00
Dries Harnie
0d28bfad19 EMI: Properly set modelview matrix for overworld 2013-07-29 22:02:03 +02:00
Joel Teichroeb
7a4b847fdf Revert "EMI: Allow lighting to be enabled"
This reverts commit 48bc8de2c8.
2013-07-12 12:08:14 -07:00
Joel Teichroeb
be41e30c00 GRIM: Make lights use an enum instead of checking against a string to get the type 2013-07-10 16:17:28 -07:00
Joel Teichroeb
48bc8de2c8 EMI: Allow lighting to be enabled 2013-07-10 15:08:47 -07:00
Joel Teichroeb
c7ad13aa92 EMI: Enable GL_BLEND when drawing a TIL 2013-07-09 17:11:06 -07:00
Einar Johan Trøan Sømåen
fe3883cecd GRIM: Reformat code to be closer to convention. 2013-07-09 21:12:55 +02:00
Joel Teichroeb
f4cd7c68d1 EMI: Disable depth mask for sprites 2013-07-08 14:33:29 -07:00
Joel Teichroeb
21afde3846 GRIM: Move Sprite into it's own file 2013-07-07 17:25:35 -07:00
Christian Mayer
5769dffca2 EMI: Enable GL_BLEND when drawing EMI-model-faces
This fixes the fading in the EMI-intro
2013-07-02 22:38:34 +02:00
Dries Harnie
3196c0a0fb EMI: Draw to depth buffer if sortorder >= 100 2013-07-02 00:22:58 +02:00
Dries Harnie
a723b0e3f5 EMI: Draw background layers at intervals
Previously, we split the background layers into everything
before SO 15 and after, and drew like that. However, this caused
the pink ship in shi.setb to not be drawn.

This patch draws the layers of the background at intervals of ten.
So if a set has six layers, layer 5 is the background and 4,3,2,1,0
are rendered at sortorder 40,30,20,10,0.
2013-06-29 14:41:17 +02:00
Einar Johan Trøan Sømåen
960f48f0f7 GRIM: Initialize all members in GfxOpenGL. 2013-04-21 15:09:39 +02:00
Joel Teichroeb
c6aa8425dd GRIM: Fix C++11 related warnings 2013-04-02 13:08:38 -07:00
Giulio Camuffo
61eeb63278 GRIM: Add a config option to disable ARB shaders: "use_arb_shaders", defaulted to true 2013-01-21 17:04:26 +01:00
Giulio Camuffo
e3c85997a2 GRIM: Don't enable lighting if we're drawing the shadow. Fix #294 2013-01-12 14:20:51 +01:00
Joni Vähämäki
2c5bfd586e GRIM: Fixed formatting. 2013-01-02 02:20:51 +02:00
Joni Vähämäki
8b283945e4 GRIM: Fixed formatting. 2013-01-02 02:15:01 +02:00
Joni Vähämäki
12ef0d6ccb GRIM: Fixed regression in sprite drawing. 2013-01-02 00:50:26 +02:00
Paweł Kołodziejski
175620b62a ALL: change license headers from LGPL to GPL, and few updates 2012-12-19 23:15:43 +01:00
Einar Johan Trøan Sømåen
6cc1d9e6a0 EMI: Avoid using TIL-specific code for TGAs 2012-11-26 17:37:56 +01:00
Dries Harnie
b239104e7b EMI: Rename Offset to Layer 2012-11-26 02:08:58 +01:00
Dries Harnie
bde37f96a8 EMI: Over-draw some actors in Set::drawForeground
EMI draws portions of the background over actors
with sortOrder >= 15.
2012-11-26 02:08:58 +01:00
Einar Johan Trøan Sømåen
4f1f4aeb4d EMI: Implement DimScreen and add hacks to UnDimRegion to make it work 2012-11-21 18:17:24 +01:00
Paweł Kołodziejski
1ef0301b2f Merge pull request #666 from klusark/emidepth
EMI: Load TIL files correctly
2012-11-18 13:15:55 -08:00
Joel Teichroeb
84db0881fa EMI: Add BM_BGRA for correct sprite colour 2012-11-18 09:47:23 -08:00
Joel Teichroeb
e27a6ad833 EMI: Load TIL files correctly 2012-11-18 09:17:21 -08:00
Dries Harnie
a23f804d9a EMI: Add glViewport call to make APITrace happy 2012-11-18 17:28:15 +01:00
Dries Harnie
5ee405f01d EMI: Turn on glDepthMask after drawing sprites
Without glDepthMask(TRUE), glClear does not clear the depth buffer.
2012-11-18 17:06:54 +01:00
Einar Johan Trøan Sømåen
dbceb00cf0 EMI: Disable texturing on texture-less faces. 2012-11-14 20:57:18 +01:00
Dries Harnie
6334cc0290 EMI: Gfx::startActorDraw() accepts a quaternion 2012-11-13 21:51:11 +01:00
Dries Harnie
92213b0454 EMI: Properly scale sprites 2012-11-13 01:14:37 +01:00
Dries Harnie
23a7d90b28 EMI: Fix text positioning 2012-11-13 01:14:34 +01:00
Dries Harnie
cd7a441f50 EMI: Only allow transparent materials in EMI 2012-09-09 16:44:44 +02:00
Dries Harnie
20a8cb1caf EMI: Support transparent textures on actors 2012-08-28 22:36:42 +02:00
Dries Harnie
c900a088a8 EMI: Unify code paths in Gfx::startActorDraw 2012-07-03 20:03:17 +02:00
Dries Harnie
9d8f2afd09 EMI: Proper rendering of setups (OpenGL) 2012-07-03 00:20:45 +02:00
Dries Harnie
662e247c77 EMI: Pass scene.roll to Gfx::positionCamera() 2012-07-03 00:20:39 +02:00
Joel Teichroeb
75f393d958 GRIM: Use glColor3ub instead of glColor3f when appropriate 2012-05-05 18:20:55 -07:00