Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 177399 Details for
Bug 253779
New ebuild: games-action/meritous
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
files/data-dir.patch
data-dir.patch (text/plain), 23.28 KB, created by
Erik Hahn
on 2009-01-04 20:48:55 UTC
(
hide
)
Description:
files/data-dir.patch
Filename:
MIME Type:
Creator:
Erik Hahn
Created:
2009-01-04 20:48:55 UTC
Size:
23.28 KB
patch
obsolete
>diff -u -N /tmp/meritous_v12_src/src/audio.c src/audio.c >--- /tmp/meritous_v12_src/src/audio.c 2008-01-15 03:54:36.000000000 +0100 >+++ src/audio.c 2009-01-04 19:41:29.000000000 +0100 >@@ -30,20 +30,21 @@ > #include "levelblit.h" > #include "mapgen.h" > #include "boss.h" >+#include "data.h" > >-char *tracks[13] = {"dat/m/ICEFRONT.S3M", >- "dat/m/cavern.xm", >- "dat/m/cave.xm", >- "dat/m/cave06.s3m", >- "dat/m/Wood.s3m", >- "dat/m/iller_knarkloader_final.xm", >- "dat/m/fear2.mod", >- "dat/m/Cv_boss.mod", >- "dat/m/Fr_boss.mod", >- "dat/m/CT_BOSS.MOD", >- "dat/m/rpg_bat1.xm", >- "dat/m/amblight.xm", >- "dat/m/FINALBAT.s3m"}; >+char *tracks[13] = {DATA_DIR "/m/ICEFRONT.S3M", >+ DATA_DIR "/m/cavern.xm", >+ DATA_DIR "/m/cave.xm", >+ DATA_DIR "/m/cave06.s3m", >+ DATA_DIR "/m/Wood.s3m", >+ DATA_DIR "/m/iller_knarkloader_final.xm", >+ DATA_DIR "/m/fear2.mod", >+ DATA_DIR "/m/Cv_boss.mod", >+ DATA_DIR "/m/Fr_boss.mod", >+ DATA_DIR "/m/CT_BOSS.MOD", >+ DATA_DIR "/m/rpg_bat1.xm", >+ DATA_DIR "/m/amblight.xm", >+ DATA_DIR "/m/FINALBAT.s3m"}; > > Mix_Music *bgm_music = NULL; > int bgm_track = -1; >@@ -87,7 +88,7 @@ > Mix_HaltChannel(0); > Mix_FreeChunk(c_sample[0]); > } >- c_sample[0] = Mix_LoadWAV("dat/a/circuitcharge.wav"); >+ c_sample[0] = Mix_LoadWAV(DATA_DIR "/a/circuitcharge.wav"); > Mix_PlayChannel(0, c_sample[0], -1); > hum_play = 1; > } >@@ -99,7 +100,7 @@ > Mix_HaltChannel(0); > Mix_FreeChunk(c_sample[0]); > } >- c_sample[0] = Mix_LoadWAV("dat/a/circuitrecover.wav"); >+ c_sample[0] = Mix_LoadWAV(DATA_DIR "/a/circuitrecover.wav"); > Mix_PlayChannel(0, c_sample[0], -1); > hum_play = 2; > } >@@ -236,5 +237,5 @@ > > void SND_CircuitRelease(int str) > { >- SND_Play("dat/a/circuitrelease.wav", sqrt(str * 2 + (str * 5300 / circuit_size) + (str > 100 ? 5300 : str*53))); >+ SND_Play(DATA_DIR "/a/circuitrelease.wav", sqrt(str * 2 + (str * 5300 / circuit_size) + (str > 100 ? 5300 : str*53))); > } >Files /tmp/meritous_v12_src/src/audio.o and src/audio.o differ >diff -u -N /tmp/meritous_v12_src/src/boss.c src/boss.c >--- /tmp/meritous_v12_src/src/boss.c 2008-01-15 03:54:37.000000000 +0100 >+++ src/boss.c 2009-01-04 19:41:29.000000000 +0100 >@@ -32,6 +32,7 @@ > #include "demon.h" > #include "gamemap.h" > #include "audio.h" >+#include "data.h" > > char *boss_names[] = { "MERIDIAN", > "ATARAXIA", >@@ -435,7 +436,7 @@ > // Turn the start room into a boss room, and clear it > > rooms[0].room_type = 2; >- Paint(rooms[0].x+1, rooms[0].y+1, rooms[0].w-2, rooms[0].h-2, "dat/d/fbossroom.loc"); >+ Paint(rooms[0].x+1, rooms[0].y+1, rooms[0].w-2, rooms[0].h-2, DATA_DIR "/d/fbossroom.loc"); > > // Lock all unvisited rooms off > >@@ -507,7 +508,7 @@ > > collect++; > if (collect == 1) { >- SND_Pos("dat/a/crystal2.wav", 100, 0); >+ SND_Pos(DATA_DIR "/a/crystal2.wav", 100, 0); > } > if (collect > 100) { > collect = 0; >@@ -564,7 +565,7 @@ > to.y = 29; > > if (boss_hp_icon == NULL) { >- boss_hp_icon = IMG_Load("dat/i/boss_icon.png"); >+ boss_hp_icon = IMG_Load(DATA_DIR "/i/boss_icon.png"); > } > SDL_BlitSurface(boss_hp_icon, NULL, screen, &to); > DrawRect(16, 28, 624, 17, 0); >@@ -640,7 +641,7 @@ > atk_power = 400 * power / circuit_size + power / 75; > if (atk_power > boss_breakpoint) { > boss_hp -= (atk_power - boss_breakpoint) * boss_dmgrate; >- SND_Pos("dat/a/enemyhit.wav", 128, dist(x, y, boss_x, boss_y) / 4); >+ SND_Pos(DATA_DIR "/a/enemyhit.wav", 128, dist(x, y, boss_x, boss_y) / 4); > boss_flash = 40; > if (boss_hp <= 0) { > boss_new_life = 1; >@@ -680,7 +681,7 @@ > > SDL_Rect drawpos; > if (boss_spr == NULL) { >- boss_spr = IMG_Load("dat/i/boss1.png"); >+ boss_spr = IMG_Load(DATA_DIR "/i/boss1.png"); > SDL_SetColorKey(boss_spr, SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); > } > >@@ -734,7 +735,7 @@ > > SDL_Rect drawpos; > if (boss_spr == NULL) { >- boss_spr = IMG_Load("dat/i/boss2.png"); >+ boss_spr = IMG_Load(DATA_DIR "/i/boss2.png"); > SDL_SetColorKey(boss_spr, SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); > } > >@@ -803,7 +804,7 @@ > SDL_Rect drawfrom, drawpos; > > if (boss_spr == NULL) { >- boss_spr = IMG_Load("dat/i/boss3.png"); >+ boss_spr = IMG_Load(DATA_DIR "/i/boss3.png"); > SDL_SetColorKey(boss_spr, SDL_SRCCOLORKEY | SDL_RLEACCEL, 0); > } > >@@ -873,7 +874,7 @@ > static SDL_Surface *boss_spr = NULL; > > if (boss_spr == NULL) { >- boss_spr = IMG_Load("dat/i/boss4.png"); >+ boss_spr = IMG_Load(DATA_DIR "/i/boss4.png"); > SDL_SetColorKey(boss_spr, SDL_SRCCOLORKEY | SDL_RLEACCEL, 0); > } > >@@ -1631,7 +1632,7 @@ > } else { > if (endpics[0] == NULL) { > if (training) { >- endpics[0] = IMG_Load("dat/i/wuss_ending.png"); >+ endpics[0] = IMG_Load(DATA_DIR "/i/wuss_ending.png"); > } > } > >Files /tmp/meritous_v12_src/src/boss.o and src/boss.o differ >diff -u -N /tmp/meritous_v12_src/src/data.h src/data.h >--- /tmp/meritous_v12_src/src/data.h 1970-01-01 01:00:00.000000000 +0100 >+++ src/data.h 2009-01-04 19:41:29.000000000 +0100 >@@ -0,0 +1,3 @@ >+#ifndef DATA_DIR >+#define DATA_DIR "dat" >+#endif >diff -u -N /tmp/meritous_v12_src/src/demon.c src/demon.c >--- /tmp/meritous_v12_src/src/demon.c 2008-01-15 03:54:38.000000000 +0100 >+++ src/demon.c 2009-01-04 19:41:29.000000000 +0100 >@@ -32,6 +32,7 @@ > #include "audio.h" > #include "boss.h" > #include "tiles.h" >+#include "data.h" > > SDL_Surface *reticle; > SDL_Surface *inrange; >@@ -797,34 +798,34 @@ > > void InitEnemySprites() > { >- enemy_sprites[0] = IMG_Load("dat/i/mons1.png"); >+ enemy_sprites[0] = IMG_Load(DATA_DIR "/i/mons1.png"); > SDL_SetColorKey(enemy_sprites[0], SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); >- enemy_sprites[1] = IMG_Load("dat/i/mons2.png"); >+ enemy_sprites[1] = IMG_Load(DATA_DIR "/i/mons2.png"); > SDL_SetColorKey(enemy_sprites[1], SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); >- enemy_sprites[2] = IMG_Load("dat/i/mons3.png"); >+ enemy_sprites[2] = IMG_Load(DATA_DIR "/i/mons3.png"); > SDL_SetColorKey(enemy_sprites[2], SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); >- enemy_sprites[3] = IMG_Load("dat/i/mons4.png"); >+ enemy_sprites[3] = IMG_Load(DATA_DIR "/i/mons4.png"); > SDL_SetColorKey(enemy_sprites[3], SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); >- enemy_sprites[4] = IMG_Load("dat/i/mons5.png"); >+ enemy_sprites[4] = IMG_Load(DATA_DIR "/i/mons5.png"); > SDL_SetColorKey(enemy_sprites[4], SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); >- enemy_sprites[5] = IMG_Load("dat/i/mons6.png"); >+ enemy_sprites[5] = IMG_Load(DATA_DIR "/i/mons6.png"); > SDL_SetColorKey(enemy_sprites[5], SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); >- enemy_sprites[6] = IMG_Load("dat/i/mons7.png"); >+ enemy_sprites[6] = IMG_Load(DATA_DIR "/i/mons7.png"); > SDL_SetColorKey(enemy_sprites[6], SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); >- enemy_sprites[7] = IMG_Load("dat/i/mons8.png"); >+ enemy_sprites[7] = IMG_Load(DATA_DIR "/i/mons8.png"); > SDL_SetColorKey(enemy_sprites[7], SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); >- enemy_sprites[8] = IMG_Load("dat/i/mons9.png"); >+ enemy_sprites[8] = IMG_Load(DATA_DIR "/i/mons9.png"); > SDL_SetColorKey(enemy_sprites[8], SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); >- enemy_sprites[9] = IMG_Load("dat/i/mons10.png"); >+ enemy_sprites[9] = IMG_Load(DATA_DIR "/i/mons10.png"); > SDL_SetColorKey(enemy_sprites[9], SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); > >- reticle = IMG_Load("dat/i/reticle.png"); >+ reticle = IMG_Load(DATA_DIR "/i/reticle.png"); > SDL_SetColorKey(reticle, SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); > >- inrange = IMG_Load("dat/i/inrange.png"); >+ inrange = IMG_Load(DATA_DIR "/i/inrange.png"); > SDL_SetColorKey(inrange, SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); > >- invis_enemy = IMG_Load("dat/i/hidden_monster.png"); >+ invis_enemy = IMG_Load(DATA_DIR "/i/hidden_monster.png"); > SDL_SetColorKey(invis_enemy, SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); > } > >@@ -1173,7 +1174,7 @@ > ct = SDL_GetTicks(); > > if ((ct - lastkill) > 100) { >- SND_Pos("dat/a/enemyhit.wav", 128, PlayerDist(t->x, t->y)); >+ SND_Pos(DATA_DIR "/a/enemyhit.wav", 128, PlayerDist(t->x, t->y)); > lastkill = ct; > } > >@@ -1243,47 +1244,47 @@ > > switch (t) { > case 0: >- SND_Pos("dat/a/mons0shot.wav", 48, dist); >+ SND_Pos(DATA_DIR "/a/mons0shot.wav", 48, dist); > last_delay = 200; > break; > case 1: >- SND_Pos("dat/a/mons1shot.wav", 112, dist); >+ SND_Pos(DATA_DIR "/a/mons1shot.wav", 112, dist); > last_delay = 500; > break; > case 2: >- SND_Pos("dat/a/mons2shot.wav", 110, dist); >+ SND_Pos(DATA_DIR "/a/mons2shot.wav", 110, dist); > last_delay = 1000; > break; > case 3: >- SND_Pos("dat/a/mons3shot.wav", 110, dist); >+ SND_Pos(DATA_DIR "/a/mons3shot.wav", 110, dist); > last_delay = 500; > break; > case 4: >- SND_Pos("dat/a/mons4shot.wav", 110, dist); >+ SND_Pos(DATA_DIR "/a/mons4shot.wav", 110, dist); > last_delay = 900; > break; > case 5: >- SND_Pos("dat/a/mons5shot.wav", 80, dist); >+ SND_Pos(DATA_DIR "/a/mons5shot.wav", 80, dist); > last_delay = 60; > break; > case 6: >- SND_Pos("dat/a/mons6shot.wav", 110, dist); >+ SND_Pos(DATA_DIR "/a/mons6shot.wav", 110, dist); > last_delay = 1000; > break; > case 7: >- SND_Pos("dat/a/mons7shot.wav", 110, dist); >+ SND_Pos(DATA_DIR "/a/mons7shot.wav", 110, dist); > last_delay = 600; > break; > case 8: >- SND_Pos("dat/a/mons8shot.wav", 110, dist); >+ SND_Pos(DATA_DIR "/a/mons8shot.wav", 110, dist); > last_delay = 700; > break; > case 9: >- SND_Pos("dat/a/mons9shot.wav", 110, dist); >+ SND_Pos(DATA_DIR "/a/mons9shot.wav", 110, dist); > last_delay = 242; > break; > case 10: >- SND_Pos("dat/a/mons10shot.wav", 110, dist); >+ SND_Pos(DATA_DIR "/a/mons10shot.wav", 110, dist); > last_delay = 250; > break; > >@@ -1670,7 +1671,7 @@ > > if (PlayerDist(fx, fy) < 4 - (2 * artifacts[5])) { > player_dying = 1; >- SND_Pos("dat/a/playerhurt.wav", 128, 0); >+ SND_Pos(DATA_DIR "/a/playerhurt.wav", 128, 0); > e->dying = 1; > break; > } >@@ -1710,7 +1711,7 @@ > c_shield_hit_sound = SDL_GetTicks(); > > if ((c_shield_hit_sound - 150) > last_shield_hit_sound) { >- SND_Pos("dat/a/shieldhit.wav", 50, 0); >+ SND_Pos(DATA_DIR "/a/shieldhit.wav", 50, 0); > last_shield_hit_sound = c_shield_hit_sound; > } > while (PlayerDist(e->x, e->y) < 30) { >@@ -1725,7 +1726,7 @@ > if (e->dying == 0) { > if (pdist < 6 - (2 * artifacts[5])) { > if (player_dying == 0) { >- SND_Pos("dat/a/playerhurt.wav", 128, 0); >+ SND_Pos(DATA_DIR "/a/playerhurt.wav", 128, 0); > player_dying = 1; > } > } >@@ -1816,7 +1817,7 @@ > > if (e->teleport_v < 24) { > if (teleflash == NULL) { >- teleflash = IMG_Load("dat/i/teleflash.png"); >+ teleflash = IMG_Load(DATA_DIR "/i/teleflash.png"); > SDL_SetColorKey(teleflash, SDL_SRCCOLORKEY | SDL_RLEACCEL, 0); > } > >@@ -1856,7 +1857,7 @@ > } > if (b->img == 1) { > if (d_star_big == NULL) { >- d_star_big = IMG_Load("dat/i/star1.png"); >+ d_star_big = IMG_Load(DATA_DIR "/i/star1.png"); > SDL_SetColorKey(d_star_big, SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); > } > >@@ -1943,7 +1944,7 @@ > } > if (b->img == 3) { > if (d_star_small == NULL) { >- d_star_small = IMG_Load("dat/i/star2.png"); >+ d_star_small = IMG_Load(DATA_DIR "/i/star2.png"); > SDL_SetColorKey(d_star_small, SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); > } > if (b->dying == 0) { >@@ -2007,7 +2008,7 @@ > } > if (b->img == 6) { > if (d_star_ls == NULL) { >- d_star_ls = IMG_Load("dat/i/star3.png"); >+ d_star_ls = IMG_Load(DATA_DIR "/i/star3.png"); > SDL_SetColorKey(d_star_ls, SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); > } > if (b->dying == 0) { >@@ -2061,7 +2062,7 @@ > if (g->delete_me) return; > > if (d_sprite == NULL) { >- d_sprite = IMG_Load("dat/i/gem.png"); >+ d_sprite = IMG_Load(DATA_DIR "/i/gem.png"); > SDL_SetColorKey(d_sprite, SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); > hp_icon[0] = 3; > hp_icon[1] = 0; >@@ -2208,11 +2209,11 @@ > > if (g->value == 31337) { > if (player_hp < (3 + (player_shield == 30)*3)) { >- SND_Pos("dat/a/crystal.wav", 64, 0); >+ SND_Pos(DATA_DIR "/a/crystal.wav", 64, 0); > player_hp++; > } else { > if (!training) { >- SND_Pos("dat/a/tone.wav", 64, 0); >+ SND_Pos(DATA_DIR "/a/tone.wav", 64, 0); > > if (player_lives == 1) { > player_lives_part += 15; >@@ -2226,7 +2227,7 @@ > if (player_lives_part >= 88) { > player_lives_part -= 88; > player_lives += 1; >- SND_Pos("dat/a/crystal2.wav", 100, 0); >+ SND_Pos(DATA_DIR "/a/crystal2.wav", 100, 0); > } > } > } >Files /tmp/meritous_v12_src/src/demon.o and src/demon.o differ >diff -u -N /tmp/meritous_v12_src/src/ending.c src/ending.c >--- /tmp/meritous_v12_src/src/ending.c 2008-01-15 03:54:38.000000000 +0100 >+++ src/ending.c 2009-01-04 19:41:29.000000000 +0100 >@@ -30,7 +30,8 @@ > #include "audio.h" > #include "boss.h" > #include "mapgen.h" >- >+#include "data.h" >+ > void DrawScrolly(int t); > void DrawPText(int t); > void DrawSText(int t); >@@ -87,9 +88,9 @@ > int i; > > if (streamspr == NULL) { >- streamspr = IMG_Load("dat/i/stream.png"); >+ streamspr = IMG_Load(DATA_DIR "/i/stream.png"); > SDL_SetColorKey(streamspr, SDL_SRCCOLORKEY | SDL_RLEACCEL, 0); >- glitter = IMG_Load("dat/i/glitter.png"); >+ glitter = IMG_Load(DATA_DIR "/i/glitter.png"); > SDL_SetColorKey(glitter, SDL_SRCCOLORKEY | SDL_RLEACCEL, 0); > } > >@@ -115,7 +116,7 @@ > if (EndingEvents()) return; > } > >- Paint(0, 0, 22, 27, "dat/d/cstream.loc"); >+ Paint(0, 0, 22, 27, DATA_DIR "/d/cstream.loc"); > > if (player_shield < 30) { > for (i = 0; i < 400; i++) { >@@ -328,10 +329,10 @@ > SDL_FillRect(screen, NULL, 0); > > if (fin == NULL) { >- fin = IMG_Load("dat/i/fin.png"); >+ fin = IMG_Load(DATA_DIR "/i/fin.png"); > >- theend[0] = IMG_Load("dat/i/theend.png"); >- theend[1] = IMG_Load("dat/i/true_end.png"); >+ theend[0] = IMG_Load(DATA_DIR "/i/theend.png"); >+ theend[1] = IMG_Load(DATA_DIR "/i/true_end.png"); > } > > if (credits_scroll >= (finish_point + 80)) { >@@ -658,7 +659,7 @@ > SDL_Rect from; > > if (circ == NULL) { >- circ = IMG_Load("dat/i/circuits_1.png"); >+ circ = IMG_Load(DATA_DIR "/i/circuits_1.png"); > } > > if (t == 0) { >Files /tmp/meritous_v12_src/src/ending.o and src/ending.o differ >diff -u -N /tmp/meritous_v12_src/src/gamemap.c src/gamemap.c >--- /tmp/meritous_v12_src/src/gamemap.c 2008-01-15 03:54:39.000000000 +0100 >+++ src/gamemap.c 2009-01-04 19:41:29.000000000 +0100 >@@ -29,6 +29,7 @@ > #include "mapgen.h" > #include "tiles.h" > #include "save.h" >+#include "data.h" > > SDL_Surface *automap = NULL; > void RecordRoom(int room_id); >@@ -43,8 +44,8 @@ > if (automap != NULL) SDL_FreeSurface(automap); > if (overview != NULL) SDL_FreeSurface(overview); > >- automap = IMG_Load("dat/i/automap.png"); //520x520 >- overview = IMG_Load("dat/i/overview.png"); //200x200 >+ automap = IMG_Load(DATA_DIR "/i/automap.png"); //520x520 >+ overview = IMG_Load(DATA_DIR "/i/overview.png"); //200x200 > > //SDL_SetColorKey(automap, SDL_SRCCOLORKEY | SDL_RLEACCEL, 255); > >Files /tmp/meritous_v12_src/src/gamemap.o and src/gamemap.o differ >diff -u -N /tmp/meritous_v12_src/src/help.c src/help.c >--- /tmp/meritous_v12_src/src/help.c 2008-01-15 03:54:40.000000000 +0100 >+++ src/help.c 2009-01-04 19:41:29.000000000 +0100 >@@ -27,6 +27,7 @@ > #include <string.h> > > #include "levelblit.h" >+#include "data.h" > > struct help_line { > char *t; >@@ -57,7 +58,7 @@ > hlp = malloc(sizeof(struct help_file)); > hlp->sections = 0; > >- fp = fopen("dat/d/helpfile.txt", "r"); >+ fp = fopen(DATA_DIR "/d/helpfile.txt", "r"); > while (!feof(fp)) { > fgets(linebuf, 79, fp); > if (linebuf[strlen(linebuf)-1] == '\n') >Files /tmp/meritous_v12_src/src/help.o and src/help.o differ >diff -u -N /tmp/meritous_v12_src/src/levelblit.c src/levelblit.c >--- /tmp/meritous_v12_src/src/levelblit.c 2008-01-15 03:54:41.000000000 +0100 >+++ src/levelblit.c 2009-01-04 19:44:07.000000000 +0100 >@@ -37,6 +37,7 @@ > #include "audio.h" > #include "boss.h" > #include "ending.h" >+#include "data.h" > > #define PLAYERW 16 > #define PLAYERH 24 >@@ -244,7 +245,7 @@ > SDL_UpdateRect(screen, 0, 0, 0, 0); > if (WriteBitmaps) { > if ((bmp >= WB_StartRange)&&(bmp < WB_EndRange)) { >- sprintf(bmp_name, "v/bmp%d.bmp", bmp); >+ sprintf(bmp_name, DATA_DIR "/v/bmp%d.bmp", bmp); > SDL_SaveBMP(screen, bmp_name); > } > bmp++; >@@ -455,12 +456,12 @@ > srand(stime); > } > >- asceai = IMG_Load("dat/i/asceai.png"); >- wm_icon = IMG_Load("dat/i/icon.png"); >+ asceai = IMG_Load(DATA_DIR "/i/asceai.png"); >+ wm_icon = IMG_Load(DATA_DIR "/i/icon.png"); > > screen = SDL_SetVideoMode(SCREEN_W, SCREEN_H, 8, SDL_SWSURFACE | (SDL_FULLSCREEN * fullscreen)); > >- wm_mask_file = fopen("dat/d/icon_bitmask.dat", "rb"); >+ wm_mask_file = fopen(DATA_DIR "/d/icon_bitmask.dat", "rb"); > fread(wm_mask, 1, 128, wm_mask_file); > fclose(wm_mask_file); > SDL_WM_SetCaption("~ m e r i t o u s ~", "MT"); >@@ -517,8 +518,8 @@ > > maxoptions = 2 + can_continue; > >- title = IMG_Load("dat/i/title.png"); >- title_pr = IMG_Load("dat/i/title.png"); >+ title = IMG_Load(DATA_DIR "/i/title.png"); >+ title_pr = IMG_Load(DATA_DIR "/i/title.png"); > > while (on_title) { > SetTitlePalette2(ticker_tick); >@@ -620,7 +621,7 @@ > static SDL_Surface *meter = NULL; > SDL_Rect drawfrom, drawto; > if (meter == NULL) { >- meter = IMG_Load("dat/i/meter.png"); >+ meter = IMG_Load(DATA_DIR "/i/meter.png"); > SDL_SetColorKey(meter, SDL_SRCCOLORKEY | SDL_RLEACCEL, 0); > } > >@@ -751,7 +752,7 @@ > if (game_load) { > first_game = 0; > ReadPlayerData(); >- //Paint(rooms[0].x+1, rooms[0].y+1, rooms[0].w-2, rooms[0].h-2, "dat/d/fbossroom.loc"); >+ //Paint(rooms[0].x+1, rooms[0].y+1, rooms[0].w-2, rooms[0].h-2, DATA_DIR "/d/fbossroom.loc"); > } else { > player_x = map.w * 32 / 2 - PLAYERW/2; > player_y = map.h * 32 / 2 - PLAYERH/2; >@@ -920,7 +921,7 @@ > > SDL_Rect draw_to; > if (agate_knife == NULL) { >- agate_knife = IMG_Load("dat/i/agate.png"); >+ agate_knife = IMG_Load(DATA_DIR "/i/agate.png"); > SDL_SetColorKey(agate_knife, SDL_SRCCOLORKEY | SDL_RLEACCEL, 0); > } > xpos = (int)((sin(agate_t * 1.33)*0.5+0.5) * (float)room_w) + room_x; >@@ -930,7 +931,7 @@ > agate_knife_loc = -1; > specialmessage = 50; > specialmessagetimer = 150; >- SND_Pos("dat/a/crystal2.wav", 128, 0); >+ SND_Pos(DATA_DIR "/a/crystal2.wav", 128, 0); > > player_shield = 30; > circuit_fillrate = 30; >@@ -1483,8 +1484,8 @@ > DrawRect(0, 0, 640, 480, 255); > > if (tiles == NULL) { >- tiles = IMG_Load("dat/i/tileset.png"); >- fog = IMG_Load("dat/i/tileset.png"); >+ tiles = IMG_Load(DATA_DIR "/i/tileset.png"); >+ fog = IMG_Load(DATA_DIR "/i/tileset.png"); > > pp = fog->pixels; > >@@ -1525,7 +1526,7 @@ > SDL_Rect playerrec, screenrec; > > if (playersprite == NULL) { >- playersprite = IMG_Load("dat/i/player.png"); >+ playersprite = IMG_Load(DATA_DIR "/i/player.png"); > SDL_SetColorKey(playersprite, SDL_SRCCOLORKEY | SDL_RLEACCEL, 0); > } > >@@ -1724,7 +1725,7 @@ > opening_door_i = 1; > opening_door_n = rooms[GetRoom(bx, by)].room_param; > if ((SDL_GetTicks() - bd_timer) > 100) { >- SND_Pos("dat/a/crystal2.wav", 100, 0); >+ SND_Pos(DATA_DIR "/a/crystal2.wav", 100, 0); > bd_timer = SDL_GetTicks(); > } > } >@@ -1787,7 +1788,7 @@ > { > FILE *font_data_file; > int chr, x, y; >- font_data_file = fopen("dat/d/font.dat", "rb"); >+ font_data_file = fopen(DATA_DIR "/d/font.dat", "rb"); > > for (chr = 0; chr < 128; chr++) { > for (y = 0; y < 8; y++) { >@@ -2072,7 +2073,7 @@ > artifacts[treasure] = 1; > specialmessage = treasure + 1; > specialmessagetimer = 30; >- SND_Pos("dat/a/crystal2.wav", 128, 0); >+ SND_Pos(DATA_DIR "/a/crystal2.wav", 128, 0); > } > if (typ == 1) { > // Reward >@@ -2084,14 +2085,14 @@ > specialmessage = 20; > player_gems += rand()%((1 << (rooms[room].s_dist / 7)) * 1500); > given_treasure = 1; >- SND_Pos("dat/a/tone.wav", 128, 0); >+ SND_Pos(DATA_DIR "/a/tone.wav", 128, 0); > break; > case 1: > if (player_shield < 25) { > specialmessage = 10; > player_shield += 1; > given_treasure = 1; >- SND_Pos("dat/a/tone.wav", 128, 0); >+ SND_Pos(DATA_DIR "/a/tone.wav", 128, 0); > } > break; > case 2: >@@ -2099,7 +2100,7 @@ > specialmessage = 11; > circuit_fillrate += 1; > given_treasure = 1; >- SND_Pos("dat/a/tone.wav", 128, 0); >+ SND_Pos(DATA_DIR "/a/tone.wav", 128, 0); > } > break; > case 3: >@@ -2107,7 +2108,7 @@ > specialmessage = 12; > circuit_recoverrate += 1; > given_treasure = 1; >- SND_Pos("dat/a/tone.wav", 128, 0); >+ SND_Pos(DATA_DIR "/a/tone.wav", 128, 0); > } > break; > default: >@@ -2238,7 +2239,7 @@ > if (player_gems >= UpgradePrice(0)) { > player_gems -= UpgradePrice(0); > player_shield += 1; >- SND_Pos("dat/a/crystal.wav", 128, 0); >+ SND_Pos(DATA_DIR "/a/crystal.wav", 128, 0); > } > break; > case 29: >@@ -2246,7 +2247,7 @@ > if (player_gems >= UpgradePrice(1)) { > player_gems -= UpgradePrice(1); > circuit_fillrate += 1; >- SND_Pos("dat/a/crystal.wav", 128, 0); >+ SND_Pos(DATA_DIR "/a/crystal.wav", 128, 0); > } > break; > case 30: >@@ -2254,7 +2255,7 @@ > if (player_gems >= UpgradePrice(2)) { > player_gems -= UpgradePrice(2); > circuit_recoverrate += 1; >- SND_Pos("dat/a/crystal.wav", 128, 0); >+ SND_Pos(DATA_DIR "/a/crystal.wav", 128, 0); > } > break; > case 31: >@@ -2262,7 +2263,7 @@ > break; > case 32: > CrystalSummon(); >- SND_Pos("dat/a/crystal.wav", 80, 0); >+ SND_Pos(DATA_DIR "/a/crystal.wav", 80, 0); > break; > default: > break; >@@ -2579,7 +2580,7 @@ > SDL_Rect from, to; > > if (artifact_spr == NULL) { >- artifact_spr = IMG_Load("dat/i/artifacts.png"); >+ artifact_spr = IMG_Load(DATA_DIR "/i/artifacts.png"); > SDL_SetColorKey(artifact_spr, SDL_SRCCOLORKEY | SDL_RLEACCEL, 0); > } > >Files /tmp/meritous_v12_src/src/levelblit.o and src/levelblit.o differ >diff -u -N /tmp/meritous_v12_src/src/mapgen.c src/mapgen.c >--- /tmp/meritous_v12_src/src/mapgen.c 2008-01-15 03:54:41.000000000 +0100 >+++ src/mapgen.c 2009-01-04 19:41:29.000000000 +0100 >@@ -29,6 +29,7 @@ > #include <SDL.h> > #include "save.h" > #include "levelblit.h" >+#include "data.h" > > void NewLevel(); > >@@ -480,15 +481,15 @@ > > // First room > if (room_id == 0) { >- Paint(place_x+1, place_y+1, room_w-2, room_h-2, "dat/d/centre.loc"); >+ Paint(place_x+1, place_y+1, room_w-2, room_h-2, DATA_DIR "/d/centre.loc"); > } > // Power object rooms > if ((room_id % 1000) == 499) { >- Paint(place_x+1, place_y+1, room_w-2, room_h-2, "dat/d/weapon.loc"); >+ Paint(place_x+1, place_y+1, room_w-2, room_h-2, DATA_DIR "/d/weapon.loc"); > } > // Boss rooms > if ((room_id % 1000) == 999) { >- Paint(place_x+1, place_y+1, room_w-2, room_h-2, "dat/d/bossroom.loc"); >+ Paint(place_x+1, place_y+1, room_w-2, room_h-2, DATA_DIR "/d/bossroom.loc"); > } > } > >Files /tmp/meritous_v12_src/src/mapgen.o and src/mapgen.o differ >Files /tmp/meritous_v12_src/src/save.o and src/save.o differ >Files /tmp/meritous_v12_src/src/tiles.o and src/tiles.o differ
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 253779
:
177395
|
177397
| 177399 |
265513