Did initial sweep with regexes
Changed regex to "((//|\;)[^ \t\n]|(for|while|if|while|do|void|int|bool)\((for|while|if|while|do)\ \(.*\)\;|\(\ |\ \)|//\ [a-z]|\ \ )|break;\n[\t]*[^\n\t\}(\/\/ Fallthrough]|[^\t\n]\{[^\n]|[^\n\t]\}[^\n]|\,[^\ ]" Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
parent
620401b671
commit
3a80d8f4fb
3 changed files with 113 additions and 95 deletions
|
@ -80,7 +80,7 @@ void OrganyaReleaseNote()
|
|||
#ifdef FIX_BUGS
|
||||
delete[] info.tdata[i].note_p;
|
||||
#else
|
||||
delete info.tdata[i].note_p; // should be delete[]
|
||||
delete info.tdata[i].note_p; // Should be delete[]
|
||||
#endif
|
||||
info.tdata[i].note_p = NULL;
|
||||
}
|
||||
|
@ -305,14 +305,17 @@ void PlayDramObject(unsigned char key, int mode, signed char track)
|
|||
lpDRAMBUFFER[track]->Stop();
|
||||
lpDRAMBUFFER[track]->SetCurrentPosition(0);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
lpDRAMBUFFER[track]->Stop();
|
||||
lpDRAMBUFFER[track]->SetCurrentPosition(0);
|
||||
ChangeDramFrequency(key, track);
|
||||
lpDRAMBUFFER[track]->Play(false);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
break;
|
||||
|
||||
case -1:
|
||||
break;
|
||||
}
|
||||
|
@ -429,9 +432,14 @@ void LoadOrganya(const char *name)
|
|||
memcpy(pass_check, p, 6);
|
||||
p += 6;
|
||||
|
||||
if (!memcmp(pass_check, "Org-01", 6))ver = 1;
|
||||
if (!memcmp(pass_check, "Org-02", 6))ver = 2;
|
||||
//if (!memcmp(pass_check, "Org-03", 6))ver = 2;
|
||||
if (!memcmp(pass_check, "Org-01", 6))
|
||||
ver = 1;
|
||||
|
||||
if (!memcmp(pass_check, "Org-02", 6))
|
||||
ver = 2;
|
||||
|
||||
// if (!memcmp(pass_check, "Org-03", 6))
|
||||
// ver = 2;
|
||||
|
||||
if (!ver)
|
||||
{
|
||||
|
@ -457,9 +465,11 @@ void LoadOrganya(const char *name)
|
|||
// Load notes
|
||||
NOTELIST *np;
|
||||
|
||||
for (int j = 0; j < 16; j++) {
|
||||
for (int j = 0; j < 16; j++)
|
||||
{
|
||||
// The first note from is NULL
|
||||
if (info.tdata[j].note_num == 0) {
|
||||
if (info.tdata[j].note_num == 0)
|
||||
{
|
||||
info.tdata[j].note_list = NULL;
|
||||
continue;
|
||||
}
|
||||
|
@ -471,7 +481,8 @@ void LoadOrganya(const char *name)
|
|||
np->to = (np + 1);
|
||||
np++;
|
||||
|
||||
for (int i = 1; i < info.tdata[j].note_num; i++) {
|
||||
for (int i = 1; i < info.tdata[j].note_num; i++)
|
||||
{
|
||||
np->from = (np - 1);
|
||||
np->to = (np + 1);
|
||||
np++;
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
#include "WindowsWrapper.h"
|
||||
|
||||
//Below are Organya song data structures
|
||||
struct NOTELIST {
|
||||
struct NOTELIST
|
||||
{
|
||||
NOTELIST *from; //Previous address
|
||||
NOTELIST *to; //Next address
|
||||
|
||||
|
@ -15,7 +16,8 @@ struct NOTELIST {
|
|||
};
|
||||
|
||||
//Track data * 8
|
||||
struct TRACKDATA {
|
||||
struct TRACKDATA
|
||||
{
|
||||
unsigned short freq; //Frequency (1000 is default)
|
||||
unsigned char wave_no; //Waveform No.
|
||||
signed char pipi;
|
||||
|
@ -26,7 +28,8 @@ struct TRACKDATA {
|
|||
};
|
||||
|
||||
//Unique information held in songs
|
||||
struct MUSICINFO {
|
||||
struct MUSICINFO
|
||||
{
|
||||
unsigned short wait;
|
||||
BOOL loaded;
|
||||
BOOL playing;
|
||||
|
|
|
@ -255,13 +255,17 @@ BOOL InitializeGame()
|
|||
if (!TransferStage(13, 200, 10, 8))
|
||||
{
|
||||
// TODO - restore this when ghWnd is available
|
||||
/*#if defined(NONPORTABLE) && defined(WINDOWS)
|
||||
/*
|
||||
|
||||
#if defined(NONPORTABLE) && defined(WINDOWS)
|
||||
#ifdef JAPANESE
|
||||
MessageBoxA(ghWnd, "ステージの読み込みに失敗", "エラー", MB_OK);
|
||||
#else
|
||||
MessageBoxA(ghWnd, "Failed to load stage", "Error", MB_OK);
|
||||
#endif
|
||||
#else*/
|
||||
#else
|
||||
|
||||
*/
|
||||
#ifdef JAPANESE
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", "ステージの読み込みに失敗", NULL);
|
||||
#else
|
||||
|
|
Loading…
Add table
Reference in a new issue