This file is indexed.

/usr/share/fceux/luaScripts/ShowPalette.lua is in fceux 2.2.2+dfsg0-1build1.

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
-- Show Palette
-- Click for other palette boxes
-- P00 - P3F are NES palette values.
-- P40 - P7F are LUA palette values.

-- True or False
ShowTextLabels=true;

function DecToHex(numberin)
 if (numberin < 16) then
  return string.format("0%X",numberin);
 else
  return string.format("%X",numberin);
 end;
end;

function text(x,y,str,text,back)
	if (x > 0 and x < 255 and y > 0 and y < 240) then
		gui.text(x,y,str,text,back);
	end;
end;

local ButtonWasPressed;
local CurrentPaletteDisplay=0;



while(true) do

FCEU.frameadvance();

for i = 0, 7 do
 gui.box(0 + (30*i),0,29 + (30*i),29,"P" .. DecToHex(0+i+(CurrentPaletteDisplay * 8)),"P" .. DecToHex(0+i+(CurrentPaletteDisplay * 8)));
 gui.box(0 + (30*i),30,29 + (30*i),59,"P" .. DecToHex(16+i+(CurrentPaletteDisplay * 8)),"P" .. DecToHex(16+i+(CurrentPaletteDisplay * 8)));
 gui.box(0 + (30*i),60,29 + (30*i),89,"P" .. DecToHex(32+i+(CurrentPaletteDisplay * 8)),"P" .. DecToHex(32+i+(CurrentPaletteDisplay * 8)));
 gui.box(0 + (30*i),90,29 + (30*i),119,"P" .. DecToHex(48+i+(CurrentPaletteDisplay * 8)),"P" .. DecToHex(48+i+(CurrentPaletteDisplay * 8)));
 if(ShowTextLabels == true) then
  text(6 + (30*i),11,"P" .. DecToHex(0+i+(CurrentPaletteDisplay * 8)))
  text(6 + (30*i),41,"P" .. DecToHex(16+i+(CurrentPaletteDisplay * 8)))
  text(6 + (30*i),71,"P" .. DecToHex(32+i+(CurrentPaletteDisplay * 8)))
  text(6 + (30*i),101,"P" .. DecToHex(48+i+(CurrentPaletteDisplay * 8)))
 end;
end;

mousestuff = input.get()

if (not ButtonWasPressed) then
 if (mousestuff.leftclick) then
  ButtonWasPressed = 1; 
  CurrentPaletteDisplay=CurrentPaletteDisplay+1;
  if (CurrentPaletteDisplay == 2) then
   CurrentPaletteDisplay=8;
  end;
  if (CurrentPaletteDisplay == 10) then
   CurrentPaletteDisplay=0;
  end;
 end;
end

ButtonWasPressed = (mousestuff.leftclick);

end;