Skip to content

Commit

Permalink
temp commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Deamon87 committed Jul 4, 2024
1 parent abe5426 commit 444198f
Show file tree
Hide file tree
Showing 7 changed files with 663 additions and 562 deletions.
2 changes: 2 additions & 0 deletions wowViewerLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ set(SOURCE_FILES
src/engine/objects/lights/CSpotLight.h
src/engine/objects/lights/CWmoNewLight.cpp
src/engine/objects/lights/CWmoNewLight.h
src/engine/objects/scenes/dayNightDataHolder/DayNightLightHolder.cpp
src/engine/objects/scenes/dayNightDataHolder/DayNightLightHolder.h
)

if (LINK_OGL2)
Expand Down
7 changes: 0 additions & 7 deletions wowViewerLib/src/engine/objects/iMapApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ class IMapApi {
virtual std::shared_ptr<WmoObject> getWmoObject(int fileDataId, SMMapObjDef &mapObjDef) = 0;
virtual std::shared_ptr<WmoObject> getWmoObject(std::string fileName, SMMapObjDefObj1 &mapObjDef) = 0;
virtual std::shared_ptr<WmoObject> getWmoObject(int fileDataId, SMMapObjDefObj1 &mapObjDef) = 0;
virtual void getLightResultsFromDB(mathfu::vec3 &cameraVec3, const Config *config,
SkyColors &skyColors,
ExteriorColors &exteriorColors,
FogResult &fogResult,
LiquidColors &liquidColors,
StateForConditions *stateForConditions) = 0;


virtual animTime_t getCurrentSceneTime() = 0;
};
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// Created by Deamon on 7/5/2024.
//

#ifndef AWEBWOWVIEWERCPP_DAYNIGHTLIGHTHOLDER_H
#define AWEBWOWVIEWERCPP_DAYNIGHTLIGHTHOLDER_H

#include <string>
#include <vector>
#include "../../../persistance/header/commonFileStructs.h"
#include "../../../ApiContainer.h"

class DayNightLightHolder {
public:
DayNightLightHolder(const HApiContainer &api, int mapId);

private:
struct mapInnerZoneLightRecord {
int ID;
std::string name;
int LightID;
CAaBox aabb;
std::vector<mathfu::vec2> points;
std::vector<mathfu::vec2> lines;
};
std::vector<mapInnerZoneLightRecord> m_zoneLights;

HApiContainer m_api;
int m_mapId = -1;
public:
void loadZoneLights();
void updateLightAndSkyboxData(const HMapRenderPlan &mapRenderPlan, MathHelper::FrustumCullingData &frustumData,
StateForConditions &stateForConditions, const AreaRecord &areaRecord);

void getLightResultsFromDB(mathfu::vec3 &cameraVec3, const Config *config,
SkyColors &skyColors,
ExteriorColors &exteriorColors,
FogResult &fogResult,
LiquidColors &liquidColors,
StateForConditions *stateForConditions);
};


#endif //AWEBWOWVIEWERCPP_DAYNIGHTLIGHTHOLDER_H
Loading

0 comments on commit 444198f

Please sign in to comment.