Skip to content

Commit

Permalink
libhexen|ACScript: Fix build errors/warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Mar 21, 2014
1 parent a63fb5a commit b445f71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions doomsday/plugins/hexen/include/acscript.h
Expand Up @@ -207,7 +207,7 @@ class ACScriptInterpreter
*/
AutoStr *scriptDescription(int scriptNumber);

void writeWorldScriptData(de::Writer &to);
void writeWorldScriptData(de::Writer &to) const;
void readWorldScriptData(de::Reader &from);

void writeMapScriptData(MapStateWriter *msw);
Expand All @@ -233,7 +233,7 @@ class ACScriptInterpreter
int scriptNumber; ///< On the target map.
byte args[4];

void write(Writer *to) const;
void write(de::Writer &to) const;
void read(de::Reader &from);
};

Expand Down
11 changes: 6 additions & 5 deletions doomsday/plugins/hexen/src/acscript.cpp
Expand Up @@ -467,17 +467,17 @@ void ACScriptInterpreter::scriptFinished(ACScript *script)
Thinker_Remove(&script->thinker);
}

void ACScriptInterpreter::writeWorldScriptData(Writer &to)
void ACScriptInterpreter::writeWorldScriptData(de::Writer &to) const
{
byte ver = 4;
to << ver; // version byte
to << byte(4); // Version.

// Write the world-global variable namespace.
for(int i = 0; i < MAX_ACS_WORLD_VARS; ++i)
{
to << worldVars[i];
}

// Serialize the deferred task queue.
// Write the deferred task queue.
to << _deferredTasksSize;
for(int i = 0; i < _deferredTasksSize; ++i)
{
Expand All @@ -489,12 +489,13 @@ void ACScriptInterpreter::readWorldScriptData(de::Reader &from)
{
byte ver; from >> ver;

// Read the world-global variable namespace.
for(int i = 0; i < MAX_ACS_WORLD_VARS; ++i)
{
from >> worldVars[i];
}

// Deserialize the deferred task queue.
// Read the deferred task queue.
clearDeferredTasks();
from >> _deferredTasksSize;
if(_deferredTasksSize)
Expand Down

0 comments on commit b445f71

Please sign in to comment.