/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
*/
#ifndef TWP_ROOM_H
#define TWP_ROOM_H
#include "common/array.h"
#include "common/rect.h"
#include "common/stream.h"
#include "common/ptr.h"
#include "math/vector2d.h"
#include "twp/squirrel/squirrel.h"
#include "twp/font.h"
#include "twp/motor.h"
#include "twp/scenegraph.h"
#include "twp/graph.h"
#define FULLSCREENCLOSEUP 1
#define FULLSCREENROOM 2
namespace Twp {
enum class RoomEffect {
None = 0,
Sepia = 1,
Ega = 2,
Vhs = 3,
Ghost = 4,
BlackAndWhite = 5
};
class Node;
class Object;
class Layer {
public:
Layer(const Common::String &name, const Math::Vector2d ¶llax, int zsort);
Layer(const Common::StringArray &names, const Math::Vector2d ¶llax, int zsort);
public:
Common::Array _names;
Common::Array > _objects;
Math::Vector2d _parallax;
int _zsort = 0;
Common::SharedPtr _node;
};
struct ScalingValue {
float scale;
int y;
};
struct Scaling {
Common::Array values;
Common::String trigger;
float getScaling(float yPos);
};
struct Light {
Color color;
Math::Vector2d pos;
float brightness = 0.f; // light brightness 1.0f...100.f
float coneDirection = 0.f; // cone direction 0...360.f
float coneAngle = 0.f; // cone angle 0...360.f
float coneFalloff = 0.f; // cone falloff 0.f...1.0f
float cutOffRadius = 0.f; // cutoff radius
float halfRadius = 0.f; // cone half radius 0.0f...1.0f
bool on = false;
int id = 0;
};
struct Lights {
int _numLights = 0; // Number of lights
Light _lights[50];
Color _ambientLight; // Ambient light color
};
struct ScalingTrigger {
ScalingTrigger(Common::SharedPtr