enable_undocumented_retrofication
was a only temporary hack while I was working on the :retro
flag, which is the new way of doing things: Image.new("filename.png", retro: true)
> Also, :retro only sets a few OpenGL parameters that change how the image is rendered when it is stretched or rotated, it does not affect the image's pixel data.
ifRetro
/:retro
parameter to image constructorsImage.new("filename.png", :retro => true)
instead of using Gosu::enable_undocumented_retrofication
.UIImage
/NSImage
etc.Gosu.podspec
for OS X and iOS is now versioned, instead of being stuck at v0.0.1.enable_undocumented_retrofication
with a new flag during image creation, e.g. Image.new("tile.png", :retro => true)
, same for load_tiles
etc.; would this help?require 'gosu'
class GameWindow < Gosu::Window
def initialize
super(640, 480, false)
self.caption = "Retro test"
enable_undocumented_retrofication ### <-- Insert this method here?
@img = Gosu::Image.new(self, "test.png", false)
end
def update
end
def draw
@img.draw(0, 0, 0, 10.0, 10.0)
end
end
GameWindow.new.show
enable_undocumented_retrofication
method - just once, preferably on program start.
Gosu::enable_undocumented_retrofication
method. Just call it once during startup. And please wrap it in a rescue
block because I want to deprecate it as soon as I have found a better interface for it %)
Gosu::enable_undocumented_retrofication
, which, as I understand it, deactivates texture filtering/antialiasing/whatever to make sure large pixels are nice and clean.Gosu::enable_undocumented_retrofication
does, of course).Gosu::enable_undocumented_retrofication
- just call it somewhereGosu::enable_undocumented_retrofication
scale
expects a block with the code that will scale...scale(2) do # passing 2 is the same as 2, 2, 0, 0 :)
image3.draw(1,2,3)
end
Gosu::enable_undocumented_retrofication
(sic)
Gosu#enable_undocumented_retrofication
to stop it from blurring, run at 640x480 (or 800x600) res and scale it down with:class Game < Chingu::Window
def draw
scale 0.5 do
super
end
end
end
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill