Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 236445 | Differences between
and this patch

Collapse All | Expand All

(-)dave-org/analog_effects.cpp (-5 / +5 lines)
Lines 881-887 Link Here
881
MotionBlur::MotionBlur() : chroma(1.0f), amount(0.3f), prog(NULL), blurred_fbo(NULL), blurred_texture(NULL)
881
MotionBlur::MotionBlur() : chroma(1.0f), amount(0.3f), prog(NULL), blurred_fbo(NULL), blurred_texture(NULL)
882
{
882
{
883
  if (game->get_ext()->shaders && game->get_ext()->fbo) {
883
  if (game->get_ext()->shaders && game->get_ext()->fbo) {
884
    prog = new GLProgram("graphics/motion_blur_vert.glsl", "graphics/motion_blur_frag.glsl");
884
    prog = new GLProgram("/usr/share/games/dave/graphics/motion_blur_vert.glsl", "/usr/share/games/dave/graphics/motion_blur_frag.glsl");
885
    prog->use();
885
    prog->use();
886
    prog->set_int("current", 0);
886
    prog->set_int("current", 0);
887
    prog->set_int("blurred", 1);
887
    prog->set_int("blurred", 1);
Lines 938-944 Link Here
938
{
938
{
939
  if (!game->get_ext()->shaders || !game->get_ext()->fbo)
939
  if (!game->get_ext()->shaders || !game->get_ext()->fbo)
940
    return;
940
    return;
941
  prog = new GLProgram("graphics/gaussian_blur_vert.glsl", "graphics/gaussian_blur_frag.glsl");
941
  prog = new GLProgram("/usr/share/games/dave/graphics/gaussian_blur_vert.glsl", "/usr/share/games/dave/graphics/gaussian_blur_frag.glsl");
942
  prog->use();
942
  prog->use();
943
  prog->set_int("image", 0);
943
  prog->set_int("image", 0);
944
  prog->unuse();
944
  prog->unuse();
Lines 982-988 Link Here
982
TV::TV() : zoom(0.0f), started_zooming_at(-1000.0f), zooming_in(false)
982
TV::TV() : zoom(0.0f), started_zooming_at(-1000.0f), zooming_in(false)
983
{
983
{
984
  room = new Scene();
984
  room = new Scene();
985
  tv = new Model("graphics/telq.3ds");
985
  tv = new Model("/usr/share/games/dave/graphics/telq.3ds");
986
  tv->set_texture(          lib["toelloe.png"            ]);
986
  tv->set_texture(          lib["toelloe.png"            ]);
987
  tv->set_self_illumination(&proxy);
987
  tv->set_self_illumination(&proxy);
988
  tv->set_environment(      lib["tv_environment.png"     ]);
988
  tv->set_environment(      lib["tv_environment.png"     ]);
Lines 1060-1066 Link Here
1060
PalNoise::PalNoise()
1060
PalNoise::PalNoise()
1061
{
1061
{
1062
  noise = lib["pal_noise.png"];
1062
  noise = lib["pal_noise.png"];
1063
  prog = new GLProgram("graphics/noise_vert.glsl", "graphics/noise_frag.glsl");
1063
  prog = new GLProgram("/usr/share/games/dave/graphics/noise_vert.glsl", "/usr/share/games/dave/graphics/noise_frag.glsl");
1064
}
1064
}
1065
1065
1066
PalNoise::~PalNoise()
1066
PalNoise::~PalNoise()
Lines 1123-1129 Link Here
1123
  set_bend(0.0f);
1123
  set_bend(0.0f);
1124
  offset = 0.0f;
1124
  offset = 0.0f;
1125
  if (game->get_ext()->shaders)
1125
  if (game->get_ext()->shaders)
1126
    prog = new GLProgram("graphics/tape_vert.glsl", "graphics/tape_frag.glsl");
1126
    prog = new GLProgram("/usr/share/games/dave/graphics/tape_vert.glsl", "/usr/share/games/dave/graphics/tape_frag.glsl");
1127
}
1127
}
1128
1128
1129
TapeDistortion::~TapeDistortion()
1129
TapeDistortion::~TapeDistortion()
(-)dave-org/editor.cpp (-1 / +1 lines)
Lines 101-107 Link Here
101
101
102
  for (int pass=0; pass<2; pass++) {
102
  for (int pass=0; pass<2; pass++) {
103
    struct dirent *dir;
103
    struct dirent *dir;
104
    DIR *d = opendir("graphics");
104
    DIR *d = opendir("/usr/share/games/dave/graphics");
105
    if (d) {
105
    if (d) {
106
      while ((dir = readdir(d)) != NULL) {
106
      while ((dir = readdir(d)) != NULL) {
107
        string name = dir->d_name;
107
        string name = dir->d_name;
(-)dave-org/game.cpp (-16 / +16 lines)
Lines 260-266 Link Here
260
  dave_kuopio->add_ability(new Ability(Ability::LASER_PULSE));
260
  dave_kuopio->add_ability(new Ability(Ability::LASER_PULSE));
261
  dave_kuopio->set_flags(Level::Block::MONOCHROME, true);
261
  dave_kuopio->set_flags(Level::Block::MONOCHROME, true);
262
  if (ext.shaders)
262
  if (ext.shaders)
263
    kuopio_prog = new GLProgram("graphics/kuopio_vert.glsl", "graphics/kuopio_frag.glsl");
263
    kuopio_prog = new GLProgram("/usr/share/games/dave/graphics/kuopio_vert.glsl", "/usr/share/games/dave/graphics/kuopio_frag.glsl");
264
  cerr<<"dave lisätty\n";
264
  cerr<<"dave lisätty\n";
265
  current_level->reset();
265
  current_level->reset();
266
  cerr<<"vihulaiset lisätty\n";
266
  cerr<<"vihulaiset lisätty\n";
Lines 291-300 Link Here
291
291
292
  remote = new Remote();
292
  remote = new Remote();
293
293
294
  img_rewind = new Image("graphics/rewind.png", true);
294
  img_rewind = new Image("/usr/share/games/dave/graphics/rewind.png", true);
295
  img_stop   = new Image("graphics/stop.png"  , true);
295
  img_stop   = new Image("/usr/share/games/dave/graphics/stop.png"  , true);
296
  img_play   = new Image("graphics/play.png"  , true);
296
  img_play   = new Image("/usr/share/games/dave/graphics/play.png"  , true);
297
  img_record = new Image("graphics/rec.png"   , true);
297
  img_record = new Image("/usr/share/games/dave/graphics/rec.png"   , true);
298
}
298
}
299
299
300
Game::~Game()
300
Game::~Game()
Lines 824-830 Link Here
824
{
824
{
825
  const bool gfin = game_completed;
825
  const bool gfin = game_completed;
826
  render();
826
  render();
827
  Mix_Music *vaapukka = Mix_LoadMUS("audio/Kirahvi_nimelta_Tuike_-_Vaapukkamehulaulu.ogg");
827
  Mix_Music *vaapukka = Mix_LoadMUS("/usr/share/games/dave/audio/Kirahvi_nimelta_Tuike_-_Vaapukkamehulaulu.ogg");
828
  Mix_PlayMusic(vaapukka, -1);
828
  Mix_PlayMusic(vaapukka, -1);
829
  if (fin)
829
  if (fin)
830
    Mix_SetMusicPosition(224.0);
830
    Mix_SetMusicPosition(224.0);
Lines 844-850 Link Here
844
844
845
    set<int> pages;
845
    set<int> pages;
846
    struct dirent *dir;
846
    struct dirent *dir;
847
    DIR *d = opendir("graphics");
847
    DIR *d = opendir("/usr/share/games/dave/graphics");
848
    if (d) {
848
    if (d) {
849
      while ((dir = readdir(d)) != NULL) {
849
      while ((dir = readdir(d)) != NULL) {
850
        const char *name = dir->d_name;
850
        const char *name = dir->d_name;
Lines 870-876 Link Here
870
      teletext[page] = new Teletext();
870
      teletext[page] = new Teletext();
871
      teletext[page]->set_text(string(41 * 26, ' '));
871
      teletext[page]->set_text(string(41 * 26, ' '));
872
      ostringstream fname;
872
      ostringstream fname;
873
      fname << "graphics/page" << page << ".tv";
873
      fname << "/usr/share/games/dave/graphics/page" << page << ".tv";
874
      ifstream main_text(fname.str().c_str(), ios_base::in | ios_base::binary);
874
      ifstream main_text(fname.str().c_str(), ios_base::in | ios_base::binary);
875
      string::size_type pos = 0;
875
      string::size_type pos = 0;
876
      for   (int y=0; y<25; y++) {
876
      for   (int y=0; y<25; y++) {
Lines 1009-1015 Link Here
1009
      if (!prev_credits) {
1009
      if (!prev_credits) {
1010
	static Mix_Music *noman;
1010
	static Mix_Music *noman;
1011
	if (!noman)
1011
	if (!noman)
1012
	  noman = Mix_LoadMUS("audio/Delicious_Orange_-_No-Man.ogg");
1012
	  noman = Mix_LoadMUS("/usr/share/games/dave/audio/Delicious_Orange_-_No-Man.ogg");
1013
	Mix_PlayMusic(noman, -1);
1013
	Mix_PlayMusic(noman, -1);
1014
	start = 0.001f * SDL_GetTicks();
1014
	start = 0.001f * SDL_GetTicks();
1015
      }
1015
      }
Lines 1301-1307 Link Here
1301
1301
1302
void Game::save_config() const
1302
void Game::save_config() const
1303
{
1303
{
1304
  ofstream f("dave.conf", ios_base::out | ios_base::binary);
1304
  ofstream f("/etc/games/dave/dave.conf", ios_base::out | ios_base::binary);
1305
  for (map<string, string>::const_iterator i=config.begin(); i!=config.end(); ++i) {
1305
  for (map<string, string>::const_iterator i=config.begin(); i!=config.end(); ++i) {
1306
    f << i->first;
1306
    f << i->first;
1307
    int si = 20 - i->first.size();
1307
    int si = 20 - i->first.size();
Lines 1318-1328 Link Here
1318
  // Parsing file
1318
  // Parsing file
1319
  config.clear();
1319
  config.clear();
1320
  ifstream f;
1320
  ifstream f;
1321
  f.open("dave.conf", ios_base::in | ios_base::binary);
1321
  f.open("/etc/games/dave/dave.conf", ios_base::in | ios_base::binary);
1322
  if (!f.good()) {
1322
  if (!f.good()) {
1323
    f.close();
1323
    f.close();
1324
    f.clear();
1324
    f.clear();
1325
    f.open("dave.conf.sample", ios_base::in | ios_base::binary);
1325
    f.open("/etc/games/dave/dave.conf.sample", ios_base::in | ios_base::binary);
1326
  }
1326
  }
1327
  if (!f.good()) {
1327
  if (!f.good()) {
1328
	char cwd[128];
1328
	char cwd[128];
Lines 1367-1376 Link Here
1367
string Game::get_level_filename() const
1367
string Game::get_level_filename() const
1368
{
1368
{
1369
  switch (current_level_number) {
1369
  switch (current_level_number) {
1370
    case 0: return "levels/practice.dave";
1370
    case 0: return "/usr/share/games/dave/levels/practice.dave";
1371
    case 1: return "levels/avaruus.dave";
1371
    case 1: return "/usr/share/games/dave/levels/avaruus.dave";
1372
    case 2: return "levels/ruohikko.dave";
1372
    case 2: return "/usr/share/games/dave/levels/ruohikko.dave";
1373
    case 3: return "levels/videonauhuri.dave";
1373
    case 3: return "/usr/share/games/dave/levels/videonauhuri.dave";
1374
    default:
1374
    default:
1375
      throw;
1375
      throw;
1376
  }
1376
  }
(-)dave-org/level.cpp (-22 / +22 lines)
Lines 503-509 Link Here
503
        starfield[i].set_texture(lib["star.png"]);
503
        starfield[i].set_texture(lib["star.png"]);
504
        background_scene->add_model(&starfield[i]);
504
        background_scene->add_model(&starfield[i]);
505
        if (!i)
505
        if (!i)
506
          starfield[i].load_shader("graphics/starfield_vert.glsl", "graphics/starfield_frag.glsl");
506
          starfield[i].load_shader("/usr/share/games/dave/graphics/starfield_vert.glsl", "/usr/share/games/dave/graphics/starfield_frag.glsl");
507
        else
507
        else
508
          starfield[i].use_same_shader_as(&starfield[0]);
508
          starfield[i].use_same_shader_as(&starfield[0]);
509
      }
509
      }
Lines 520-531 Link Here
520
  else if (lev == 2) {  // Grass
520
  else if (lev == 2) {  // Grass
521
    if (rocket == NULL) {
521
    if (rocket == NULL) {
522
      background_scene = new Scene();
522
      background_scene = new Scene();
523
      rocket = new Model("graphics/roket.3ds");
523
      rocket = new Model("/usr/share/games/dave/graphics/roket.3ds");
524
      background_scene->add_model(rocket);
524
      background_scene->add_model(rocket);
525
      valley = new Model("graphics/laakso.3ds");
525
      valley = new Model("/usr/share/games/dave/graphics/laakso.3ds");
526
      valley->set_texture(lib["laakso.png"]);
526
      valley->set_texture(lib["laakso.png"]);
527
      background_scene->add_model(valley);
527
      background_scene->add_model(valley);
528
      sun = new Model("graphics/aurinko.3ds");
528
      sun = new Model("/usr/share/games/dave/graphics/aurinko.3ds");
529
      sun->set_texture(lib["aurinko.png"]);
529
      sun->set_texture(lib["aurinko.png"]);
530
      background_scene->add_model(sun);
530
      background_scene->add_model(sun);
531
      gaussian = new GaussianBlur();
531
      gaussian = new GaussianBlur();
Lines 577-604 Link Here
577
    (*i)->handle(this, dt, time);
577
    (*i)->handle(this, dt, time);
578
578
579
  if (current_music[0] == NULL) {
579
  if (current_music[0] == NULL) {
580
    current_music         [0] = Mix_LoadMUS("audio/thyks-video_cleaner_fluid.ogg");
580
    current_music         [0] = Mix_LoadMUS("/usr/share/games/dave/audio/thyks-video_cleaner_fluid.ogg");
581
    current_music_reversed[0] = Mix_LoadMUS("audio/thyks-video_cleaner_fluid_reverse.ogg");
581
    current_music_reversed[0] = Mix_LoadMUS("/usr/share/games/dave/audio/thyks-video_cleaner_fluid_reverse.ogg");
582
    intro                 [0] = NULL;
582
    intro                 [0] = NULL;
583
    current_music         [1] = current_music[0];
583
    current_music         [1] = current_music[0];
584
    current_music_reversed[1] = current_music_reversed[0];
584
    current_music_reversed[1] = current_music_reversed[0];
585
    intro                 [1] = NULL;
585
    intro                 [1] = NULL;
586
    current_music         [2] = Mix_LoadMUS("audio/sid000loop.ogg");
586
    current_music         [2] = Mix_LoadMUS("/usr/share/games/dave/audio/sid000loop.ogg");
587
    current_music_reversed[2] = Mix_LoadMUS("audio/sid000loop_reverse.ogg");
587
    current_music_reversed[2] = Mix_LoadMUS("/usr/share/games/dave/audio/sid000loop_reverse.ogg");
588
    intro                 [2] = Mix_LoadMUS("audio/sid000intro.ogg");
588
    intro                 [2] = Mix_LoadMUS("/usr/share/games/dave/audio/sid000intro.ogg");
589
    current_music         [3] = Mix_LoadMUS("audio/sid002loop.ogg");
589
    current_music         [3] = Mix_LoadMUS("/usr/share/games/dave/audio/sid002loop.ogg");
590
    current_music_reversed[3] = Mix_LoadMUS("audio/sid002loop_reverse.ogg");
590
    current_music_reversed[3] = Mix_LoadMUS("/usr/share/games/dave/audio/sid002loop_reverse.ogg");
591
    intro                 [3] = Mix_LoadMUS("audio/sid002intro.ogg");
591
    intro                 [3] = Mix_LoadMUS("/usr/share/games/dave/audio/sid002intro.ogg");
592
592
593
    ch_lever    = Mix_LoadWAV("audio/avaruusvipu.ogg");
593
    ch_lever    = Mix_LoadWAV("/usr/share/games/dave/audio/avaruusvipu.ogg");
594
    ch_lazor    = Mix_LoadWAV("audio/lazor.ogg");
594
    ch_lazor    = Mix_LoadWAV("/usr/share/games/dave/audio/lazor.ogg");
595
    ch_pink     = Mix_LoadWAV("audio/pink_noise_10s.ogg");
595
    ch_pink     = Mix_LoadWAV("/usr/share/games/dave/audio/pink_noise_10s.ogg");
596
    ch_piuingg  = Mix_LoadWAV("audio/piuingg.ogg");
596
    ch_piuingg  = Mix_LoadWAV("/usr/share/games/dave/audio/piuingg.ogg");
597
    ch_random   = Mix_LoadWAV("audio/random.ogg");
597
    ch_random   = Mix_LoadWAV("/usr/share/games/dave/audio/random.ogg");
598
    ch_tv_noise = Mix_LoadWAV("audio/tv_noise_10s.ogg");
598
    ch_tv_noise = Mix_LoadWAV("/usr/share/games/dave/audio/tv_noise_10s.ogg");
599
    ch_tilu     = Mix_LoadWAV("audio/tilulilu.ogg");
599
    ch_tilu     = Mix_LoadWAV("/usr/share/games/dave/audio/tilulilu.ogg");
600
    ch_charge   = Mix_LoadWAV("audio/charge.ogg");
600
    ch_charge   = Mix_LoadWAV("/usr/share/games/dave/audio/charge.ogg");
601
    ch_pack     = Mix_LoadWAV("audio/pack.ogg");
601
    ch_pack     = Mix_LoadWAV("/usr/share/games/dave/audio/pack.ogg");
602
602
603
    play_music(false);
603
    play_music(false);
604
    Mix_VolumeMusic(SDL_MIX_MAXVOLUME);
604
    Mix_VolumeMusic(SDL_MIX_MAXVOLUME);
(-)dave-org/library.cpp (-1 / +1 lines)
Lines 102-108 Link Here
102
    Image *l = new Image();
102
    Image *l = new Image();
103
    string ff;
103
    string ff;
104
104
105
    ff = "graphics/" + filename;
105
    ff = "/usr/share/games/dave/graphics/" + filename;
106
    if (l->load(ff, true))
106
    if (l->load(ff, true))
107
      return l;
107
      return l;
108
108
(-)dave-org/model.cpp (-3 / +3 lines)
Lines 160-166 Link Here
160
  build_kdtree(kdtree, hash);
160
  build_kdtree(kdtree, hash);
161
161
162
  char buf[64];
162
  char buf[64];
163
  sprintf(buf, "graphics/aocache%x.tmp", hash);
163
  sprintf(buf, "/usr/share/games/dave/graphics/aocache%x.tmp", hash);
164
164
165
  FILE* fp = fopen(buf, "rb");
165
  FILE* fp = fopen(buf, "rb");
166
  if (fp)
166
  if (fp)
Lines 598-606 Link Here
598
598
599
  if (using_shader) {
599
  if (using_shader) {
600
    if (game->get_ext()->simple_shaders == false)
600
    if (game->get_ext()->simple_shaders == false)
601
      program = new GLProgram("graphics/telq_vert.glsl", "graphics/telq_frag.glsl");
601
      program = new GLProgram("/usr/share/games/dave/graphics/telq_vert.glsl", "/usr/share/games/dave/graphics/telq_frag.glsl");
602
    else
602
    else
603
      program = new GLProgram("graphics/telq_vert.glsl", "graphics/telq_frag.mac.glsl");
603
      program = new GLProgram("/usr/share/games/dave/graphics/telq_vert.glsl", "/usr/share/games/dave/graphics/telq_frag.mac.glsl");
604
    program->use();
604
    program->use();
605
    program->set_int("tex", 0);
605
    program->set_int("tex", 0);
606
    program->set_int("self_illum", 1);
606
    program->set_int("self_illum", 1);
(-)dave-org/opengl.cpp (-1 / +1 lines)
Lines 72-78 Link Here
72
	fprintf(stderr, "Compling shader '%s', '%s'...", vertFile, fragFile);
72
	fprintf(stderr, "Compling shader '%s', '%s'...", vertFile, fragFile);
73
	prog = glCreateProgramObjectARB();
73
	prog = glCreateProgramObjectARB();
74
74
75
	load_file("graphics/std.glsl", buffer);
75
	load_file("/usr/share/games/dave/graphics/std.glsl", buffer);
76
76
77
	static const char* src[2] = { buffer, buffer2 };
77
	static const char* src[2] = { buffer, buffer2 };
78
78
(-)dave-org/remote.cpp (-5 / +5 lines)
Lines 38-48 Link Here
38
static Storyboard/*<256>*/ record(Storyboard::PLAYBACK, 1  );   // Records the movements of Dave while record button is pressed
38
static Storyboard/*<256>*/ record(Storyboard::PLAYBACK, 1  );   // Records the movements of Dave while record button is pressed
39
39
40
Remote::Remote() :
40
Remote::Remote() :
41
  Model("graphics/remote/runko.3DS"),
41
  Model("/usr/share/games/dave/graphics/remote/runko.3DS"),
42
  pressed(NOTHING),
42
  pressed(NOTHING),
43
  paused(false),
43
  paused(false),
44
  screen_texture(GL_RGB8, 512, 512),
44
  screen_texture(GL_RGB8, 512, 512),
45
  grid("graphics/lcd_grid.png", false)
45
  grid("/usr/share/games/dave/graphics/lcd_grid.png", false)
46
{
46
{
47
  set_texture(lib["remote/mappi3.png"]);
47
  set_texture(lib["remote/mappi3.png"]);
48
  scene = new Scene();
48
  scene = new Scene();
Lines 51-67 Link Here
51
  set_position(0.0f, 0.0f, /*-23.0f*/ -40.0f);
51
  set_position(0.0f, 0.0f, /*-23.0f*/ -40.0f);
52
  //set_rotation(90.0f, 0.0f, 0.0f);
52
  //set_rotation(90.0f, 0.0f, 0.0f);
53
53
54
  screen = new Model("graphics/remote/nayttooikee2.3DS");
54
  screen = new Model("/usr/share/games/dave/graphics/remote/nayttooikee2.3DS");
55
  add_model(screen);
55
  add_model(screen);
56
  screen->set_texture(new TextureProxy(&screen_texture));
56
  screen->set_texture(new TextureProxy(&screen_texture));
57
  gaps = new Model("graphics/remote/nreunat.3DS");
57
  gaps = new Model("/usr/share/games/dave/graphics/remote/nreunat.3DS");
58
  add_model(gaps);
58
  add_model(gaps);
59
  gaps->set_texture(lib["remote/napit.png"]);
59
  gaps->set_texture(lib["remote/napit.png"]);
60
  button_count = 27;
60
  button_count = 27;
61
  buttons = new Model [button_count] ();
61
  buttons = new Model [button_count] ();
62
  for (int i=0; i<button_count; i++) {
62
  for (int i=0; i<button_count; i++) {
63
    ostringstream s;
63
    ostringstream s;
64
    s << "graphics/remote/n" << i + 1 << "ya.3DS";
64
    s << "/usr/share/games/dave/graphics/remote/n" << i + 1 << "ya.3DS";
65
    buttons[i].load(s.str());
65
    buttons[i].load(s.str());
66
    buttons[i].set_texture(lib["remote/napit.png"]);
66
    buttons[i].set_texture(lib["remote/napit.png"]);
67
    add_model(&buttons[i]);
67
    add_model(&buttons[i]);

Return to bug 236445