예제 #1
0
void OSystem_Wii::showOverlay() {
	_mouseX = _overlayWidth / 2;
	_mouseY = _overlayHeight / 2;
	_overlayVisible = true;
	_currentWidth = _overlayWidth;
	_currentHeight = _overlayHeight;

	updateEventScreenResolution();
}
예제 #2
0
void OSystem_Wii::hideOverlay() {
	_mouseX = _gameWidth / 2;
	_mouseY = _gameHeight / 2;
	_overlayVisible = false;
	_currentWidth = _gameWidth;
	_currentHeight = _gameHeight;

	updateEventScreenResolution();
}
예제 #3
0
void OSystem_Wii::updateScreenResolution() {
	if (_overlayVisible) {
		_currentWidth = _overlayWidth;
		_currentHeight = _overlayHeight;
	} else {
		_currentWidth = _gameWidth;
		_currentHeight = _gameHeight;
	}

	if (_currentWidth > 0)
		_currentXScale = f32(gfx_video_get_width()) / f32(_currentWidth);
	else
		_currentXScale = 1.0;

	if (_currentHeight > 0)
		_currentYScale = f32(gfx_video_get_height()) / f32(_currentHeight);
	else
		_currentYScale = 1.0;

	updateEventScreenResolution();
}
예제 #4
0
void OSystem_Wii::initSize(uint width, uint height) {
	if (_gameWidth != width || _gameHeight != height) {
		printf("initSize %u %u\n", width, height);

		assert((width <= 640) && (height <= 480));

		_gameWidth = width;
		_gameHeight = height;

		if(_gamePixels)
			free(_gamePixels);

		_gamePixels = (u8 *) memalign(32, _gameWidth * _gameHeight);
		memset(_gamePixels, 0, _gameWidth * _gameHeight);

		if (!_overlayVisible) {
			_currentWidth = _gameWidth;
			_currentHeight = _gameHeight;
			updateEventScreenResolution();
		}

		setGraphicsMode(_activeGraphicsMode);
	}
}