File: PuyoStory.cpp

package info (click to toggle)
flobopuyo 0.20-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,052 kB
  • sloc: cpp: 6,209; ansic: 3,743; yacc: 179; makefile: 176; lex: 42
file content (39 lines) | stat: -rw-r--r-- 714 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "PuyoStory.h"
#include "PuyoCommander.h"

#ifndef DATADIR
extern char *DATADIR;
#endif

PuyoStory *theStory;

int NB_STORIES = 6;

extern void launch_scenar(const char *f);
extern void draw_scenar();

PuyoStory::PuyoStory(PuyoCommander *com, int num) : num(num), commander(com)
{}

PuyoStory::~PuyoStory()
{}

void PuyoStory::loop()
{
    theStory = this;
    if (num==0) {
        char temp[1024];
        sprintf(temp, "%s/story/intro.txt", DATADIR);
        launch_scenar(temp);
    }
    else {
      char stories[1024];
      sprintf(stories, "%s/story%d.txt", DATADIR, num);
      launch_scenar(stories);
    }
}

void PuyoStory::draw()
{
    draw_scenar();
}