mirror of
https://github.com/ZDoom/ZDRay.git
synced 2025-01-24 16:51:08 +00:00
- hook up lightmap builder
This commit is contained in:
parent
fe9368b048
commit
f9960ee12c
4 changed files with 14 additions and 15 deletions
|
@ -38,6 +38,8 @@ public:
|
|||
|
||||
void BuildNodes ();
|
||||
|
||||
FLevel Level;
|
||||
|
||||
private:
|
||||
void LoadUDMF();
|
||||
void LoadThings ();
|
||||
|
@ -64,8 +66,6 @@ private:
|
|||
void ParseMapProperties();
|
||||
void ParseTextMap(int lump);
|
||||
|
||||
FLevel Level;
|
||||
|
||||
TArray<FNodeBuilder::FPolyStart> PolyStarts;
|
||||
TArray<FNodeBuilder::FPolyStart> PolyAnchors;
|
||||
|
||||
|
|
|
@ -160,4 +160,3 @@ void Error(const char *error, ...);
|
|||
char *Va(const char *str, ...);
|
||||
void Delay(int ms);
|
||||
const int64_t GetSeconds();
|
||||
const kexStr &FilePath();
|
||||
|
|
|
@ -140,8 +140,6 @@ void kexWorker::RunThreads(const int count, void *data, jobFunc_t jobFunc)
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Stuff from old main.cpp
|
||||
|
||||
static kexStr basePath;
|
||||
|
||||
void Error(const char *error, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
|
@ -179,15 +177,6 @@ const int64_t GetSeconds()
|
|||
return time(0);
|
||||
}
|
||||
|
||||
//
|
||||
// FilePath
|
||||
//
|
||||
|
||||
const kexStr &FilePath()
|
||||
{
|
||||
return basePath;
|
||||
}
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
|
|
13
src/main.cpp
13
src/main.cpp
|
@ -7,11 +7,11 @@
|
|||
#include "framework/zdray.h"
|
||||
#include "wad/wad.h"
|
||||
#include "level/level.h"
|
||||
#include "lightmap/lightmap.h"
|
||||
|
||||
static void ParseArgs(int argc, char **argv);
|
||||
static void ShowUsage();
|
||||
static void ShowVersion();
|
||||
static bool CheckInOutNames();
|
||||
|
||||
const char *Map = nullptr;
|
||||
const char *InName = nullptr;
|
||||
|
@ -71,6 +71,17 @@ int main(int argc, char **argv)
|
|||
FLevelLoader loader(inwad, lump);
|
||||
loader.BuildNodes();
|
||||
|
||||
loader.Level.ParseConfigFile("lightconfig.txt");
|
||||
loader.Level.SetupDlight();
|
||||
Surface_AllocateFromMap(loader.Level);
|
||||
loader.Level.CreateLights();
|
||||
|
||||
kexLightmapBuilder builder;
|
||||
builder.CreateLightmaps(loader.Level);
|
||||
builder.WriteTexturesToTGA();
|
||||
|
||||
loader.Level.CleanupThingLights();
|
||||
|
||||
lump = inwad.LumpAfterMap(lump);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue