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:
Gabriel Ravier 2019-06-14 16:49:32 +02:00
parent 620401b671
commit 3a80d8f4fb
No known key found for this signature in database
GPG key ID: 1E75F156884F3DCE
3 changed files with 113 additions and 95 deletions

View file

@ -80,7 +80,7 @@ void OrganyaReleaseNote()
#ifdef FIX_BUGS #ifdef FIX_BUGS
delete[] info.tdata[i].note_p; delete[] info.tdata[i].note_p;
#else #else
delete info.tdata[i].note_p; // should be delete[] delete info.tdata[i].note_p; // Should be delete[]
#endif #endif
info.tdata[i].note_p = NULL; 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]->Stop();
lpDRAMBUFFER[track]->SetCurrentPosition(0); lpDRAMBUFFER[track]->SetCurrentPosition(0);
break; break;
case 1: case 1:
lpDRAMBUFFER[track]->Stop(); lpDRAMBUFFER[track]->Stop();
lpDRAMBUFFER[track]->SetCurrentPosition(0); lpDRAMBUFFER[track]->SetCurrentPosition(0);
ChangeDramFrequency(key, track); ChangeDramFrequency(key, track);
lpDRAMBUFFER[track]->Play(false); lpDRAMBUFFER[track]->Play(false);
break; break;
case 2: case 2:
break; break;
case -1: case -1:
break; break;
} }
@ -429,9 +432,14 @@ void LoadOrganya(const char *name)
memcpy(pass_check, p, 6); memcpy(pass_check, p, 6);
p += 6; p += 6;
if (!memcmp(pass_check, "Org-01", 6))ver = 1; if (!memcmp(pass_check, "Org-01", 6))
if (!memcmp(pass_check, "Org-02", 6))ver = 2; ver = 1;
//if (!memcmp(pass_check, "Org-03", 6))ver = 2;
if (!memcmp(pass_check, "Org-02", 6))
ver = 2;
// if (!memcmp(pass_check, "Org-03", 6))
// ver = 2;
if (!ver) if (!ver)
{ {
@ -457,9 +465,11 @@ void LoadOrganya(const char *name)
// Load notes // Load notes
NOTELIST *np; NOTELIST *np;
for (int j = 0; j < 16; j++) { for (int j = 0; j < 16; j++)
{
// The first note from is NULL // 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; info.tdata[j].note_list = NULL;
continue; continue;
} }
@ -471,7 +481,8 @@ void LoadOrganya(const char *name)
np->to = (np + 1); np->to = (np + 1);
np++; 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->from = (np - 1);
np->to = (np + 1); np->to = (np + 1);
np++; np++;

View file

@ -3,7 +3,8 @@
#include "WindowsWrapper.h" #include "WindowsWrapper.h"
//Below are Organya song data structures //Below are Organya song data structures
struct NOTELIST { struct NOTELIST
{
NOTELIST *from; //Previous address NOTELIST *from; //Previous address
NOTELIST *to; //Next address NOTELIST *to; //Next address
@ -15,7 +16,8 @@ struct NOTELIST {
}; };
//Track data * 8 //Track data * 8
struct TRACKDATA { struct TRACKDATA
{
unsigned short freq; //Frequency (1000 is default) unsigned short freq; //Frequency (1000 is default)
unsigned char wave_no; //Waveform No. unsigned char wave_no; //Waveform No.
signed char pipi; signed char pipi;
@ -26,7 +28,8 @@ struct TRACKDATA {
}; };
//Unique information held in songs //Unique information held in songs
struct MUSICINFO { struct MUSICINFO
{
unsigned short wait; unsigned short wait;
BOOL loaded; BOOL loaded;
BOOL playing; BOOL playing;

View file

@ -255,13 +255,17 @@ BOOL InitializeGame()
if (!TransferStage(13, 200, 10, 8)) if (!TransferStage(13, 200, 10, 8))
{ {
// TODO - restore this when ghWnd is available // TODO - restore this when ghWnd is available
/*#if defined(NONPORTABLE) && defined(WINDOWS) /*
#if defined(NONPORTABLE) && defined(WINDOWS)
#ifdef JAPANESE #ifdef JAPANESE
MessageBoxA(ghWnd, "ステージの読み込みに失敗", "エラー", MB_OK); MessageBoxA(ghWnd, "ステージの読み込みに失敗", "エラー", MB_OK);
#else #else
MessageBoxA(ghWnd, "Failed to load stage", "Error", MB_OK); MessageBoxA(ghWnd, "Failed to load stage", "Error", MB_OK);
#endif #endif
#else*/ #else
*/
#ifdef JAPANESE #ifdef JAPANESE
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", "ステージの読み込みに失敗", NULL); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", "ステージの読み込みに失敗", NULL);
#else #else