File: video.lua

package info (click to toggle)
gltron 0.70final-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,752 kB
  • ctags: 4,793
  • sloc: ansic: 19,182; sh: 3,220; cpp: 973; makefile: 269
file content (36 lines) | stat: -rw-r--r-- 839 bytes parent folder | download | duplicates (9)
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