COMMON: Registers RandomSources in constructor with the event recorder
This also removes the dependency of engines on the event recorder header and API, and will make it easier to RandomSources that are not properly registered.
This commit is contained in:
parent
305c13a4aa
commit
4cbe4ede66
39 changed files with 99 additions and 125 deletions
|
@ -25,11 +25,10 @@
|
|||
#include "kyra/animator_lok.h"
|
||||
|
||||
#include "common/system.h"
|
||||
#include "common/EventRecorder.h"
|
||||
|
||||
namespace Kyra {
|
||||
|
||||
Sprites::Sprites(KyraEngine_LoK *vm, OSystem *system) {
|
||||
Sprites::Sprites(KyraEngine_LoK *vm, OSystem *system) : _rnd("kyraSprites") {
|
||||
_vm = vm;
|
||||
_res = vm->resource();
|
||||
_screen = vm->screen();
|
||||
|
@ -40,7 +39,6 @@ Sprites::Sprites(KyraEngine_LoK *vm, OSystem *system) {
|
|||
_spriteDefStart = 0;
|
||||
memset(_drawLayerTable, 0, sizeof(_drawLayerTable));
|
||||
_sceneAnimatorBeaconFlag = 0;
|
||||
g_eventRec.registerRandomSource(_rnd, "kyraSprites");
|
||||
}
|
||||
|
||||
Sprites::~Sprites() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue