- moved the VM types into their own file and only include it where really needed.

This commit is contained in:
Christoph Oelckers 2017-04-13 01:12:04 +02:00
commit 6599e2c425
111 changed files with 4283 additions and 4147 deletions

View file

@ -11,6 +11,7 @@
#include "templates.h"
#include "serializer.h"
#include "r_data/r_translate.h"
#include "vm.h"
//----------------------------------------------------------------------------
//

View file

@ -60,7 +60,7 @@
#include "p_local.h"
#include "c_dispatch.h"
#include "g_level.h"
#include "scripting/thingdef.h"
#include "thingdef.h"
#include "i_system.h"
#include "templates.h"
#include "doomdata.h"
@ -74,6 +74,7 @@
#include "actorinlines.h"
#include "c_cvars.h"
#include "gl/system//gl_interface.h"
#include "vm.h"
EXTERN_CVAR(Int, vid_renderer)

View file

@ -15,7 +15,8 @@
#include "d_player.h"
#include "r_data/sprites.h"
#include "g_levellocals.h"
#include "virtual.h"
#include "vm.h"
#include "vm.h"
static FRandom pr_morphmonst ("MorphMonster");
@ -612,8 +613,7 @@ void EndAllPowerupEffects(AInventory *item)
IFVIRTUALPTRNAME(item, NAME_Powerup, EndEffect)
{
VMValue params[1] = { item };
VMFrameStack stack;
GlobalVMStack.Call(func, params, 1, nullptr, 0, nullptr);
VMCall(func, params, 1, nullptr, 0);
}
}
item = item->Inventory;
@ -638,8 +638,7 @@ void InitAllPowerupEffects(AInventory *item)
IFVIRTUALPTRNAME(item, NAME_Powerup, InitEffect)
{
VMValue params[1] = { item };
VMFrameStack stack;
GlobalVMStack.Call(func, params, 1, nullptr, 0, nullptr);
VMCall(func, params, 1, nullptr, 0);
}
}
item = item->Inventory;

View file

@ -40,6 +40,7 @@
#include "doomstat.h"
#include "serializer.h"
#include "a_pickups.h"
#include "vm.h"
static FRandom pr_spot ("SpecialSpot");
static FRandom pr_spawnmace ("SpawnMace");

View file

@ -54,7 +54,7 @@
#include "r_utility.h"
#include "cmdlib.h"
#include "g_levellocals.h"
#include "virtual.h"
#include "vm.h"
#include <time.h>
@ -1093,7 +1093,7 @@ static void DrawPowerups(player_t *CPlayer)
VMValue param[] = { item };
int rv;
VMReturn ret(&rv);
GlobalVMStack.Call(func, param, 1, &ret, 1);
VMCall(func, param, 1, &ret, 1);
auto tex = FSetTextureID(rv);
if (!tex.isValid()) continue;
auto texture = TexMan(tex);