1 --- src/curse.py.orig 2009-03-26 05:51:06.393371998 +0100
2 +++ src/curse.py 2009-03-26 05:51:26.030042161 +0100
7 + # set up savegame directory
8 + self.savedir=os.path.join(os.getenv('HOME'),'.curse')
10 + if not os.path.isdir(self.savedir):
12 + os.mkdir(self.savedir)
14 + print "Unable to create directory", self.savedir
18 pygame.mixer.init(44100, -16, 2, 512)
24 - self.screen = pygame.display.set_mode(size)
25 + self.screen = pygame.display.set_mode(size, FULLSCREEN)
26 self.main_screen=pygame.Surface((384,384))
27 self.gui_screen=pygame.Surface((232,384))
28 self.message_screen=pygame.Surface((384,72))
30 self.playerpower=6-int(diff)
31 self.flags['pw']=self.playerpower
33 - FILE=gzip.open(os.path.join('..',pln+'cs'), 'r', 2)
34 + FILE=gzip.open(os.path.join(self.savedir,pln+'cs'), 'r', 2)
35 self.player,self.world,self.flags=pickle.load(FILE)
36 self.playerpower=self.flags['pw']
39 self.screen.blit(self.key_screen,(8+8+384,8+8+384))
41 p=copy.copy(self.player)
42 - FILE=gzip.open(os.path.join('..',p.name+'cs'), 'w')
43 + FILE=gzip.open(os.path.join(self.savedir,p.name+'cs'), 'w')
45 pickle.dump((p,self.world,self.flags), FILE, 2)
49 if e.type == pygame.KEYDOWN:
50 if e.key == pygame.K_ESCAPE:
53 + if e.key == pygame.K_F12:
54 pygame.display.toggle_fullscreen()
56 if e.unicode in '12345':
59 if e.type == pygame.KEYDOWN:
60 if e.key == pygame.K_ESCAPE:
63 + if e.key == pygame.K_F12:
64 pygame.display.toggle_fullscreen()
66 if e.unicode in 'pwcln':
70 if e.type == pygame.KEYDOWN:
71 - if e.key== pygame.K_ESCAPE:
72 + if e.key == pygame.K_ESCAPE:
75 + if e.key== pygame.K_F12:
76 pygame.display.toggle_fullscreen()
77 if e.unicode in 'abcdefghijklmnopqrstuvwxyzQWERTZUIOPLKJHGFDSAYXCVBNM':
82 #check for saved game:
83 - if os.path.exists(os.path.join('..',(n+'cs'))):
84 + if os.path.exists(os.path.join(self.savedir,(n+'cs'))):
87 title , diff = self.new_game(n)
91 if e.type==pygame.KEYDOWN:
92 - if e.key==pygame.K_ESCAPE:
93 + if e.key == pygame.K_ESCAPE:
96 + if e.key==pygame.K_F12:
97 pygame.display.toggle_fullscreen()
99 if number_of_warriors and ATTACK_STATE==AT_NEW_ROUND:
103 if e.type == pygame.KEYDOWN:
104 - if e.key==pygame.K_ESCAPE:
105 + if e.key == pygame.K_ESCAPE:
108 + if e.key==pygame.K_F12:
109 pygame.display.toggle_fullscreen()
110 if self.state==STATE_RUNNING:
111 if e.key == pygame.K_DOWN:
112 @@ -976,7 +1001,10 @@
115 if e.type == pygame.KEYDOWN:
116 - if e.key==pygame.K_ESCAPE:
117 + if e.key == pygame.K_ESCAPE:
120 + if e.key==pygame.K_F12:
121 pygame.display.toggle_fullscreen()
123 self.state=STATE_RUNNING
124 --- README.orig 2009-03-26 05:53:56.203354702 +0100
125 +++ README 2009-03-26 05:54:18.498826794 +0100
128 Press s on the world map to toggle music on/off
130 -Press ESC on the world map to toggle fullscreen on/off
131 +Press F12 on the world map to toggle fullscreen on/off
133 +Press ESC to quit game
135 Press SPACE to enter a location