File: video.lua

package info (click to toggle)
gltron 0.70final-14
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,992 kB
  • sloc: ansic: 19,172; sh: 3,004; cpp: 973; makefile: 209
file content (36 lines) | stat: -rw-r--r-- 839 bytes parent folder | download | duplicates (10)
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
-- very similiar to setupSoundTracks() in audio.lua

function setupArtpacks()
   local i,name
   for i,name in artpacks do
      if name == settings.current_artpack then
	 current_artpack_index = i
	 return
      end
   end
   settings.current_artpack = artpacks[1]
   current_artpack_index = 1
end

function nextArtpack()
   if current_artpack_index < getn(artpacks) then
      current_artpack_index = current_artpack_index + 1
   else
      current_artpack_index = 1
   end
   settings.current_artpack = artpacks[ current_artpack_index ]
   c_reloadArtpack()
end

function previousArtpack()
   if current_artpack_index > 1 then
      current_artpack_index = current_artpack_index - 1
   else
      current_artpack_index = getn(artpacks) 
   end
   settings.current_artpack = artpacks[ current_artpack_index ]
   c_reloadArtpack()
end