From f3600c28cd6e96abe7c0916860b0cc56b444545f Mon Sep 17 00:00:00 2001 From: Simon Cross Date: Sun, 4 Sep 2016 14:55:08 +0200 Subject: [PATCH] Add draft of package layout. --- tabakrolletjie/data.py | 27 --------------------------- tabakrolletjie/engine.py | 0 tabakrolletjie/gamestate.py | 0 tabakrolletjie/lights.py | 0 tabakrolletjie/obstacles.py | 0 tabakrolletjie/scenes/__init__.py | 0 tabakrolletjie/scenes/day.py | 0 tabakrolletjie/scenes/menu.py | 0 tabakrolletjie/scenes/night.py | 0 tabakrolletjie/stations.py | 0 10 files changed, 27 deletions(-) delete mode 100644 tabakrolletjie/data.py create mode 100644 tabakrolletjie/engine.py create mode 100644 tabakrolletjie/gamestate.py create mode 100644 tabakrolletjie/lights.py create mode 100644 tabakrolletjie/obstacles.py create mode 100644 tabakrolletjie/scenes/__init__.py create mode 100644 tabakrolletjie/scenes/day.py create mode 100644 tabakrolletjie/scenes/menu.py create mode 100644 tabakrolletjie/scenes/night.py create mode 100644 tabakrolletjie/stations.py diff --git a/tabakrolletjie/data.py b/tabakrolletjie/data.py deleted file mode 100644 index 66b66bb..0000000 --- a/tabakrolletjie/data.py +++ /dev/null @@ -1,27 +0,0 @@ -'''Simple data loader module. - -Loads data files from the "data" directory shipped with a game. - -Enhancing this to handle caching etc. is left as an exercise for the reader. - -Note that pyglet users should probably just add the data directory to the -pyglet.resource search path. -''' - -import os - -data_py = os.path.abspath(os.path.dirname(__file__)) -data_dir = os.path.normpath(os.path.join(data_py, '..', 'data')) - -def filepath(filename): - '''Determine the path to a file in the data directory. - ''' - return os.path.join(data_dir, filename) - -def load(filename, mode='rb'): - '''Open a file in the data directory. - - "mode" is passed as the second arg to open(). - ''' - return open(os.path.join(data_dir, filename), mode) - diff --git a/tabakrolletjie/engine.py b/tabakrolletjie/engine.py new file mode 100644 index 0000000..e69de29 diff --git a/tabakrolletjie/gamestate.py b/tabakrolletjie/gamestate.py new file mode 100644 index 0000000..e69de29 diff --git a/tabakrolletjie/lights.py b/tabakrolletjie/lights.py new file mode 100644 index 0000000..e69de29 diff --git a/tabakrolletjie/obstacles.py b/tabakrolletjie/obstacles.py new file mode 100644 index 0000000..e69de29 diff --git a/tabakrolletjie/scenes/__init__.py b/tabakrolletjie/scenes/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tabakrolletjie/scenes/day.py b/tabakrolletjie/scenes/day.py new file mode 100644 index 0000000..e69de29 diff --git a/tabakrolletjie/scenes/menu.py b/tabakrolletjie/scenes/menu.py new file mode 100644 index 0000000..e69de29 diff --git a/tabakrolletjie/scenes/night.py b/tabakrolletjie/scenes/night.py new file mode 100644 index 0000000..e69de29 diff --git a/tabakrolletjie/stations.py b/tabakrolletjie/stations.py new file mode 100644 index 0000000..e69de29 -- 2.34.1