Commit Graph
341 Commits
Author SHA1 Message Date
Joni Vähämäki dbfec3b1e8 GRIM: Use quaternions for animation. 2014-07-02 22:29:37 +03:00
Christian Krause 565f488c58 GRAPHICS: Refactoring
Rename some variables and functions of the graphics drivers to distinguish properly betwen textures and materials.
2014-07-02 02:07:06 +02:00
Stefano Musumeci 109767e513 TINYGL: Implemented alpha blending and color transformation in sprite blitting for Grim TinyGL renderer. 2014-07-02 00:09:13 +02:00
Stefano Musumeci 63fd685589 TINYGL: Implemented alpha interpolation in triangle rasterization routine. 2014-07-01 14:29:44 +02:00
Stefano Musumeci b9e0b28ed9 TINYGL: Renamed ZBuffer into FrameBuffer 2014-06-28 20:39:08 +02:00
Stefano Musumeci a2de6a0eef TINYGL: Moved a few external C functions inside ZBuffer. 2014-06-28 20:39:05 +02:00
Joel Teichroeb 0e69cc11a7 Merge pull request #938 from Akz-/emi-sprite-fixes
EMI: Sprite fixes
2014-06-25 17:30:36 -07:00
Joni Vähämäki 18d73eb3bb EMI: Sprite fixes for TinyGL renderer.
Note that most of this is currently commented out due to lack of proper blending in TinyGL. Once blending is properly implemented the commented out parts can be enabled.
2014-06-23 22:36:11 +03:00
Joseph Jezak 55f77fb92f EMI/GRIM/MYST3: Replace some Quaternions with Rotation3D. 2014-06-23 09:24:26 -04:00
Christian Krause 58833e15f0 EMI: Change frustum parameters for Overworld actors
- lower the distance to the near plane of the frustum for Overworld
  and change the other parameters accordingly

- this makes the following actors visible:
 - background of directions to Pegnose Pete's house (issue #869)
 - Murray in the murray_go easter egg
 - the trophies during the diving contest (upper left corner)
 - the screenshots for the save games (still with the wrong texture)
2014-06-21 23:59:07 +02:00
Christian Krause bf8501fd37 EMI: Clear depth buffer before starting to draw the Overworld
- all actors of the Overworld should cover any non-Overworld drawings
- Overworld actors need to use the depth buffer so that e.g. the
pause screen is drawn above the inventory

- this fixes issue #927 (inventory is drawn above background of pause
  or menu screen)
2014-06-21 23:59:07 +02:00
Joel Teichroeb a539832c78 Merge pull request #910 from JoseJX/FixGLTextureParams
EMI: Clamp sprites, repeat other textures.
2014-06-20 08:30:44 -07:00
Joseph Jezak df3d63fc24 EMI: Add support for clamping sprite textures and repeating other textures. 2014-06-18 22:19:42 -04:00
Joni Vähämäki b5cdd1240f EMI: Only draw models for actors inside the view frustum.
This adds math classes for doing frustum culling in software. These could be used for optimizing performance in many other places as well. For example, if an actor is outside the view frustum, it may not be necessary to do expensive keyframe animation and vertex skinning calculations for that actor.
2014-06-16 15:42:18 +03:00
Joni Vähämäki 8f9f541f17 EMI: Implemented dynamic lighting for models.
Lighting is done by calculating vertex colors in software, since the attenuation model used in EMI cannot be simulated with OpenGL fixed function lighting. The original game does the lighting this way as well. Ideally for the modern shader-based renderer a shader would be used for this instead.
2014-06-16 15:41:06 +03:00
Joni Vähämäki d80c84ad97 EMI: Enable backface culling. Fixes #900 2014-06-10 22:51:24 +03:00
Joel Teichroeb 0f3da43694 GRIM: Change NULL to nullptr. 2014-05-30 17:43:08 -07:00
Pawel Kolodziejski 8759900b6a ALL: synced with ScummVM 2014-04-05 18:18:42 +02:00
Joel Teichroeb a010e06bec GRIM: Make data in MeshFace private 2014-03-30 14:38:52 -07:00
Ingo van Lil 51c59ab6ed EMI: Display subtitles with TinyGL
In EMI the screen is dimmed while playing movies. The blit() function in
TinyGL is required to work in that case so that movie subtitles are
displayed.
2014-03-22 10:37:40 -07:00
Christian Krause 5577bd71b7 Merge pull request #833 from chkr-private/compiler-warning-fixes
EMI/GRIM/TINYGL: fix compile warnings and coverity issues
2014-02-15 18:50:59 +01:00
Christian Krause 446f56eb67 GRIM/EMI: Fix compile warnings 2014-02-15 18:40:19 +01:00
Christian Krause 58d7bf116c EMI/GRIM: Fix rotation of attached actors
Use matrix multiplications to fix the rotation for attached actors:
- calculate the final transformation matrix recursively for attached
  actors (instead of using getWorldPos and getWorldRot)
- use a different order for building the quaternions out of the Euler
  angles
- changed handling of camera position (just apply the rotation of the
  camera, the (inverted) position of the camera and the position of the
  actor
- no functional changes for GRIM
- no changes for drawing in overworld

Code simplification for GRIM:
- no need to use _currentPos in calculations for GRIM since it is
always (0, 0, 0)

This fixes:
- the rotation of any items Guybrush is holding in his hands
- the handling of the pole when using the raft in the swamps
- getting the bananas with the banana picker
2014-02-05 21:35:02 +01:00
Ingo van Lil f106a2a8b9 GRIM/EMI: Fix sprite scaling with non-native screen resolutions
When mapping a sprite to a GL polygon its dimensions are scaled by the ratio
between the current screen resolution and the native game resolution. When
the polygon is rendered it is scaled again, causing sprites to be displayed
unproportionally big when using larger screen resolutions.
2014-01-09 23:32:47 +01:00
Einar Johan Trøan Sømåen bf47bfca37 GRIM: Initialize _currentActor in GfxTinyGL. 2014-01-07 11:52:51 +01:00
Dries Harnie 180b4659b9 Merge pull request #789 from sietschie/master
EMI: Place text when actors talk
2013-12-16 16:05:12 -08:00
sietschie d06762ec52 EMI: removed unnecessary comments, made getBoundingBox const 2013-12-12 14:46:53 +01:00
Einar Johan Trøan Sømåen a11670047a EMI: Apply alpha when drawing sprites.
This fixes the health bars in Monkey Kombat.
2013-12-12 03:36:21 +01:00
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
Dries Harnie 54ae6df729 GRAPHICS: Fix off-by-one error in software renderer 2013-11-26 22:25:38 +01: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
Joel Teichroeb 97215332df GRIM: Calculate length instead of repeatedly calling strlen 2013-10-24 19:10:28 -07:00
Pawel Kolodziejski 790db038c0 ALL: sync with scummvm 2013-10-13 11:30:34 +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
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
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 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 0bbdc4db93 EMI: Draw to depth buffer if sortorder >= 100 (TinyGL) 2013-07-02 00:22:59 +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 b51d757361 GRIM: Initialize all members in GfxTinyGL 2013-04-21 15:11:06 +02:00
Giulio Camuffo 570164a2cd GRIM: Fix switching fullscreen crashing with tinygl 2013-02-04 12:33:17 +01:00
Joel Teichroeb 2d1b3d36ba GRIM: Silence casting away const warnings 2013-01-22 19:56:23 -08:00
Giulio Camuffo 80109ca3fe GRIM: Fix ActorToClean behaviour. Bump save version to 22.4. Fix #701.
The clean buffer code needs two layers. Every actor needs its buffer,
but we also need a global one. The actors' buffers blit to the global buffer
which then gets blitted to screen.
2013-01-11 12:44:30 +01:00
Joni Vähämäki 2c5bfd586e GRIM: Fixed formatting. 2013-01-02 02:20:51 +02:00