Browse files

Arrow files are read from the levels file.

  • Loading branch information...
1 parent 84e5ca5 commit 3f2f996a56140b2044b4426c9647f4df2d4e08ed @LindseyB LindseyB committed Oct 24, 2010
Showing with 21 additions and 9 deletions.
  1. +1 −1 AAR.d
  2. +2 −2 arrowSection.d
  3. +4 −2 level.d
  4. +4 −3 levelScreen.d
  5. +5 −0 levels.txt
  6. +5 −1 selectScreen.d
View
2 AAR.d
@@ -54,7 +54,7 @@ void main(){
sc.stop();
currentLevel = selectS._levels[selectS._selectedLevel];
- levelS = new LevelScreen(currentLevel._name);
+ levelS = new LevelScreen(currentLevel);
Shitz shitzShitty = new Shitz(levelS, win);
Thread inputThread = new Thread(&shitzShitty.callMyShit);
View
4 arrowSection.d
@@ -20,8 +20,8 @@ class ArrowSection {
TextFileInput chartFile;
- this() {
- chartFile = new TextFileInput("arrow_charts/" ~ "anamanaguchi_flora_fauna" ~ ".txt");
+ this(char[] arrowFile) {
+ chartFile = new TextFileInput("arrow_charts/" ~ arrowFile);
auto bpm = chartFile.next;
View
6 level.d
@@ -3,12 +3,14 @@ module level;
class Level {
char[] _audio;
char[] _name;
+ char[] _arrowChart;
int _difficulty;
- this(char[] audio, char[] name, int difficulty) {
+ this(char[] audio, char[] name, int difficulty, char[] arrowChart) {
_audio = audio;
_name = name;
- _difficulty = difficulty;
+ _difficulty = difficulty;
+ _arrowChart = arrowChart;
}
char[] getAudio() {
View
7 levelScreen.d
@@ -4,6 +4,7 @@ import tango.stdc.stringz;
import ncurses;
import tango.io.Stdout;
+import level;
import dataScore;
import arrowSection;
import dancingMan;
@@ -19,9 +20,9 @@ class LevelScreen {
bool _playing;
- this(char[] title) {
- _score = new DataScore(title);
- _arrowSect = new ArrowSection();
+ this(Level currentLevel) {
+ _score = new DataScore(currentLevel._name);
+ _arrowSect = new ArrowSection(currentLevel._arrowChart);
_dancingMan = new DancingMan();
_playing = true;
_spotlight = new AsciiSprite("graphics/spotlight.txt", null, false, 10, 18);
View
5 levels.txt
@@ -1,15 +1,20 @@
Anamanaguchi_-_02_-_Helix_Nebula.mp3
Helix Nebula by Anamanaguchi
5
+anamanaguchi_flora_fauna.txt
Anamanaguchi_-_03_-_Airbase.mp3
Airbase by Anamanaguchi
5
+anamanaguchi_flora_fauna.txt
Anamanaguchi_-_04_-_Video_Challenge.mp3
Video Challenge by Anamanaguchi
5
+anamanaguchi_flora_fauna.txt
Anamanaguchi_-_06_-_FloraFauna.mp3
FloraFauna
5
+anamanaguchi_flora_fauna.txt
Anamanaguchi_-_07_-_Power_Supply.mp3
Power Supply
5
+anamanaguchi_flora_fauna.txt
View
6 selectScreen.d
@@ -22,6 +22,7 @@ class SelectScreen {
char[] audio;
char[] name;
+ char[] arrowChart;
int difficulty = -1;
int i = 0;
@@ -34,8 +35,11 @@ class SelectScreen {
i++;
} else if(i == 2) {
difficulty = to!(int)(line);
+ i++;
+ } else if(i == 3) {
+ arrowChart = line;
i = 0;
- Level l = new Level(audio, name, difficulty);
+ Level l = new Level(audio, name, difficulty, arrowChart);
_levels ~= l;
} else {
// boo!

0 comments on commit 3f2f996

Please sign in to comment.