Mercurial > otakunoraifu
comparison music2/music.cc @ 43:01aa5ddf7dc8
A lot of very minor improvements (deleted some unused variables, and other things like that...)
author | thib |
---|---|
date | Tue, 24 Mar 2009 19:45:48 +0000 |
parents | f88d47a4bf87 |
children | 15a18fbe6f21 |
comparison
equal
deleted
inserted
replaced
42:039d813d4cef | 43:01aa5ddf7dc8 |
---|---|
331 } | 331 } |
332 return info; | 332 return info; |
333 } | 333 } |
334 | 334 |
335 static SDL_RWops* OpenSDLRW(const char* path) { | 335 static SDL_RWops* OpenSDLRW(const char* path) { |
336 char cmdline_buf[1024]; | |
337 /* まず wav ファイルを探す */ | 336 /* まず wav ファイルを探す */ |
338 ARCINFO* info = file_searcher.Find(FILESEARCH::WAV,path,".wav"); | 337 ARCINFO* info = file_searcher.Find(FILESEARCH::WAV,path,".wav"); |
339 if (info == 0) { | 338 if (info == 0) { |
340 info = file_searcher.Find(FILESEARCH::WAV,path,".nwa"); | 339 info = file_searcher.Find(FILESEARCH::WAV,path,".nwa"); |
341 if (info == 0) info = file_searcher.Find(FILESEARCH::BGM,path,"nwa"); | 340 if (info == 0) info = file_searcher.Find(FILESEARCH::BGM,path,"nwa"); |
342 if (info) { // read NWA file | 341 if (info) { // read NWA file |
343 | 342 |
344 static char* nwa_buffer = 0; | |
345 int dummy; | 343 int dummy; |
346 FILE* f = info->OpenFile(&dummy); | 344 FILE* f = info->OpenFile(&dummy); |
347 static char* d = 0; | 345 static char* d = 0; |
348 int sz; | 346 int sz; |
349 if (d != 0) delete[] d; | 347 if (d != 0) delete[] d; |
363 } | 361 } |
364 return 0; | 362 return 0; |
365 } | 363 } |
366 | 364 |
367 static WAVFILE* OpenWaveFile(const char* path) { | 365 static WAVFILE* OpenWaveFile(const char* path) { |
368 char cmdline_buf[1024]; | |
369 /* まず wav ファイルを探す */ | 366 /* まず wav ファイルを探す */ |
370 ARCINFO* info = file_searcher.Find(FILESEARCH::WAV,path,".wav"); | 367 ARCINFO* info = file_searcher.Find(FILESEARCH::WAV,path,".wav"); |
371 if (info == 0) info = file_searcher.Find(FILESEARCH::BGM,path,"wav"); | 368 if (info == 0) info = file_searcher.Find(FILESEARCH::BGM,path,"wav"); |
372 if (info) { | 369 if (info) { |
373 int size; | 370 int size; |