Skip to content

Instantly share code, notes, and snippets.

@AphonicChaos
Created May 17, 2012 11:48
Show Gist options
  • Save AphonicChaos/2718367 to your computer and use it in GitHub Desktop.
Save AphonicChaos/2718367 to your computer and use it in GitHub Desktop.
Patch to reorganize doc directory and simplify documnetation generation (ultimate-smash-friends)
diff --git a/doc/design_documents/README.txt b/doc/design_documents/README.txt
deleted file mode 100644
index f628b48..0000000
--- a/doc/design_documents/README.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-Sat, 10 Jul 2010 15:10:41 +0200
-Gabriel Pettier
-
-In this directory design decisions about the general game, about characters and
-about levels will be documented.
-
-Code and technic should not be discussed here, it's about gameplay specifications.
-
-Discussions about those decisions and propositions happens on the launchpad
-mailing list of the project:
-<[email protected]>
-
-you can also join us on irc
[email protected]
diff --git a/doc/diagrams/classes.dia b/doc/diagrams/classes.dia
deleted file mode 100644
index 15d71b8..0000000
Binary files a/doc/diagrams/classes.dia and /dev/null differ
diff --git a/doc/diagrams/classes.fr.dia b/doc/diagrams/classes.fr.dia
deleted file mode 100644
index 452269f..0000000
Binary files a/doc/diagrams/classes.fr.dia and /dev/null differ
diff --git a/doc/doc b/doc/doc
deleted file mode 100644
index bce0f42..0000000
--- a/doc/doc
+++ /dev/null
@@ -1,417 +0,0 @@
-class AI (Entity):
-def choose_strategy (self, game) : def compute_computing_time () :
-def find_path (self, game) : def get_enemy_num_by_rank (self, rank) :
-def get_enemy_rank_by_num (self, num) :
-def get_entity_by_num (self, num, game) :
-def __init__ (self, num, game, entity_skinname
-def jump (self, game, type
-def jump_update (self, game) :
-def kick (self, game, type
-def localize_fall_zone (self, player, map) :
-def reversed_or_not (self, side) :
-def test_on_ground (game, lenght
-def update_current_target (self, game) : def update_enemy (self, game) :
-def update (self, dt, t, surface, game, coords
-def use_strategy (self, game, dt) : def walk (self, side
-average_computing_time
-average_computing_time
-begin_computing_time
-current_target
-enemy_distance
-enemy_number
-enemy_position
-fight_engaged
-ignored_pl
-in_jump
-make_fall_priority
-need_change_target
-reversed
-skill
-strategy
-target_x_offset
-target_x_relative_state
-target_y_offset
-target_y_relative_state
-walking_vector
-
-class Frame (object):
-def addAgressivPoint(self, (x,y),(v,j)):
-def __init__(self, image, time, vector, hardshape, name):
-agressivpoints
-agressivpoints_reverse
-hardshape
-image
-image_reversed
-LOG
-name
-time
-vector
-
-class PreciseTimedAnimation(Sprite):
-def __del__(self):
-def __init__( self, timedFrames, attribs, server
-def start(self):
-def update(self, _time, reversed
-agressivpoints
-duration
-frames
-hardshape
-image
-playing
-rect
-repeat
-server_mode
-_start_time
-vector
-
-class Sequence (object):
-def compare(self, seq, game_instance):
-def __init__(self, player, keys, action, condition
-def __str__():
-action
-condition
-keys
-player
-
-class Controls (object):
-def assignKey(self, action):
-def draw_rect(surface, rect, color
-def getKeyByAction(self, action):
-def handle_game_key( self, state, key, game_instance ):
-def handle_menu_key( self, state, key, game):
-def __init__(self):
-def poll(self, game_instance, menu, state):
-def reload(self):
-def save(self):
-keys
-player_sequences
-sequences
-
-class LOG (object):
-def __init__(self, out
-def log(self, message, level
-min_level
-out
-severities
-
-class WrongEntityException(Exception):
-def __init__(self):
-
-class Entity (object):
-def collide_point(self, (x,y)):
-def dist(self, entity):
-def draw(self, coords, zoom, surface):
-def foot_collision_rect(self):
-def get_block_vector(self, level_vector_blocs):
-def move(self,(x,y), _from
-def serialize(self):
-def unserialize(self, string):
-def update_floor_vector(self, level_moving_parts):
-def update_physics(self, dt, game):
-def update_points(self, x
-def update(self, dt, t, surface, game, coords
-def worldCollide(self, game):
-if reversed: x
-carried_by
-entity_skin
-entity_skin.animation.__start__time
-entity_skin.current_animation
-entity_skinname
-entity_type
-invincible
-lives
-name
-num
-number
-onGround
-percents
-place
-present
-rect
-reversed
-vector
-visible
-walking_vector
-
-class Entity_skin (object):
-def change_animation( self, anim_name, game, params
-def __del__(self):
-def __init__( self, dir_name
-def update(self, t, reversed
-action_events
-animation
-animation_change
-animations
-current_animation
-filename
-hardshape
-image
-name
-sounds
-
-class BadPlayersNetworkParamError(Exception):
-
-class Game (object):
-def addItem(self, item
-def __del__(self):
-def draw(self, debug_params
-def __init__(self, screen, level
-def update_events(self, dt):
-def update(self, debug_params
-ended
-ending
-events
-font
-game_font
-heart
-icon_space
-items
-last_clock
-level
-level_place
-LOG
-players
-screen
-tmp_surface
-type
-zoom
-
-class NetworkServerGame(Game):
-def begin(self, level, players_):
-def draw(self):
-def __init__(self, players_
-def update_game_state_string(self):
-def update(self):
-accepting
-ended
-ending
-events
-game_string
-items
-last_clock
-level
-LOG
-num_players
-players
-server
-type
-
-class NetworkClientGame(Game):
-def begin( self, players
-def fromPool(self, skin, movment, time):
-def update(self, time):
-connection
-level
-players
-screen
-skinpool
-type
-
-class Block (object):
-def collide_rect(self, (x,y), (h,w)
-def draw(self, surface, coords
-def feedZoomedBloc(self, zoom ):
-def __init__(self):
-def __str__(self):
-inThread
-zoom_cache
-
-class VectorBloc (Block):
-def apply_vector(self, entity):
-def __init__(self, rects, position, vector, relative, texture, server
-collide_rects
-position
-rects
-relative
-texture
-vector
-
-class MovingPart (Block):
-def get_movement(self):
-def __init__(self, rects, texture, patterns, server
-def update(self, level_time):
-collide_rects
-old_position
-patterns
-position
-rects
-texture, self.rect
-
-class Level ( object ):
-def collide_rect(self, (x,y), (h,w)
-def __del__(self):
-def draw_background(self, surface, coords
-def draw_foreground(self, surface, coords
-def draw_level(self, surface, coords
-def feedZoomedLevel(self, zoom ):
-def __init__(self, levelname
-def load_image(name, colorkey
-def load_keys(file
-def update(self, time):
-background
-border
-foreground
-foreground_zoom_levels_cache
-inThread
-level, self.rect
-level,self.rect
-level_zoom_levels_cache
-map
-moving_blocs
-name
-vector_blocs
-
-class Menu:
-def draw_conf_keyboard(self, controls):
-def draw_cursor(self, color, position):
-def draw_level_selection(self):
-def draw_menu(self, game):
-def draw_player_rect( self, place, player ):
-def draw_player_selection(self):
-def __init__(self, surface):
-def launch_game(self, game):
-def update(self, state, game, controls):
-characters
-cursors
-font
-game_type
-level
-levels
-menu_elements
-players
-R, self.V, self.B
-R,self.V,self.B
-selectors
-small_font
-state
-surface
-
-class Music (object):
-def change_music(self, music, fading
-def __init__(self):
-def test_client():
-def update(self, params
-playing
-playlist
-time_begin
-
-class NetworkError (RuntimeError):
-def server_thread(client_socket, server, num, game_instance):
-
-class Client(object):
-def close(self):
-def __init__(self, sock
-def recieve(self):
-def send(self, key, action
-def update(self):
-level
-lock
-messages
-players
-socket
-
-class Server(object):
-def close(self):
-def del_entity(self, num):
-def __del__(self):
-def fetch(self):
-def __init__(self, game_instance
-def listen_function(self, game_instance):
-def listen(self, clients
-def new_entity(self, num, skin, position):
-def new_player_from_string(self, data):
-def send_updated_informations(self):
-clients
-game_instance
-lock
-messages
-players
-quit
-serversocket
-socket
-votemap
-
-class TimedEvent (object):
-def condition(self):
-def execute(self, dt):
-def initiate(self):
-def __init__( self, period, params
-def update(self, deltatime):
-done
-params
-period
-
-class HealEvent(TimedEvent):
-def condition(self):
-def execute(self, dt):
-params.percents
-
-class DelItemEvent(TimedEvent):
-def condition(self):
-def __del__(self):
-def execute(self, dt):
-
-class BombExplode(TimedEvent):
-def condition(self):
-def execute(self, dt):
-done
-
-class DropRandomItem(TimedEvent):
-def condition(self):
-def execute(self, dt):
-done
-
-class ItemShower(TimedEvent):
-def condition(self):
-def execute(self,dt):
-elapsed
-
-class ThrowBomb(TimedEvent):
-def condition(self):
-def execute(self, deltatime):
-done
-
-class Gost(TimedEvent):
-def condition(self):
-def execute(self, deltatime):
-params.vector
-target_player
-
-class ThrowMiniGost(TimedEvent):
-def condition(self):
-def execute(self, deltatime):
-done
-
-class InvinciblePlayer(TimedEvent):
-def condition(self):
-def __del__(self):
-def execute(self, deltatime):
-def initiate(self):
-def myfilter(self, element):
-done
-params.invincible
-params.visible
-
-class DropPlayer(TimedEvent):
-def condition(self):
-def __del__(self):
-def execute(self, deltatime):
-def initiate(self):
-params.percents
-params.place
-params.present
-params.vector
-params.visible
-params.walking_vector
-
-class PlayerOut(TimedEvent):
-def condition(self):
-def execute(self, deltatime):
-def initiate(self):
-params.present
-xy
-
-class PlayerStaticOnGround(TimedEvent):
-def condition(self):
-def execute(self, deltatime):
-def __del__(self):
diff --git a/doc/init_doc.sh b/doc/init_doc.sh
deleted file mode 100755
index fddf424..0000000
--- a/doc/init_doc.sh
+++ /dev/null
@@ -1,145 +0,0 @@
-#!/usr/bin/env bash
-rm doc/sphinx/*.rst
-for i in $(ls usf/*.py);
-do
-j=$(echo $i | sed s:.*/::)
-echo "
-================================================
-$j
-================================================
-
-.. automodule:: $j
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-"|sed s/.py// > doc/sphinx/core.$j.rst
-done
-
-for i in $(ls usf/widgets/*.py);
-do
-j=$(echo $i | sed s:.*/::)
-echo "
-================================================
-$j
-================================================
-
-.. automodule:: $j
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-"|sed s/.py// > doc/sphinx/widgets.$j.rst
-done
-
-for i in $(ls usf/screen/*.py);
-do
-j=$(echo $i | sed s:.*/::)
-echo "
-================================================
-$j
-================================================
-
-.. automodule:: $j
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-"|sed s/.py// > doc/sphinx/screen.$j.rst
-done
-
-cd doc/sphinx
-
-rm *__init__*
-
-rename s/.py// *.py.rst
-
-echo "
-USF modules
-===========
-
-
-.. toctree::
- :maxdepth: 2
-
-" > tmp
-
-for i in $(ls core.*.rst)
-do
- echo " $i" >> tmp
-done
-
-mv tmp usf.rst
-
-echo "
-widgets
-===========
-
-
-.. toctree::
- :maxdepth: 2
-
-" > tmp
-
-for i in $(ls widgets.*.rst)
-do
- echo " $i" >> tmp
-done
-
-mv tmp widgets.rst
-
-echo "
-screens
-===========
-
-
-.. toctree::
- :maxdepth: 2
-
-" > tmp
-
-for i in $(ls screen.*.rst)
-do
- echo " $i" >> tmp
-done
-
-mv tmp screen.rst
-
-echo "
-.. USF documentation master file, created by
- sphinx-quickstart on Mon Feb 21 11:08:19 2011.
- You can adapt this file completely to your liking, but it should at least
- contain the root \`toctree\` directive.
-
-Welcome to USF's documentation!
-===============================
-
-.. automodule:: usf
- :members:
- :show-inheritance:
-
-Contents:
-
-.. toctree::
- :maxdepth: 2
-
- usf.rst
- widgets.rst
- screen.rst
-
-
-Indices and tables
-==================
-
-* :ref:\`genindex\`
-* :ref:\`modindex\`
-* :ref:\`search\`
-
-" > index.rst
-
diff --git a/doc/network_plan b/doc/network_plan
index ee23c0c..85465d0 100644
--- a/doc/network_plan
+++ b/doc/network_plan
@@ -37,10 +37,10 @@ Game ends
-----------------------------------------------------------
stream format reference:
-'' is the stream message termination character.
+'' is the stream message termination character.
-new game (level): L:levelname
-new entity; N:number,skin,x,y
-entity update: U:number, position, percents, animation_reference, x, y
-entity delete: D:number
-end of game: EOF
+new game (level): L:levelname
+new entity; N:number,skin,x,y
+entity update: U:number, position, percents, animation_reference, x, y
+entity delete: D:number
+end of game: EOF
diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py
deleted file mode 100644
index c8c865e..0000000
--- a/doc/sphinx/conf.py
+++ /dev/null
@@ -1,202 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# USF documentation build configuration file, created by
-# sphinx-quickstart on Mon Feb 21 11:08:19 2011.
-#
-# This file is execfile()d with the current directory set to its containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import sys, os
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.append(os.path.abspath('../../'))
-sys.path.append(os.path.abspath("../../"))
-sys.path.append(os.path.abspath("../../usf/"))
-sys.path.append(os.path.abspath("../../usf/widgets/"))
-sys.path.append(os.path.abspath("../../usf/screen/"))
-
-# -- General configuration -----------------------------------------------------
-
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = [
- 'sphinx.ext.autodoc',
- 'sphinx.ext.doctest',
- 'sphinx.ext.todo',
- 'sphinx.ext.coverage']
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The suffix of source filenames.
-source_suffix = '.rst'
-
-# The encoding of source files.
-#source_encoding = 'utf-8'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = u'USF'
-copyright = u'2011, tshirtman, xapantu'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = '0.1'
-# The full version, including alpha/beta/rc tags.
-release = '0.1'
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of documents that shouldn't be included in the build.
-#unused_docs = []
-
-# List of directories, relative to source directory, that shouldn't be searched
-# for source files.
-exclude_trees = []
-
-# The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
-
-
-# -- Options for HTML output ---------------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. Major themes that come with
-# Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = 'default'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further. For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
-
-# The name for this set of Sphinx documents. If None, it defaults to
-# "<project> v<release> documentation".
-#html_title = None
-
-# A shorter title for the navigation bar. Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_use_modindex = True
-
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it. The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = ''
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'USFdoc'
-
-
-# -- Options for LaTeX output --------------------------------------------------
-
-# The paper size ('letter' or 'a4').
-#latex_paper_size = 'letter'
-
-# The font size ('10pt', '11pt' or '12pt').
-#latex_font_size = '10pt'
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, documentclass [howto/manual]).
-latex_documents = [
- ('index', 'USF.tex', u'USF Documentation',
- u'tshirtman, xapantu', 'manual'),
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# Additional stuff for the LaTeX preamble.
-#latex_preamble = ''
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-#latex_use_modindex = True
diff --git a/doc/sphinx/core.__init__.rst b/doc/sphinx/core.__init__.rst
deleted file mode 100644
index 6630059..0000000
--- a/doc/sphinx/core.__init__.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-__init__
-================================================
-
-.. automodule:: __init__
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.ai.rst b/doc/sphinx/core.ai.rst
deleted file mode 100644
index 4bf912d..0000000
--- a/doc/sphinx/core.ai.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-ai
-================================================
-
-.. automodule:: ai
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.animations.rst b/doc/sphinx/core.animations.rst
deleted file mode 100644
index 186a137..0000000
--- a/doc/sphinx/core.animations.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-animations
-================================================
-
-.. automodule:: animations
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.config.rst b/doc/sphinx/core.config.rst
deleted file mode 100644
index 93d675b..0000000
--- a/doc/sphinx/core.config.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-config
-================================================
-
-.. automodule:: config
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.controls.rst b/doc/sphinx/core.controls.rst
deleted file mode 100644
index ef046e9..0000000
--- a/doc/sphinx/core.controls.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-controls
-================================================
-
-.. automodule:: controls
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.debug_utils.rst b/doc/sphinx/core.debug_utils.rst
deleted file mode 100644
index 61fdd22..0000000
--- a/doc/sphinx/core.debug_utils.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-debug_utils
-================================================
-
-.. automodule:: debug_utils
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.entity.rst b/doc/sphinx/core.entity.rst
deleted file mode 100644
index 51e18f3..0000000
--- a/doc/sphinx/core.entity.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-entity
-================================================
-
-.. automodule:: entity
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.entity_skin.rst b/doc/sphinx/core.entity_skin.rst
deleted file mode 100644
index a75efb1..0000000
--- a/doc/sphinx/core.entity_skin.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-entity_skin
-================================================
-
-.. automodule:: entity_skin
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.event_manager.rst b/doc/sphinx/core.event_manager.rst
deleted file mode 100644
index 83c47d1..0000000
--- a/doc/sphinx/core.event_manager.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-event_manager
-================================================
-
-.. automodule:: event_manager
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.font.rst b/doc/sphinx/core.font.rst
deleted file mode 100644
index 86026b7..0000000
--- a/doc/sphinx/core.font.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-font
-================================================
-
-.. automodule:: font
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.game.rst b/doc/sphinx/core.game.rst
deleted file mode 100644
index 8827b2b..0000000
--- a/doc/sphinx/core.game.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-game
-================================================
-
-.. automodule:: game
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.gui.rst b/doc/sphinx/core.gui.rst
deleted file mode 100644
index 3b281ee..0000000
--- a/doc/sphinx/core.gui.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-gui
-================================================
-
-.. automodule:: gui
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.level.rst b/doc/sphinx/core.level.rst
deleted file mode 100644
index 4162f81..0000000
--- a/doc/sphinx/core.level.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-level
-================================================
-
-.. automodule:: level
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.loaders.rst b/doc/sphinx/core.loaders.rst
deleted file mode 100644
index ad8a4df..0000000
--- a/doc/sphinx/core.loaders.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-loaders
-================================================
-
-.. automodule:: loaders
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.main.rst b/doc/sphinx/core.main.rst
deleted file mode 100644
index 683b83d..0000000
--- a/doc/sphinx/core.main.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-main
-================================================
-
-.. automodule:: main
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.memoize.rst b/doc/sphinx/core.memoize.rst
deleted file mode 100644
index bd3d43a..0000000
--- a/doc/sphinx/core.memoize.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-memoize
-================================================
-
-.. automodule:: memoize
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.music.rst b/doc/sphinx/core.music.rst
deleted file mode 100644
index 1e16fba..0000000
--- a/doc/sphinx/core.music.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-music
-================================================
-
-.. automodule:: music
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.particles.rst b/doc/sphinx/core.particles.rst
deleted file mode 100644
index cc9da8b..0000000
--- a/doc/sphinx/core.particles.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-particles
-================================================
-
-.. automodule:: particles
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.skin.rst b/doc/sphinx/core.skin.rst
deleted file mode 100644
index a3ef118..0000000
--- a/doc/sphinx/core.skin.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-skin
-================================================
-
-.. automodule:: skin
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.timed_event.rst b/doc/sphinx/core.timed_event.rst
deleted file mode 100644
index 3c0de51..0000000
--- a/doc/sphinx/core.timed_event.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-timed_event
-================================================
-
-.. automodule:: timed_event
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/core.translation.rst b/doc/sphinx/core.translation.rst
deleted file mode 100644
index 6b769d7..0000000
--- a/doc/sphinx/core.translation.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-translation
-================================================
-
-.. automodule:: translation
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/index.rst b/doc/sphinx/index.rst
deleted file mode 100644
index b690895..0000000
--- a/doc/sphinx/index.rst
+++ /dev/null
@@ -1,31 +0,0 @@
-
-.. USF documentation master file, created by
- sphinx-quickstart on Mon Feb 21 11:08:19 2011.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
-Welcome to USF's documentation!
-===============================
-
-.. automodule:: usf
- :members:
- :show-inheritance:
-
-Contents:
-
-.. toctree::
- :maxdepth: 2
-
- usf.rst
- widgets.rst
- screen.rst
-
-
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
-
-
diff --git a/doc/sphinx/make_doc.sh b/doc/sphinx/make_doc.sh
deleted file mode 100755
index 9ef0325..0000000
--- a/doc/sphinx/make_doc.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-#this script must be launched from the root directory of usf
-
-sphinx-build -b html ./doc/sphinx ./doc/sphinx/doc
diff --git a/doc/sphinx/screen.__init__.rst b/doc/sphinx/screen.__init__.rst
deleted file mode 100644
index 6630059..0000000
--- a/doc/sphinx/screen.__init__.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-__init__
-================================================
-
-.. automodule:: __init__
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/screen.about.rst b/doc/sphinx/screen.about.rst
deleted file mode 100644
index 3c5df7c..0000000
--- a/doc/sphinx/screen.about.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-about
-================================================
-
-.. automodule:: about
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/screen.characters.rst b/doc/sphinx/screen.characters.rst
deleted file mode 100644
index ec26064..0000000
--- a/doc/sphinx/screen.characters.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-characters
-================================================
-
-.. automodule:: characters
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/screen.configure.rst b/doc/sphinx/screen.configure.rst
deleted file mode 100644
index 817b483..0000000
--- a/doc/sphinx/screen.configure.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-configure
-================================================
-
-.. automodule:: configure
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/screen.keyboard.rst b/doc/sphinx/screen.keyboard.rst
deleted file mode 100644
index fe330b1..0000000
--- a/doc/sphinx/screen.keyboard.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-keyboard
-================================================
-
-.. automodule:: keyboard
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/screen.level.rst b/doc/sphinx/screen.level.rst
deleted file mode 100644
index 4162f81..0000000
--- a/doc/sphinx/screen.level.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-level
-================================================
-
-.. automodule:: level
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/screen.main_screen.rst b/doc/sphinx/screen.main_screen.rst
deleted file mode 100644
index 5241c87..0000000
--- a/doc/sphinx/screen.main_screen.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-main_screen
-================================================
-
-.. automodule:: main_screen
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/screen.network_game_conf_screen.rst b/doc/sphinx/screen.network_game_conf_screen.rst
deleted file mode 100644
index f1f94a8..0000000
--- a/doc/sphinx/screen.network_game_conf_screen.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-network_game_conf_screen
-================================================
-
-.. automodule:: network_game_conf_screen
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/screen.network_join_screen.rst b/doc/sphinx/screen.network_join_screen.rst
deleted file mode 100644
index 17cd729..0000000
--- a/doc/sphinx/screen.network_join_screen.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-network_join_screen
-================================================
-
-.. automodule:: network_join_screen
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/screen.network_screen.rst b/doc/sphinx/screen.network_screen.rst
deleted file mode 100644
index 990df39..0000000
--- a/doc/sphinx/screen.network_screen.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-network_screen
-================================================
-
-.. automodule:: network_screen
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/screen.resume.rst b/doc/sphinx/screen.resume.rst
deleted file mode 100644
index 5417e8e..0000000
--- a/doc/sphinx/screen.resume.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-resume
-================================================
-
-.. automodule:: resume
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/screen.rst b/doc/sphinx/screen.rst
deleted file mode 100644
index 6a9ecbc..0000000
--- a/doc/sphinx/screen.rst
+++ /dev/null
@@ -1,23 +0,0 @@
-
-screens
-===========
-
-
-.. toctree::
- :maxdepth: 2
-
-
- screen.about.rst
- screen.characters.rst
- screen.configure.rst
- screen.__init__.rst
- screen.keyboard.rst
- screen.level.rst
- screen.main_screen.rst
- screen.network_game_conf_screen.rst
- screen.network_join_screen.rst
- screen.network_screen.rst
- screen.resume.rst
- screen.screen.rst
- screen.screen_screen.rst
- screen.sound.rst
diff --git a/doc/sphinx/screen.screen.rst b/doc/sphinx/screen.screen.rst
deleted file mode 100644
index b6bba4e..0000000
--- a/doc/sphinx/screen.screen.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-screen
-================================================
-
-.. automodule:: screen
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/screen.screen_screen.rst b/doc/sphinx/screen.screen_screen.rst
deleted file mode 100644
index daf99be..0000000
--- a/doc/sphinx/screen.screen_screen.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-screen_screen
-================================================
-
-.. automodule:: screen_screen
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/screen.sound.rst b/doc/sphinx/screen.sound.rst
deleted file mode 100644
index c19149c..0000000
--- a/doc/sphinx/screen.sound.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-sound
-================================================
-
-.. automodule:: sound
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/usf.rst b/doc/sphinx/usf.rst
deleted file mode 100644
index f0b7561..0000000
--- a/doc/sphinx/usf.rst
+++ /dev/null
@@ -1,30 +0,0 @@
-
-USF modules
-===========
-
-
-.. toctree::
- :maxdepth: 2
-
-
- core.ai.rst
- core.animations.rst
- core.config.rst
- core.controls.rst
- core.debug_utils.rst
- core.entity.rst
- core.entity_skin.rst
- core.event_manager.rst
- core.font.rst
- core.game.rst
- core.gui.rst
- core.__init__.rst
- core.level.rst
- core.loaders.rst
- core.main.rst
- core.memoize.rst
- core.music.rst
- core.particles.rst
- core.skin.rst
- core.timed_event.rst
- core.translation.rst
diff --git a/doc/sphinx/widgets.__init__.rst b/doc/sphinx/widgets.__init__.rst
deleted file mode 100644
index 6630059..0000000
--- a/doc/sphinx/widgets.__init__.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-__init__
-================================================
-
-.. automodule:: __init__
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/widgets.box.rst b/doc/sphinx/widgets.box.rst
deleted file mode 100644
index 3c98298..0000000
--- a/doc/sphinx/widgets.box.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-box
-================================================
-
-.. automodule:: box
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/widgets.button.rst b/doc/sphinx/widgets.button.rst
deleted file mode 100644
index 9c5e198..0000000
--- a/doc/sphinx/widgets.button.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-button
-================================================
-
-.. automodule:: button
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/widgets.checkbox.rst b/doc/sphinx/widgets.checkbox.rst
deleted file mode 100644
index 1e91361..0000000
--- a/doc/sphinx/widgets.checkbox.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-checkbox
-================================================
-
-.. automodule:: checkbox
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/widgets.checkbox_text.rst b/doc/sphinx/widgets.checkbox_text.rst
deleted file mode 100644
index 3ca5304..0000000
--- a/doc/sphinx/widgets.checkbox_text.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-checkbox_text
-================================================
-
-.. automodule:: checkbox_text
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/widgets.coverflow.rst b/doc/sphinx/widgets.coverflow.rst
deleted file mode 100644
index 04db67e..0000000
--- a/doc/sphinx/widgets.coverflow.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-coverflow
-================================================
-
-.. automodule:: coverflow
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/widgets.image.rst b/doc/sphinx/widgets.image.rst
deleted file mode 100644
index c60120d..0000000
--- a/doc/sphinx/widgets.image.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-image
-================================================
-
-.. automodule:: image
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/widgets.imagebutton.rst b/doc/sphinx/widgets.imagebutton.rst
deleted file mode 100644
index 7ae6f67..0000000
--- a/doc/sphinx/widgets.imagebutton.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-imagebutton
-================================================
-
-.. automodule:: imagebutton
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/widgets.label.rst b/doc/sphinx/widgets.label.rst
deleted file mode 100644
index 0661e20..0000000
--- a/doc/sphinx/widgets.label.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-label
-================================================
-
-.. automodule:: label
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/widgets.paragraph.rst b/doc/sphinx/widgets.paragraph.rst
deleted file mode 100644
index 420b424..0000000
--- a/doc/sphinx/widgets.paragraph.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-paragraph
-================================================
-
-.. automodule:: paragraph
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/widgets.rst b/doc/sphinx/widgets.rst
deleted file mode 100644
index e33c7d1..0000000
--- a/doc/sphinx/widgets.rst
+++ /dev/null
@@ -1,25 +0,0 @@
-
-widgets
-===========
-
-
-.. toctree::
- :maxdepth: 2
-
-
- widgets.box.rst
- widgets.button.rst
- widgets.checkbox.rst
- widgets.checkbox_text.rst
- widgets.coverflow.rst
- widgets.imagebutton.rst
- widgets.image.rst
- widgets.__init__.rst
- widgets.label.rst
- widgets.paragraph.rst
- widgets.slider.rst
- widgets.special.rst
- widgets.spinner.rst
- widgets.tab.rst
- widgets.text_entry.rst
- widgets.widget.rst
diff --git a/doc/sphinx/widgets.slider.rst b/doc/sphinx/widgets.slider.rst
deleted file mode 100644
index 3f5a90e..0000000
--- a/doc/sphinx/widgets.slider.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-slider
-================================================
-
-.. automodule:: slider
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/widgets.special.rst b/doc/sphinx/widgets.special.rst
deleted file mode 100644
index f4e2506..0000000
--- a/doc/sphinx/widgets.special.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-special
-================================================
-
-.. automodule:: special
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/widgets.spinner.rst b/doc/sphinx/widgets.spinner.rst
deleted file mode 100644
index 88d67f6..0000000
--- a/doc/sphinx/widgets.spinner.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-spinner
-================================================
-
-.. automodule:: spinner
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/widgets.tab.rst b/doc/sphinx/widgets.tab.rst
deleted file mode 100644
index 284cd1e..0000000
--- a/doc/sphinx/widgets.tab.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-tab
-================================================
-
-.. automodule:: tab
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/widgets.text_entry.rst b/doc/sphinx/widgets.text_entry.rst
deleted file mode 100644
index 89a2065..0000000
--- a/doc/sphinx/widgets.text_entry.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-text_entry
-================================================
-
-.. automodule:: text_entry
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/doc/sphinx/widgets.widget.rst b/doc/sphinx/widgets.widget.rst
deleted file mode 100644
index 656c254..0000000
--- a/doc/sphinx/widgets.widget.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-
-================================================
-widget
-================================================
-
-.. automodule:: widget
- :members:
- :show-inheritance:
-
-
-.. toctree::
-
-
diff --git a/usf/config.py b/usf/config.py
index f961095..68144c9 100755
--- a/usf/config.py
+++ b/usf/config.py
@@ -20,7 +20,7 @@
""" Provides a class used for reading and writing various configurable options
- throughout the game
+ throughout the game.
This class produces an INI formated config file as opposed to an XML
formatted one. The reason that python's built-in ConfigurationParser isn't
@@ -31,10 +31,10 @@
A default config file may be generated by envoking this module from the
- command line:
+ command line::
python -m config.py [-f filename]
- where filename is an optional name for the config file (system.cfg by default)
+ filename is an optional name for the config file (system.cfg by default)
"""
from __future__ import with_statement
@@ -130,12 +130,16 @@ class Section(object):
""" An object that represents a section in a config file.
Options can be added to a section by simply assigning a value to an
- attribute: section.foo = baz
- would produce:
+ attribute::
+
+ section.foo = baz
+
+ would produce::
+
[section]
foo = baz
- in the config file. Options that do not exist on assignment
- are created dynamcially.
+
+ Options that do not exist on assignment are created dynamcially.
Values are automatically converted to the appropriate python type.
Options that begin and end with brackets([, ]) are converted to lists,
@@ -143,16 +147,20 @@ class Section(object):
Section also recognizes booleans regardless of case, in addition to the
literals 'yes' and 'no' of any case. Except in the case of
double-quoted strings, extra white-space is trimmed, so you need not
- worry. For example:
+ worry. For example::
+
foo = bar
- is equivalent to :
- foo = baz
+
+ Equivalent to::
+
+ foo = baz
"""
def __init__(self, name):
""" Initialize a new section.
@param name: name of the section. In the INI file, sections are surrounded
by brackets ([name])
+
@type name: string
"""
self.name = name
@@ -161,7 +169,9 @@ class Section(object):
""" Assign a value to an option, converting types when appropriate.
@param option: name of the option to assign a value to.
+
@type option: string @param value: value to be assigned to the option.
+
@type value: int, float, string, boolean, or list
"""
value = str(value)
@@ -411,10 +421,11 @@ class Config(object):
def write(self, filename=None):
""" Writes a config file based on the config object's
- sections and options
+ sections and options.
@param filename: Name of file to save to. By default, this is
the user config file.
+
@type path: string
"""
if filename is None:
diff --git a/usf/entity.py b/usf/entity.py
index 6b44fbe..d55dd34 100644
--- a/usf/entity.py
+++ b/usf/entity.py
@@ -728,13 +728,18 @@ class Entity(Actor):
int(Entity.list_sin_cos_1[n][1] * h[3] / 2 + r[1]))
def update_points(self, x = 0, y = 0):
- """
- creation of points, there are 8 points placed like this:
- 7. .0 counted clockwise and starting from the upper right one
- 6. .1 (in fact it's the opposite but the screen is (0, 0) at the
- 5. .2 top left, what actualy means right or left is not important
- 4. .3 as long as you stay consistent, I hope I do :P).
-
+ """ Points are created as follows::
+
+ +-------------------+
+ | 7 0 |
+ | 6 1 |
+ | |
+ | 5 2 |
+ | 4 3 |
+ +-------------------+
+
+ As can be seen, they are oriented clock-wise, beginning in the
+ upper-right corner and ending in the upper-left.
"""
h = self.hardshape
@@ -824,10 +829,8 @@ class Entity(Actor):
# this test should optimise most situations.
elif game.level.collide_rect(self.rect[:2], self.rect[2:]) != -1:
- self._on_ground = False
if self.collide_top(game):
- self._on_ground = True
self._vector[1] = -math.fabs(
self.vector[1] * CONFIG.general.BOUNCE)
@@ -866,9 +869,9 @@ class Entity(Actor):
self.walking_vector[1] * deltatime))
self.foot_rect = self._foot_collision_rect()
- #self._on_ground = game.level.collide_rect(
- #self.foot_rect[:2],
- #self.foot_rect[2:])
+ self._on_ground = game.level.collide_rect(
+ self.foot_rect[:2],
+ self.foot_rect[2:])
# follow the floor if it's moving
floor_vector = self._update_floor_vector(game.level.moving_blocs)
diff --git a/usf/event_manager.py b/usf/event_manager.py
index 23d0890..23d3813 100644
--- a/usf/event_manager.py
+++ b/usf/event_manager.py
@@ -58,13 +58,13 @@ class EventManager(object):
e.update(deltatime, gametime)
if e.done:
- e.del_()
+ e.del_()
self.events = filter(lambda x: not x.done, self.events)
def add_event(self, name, *args, **kwargs):
- """ add an event of the requested type to the manager, *args and
- **kwargs are passed to the event creation
+ """ add an event of the requested type to the manager, args and
+ kwargs are passed to the event creation
"""
self.events.append(EVENT_NAMES[name](self, *args, **kwargs))
diff --git a/usf/memoize.py b/usf/memoize.py
index 3ed9d0b..ebd59c9 100644
--- a/usf/memoize.py
+++ b/usf/memoize.py
@@ -21,11 +21,11 @@
This module provide simple implementation of the memoize pattern, implemented
as a decorator.
-usage:
+usage::
-@memoize
-def my_determinist_pure_function(*args, **kwargs):
- do stuff
+ @memoize
+ def my_determinist_pure_function(*args, **kwargs):
+ do stuff
my_determinist_pure_function(some_params) # first call with those params, slow
...
diff --git a/usf/tests/__init__.py b/usf/tests/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/usf/tests/skin.py b/usf/tests/skin.py
deleted file mode 100644
index d436632..0000000
--- a/usf/tests/skin.py
+++ /dev/null
@@ -1,71 +0,0 @@
-################################################################################
-# Copyright 2011 Lucas Baudin <[email protected]> #
-# #
-# This file is part of Ultimate Smash Friends #
-# #
-# Ultimate Smash Friends is free software: you can redistribute it and/or #
-# modify it under the terms of the GNU General Public License as published by #
-# the Free Software Foundation, either version 3 of the License, or (at your #
-# option) any later version. #
-# #
-# Ultimate Smash Friends is distributed in the hope that it will be useful, but#
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or#
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
-# more details. #
-# #
-# You should have received a copy of the GNU General Public License along with #
-# Ultimate Smash Friends. If not, see <http://www.gnu.org/licenses/>. #
-################################################################################
-
-# Launch this files using 'python -m usf.tests.skin' from the root folder of usf
-
-# This file contains a testsuite for skin.Layer
-# TODO: skin.Skin is not tested
-
-from usf import skin
-
-
-import unittest
-from xml.etree.ElementTree import ElementTree
-import pygame
-
-
-class TestLayer(unittest.TestCase):
-
- def setUp(self):
- pass
-
- def test(self):
- # We need to init pygame and to create a display to load the images
- pygame.init()
- self.screen = pygame.display.set_mode((100, 100))
-
- # Read the xml file of blobplanet level
- attrib = ElementTree()
- attrib.parse(CONFIG.paths['system'] +
- "levels/blobplanet/level.xml")
-
- # Let's use the first layer node, we know it values
- layer = skin.Layer(attrib.findall("layer")[0])
-
- # Update the timing of the layer
- layer.get_image(0)
-
- # At 0.0, our layer should be at 0 on the x axis
- self.assertEqual(layer.get_pos(0)[0], 0)
- # At 0.0, our layer should be at -70 on the y axis
- self.assertEqual(layer.get_pos(0)[1], -70)
-
- # At 1.0, our layer should be at 15 on the x axis
- self.assertEqual(layer.get_pos(1)[0], 15)
- # At 1.0, our layer should be at 265 on the x axis
- self.assertEqual(layer.get_pos(1)[1], 265)
-
- # At 2.0, our layer should be at 30 on the x axis
- self.assertEqual(layer.get_pos(2)[0], 30)
- # At 2.0, our layer should be at 600 on the x axis
- self.assertEqual(layer.get_pos(2)[1], 600)
-
-
-if __name__ == '__main__':
- unittest.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment