diff --git a/README.md b/README.md index 5bc5399ec..35a2c1be4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# Welcome to QZDoom! [![QZDoom Logo](https://forum.drdteam.org/download/file.php?id=3080)](https://zdoom.org/) +# Welcome to QZDoom! [![Build Status](https://ci.appveyor.com/api/projects/status/github/raa-eruanna/qzdoom?branch=master&svg=true)](https://ci.appveyor.com/project/raa-eruanna/qzdoom) [![Build Status](https://travis-ci.org/raa-eruanna/qzdoom.svg?branch=master)](https://travis-ci.org/raa-eruanna/qzdoom) @@ -19,6 +19,6 @@ Special thanks to Coraline of the 3DGE team for allowing us to use her README.md ## How to build QZDoom -To build QZDoom, please see the [wiki](https://zdoom.org/wiki/) and see the "Programmer's Corner" on the bottom-right corner of the page to build for your plaform. +To build QZDoom, please see the [wiki](https://zdoom.org/wiki/) and see the "Programmer's Corner" on the bottom-right corner of the page to build for your platform. Follow the same instructions as with GZDoom, except substituting "coelckers/gzdoom" with "raa-eruanna/qzdoom" in order to link this repository in your build environment. diff --git a/src/g_level.cpp b/src/g_level.cpp index 0b211f3e6..17f76a67d 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -2028,6 +2028,10 @@ DEFINE_FIELD(FLevelLocals, F1Pic) DEFINE_FIELD(FLevelLocals, maptype) DEFINE_FIELD(FLevelLocals, Music) DEFINE_FIELD(FLevelLocals, musicorder) +DEFINE_FIELD(FLevelLocals, skytexture1) +DEFINE_FIELD(FLevelLocals, skytexture2) +DEFINE_FIELD(FLevelLocals, skyspeed1) +DEFINE_FIELD(FLevelLocals, skyspeed2) DEFINE_FIELD(FLevelLocals, total_secrets) DEFINE_FIELD(FLevelLocals, found_secrets) DEFINE_FIELD(FLevelLocals, total_items) @@ -2093,3 +2097,19 @@ CCMD(skyfog) } } + +//========================================================================== +// +// ZScript counterpart to ACS ChangeSky, uses TextureIDs +// +//========================================================================== +DEFINE_ACTION_FUNCTION(FLevelLocals, ChangeSky) +{ + PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals); + PARAM_INT(sky1); + PARAM_INT(sky2); + sky1texture = self->skytexture1 = FSetTextureID(sky1); + sky2texture = self->skytexture2 = FSetTextureID(sky2); + R_InitSkyMap(); + return 0; +} diff --git a/wadsrc/static/zscript/base.txt b/wadsrc/static/zscript/base.txt index bef1751da..503efa453 100644 --- a/wadsrc/static/zscript/base.txt +++ b/wadsrc/static/zscript/base.txt @@ -591,6 +591,10 @@ struct LevelLocals native native readonly int maptype; native readonly String Music; native readonly int musicorder; + native readonly TextureID skytexture1; + native readonly TextureID skytexture2; + native float skyspeed1; + native float skyspeed2; native int total_secrets; native int found_secrets; native int total_items; @@ -640,7 +644,9 @@ struct LevelLocals native native static clearscope vector3 Vec3Diff(vector3 v1, vector3 v2); native String GetChecksum() const; - + + native void ChangeSky( TextureID sky1, TextureID sky2 ); + String TimeFormatted(bool totals = false) { int sec = Thinker.Tics2Seconds(totals? totaltime : time);