Skip to content
Snippets Groups Projects
Commit 5568eab3 authored by dg's avatar dg
Browse files

licence

git-svn-id: http://svn.net-core.org/repos/t-engine4@1149 51575b47-30f0-44d4-a5cc-537603b46e54
parent ae395fd9
No related branches found
No related tags found
No related merge requests found
......@@ -212,10 +212,22 @@ end
function _M:toScreen(x, y)
-- Draw with only the texture
if self.__showup then
local zoom = self.__showup / 7
self.texture:toScreenFull(x + (self.w - self.w * zoom) / 2, y + (self.h - self.h * zoom) / 2, self.w * zoom, self.h * zoom, self.texture_w * zoom, self.texture_h * zoom)
self.__showup = self.__showup + 1
if self.__showup >= 7 then self.__showup = nil end
local eff = self.__showup_effect or "pop"
if eff == "overpop" then
local zoom = self.__showup / 7
if self.__showup >= 9 then
zoom = (9 - (self.__showup - 9)) / 7 - 1
zoom = 1 + zoom * 0.5
end
self.texture:toScreenFull(x + (self.w - self.w * zoom) / 2, y + (self.h - self.h * zoom) / 2, self.w * zoom, self.h * zoom, self.texture_w * zoom, self.texture_h * zoom)
self.__showup = self.__showup + 1
if self.__showup >= 11 then self.__showup = nil end
else
local zoom = self.__showup / 7
self.texture:toScreenFull(x + (self.w - self.w * zoom) / 2, y + (self.h - self.h * zoom) / 2, self.w * zoom, self.h * zoom, self.texture_w * zoom, self.texture_h * zoom)
self.__showup = self.__showup + 1
if self.__showup >= 7 then self.__showup = nil end
end
else
self.texture:toScreenFull(x, y, self.w, self.h, self.texture_w, self.texture_h)
end
......
-- TE4 - T-Engine 4
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
......
-- TE4 - T-Engine 4
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
......
-- TE4 - T-Engine 4
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
......
-- TE4 - T-Engine 4
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
......
-- TE4 - T-Engine 4
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
......
-- TE4 - T-Engine 4
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
......
-- TE4 - T-Engine 4
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment