Changeset - bcaa4e5460c2
[Not reviewed]
default
1 3 0
Silverwing - 4 years ago 2021-01-04 23:04:20

Fix decor module a bit; Fix flickering when moving between menus; Remove obsolete font file
4 files changed with 38 insertions and 11 deletions:
0 comments (0 inline, 0 general) First comment
decor.lua
Show inline comments
 
@@ -129,7 +129,7 @@ function img:render(v)
 
		v.fx = xx * v.w
 
		v.fy = yy * v.h
 
		if v.animated and instead.ticks() - (v.__delay or 0) >= delay then
 
			if frame < v.frames - 1 then
 
			if frame < v.frames - 1 and v.__delay then
 
				frame = frame + 1
 
			else
 
				frame = 0
fonts/vga_old.ttf
Show inline comments
 
deleted file
 
binary diff not shown
images/title/bg.png
Show inline comments
 
binary diff not shown
Show images
main3.lua
Show inline comments
 
@@ -114,8 +114,10 @@ std.phrase_show = false;
 
prefs.music_accessibility = true;
 

	
 
function start_menu()
 
	D {'background', 'img', 'images/title/bg_animate.png', x=0, y=0, w=800, h=600, frames=16, z=1, delay=200, animated=true};
 
	D {'title', 'img', 'images/title/title.png', x=150, y=88, frames=1, z=0};
 
	if not D('background') then
 
		D {'background', 'img', 'images/title/bg_animate.png', x=0, y=0, w=800, h=600, frames=16, z=1, delay=200, animated=true, background=true};
 
		D {'title', 'img', 'images/title/title.png', x=150, y=88, frames=1, z=0};
 
	end;
 
end;
 

	
 
function stop_menu()
 
@@ -123,6 +125,25 @@ function stop_menu()
 
	D {'title'};
 
end;
 

	
 
local __ds = false;
 

	
 
std.mod_step(function(state)
 
	if (player_moved()) and std.cmd[1] ~= 'load' then
 
		if here().nofading then
 
			__ds = true;
 
			sprite.direct(true);
 
		end;
 
	end
 
end)
 

	
 
std.mod_cmd(function(cmd)
 
	if __ds then
 
		__ds = false;
 
		sprite.direct(false);
 
		return std.nop();
 
	end;
 
end, -1);
 

	
 
game.afterwalk = function()
 
	if from().themeDispose then
 
		from():themeDispose();
 
@@ -381,6 +402,7 @@ room {
 
		theme.set('win.h', '384');
 
		theme.set('win.x', '125');
 
		theme.set('win.y', '108');
 
		theme.set('menu.button.x', -300);
 
	end;
 
	themeDispose = function(s)
 
		local title = D('title');
 
@@ -392,6 +414,7 @@ room {
 
		theme.reset('win.h');
 
		theme.reset('win.x');
 
		theme.reset('win.y');
 
		theme.reset('menu.button.x');
 
	end;
 
	enter = function(s)
 
		D {'back', 'img', 'images/title/back.rus.png', x=77, y=500, frames=1, click=true};
 
@@ -432,10 +455,11 @@ room {
 
	theme = function(s)
 
		D('title').y = 40;
 
		theme.set('scr.gfx.bg', 'images/title/bg.png');
 
		theme.set('win.w', '600');
 
		theme.set('win.h', '400');
 
		theme.set('win.x', '100');
 
		theme.set('win.y', '100');
 
		theme.set('win.w', '540');
 
		theme.set('win.h', '384');
 
		theme.set('win.x', '125');
 
		theme.set('win.y', '108');
 
		theme.set('menu.button.x', -300);
 
	end;
 
	themeDispose = function(s)
 
		local title = D('title');
 
@@ -447,6 +471,7 @@ room {
 
		theme.reset('win.h');
 
		theme.reset('win.x');
 
		theme.reset('win.y');
 
		theme.reset('menu.button.x');
 
	end;
 
	enter = function(s)
 
		D {'back', 'img', 'images/title/back.rus.png', x=77, y=500, frames=1, click=true};
 
@@ -494,10 +519,11 @@ room {
 
	theme = function(s)
 
		D('title').y = 40;
 
		theme.set('scr.gfx.bg', 'images/title/bg.png');
 
		theme.set('win.w', '600');
 
		theme.set('win.h', '400');
 
		theme.set('win.x', '100');
 
		theme.set('win.y', '100');
 
		theme.set('win.w', '540');
 
		theme.set('win.h', '384');
 
		theme.set('win.x', '125');
 
		theme.set('win.y', '108');
 
		theme.set('menu.button.x', -300);
 
	end;
 
	themeDispose = function(s)
 
		local title = D('title');
 
@@ -509,6 +535,7 @@ room {
 
		theme.reset('win.h');
 
		theme.reset('win.x');
 
		theme.reset('win.y');
 
		theme.reset('menu.button.x');
 
	end;
 
	enter = function(s)
 
		D {'back', 'img', 'images/title/back.rus.png', x=77, y=500, frames=1, click=true};
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now