TombEngine/TR5Main/Game/objlight.cpp
TokyoSU 29f0724693 New project format (#206)
* Starting Reformat the project

- New Import Method, no more "../../" in import,
- New Entity Folder Structure, less compile time

* Refactoring the Project

- added precompiled header with default import like microsoft or directx.
- fix many double import.
- fix math.h confliting math.h from
microsoft.
- fix effects.h confliting Effects.h from DirectX.
- refactored TR4 entity folder and how it's loaded.

* Update Some Code Before Switching to Master

* Finished the NewProjectFormat Template

- need to finish entity in the master later.

* Added Monty NewFileFormat

* Fixed Monty NewFileFormat Include

* Revert "Fixed Monty NewFileFormat Include"

This reverts commit ebf0afca10.

* Trying to fix conflits for NewFileFormat

* Fixed .filters

* Last Commit in NewProjectFormat
2020-05-27 09:21:20 +02:00

20 lines
531 B
C++

#include "framework.h"
#include "objlight.h"
#include "control.h"
#include "effect2.h"
void TriggerAlertLight(int x, int y, int z, int r, int g, int b, int angle, short room, int falloff)
{
GAME_VECTOR source, target;
source.x = x;
source.y = y;
source.z = z;
GetFloor(x, y, z, &room);
source.roomNumber = room;
target.x = x + phd_sin(16 * angle);
target.y = y;
target.z = z + phd_cos(16 * angle);
if (!LOS(&source, &target))
TriggerDynamicLight(target.x, target.y, target.z, falloff, r, g, b);
}