mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
WINTERMUTE: WME3D: Janitorial
This commit is contained in:
parent
928c40da71
commit
5a48d528f6
@ -27,6 +27,7 @@
|
||||
|
||||
#include "common/math.h"
|
||||
#include "common/util.h"
|
||||
|
||||
#include "engines/wintermute/ad/ad_actor_3dx.h"
|
||||
#include "engines/wintermute/ad/ad_attach_3dx.h"
|
||||
#include "engines/wintermute/ad/ad_entity.h"
|
||||
@ -104,7 +105,6 @@ AdActor3DX::~AdActor3DX() {
|
||||
for (uint32 i = 0; i < _attachments.size(); i++) {
|
||||
delete _attachments[i];
|
||||
}
|
||||
|
||||
_attachments.clear();
|
||||
|
||||
// delete transition times
|
||||
@ -969,7 +969,6 @@ bool AdActor3DX::loadBuffer(byte *buffer, bool complete) {
|
||||
case TOKEN_SHADOW_COLOR: {
|
||||
int r, g, b, a;
|
||||
parser.scanStr((char *)params, "%d,%d,%d,%d", &r, &g, &b, &a);
|
||||
// TODO: not sure if this is correct
|
||||
_shadowColor = BYTETORGBA(r, g, b, a);
|
||||
|
||||
break;
|
||||
@ -1254,7 +1253,6 @@ bool AdActor3DX::playAnim3DX(int channel, const char *name, bool setState) {
|
||||
}
|
||||
|
||||
bool res = _modelX->playAnim(channel, name, _defaultTransTime, true, _defaultStopTransTime);
|
||||
|
||||
if (res && setState) {
|
||||
_state = STATE_PLAYING_ANIM;
|
||||
_stateAnimChannel = channel;
|
||||
@ -2495,6 +2493,7 @@ bool AdActor3DX::parseEffect(byte *buffer) {
|
||||
}
|
||||
|
||||
if (effectFile && material) {
|
||||
// TODO: Implement
|
||||
}
|
||||
|
||||
delete[] effectFile;
|
||||
|
@ -59,7 +59,6 @@ bool AdAttach3DX::init(const char *modelFile, const char *name, const char *pare
|
||||
setName(name);
|
||||
|
||||
_modelX = new ModelX(_gameRef, _owner);
|
||||
|
||||
if (!_modelX) {
|
||||
return false;
|
||||
}
|
||||
|
@ -29,6 +29,7 @@
|
||||
#define WINTERMUTE_AD_OBJECT_3D_H
|
||||
|
||||
#include "engines/wintermute/ad/ad_object.h"
|
||||
|
||||
#include "math/matrix4.h"
|
||||
#include "math/vector3d.h"
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "engines/wintermute/base/base.h"
|
||||
#include "engines/wintermute/coll_templ.h"
|
||||
#include "engines/wintermute/persistent.h"
|
||||
|
||||
#include "math/vector3d.h"
|
||||
|
||||
namespace Wintermute {
|
||||
|
@ -31,6 +31,7 @@
|
||||
|
||||
#include "engines/wintermute/persistent.h"
|
||||
#include "engines/wintermute/base/base.h"
|
||||
|
||||
#include "math/vector3d.h"
|
||||
|
||||
namespace Wintermute {
|
||||
|
@ -211,7 +211,6 @@ void AdScene::cleanup() {
|
||||
#ifdef ENABLE_WME3D
|
||||
delete _sceneGeometry;
|
||||
#endif
|
||||
|
||||
delete _viewport;
|
||||
_viewport = nullptr;
|
||||
|
||||
@ -813,17 +812,15 @@ bool AdScene::loadBuffer(char *buffer, bool complete) {
|
||||
cmd = PARSERR_GENERIC;
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_WME3D
|
||||
case TOKEN_GEOMETRY:
|
||||
delete _sceneGeometry;
|
||||
|
||||
if (!_gameRef->_useD3D) {
|
||||
break;
|
||||
}
|
||||
|
||||
_sceneGeometry = new AdSceneGeometry(_gameRef);
|
||||
|
||||
if(_sceneGeometry == nullptr || !_sceneGeometry->loadFile(params)) {
|
||||
if (_sceneGeometry == nullptr || !_sceneGeometry->loadFile(params)) {
|
||||
delete _sceneGeometry;
|
||||
cmd = PARSERR_GENERIC;
|
||||
}
|
||||
@ -862,6 +859,7 @@ bool AdScene::loadBuffer(char *buffer, bool complete) {
|
||||
parser.scanStr(params, "%b", &_2DPathfinding);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case TOKEN_CAMERA:
|
||||
Common::strlcpy(camera, params, MAX_PATH_LENGTH);
|
||||
break;
|
||||
@ -1017,8 +1015,7 @@ bool AdScene::loadBuffer(char *buffer, bool complete) {
|
||||
_sceneGeometry->dropWaypoints();
|
||||
}
|
||||
|
||||
Camera3D* activeCamera = _sceneGeometry->getActiveCamera();
|
||||
|
||||
Camera3D *activeCamera = _sceneGeometry->getActiveCamera();
|
||||
if (activeCamera != nullptr) {
|
||||
_gameRef->_renderer->setup3D(activeCamera);
|
||||
}
|
||||
@ -1285,7 +1282,6 @@ bool AdScene::updateFreeObjects() {
|
||||
#ifdef ENABLE_WME3D
|
||||
if (adGame->_objects[i]->_is3D && _sceneGeometry) {
|
||||
Camera3D* activeCamera = _sceneGeometry->getActiveCamera();
|
||||
|
||||
if (activeCamera != nullptr) {
|
||||
_gameRef->_renderer->setup3D(activeCamera, !is3DSet);
|
||||
is3DSet = true;
|
||||
@ -1304,7 +1300,6 @@ bool AdScene::updateFreeObjects() {
|
||||
#ifdef ENABLE_WME3D
|
||||
if (_objects[i]->_is3D && _sceneGeometry) {
|
||||
Camera3D* activeCamera = _sceneGeometry->getActiveCamera();
|
||||
|
||||
if (activeCamera != nullptr) {
|
||||
_gameRef->_renderer->setup3D(activeCamera, !is3DSet);
|
||||
is3DSet = true;
|
||||
@ -2653,7 +2648,6 @@ bool AdScene::scSetProperty(const char *name, ScValue *value) {
|
||||
return STATUS_OK;
|
||||
}
|
||||
|
||||
|
||||
#ifdef ENABLE_WME3D
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// WaypointsHeight
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include "common/math.h"
|
||||
#include "common/util.h"
|
||||
|
||||
#include "engines/wintermute/ad/ad_block.h"
|
||||
#include "engines/wintermute/ad/ad_game.h"
|
||||
#include "engines/wintermute/ad/ad_generic.h"
|
||||
@ -50,6 +51,7 @@
|
||||
#include "engines/wintermute/math/math_util.h"
|
||||
#include "engines/wintermute/system/sys_class_registry.h"
|
||||
#include "engines/wintermute/wintermute.h"
|
||||
|
||||
#include "math/glmath.h"
|
||||
|
||||
namespace Wintermute {
|
||||
|
@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "common/util.h"
|
||||
|
||||
#include "engines/wintermute/ad/ad_waypoint_group3d.h"
|
||||
#include "engines/wintermute/base/gfx/3ds/mesh3ds.h"
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
|
||||
#include "engines/wintermute/base/base.h"
|
||||
#include "engines/wintermute/coll_templ.h"
|
||||
|
||||
#include "math/vector3d.h"
|
||||
|
||||
namespace Wintermute {
|
||||
|
@ -31,7 +31,9 @@
|
||||
#include "engines/wintermute/base/gfx/3ds/loader3ds.h"
|
||||
#include "engines/wintermute/math/math_util.h"
|
||||
#include "engines/wintermute/wintypes.h"
|
||||
|
||||
#include "graphics/opengl/system_headers.h"
|
||||
|
||||
#include "math/glmath.h"
|
||||
|
||||
namespace Wintermute {
|
||||
|
@ -23,6 +23,7 @@
|
||||
#define WINTERMUTE_MESH_3DS_H
|
||||
|
||||
#include "common/memstream.h"
|
||||
|
||||
#include "math/vector4d.h"
|
||||
|
||||
namespace Wintermute {
|
||||
|
@ -263,7 +263,7 @@ bool BaseRenderer::setup2D(bool Force) {
|
||||
|
||||
#ifdef ENABLE_WME3D
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool BaseRenderer::setup3D(Camera3D* camera, bool force) {
|
||||
bool BaseRenderer::setup3D(Camera3D *camera, bool force) {
|
||||
return STATUS_FAILED;
|
||||
}
|
||||
#endif
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "engines/wintermute/dctypes.h"
|
||||
#include "engines/wintermute/math/rect32.h"
|
||||
#include "engines/wintermute/math/vector2.h"
|
||||
|
||||
#include "graphics/transform_struct.h"
|
||||
|
||||
#include "math/matrix4.h"
|
||||
|
@ -111,7 +111,7 @@ bool Animation::loadFromX(XFileLexer &lexer, AnimationSet *parentAnimSet) {
|
||||
lexer.advanceToNextToken();
|
||||
lexer.advanceOnOpenBraces();
|
||||
|
||||
// I think we can ignore these for the moment)
|
||||
// I think we can ignore these for the moment
|
||||
lexer.readInt(); // whether animation is open or closed
|
||||
lexer.readInt(); // position quality
|
||||
lexer.advanceToNextToken(); // skip closed braces
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "engines/wintermute/base/gfx/x/meshx.h"
|
||||
#include "engines/wintermute/base/gfx/x/modelx.h"
|
||||
#include "engines/wintermute/coll_templ.h"
|
||||
|
||||
#include "math/matrix4.h"
|
||||
#include "math/quat.h"
|
||||
#include "math/vector3d.h"
|
||||
|
@ -188,14 +188,12 @@ void ModelX::cleanup(bool complete) {
|
||||
for (uint32 i = 0; i < _animationSets.size(); i++) {
|
||||
delete _animationSets[i];
|
||||
}
|
||||
|
||||
_animationSets.clear();
|
||||
|
||||
if (complete) {
|
||||
for (uint i = 0; i < _mergedModels.size(); ++i) {
|
||||
delete[] _mergedModels[i];
|
||||
}
|
||||
|
||||
_mergedModels.clear();
|
||||
}
|
||||
|
||||
@ -203,13 +201,11 @@ void ModelX::cleanup(bool complete) {
|
||||
delete _matSprites[i];
|
||||
_matSprites[i] = nullptr;
|
||||
}
|
||||
|
||||
_matSprites.clear();
|
||||
|
||||
for (uint i = 0; i < _materialReferences.size(); ++i) {
|
||||
delete _materialReferences[i]._material;
|
||||
}
|
||||
|
||||
_materialReferences.clear();
|
||||
|
||||
// remove root frame
|
||||
|
@ -234,9 +234,7 @@ enum TShadowType {
|
||||
#ifdef ENABLE_WME3D
|
||||
|
||||
struct FogParameters {
|
||||
FogParameters() : _start(0.0f), _end(0.0f), _color(0x00000000), _enabled(false) {
|
||||
|
||||
}
|
||||
FogParameters() : _start(0.0f), _end(0.0f), _color(0x00000000), _enabled(false) {}
|
||||
|
||||
float _start;
|
||||
float _end;
|
||||
|
Loading…
Reference in New Issue
Block a user