### Ultima tile 

sub new {
	my ($class, $c, $nonrelx, $nonrely) = @_; 

	### FIXME : if defined($nonrelx) else 0, same for $nonrely
	my $self = {
		xoffset => $nonrelx, ### X position in map not on screen
		yoffset => $nonrely, ### Y position in map not on screen
		connected_t_ile => undef,
		collideable => $c

	};

	bless $self, $class;	
}

sub getXoffset {
	my ($self) = shift;

	return $self->{xoffset};
}

sub getYoffset {
	my ($self) = shift;

	return $self->{yoffset};
}

sub setXoffset {
	my ($self, $x) = @_;

	$self->{xoffset} = $x;
}

sub setYoffset {
	my ($self, $y) = @_;

	$self->{yoffset} = $y;
}

sub setFollower {
	my ($self, $t_ile) = @_;
	
	$self->{connected_t_ile} = $t_ile;

}

### get the sole connection on the right and down
sub getNext {
	my ($self) = shift;

	return $self->{connected_t_ile};

}

### blitting API
sub blit {
	my ($self, $blitter) = @_;

	$blitter->blit($self);
}
 
