Пример #1
0
Chunk::Chunk(const Chunk &chunk)
{
	setWorld(chunk.getWorld());
	setLoc(chunk.getLoc());
	const unsigned char *blocks = chunk.getBlocks();
	memcpy(m_Blocks, blocks, CHUNK_WIDTH * CHUNK_WIDTH * CHUNK_HEIGHT);
}
Пример #2
0
void setLocalForBase(MIS& env, Type ty) {
  assert(mustBeInFrame(env.base) ||
         env.base.loc == BaseLoc::LocalArrChain);
  if (!env.base.local) return loseNonRefLocalTypes(env);
  setLoc(env, env.base.local, ty);
  FTRACE(4, "      ${} := {}\n",
    env.base.locName ? env.base.locName->data() : "$<unnamed>",
    show(ty)
  );
}
Пример #3
0
Location* Floor::createStairs(int idNum, int x, int y, bool isUp){
	StairsTile* stairs = new StairsTile(idNum,x,y,id,isUp);
	Location* loc = &(*stairs); // can we set base pointers = to derived pointers?
	if(isUp){
		upStairs = stairs;
	}
	else{
		downStairs = stairs;
	}
	setLoc(loc,x,y);
	return loc;
}
Пример #4
0
Char::Char( CATEGORY cat, Vec2 lc, TileDeck *dk, Layer *tgtlayer, int client_id, int internal_id ) : Prop2D(), category(cat), clean_at(0), client_id(client_id), internal_id(internal_id) {
    setScl(24,24);
    setDeck(dk);
    setLoc(lc);
    tgtlayer->insertProp(this);
}
Пример #5
0
 void Actor::setLoc (const Vector2 &l) {
   setLoc( l.x, l.y );
 }
Пример #6
0
CTerrain::CTerrain(string _type, int _x, int _y) : CMovable(_x, _y), type(_type)
{
	Initialize();
	setLoc(getX(), getY() + TILE_HEIGHT/2 - getH()/2);
}
Пример #7
0
CButton::CButton(string _type, int _dscreen, int _dstate, int _x, int _y) 
	: CScreenObj(game.getClient(), _type, _x, _y), dscreen(_dscreen), dstate(_dstate)
{
	Initialize();
	setLoc(_x, _y);
}