#include "mxdsaction.h" #include #include #include #include #include si::Interleaf::Version version = si::Interleaf::Version2_2; uint32_t bufferSize = 65536; uint32_t bufferCount = 8; std::string out; std::ofstream depfile; void CreateWidescreen() { si::Interleaf si; si.Read("widescreen/GaraDoor.si"); si::Object* garadoor = dynamic_cast(si.GetChildAt(0)); const char append[] = "Replace:\\Lego\\Scripts\\Isle\\Isle;1160"; garadoor->extra_.append(append, sizeof(append)); si::Object GaraDoor_Background_Wide; const char extra[] = "World:current, RemoveWith:\\Lego\\Scripts\\Isle\\Isle;1161"; GaraDoor_Background_Wide.id_ = 5001; GaraDoor_Background_Wide.type_ = si::MxOb::Bitmap; GaraDoor_Background_Wide.flags_ = MxDSAction::c_enabled | MxDSAction::c_bit4; GaraDoor_Background_Wide.duration_ = -1; GaraDoor_Background_Wide.loops_ = 1; GaraDoor_Background_Wide.extra_ = si::bytearray(extra, sizeof(extra)); GaraDoor_Background_Wide.presenter_ = "MxStillPresenter"; GaraDoor_Background_Wide.name_ = "GaraDoor_Background_Wide"; GaraDoor_Background_Wide.filetype_ = si::MxOb::STL; GaraDoor_Background_Wide.location_ = si::Vector3(-240.0, 0.0, -1.0); GaraDoor_Background_Wide.direction_ = si::Vector3(0, 0, 0); GaraDoor_Background_Wide.up_ = si::Vector3(0, 1.0, 0); GaraDoor_Background_Wide.up_.y = 1.0; GaraDoor_Background_Wide.ReplaceWithFile("widescreen/GaraDoor_Background_Wide.bmp"); garadoor->AppendChild(&GaraDoor_Background_Wide); std::string file = out + "/widescreen.si"; depfile << file << ": " << (std::filesystem::current_path() / "widescreen/GaraDoor_Background_Wide.bmp").string() << std::endl; si.Write(file.c_str()); } int main(int argc, char* argv[]) { out = argv[1]; depfile = std::ofstream(argv[2]); CreateWidescreen(); return 0; }