Not logged inOpenClonk Forum
Up Topic Save scenario rework: Save to Objects.c instead of Game.txt.

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Sven2
I uploaded a new iteration:

* I combined the SaveScenarioObject / SaveScenarioObjectProps / SaveScenarioObjectExtraProps / SaveScenarioObjectIgnoreProps into a single SaveScenarioObject callback with a proplist parameter that has the remaining interface. E.g.:

func SaveScenarioObject(props)
{
  if (!inherited(props, ...)) return false;
  // Waterfall has its own creation procedure
  props->RemoveCreation();
  props->Add(SAVEOBJ_Creation, "CreateWaterfall(%d,%d,%d,%v)",fx_waterfall.X, fx_waterfall.Y, fx_waterfall.Strength, fx_waterfall.Material);
  // Don't save color modultion
  props->Remove("ClrModulation");
  // Save some properties
  props->AddCall("Direction", this, "SetDirection", XDir, YDir);
  return true;
}


* Actions no longer saved by default
* GetScenarioSaveName renamed to MakeScenarioSaveName
* Interface extended on some objects so Set*-functions can be called instead of setting locals directly

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill