Skip to content

Commit

Permalink
Remove unused sounds
Browse files Browse the repository at this point in the history
  • Loading branch information
joyrider3774 committed Jan 15, 2025
1 parent 4640d40 commit 1ea61f6
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 43 deletions.
2 changes: 0 additions & 2 deletions Make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ wav2vircon assets\music\title.wav -o obj\title.vsnd || goto :failed
wav2vircon assets\sound\blockselect.wav -o obj\blockselect.vsnd || goto :failed
wav2vircon assets\sound\delete.wav -o obj\delete.vsnd || goto :failed
wav2vircon assets\sound\error.wav -o obj\error.vsnd || goto :failed
wav2vircon assets\sound\fiveminute.wav -o obj\fiveminute.vsnd || goto :failed
wav2vircon assets\sound\goodbye.wav -o obj\goodbye.vsnd || goto :failed
wav2vircon assets\sound\menu.wav -o obj\menu.vsnd || goto :failed
wav2vircon assets\sound\one.wav -o obj\one.vsnd || goto :failed
wav2vircon assets\sound\oneminute.wav -o obj\oneminute.vsnd || goto :failed
Expand Down
2 changes: 0 additions & 2 deletions Znax.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
<sound path="obj/blockselect.vsnd" />
<sound path="obj/delete.vsnd" />
<sound path="obj/error.vsnd" />
<sound path="obj/fiveminute.vsnd" />
<sound path="obj/goodbye.vsnd" />
<sound path="obj/menu.vsnd" />
<sound path="obj/one.vsnd" />
<sound path="obj/oneminute.vsnd" />
Expand Down
Binary file removed assets/sound/fiveminute.wav
Binary file not shown.
Binary file removed assets/sound/goodbye.wav
Binary file not shown.
29 changes: 9 additions & 20 deletions src/caudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,70 +44,59 @@ int* filenameToAudio(int* FileName)
*result = 3;
}

if (strcmp(FileName, "fiveminute") == 0)
{
result = (int*) malloc(sizeof(int));
*result = 4;
}

if (strcmp(FileName, "goodbye") == 0)
{
result = (int*) malloc(sizeof(int));
*result = 5;
}

if (strcmp(FileName, "menu") == 0)
{
result = (int*) malloc(sizeof(int));
*result = 6;
*result = 4;
}

if (strcmp(FileName, "one") == 0)
{
result = (int*) malloc(sizeof(int));
*result = 7;
*result = 5;
}

if (strcmp(FileName, "oneminute") == 0)
{
result = (int*) malloc(sizeof(int));
*result = 8;
*result = 6;
}

if (strcmp(FileName, "readygo") == 0)
{
result = (int*) malloc(sizeof(int));
*result = 9;
*result = 7;
}

if (strcmp(FileName, "select") == 0)
{
result = (int*) malloc(sizeof(int));
*result = 10;
*result = 8;
}

if (strcmp(FileName, "three") == 0)
{
result = (int*) malloc(sizeof(int));
*result = 11;
*result = 9;
}

if (strcmp(FileName, "timeover") == 0)
{
result = (int*) malloc(sizeof(int));
*result = 12;
*result = 10;
}

if (strcmp(FileName, "two") == 0)
{
result = (int*) malloc(sizeof(int));
*result = 13;
*result = 11;
}

if (strcmp(FileName, "welcome") == 0)
{
result = (int*) malloc(sizeof(int));
*result = 14;
*result = 12;
}


Expand Down
26 changes: 12 additions & 14 deletions src/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define Fixed 0
#define Relative 1

#define NrOfSounds 14
#define NrOfSounds 12
#define NrOfRows 10
#define NrOfCols 14
#define NrOfBlockColors 5
Expand All @@ -32,19 +32,17 @@
#define TileWidth 35
#define TileHeight 35
#define SND_READYGO 0
#define SND_5MINUTE 1
#define SND_1MINUTE 2
#define SND_3 3
#define SND_2 4
#define SND_1 5
#define SND_TIMEOVER 6
#define SND_MENU 7
#define SND_SELECT 8
#define SND_WELCOME 9
#define SND_GOODBYE 10
#define SND_DELETE 11
#define SND_BLOCKSELECT 12
#define SND_ERROR 13
#define SND_1MINUTE 1
#define SND_3 2
#define SND_2 3
#define SND_1 4
#define SND_TIMEOVER 5
#define SND_MENU 6
#define SND_SELECT 7
#define SND_WELCOME 8
#define SND_DELETE 9
#define SND_BLOCKSELECT 10
#define SND_ERROR 11

#define SCALE 1.5

Expand Down
2 changes: 0 additions & 2 deletions src/gamefuncs.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ void LoadSounds()
Sounds[SND_2] = CAudio_LoadSound("two");
Sounds[SND_3] = CAudio_LoadSound("three");
Sounds[SND_1MINUTE] = CAudio_LoadSound("oneminute");
Sounds[SND_5MINUTE] = CAudio_LoadSound("fiveminute");
Sounds[SND_TIMEOVER] = CAudio_LoadSound("timeover");
Sounds[SND_MENU] = CAudio_LoadSound("menu");
Sounds[SND_SELECT] = CAudio_LoadSound("select");
Sounds[SND_WELCOME] = CAudio_LoadSound("welcome");
Sounds[SND_GOODBYE] = CAudio_LoadSound("goodbye");
Sounds[SND_DELETE] = CAudio_LoadSound("delete");
Sounds[SND_BLOCKSELECT] = CAudio_LoadSound("blockselect");
Sounds[SND_ERROR] = CAudio_LoadSound("error");
Expand Down
3 changes: 0 additions & 3 deletions src/state_game.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ void Game()
Timer-= 1;
switch (Timer)
{
case 300 :
CAudio_PlaySound(Sounds[SND_5MINUTE],0);
break;
case 60:
CAudio_PlaySound(Sounds[SND_1MINUTE],0);
break;
Expand Down

0 comments on commit 1ea61f6

Please sign in to comment.