mirror of
https://github.com/colby-swandale/waterfoul
synced 2024-11-15 19:47:58 +01:00
set new default window width
This commit is contained in:
parent
5ca8892745
commit
dfc9df2f4f
1 changed files with 6 additions and 3 deletions
|
@ -1,16 +1,19 @@
|
|||
module Waterfoul
|
||||
class Screen
|
||||
|
||||
WINDOW_WIDTH = 480
|
||||
WINDOW_HEIGHT = 432
|
||||
|
||||
SCREEN_WIDTH = 160
|
||||
SCREEN_HEIGHT = 144
|
||||
|
||||
def initialize
|
||||
SDL.InitSubSystem SDL::INIT_VIDEO
|
||||
@buffer = FFI::MemoryPointer.new :uint32, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||
@window = SDL.CreateWindow 'waterfoul', 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SDL::SDL_WINDOW_RESIZABLE
|
||||
@window = SDL.CreateWindow 'waterfoul', 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT, SDL::SDL_WINDOW_RESIZABLE
|
||||
@renderer = SDL.CreateRenderer @window, -1, 0
|
||||
SDL.SetHint "SDL_RENDER_SCALE_QUALITY", "linear"
|
||||
SDL.RenderSetLogicalSize(@renderer, SCREEN_WIDTH, SCREEN_HEIGHT)
|
||||
SDL.SetHint "SDL_HINT_RENDER_SCALE_QUALITY", "2"
|
||||
SDL.RenderSetLogicalSize(@renderer, WINDOW_WIDTH, WINDOW_HEIGHT)
|
||||
@texture = SDL.CreateTexture @renderer, SDL::PIXELFORMAT_ARGB8888, 1, SCREEN_WIDTH, SCREEN_HEIGHT
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue