This file is indexed.

/usr/share/games/instead/stead/sprites.lua is in instead-data 1.9.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
require "theme"

stead.font_load = instead_font_load
stead.font_free = instead_font_free
stead.font_scaled_size = instead_font_scaled_size
stead.sprite_alpha = instead_sprite_alpha
stead.sprite_dup = instead_sprite_dup
stead.sprite_scale = instead_sprite_scale
stead.sprite_rotate = instead_sprite_rotate
stead.sprite_text = instead_sprite_text
stead.sprite_text_size = instead_sprite_text_size
stead.sprite_draw = instead_sprite_draw
stead.sprite_copy = instead_sprite_copy
stead.sprite_compose = instead_sprite_compose
stead.sprite_fill = instead_sprite_fill
stead.sprite_pixel = instead_sprite_pixel
stead.sprite_load = instead_sprite_load
stead.sprite_free = instead_sprite_free
stead.sprite_size = instead_sprite_size
stead.sprites_free = instead_sprites_free

sprite = {
	nam = 'sprites';
	object_type = true;
	system_type = true;

	screen = function(s)
		if theme.get 'scr.gfx.mode' ~= 'direct' then
			return
		end
		return 'screen'
	end;

	font_scaled_size = function(size)
		return stead.font_scaled_size(size);
	end;
	font = function(font, size, ...)
		return stead.font_load(font, size, ...);
	end;
	free_font = function(font)
		return stead.font_free(key);
	end;
	font_height = function(font)
		local w,h = stead.sprite_text_size(font)
		return h
	end;
	alpha = function(name, alpha, ...)
		return stead.sprite_alpha(name, alpha, ...);
	end;
	dup = function(name, ...)
		return stead.sprite_dup(name, ...);
	end;
	scale = function(name, xs, ys, smooth, ...)
		if smooth == nil then
			smooth = true -- default is on
		end
		return stead.sprite_scale(name, xs, ys, smooth,...);
	end;
	rotate = function(name, angle, smooth, ...)
		if smooth == nil then
			smooth = true -- default is on
		end
		return stead.sprite_rotate(name, angle, smooth, ...);
	end;
	text = function(font, text, col, style, ...)
		return stead.sprite_text(font, text, col, style, ...);
	end;
	size = function(spr)
		return stead.sprite_size(spr);
	end;
	text_size = function(fnt, spr)
		return stead.sprite_text_size(fnt, spr);
	end;
	draw = function(s, fx, fy, fw, fh, d, x, y, alpha)
		if d == nil and x == nil and y == nil then
			return stead.sprite_draw(s, 0, 0, -1, -1, fx, fy, fw, fh);
		end
		return stead.sprite_draw(s, fx, fy, fw, fh, d, x, y, alpha);
	end;
	copy = function(s, fx, fy, fw, fh, d, x, y, alpha)
		if d == nil and x == nil and y == nil then
			return stead.sprite_copy(s, 0, 0, -1, -1, fx, fy, fw, fh);
		end
		return stead.sprite_copy(s, fx, fy, fw, fh, d, x, y, alpha);
	end;
	compose = function(s, fx, fy, fw, fh, d, x, y, alpha)
		if d == nil and x == nil and y == nil then
			return stead.sprite_compose(s, 0, 0, -1, -1, fx, fy, fw, fh);
		end
		return stead.sprite_compose(s, fx, fy, fw, fh, d, x, y, alpha);
	end;
	fill = function(d, x, y, w, h, col)
		if h == nil and col == nil then
			return stead.sprite_fill(d, 0, 0, -1, -1, x);
		end 
		return stead.sprite_fill(d, x, y, w, h, col);
	end;
	pixel = function(d, x, y, col, alpha)
		return stead.sprite_pixel(d, x, y, col, alpha)
	end;
	load = function(fname, ...)
		return stead.sprite_load(fname, ...);
	end;
	blank = function(w, h, ...)
		local t = 'blank:'..tostring(w)..'x'..tostring(h)
		return stead.sprite_load(t, ...)
	end;
	box = function(w, h, col, alpha, ...)
		local t = 'box:'..tostring(w)..'x'..tostring(h)
		if col then
			t = t..','..tostring(col)
		end
		if alpha then
			t = t..','..tostring(alpha)
		end
		return stead.sprite_load(t, ...)
	end;
	free = function(key)
		return stead.sprite_free(key);
	end;
}

stead.module_init(function()
	stead.sprites_free();
end)