Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrote "author" function. #17

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CREDITS.txt

This file was deleted.

9 changes: 9 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,12 @@ Please send reports, suggests or patchs to:
https://bugs.launchpad.net/ultimate-smash-friends

last update: Wed, 27 Apr 2011 18:45:51 +0200

Credits
=======
For a list of contributors, read data/CREDITS. Alternatively, you may see
the list by using the proper command line switch::
./ultimate-smash-friends --credits

Or, you can see the credits from within the game, by clicking "Credits" from
the main menu.
23 changes: 9 additions & 14 deletions data/CREDITS
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@

- programers -
Gabriel Pettier (most of codebase)
Toineo (bug fixes, first AI)
Kaoron (patch to a nasty bug, code
review and other help)
Alaxa27 (bugfixes, code
normalisation)
Kaoron (patch to a nasty bug,
code review and other help)
Alaxa27 (bugfixes, code normalisation)
Xapantu (new menu system, new AI)
Aspidites (new config system, bug
fixes, and a lot of other
things !)
feelie (a lot of bug reports and
fixes !)
aspidites (new config system, bug fixes,
and a lot of other things!)
feelie (a lot of bug reports and fixes!)

- character design -
Thomas Pettier
Gabriel Pettier
Herberts
Necroluckyboy
Doudoulolita
Redshrike (from OpenGameArt.org !)
Redshrike (from OpenGameArt.org!)

- levels design -
Gabriel Pettier
Necroluckyboy
Qubodup
bart (from OpenGameArt.org !)
bart (from OpenGameArt.org!)

- others graphics -
Jean-Manuel Clemençon aka Samuncle
(GUI...)
Jean-Manuel Clemençon aka Samuncle (GUI...)

- music -
Mourad Achir
Expand Down
6 changes: 3 additions & 3 deletions usf/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# Our modules
from usf.font import fonts
from usf.game import Game
from usf.screens.about import About
from usf.screens.credits import Credits
from usf.screens.characters import Characters
from usf.screens.configure import Configure
from usf.screens.keyboard import Keyboard
Expand Down Expand Up @@ -62,7 +62,7 @@ def __init__(self, surface):

self.screens['main_screen'] = MainScreen('main_screen', self.screen)
self.screens['configure'] = Configure('configure', self.screen)
self.screens['about'] = About('about', self.screen)
self.screens['credits'] = Credits('credits', self.screen)
self.screens['resume'] = Resume('resume', self.screen)
self.screens['sound'] = Audio('sound', self.screen)
self.screens['display'] = Display('display', self.screen)
Expand Down Expand Up @@ -210,7 +210,7 @@ def handle_reply(self, reply):
in-game menu
"""
if hasattr(reply, 'get'):
sound = loaders.track(os.path.join(CONFIG.system_path,
sound = loaders.track(os.path.join(CONFIG.system_path,
"sounds", "mouseClick2.wav"))
sound.set_volume(CONFIG.audio.SOUND_VOLUME/100.0)
sound.play()
Expand Down
45 changes: 23 additions & 22 deletions usf/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,26 @@
level=(CONFIG.debug.LOG_LEVEL)
)

logging.debug("""Paths:
Config:
System: {0}
User: {1}
logging.debug("""\
Paths:
Config:
System: {0}
User: {1}
Filename: {2}""".format(*CONFIG.paths.keys() + [CONFIG.filename])
)

Filename: {2}""".format(*CONFIG.paths.keys() + [CONFIG.filename]))
def credits():
""" print credits in the terminal """

def author():
""" print credits in the terminal
"""
if 'CREDITS' not in os.listdir(os.path.join(CONFIG.system_path)):
logging.info(CONFIG.system_path)
logging.info('\n'.join(os.listdir(os.path.join(CONFIG.system_path))))
logging.debug(CONFIG.system_path +'/CREDITS file not found')
credits_file = os.path.join(CONFIG.system_path, 'CREDITS')

else:
author_file = open(os.path.join(CONFIG.system_path, 'CREDITS'))
logging.info(author_file.read())
author_file.close()
try:
with open(credits_file, 'r') as c:
print ''.join(c.readlines())

except IOError:
logging.info(CONFIG.system_path)
logging.debug('{0} not found!'.format(credits_file))


class Main(object):
Expand Down Expand Up @@ -332,9 +333,9 @@ def loading_screen(self):
# Set options and usage to parse users choices

parser.add_argument(
'-a', '--authors',
action='store_true', dest='author',
help='See authors of this game.'
'-c', '--credits',
action='store_true', dest='credits',
help='See credits for this game.'
)
parser.add_argument(
'-v', '--version',
Expand All @@ -353,11 +354,11 @@ def loading_screen(self):

args = vars(parser.parse_args())

if args.get('author'):
author()
if args.get('credits'):
credits()
sys.exit(1)
else:
del args['author']
del args['credits']

if args.get('player'):
args['players'] = map(
Expand Down
2 changes: 2 additions & 0 deletions usf/screens/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__all__ = []

from usf.screens.screen import Screen
2 changes: 1 addition & 1 deletion usf/screens/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

'''

from usf.screens.screen import Screen
from usf.screens import Screen
from usf.widgets.box import VBox
from usf.widgets.slider import Slider
from usf.widgets.label import Label
Expand Down
2 changes: 1 addition & 1 deletion usf/screens/characters.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

'''

from usf.screens.screen import Screen
from usf.screens import Screen

from usf import CONFIG

Expand Down
2 changes: 1 addition & 1 deletion usf/screens/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

'''

from usf.screens.screen import Screen
from usf.screens import Screen

from usf.widgets.box import VBox
from usf.widgets.button import Button
Expand Down
33 changes: 22 additions & 11 deletions usf/screens/about.py → usf/screens/credits.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
################################################################################

'''
The About/Credit screen.
The Credit screen.

'''

from usf.screens.screen import Screen
import os
from usf.screens import Screen
from usf import CONFIG

from usf.widgets.box import VBox
Expand All @@ -31,19 +32,29 @@

from usf.translation import _

class About(Screen):
class Credits(Screen):

def init(self):
self.name = (_("about"))
self.add(VBox())
padding = CONFIG.general.HEIGHT / 10 # 10 percent of screen height

self.widget.add(Paragraph('CREDITS'),
size=(
490*CONFIG.general.WIDTH/800,
300*CONFIG.general.HEIGHT/600))
self.name = (_("credit"))
self.add(VBox())

self.widget.add(Button(_('Back')),
margin=55)
credits_text = open(
os.path.join(CONFIG.system_path, 'CREDITS')
, 'r'
).readlines()

self.widget.add(
Paragraph(credits_text),
size=(
CONFIG.general.WIDTH - padding,
CONFIG.general.HEIGHT - padding
),
margin=padding
)

self.widget.add(Button(_('Back')), margin=55)

def callback(self, action):
if action.text == _('Back'):
Expand Down
2 changes: 1 addition & 1 deletion usf/screens/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

'''

from usf.screens.screen import Screen
from usf.screens import Screen
from usf.widgets.box import VBox
from usf.widgets.label import Label
from usf.widgets.checkbox_text import TextCheckBox
Expand Down
4 changes: 2 additions & 2 deletions usf/screens/keyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

from os.path import join

from usf.screens.screen import Screen
from usf.screens import Screen
from usf.widgets.box import VBox, HBox
from usf.widgets.button import Button
from usf.widgets.label import Label
Expand Down Expand Up @@ -65,7 +65,7 @@ def init(self):
hbox.add(Label('Player ' + str(i + 1)), size=(80, 50))

for action in actions:
w = KeyboardWidget(getattr(CONFIG.keyboard,
w = KeyboardWidget(getattr(CONFIG.keyboard,
"PL{0}_{1}".format(i, action.upper())))
w.set_id("PL{0}_{1}".format(i, action.upper()))
hbox.add(w, size=(40, 40), margin=30)
Expand Down
2 changes: 1 addition & 1 deletion usf/screens/level.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import logging

#our modules
from usf.screens.screen import Screen
from usf.screens import Screen
from usf.widgets.box import VBox
from usf.widgets.button import Button
from usf.widgets.coverflow import Coverflow
Expand Down
4 changes: 2 additions & 2 deletions usf/screens/main_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import pygame

from usf.screens.screen import Screen
from usf.screens import Screen
from usf.widgets.box import VBox
from usf.widgets.button import Button
from usf.translation import _
Expand All @@ -49,7 +49,7 @@ def callback(self, action):
if action.text == _('Configure'):
return {'goto': 'configure'}
if action.text == _('Credits'):
return {'goto': 'about'}
return {'goto': 'credits'}
if action.text == _('Quit'):
pygame.event.post( pygame.event.Event(pygame.QUIT) )

2 changes: 1 addition & 1 deletion usf/screens/network_game_conf_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

'''

from usf.screens.screen import Screen
from usf.screens import Screen

from usf import CONFIG

Expand Down
2 changes: 1 addition & 1 deletion usf/screens/network_join_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import pygame

from usf.screens.screen import Screen
from usf.screens import Screen
from usf.widgets.box import VBox
from usf.widgets.label import Label
from usf.widgets.button import Button
Expand Down
2 changes: 1 addition & 1 deletion usf/screens/network_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import pygame

from usf.screens.screen import Screen
from usf.screens import Screen
from usf.widgets.box import VBox
from usf.widgets.button import Button
from usf.translation import _
Expand Down
2 changes: 1 addition & 1 deletion usf/screens/resume.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

'''

from usf.screens.screen import Screen
from usf.screens import Screen
from usf.widgets.button import Button
from usf.widgets.box import VBox
from usf.translation import _
Expand Down
Loading