mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-20 08:48:13 +00:00
FULLPIPE: Implement Shadows::initMovement()
This commit is contained in:
parent
1b057ba346
commit
eea48b4f12
@ -1047,7 +1047,29 @@ void Shadows::init() {
|
||||
}
|
||||
|
||||
void Shadows::initMovement(Movement *mov) {
|
||||
warning("STUB: Shadows::initMovement()");
|
||||
uint num;
|
||||
|
||||
if (mov->_currMovement)
|
||||
num = mov->_currMovement->_dynamicPhases.size();
|
||||
else
|
||||
num = mov->_dynamicPhases.size();
|
||||
|
||||
_items.clear();
|
||||
_items.resize(num);
|
||||
|
||||
Common::Point point;
|
||||
|
||||
_items[0].dynPhase = (DynamicPhase *)mov->_staticsObj1;
|
||||
_items[0].dynPhase->getDimensions(&point);
|
||||
_items[0].width = point.x;
|
||||
_items[0].height = point.y;
|
||||
|
||||
for (uint i = 1; i < num; i++) {
|
||||
_items[i].dynPhase = mov->getDynamicPhaseByIndex(i);
|
||||
_items[i].dynPhase->getDimensions(&point);
|
||||
_items[i].width = point.x;
|
||||
_items[i].height = point.y;
|
||||
}
|
||||
}
|
||||
|
||||
DynamicPhase *Shadows::findSize(int width, int height) {
|
||||
|
@ -1348,6 +1348,22 @@ void Movement::setDynamicPhaseIndex(int index) {
|
||||
gotoPrevFrame();
|
||||
}
|
||||
|
||||
DynamicPhase *Movement::getDynamicPhaseByIndex(int idx) {
|
||||
debug(7, "Movement::updateCurrDynamicPhase()");
|
||||
|
||||
if (_currMovement) {
|
||||
if (_currMovement->_dynamicPhases.size() == 0 || (uint)idx >= _currMovement->_dynamicPhases.size())
|
||||
return 0;
|
||||
|
||||
return (DynamicPhase *)_currMovement->_dynamicPhases[idx];
|
||||
} else {
|
||||
if (_dynamicPhases.size() == 0 || (uint)idx >= _dynamicPhases.size())
|
||||
return 0;
|
||||
|
||||
return (DynamicPhase *)_dynamicPhases[idx];
|
||||
}
|
||||
}
|
||||
|
||||
void Movement::loadPixelData() {
|
||||
Movement *mov = this;
|
||||
for (Movement *i = _currMovement; i; i = i->_currMovement)
|
||||
|
@ -143,6 +143,7 @@ class Movement : public GameObject {
|
||||
void setAlpha(int alpha);
|
||||
|
||||
void setDynamicPhaseIndex(int index);
|
||||
DynamicPhase *getDynamicPhaseByIndex(int idx);
|
||||
|
||||
void removeFirstPhase();
|
||||
bool gotoNextFrame(int callback1, void (*callback2)(int *));
|
||||
|
Loading…
Reference in New Issue
Block a user