ILLUSIONS: Add more script opcodes and fix/add stuff along the way

- Unload backgrounds
- Add transparent sprite drawing
- Add AbortableThread
This commit is contained in:
johndoe123 2014-03-21 17:21:55 +01:00 committed by Eugene Sandulenko
parent 43cd806f17
commit 762be35a36
23 changed files with 399 additions and 57 deletions

View file

@ -59,6 +59,29 @@ void Properties::init(uint count, byte *properties) {
_properties = properties;
}
bool Properties::get(uint32 propertyId) {
uint index;
byte mask;
getProperyPos(propertyId, index, mask);
return (_properties[index] & mask) != 0;
}
void Properties::set(uint32 propertyId, bool value) {
uint index;
byte mask;
getProperyPos(propertyId, index, mask);
if (value)
_properties[index] |= mask;
else
_properties[index] &= ~mask;
}
void Properties::getProperyPos(uint32 propertyId, uint &index, byte &mask) {
propertyId &= 0xFFFF;
index = propertyId >> 3;
mask = 1 << (propertyId & 7);
}
// BlockCounters
BlockCounters::BlockCounters()