SubtileHolder::SubtileHolder(int bg, int x, int y, unsigned int palIdx, Subtile** tiles) : Tile(bg,x,y,palIdx), destroyed(false) { memcpy(subtiles, tiles, sizeof(Subtile*)*4); if(subtiles[0]) { subtiles[0]->setXPos(4*x); subtiles[0]->setYPos(4*y); subtiles[0]->setBgHandle(bg); subtiles[0]->setPalIdx(palIdx); } if(subtiles[1]) { subtiles[1]->setXPos(4*x + 2); subtiles[1]->setYPos(4*y); subtiles[1]->setBgHandle(bg); subtiles[1]->setPalIdx(palIdx); } if(subtiles[2]) { subtiles[2]->setXPos(4*x); subtiles[2]->setYPos(4*y + 2); subtiles[2]->setBgHandle(bg); subtiles[2]->setPalIdx(palIdx); } if(subtiles[3]) { subtiles[3]->setXPos(4*x + 2); subtiles[3]->setYPos(4*y + 2); subtiles[3]->setBgHandle(bg); subtiles[3]->setPalIdx(palIdx); } drawUpdate(); }
void MenuBar::drawGrund() { //Den tomma gråa raden char tom[COLUMNS+1]; for(int i = 0; i < getWidth(); i++) tom[i] = ' '; tom[getWidth()] = '\0'; textbackground(MBARBG); gotoxy(getTop(),getLeft()); cputs(tom); drawUpdate(); //Knapparna och activa menyer }
void Beetle::update() { if (!_data) error("Beetle::update: sequences have not been loaded!"); if (!_data->isLoaded) return; move(); if (_data->field_D5) _data->field_D5--; if (_data->currentSequence && _data->indexes[_data->offset] != 29) { drawUpdate(); return; } if (getInventory()->get(kItemBeetle)->location == kObjectLocation3) { if ((!_data->field_DD && rnd(10) < 1) || (_data->field_DD && rnd(30) < 1) || rnd(100) < 1) { _data->field_DD++; if (_data->field_DD > 3) _data->field_DD = 0; updateData(24); _data->coordX = (int16)(rnd(250) + 190); _data->coordOffset = (int16)(rnd(5) + 5); if (_data->field_D9 > 1) _data->field_D9--; drawUpdate(); } } }
//-------------------------------------------------------------- void ofApp::update(){ drawUpdate(); }
Mirror::Mirror(int bg, int mirrorBg, int x, int y, unsigned int palIdx, unsigned int tileBase) : Tile(bg, x, y, palIdx), mirrorTileBase(tileBase), mirrorBgHandle(mirrorBg), angle(rand() & 0xF) { needsUpdate = true; drawUpdate(); }
SpinBlocker::SpinBlocker(int bg, int x, int y, unsigned int palIdx, unsigned int tile, BeamDirection initAngle) : Tile(bg, x, y, palIdx), tileBase(tile), angle(initAngle & 7) { drawUpdate(); }
Target::Target(int bg, int x, int y, unsigned int palIdx, unsigned int tile, Level* level) : Tile(bg,x,y,palIdx), tileBase(tile), level(level), state(0) { drawUpdate(); }
Laser::Laser(int bg, int x, int y, unsigned int palIdx, unsigned int tileBase, LaserDirection direction) : Tile(bg, x, y, palIdx), laserTileBase(tileBase), dir(direction) { drawUpdate(); }