10 circuitlist = [[(590,0), (550,40), (200,40), (170,70), (170,310)],
11 [(570,0), (540,30), (190,30), (160,60), (20,60), (20,220), (50,250), (50,420), (90,460), (610,460)],
12 [(0,220), (40,260), (40,480)],
13 [(180,0), (180,20), (150,50), (20,50), (20,0)]]
15 menuitems = [("play","fileselect"), ("quit","quit")]
16 subtitle = "holy shit parallax!!!11!1"
20 self.fxlock = thread.allocate_lock()
24 self.bar = PulseLine([(0,0),(130,0)],(200,200,255),self.period,5)
25 thread.start_new_thread(self.fxloader,())
29 self.fx.append(Blank())
30 for l in self.circuitlist:
31 o = PulseLine(l,(255,30,30),self.period)
35 o = Image('gfx/title.png',(200,40))
41 for l in self.menuitems:
42 o = Text(l[0],'font/Nano.ttf',18,(30,70 + 20*n), (255,30,30))
49 o = Text(self.subtitle,'font/Nano.ttf',15,(600,100),(255,30,30))
55 o = Text("version " + str(self.version),'font/Nano.ttf',14,(610,440),(255,30,30))
61 o = PlaneScroll('gfx/chips_layer1.jpg',(-0.12,0.06),2.0,0.75)
66 o = PlaneScroll('gfx/chips_layer2.jpg',(-0.06,0.03))
68 self.fx.remove(self.fx[0])
77 self.bar.location = (30, 68 + 20*self.position)
79 self.bar.location = (30, 68 + 20*self.position + 20)
83 screen = pygame.display.get_surface()
85 pygame.mixer.music.load('snd/0x00.ogg')
86 pygame.mixer.music.set_volume(0.75)
87 pygame.mixer.music.play(-1)
88 stab = pygame.mixer.Sound('snd/stab.ogg')
90 start_t = pygame.time.get_ticks()
93 t = pygame.time.get_ticks() - start_t
94 for e in pygame.event.get():
95 act = event.parseevent(e)
96 if act == event.CANCEL:
98 elif act == event.DOWN:
100 elif act == event.UP:
102 elif act == event.OK:
103 decided = self.menuitems[self.position][1]
105 self.position = self.position % len(self.menuitems)
107 pygame.display.flip()
109 pygame.mixer.music.fadeout(1500)
112 start_t2 = pygame.time.get_ticks()
114 blanksurf = pygame.surface.Surface((640,480)).convert()
115 blanksurf.fill( (0,0,0) )
117 dt = pygame.time.get_ticks() - start_t2
119 self.draw(pygame.time.get_ticks() - start_t)
120 blanksurf.set_alpha(int(dt / 1000.0 * 255.0))
121 screen.blit(blanksurf,(0,0))
123 screen.fill( (0,0,0) )
124 self.menufx[self.position].draw(0)
126 blanksurf.set_alpha(int((dt-1000) / 500.0 * 255.0))
127 screen.blit(blanksurf,(0,0))
128 pygame.display.flip()