22#ifndef BLADERUNNER_SLICE_ANIMATIONS_H
23#define BLADERUNNER_SLICE_ANIMATIONS_H
25#include "common/array.h"
26#include "common/file.h"
27#include "common/str.h"
28#include "common/types.h"
30#include "bladerunner/color.h"
31#include "bladerunner/vector.h"
34namespace BladeRunner {
36class BladeRunnerEngine;
65 Page() : _data(
nullptr), _lastAccess(0), _prevPage(
nullptr), _nextPage(
nullptr) {}
75 PageFile(
SliceAnimations *sliceAnimations) : _sliceAnimations(sliceAnimations), _fileNumber(-1) {}
78 void close(int8 fileIdx);
79 void *loadPage(uint32 page);
94 PageFile _coreAnimPageFile;
95 PageFile _framesPageFile;
97 void updatePagesList(Page &page,
bool newPage);
98 void cleanupOutdatedPages();
103 , _coreAnimPageFile(
this)
104 , _framesPageFile(
this)
109 , _lastUsedPage(
nullptr) {}
115 bool openFrames(
int fileNumber);
117 Palette &getPalette(
int i) {
return _palettes[i]; };
118 void *getFramePtr(uint32 animation, uint32 frame);
120 int getFrameCount(
int animation)
const {
return _animations[animation].frameCount; }
121 float getFPS(
int animation)
const {
return _animations[animation].fps; }
123 Vector3 getPositionChange(
int animation)
const;
124 float getFacingChange(
int animation)
const;
Definition: bladerunner.h:113
Definition: slice_animations.h:39
Definition: slice_renderer.h:45