Commit 4dce6cc4 authored by Steven Fuller's avatar Steven Fuller

* Moved rest of sound items to Sounds.c

parent db1e5877
...@@ -25,19 +25,6 @@ unsigned char *VideoPointer; ...@@ -25,19 +25,6 @@ unsigned char *VideoPointer;
Word VideoWidth; Word VideoWidth;
LongWord YTable[480]; LongWord YTable[480];
Word FontX;
Word FontY;
unsigned char *FontPtr;
unsigned char *FontWidths;
Word FontHeight;
Word FontFirst;
Word FontLast;
Word FontLoaded;
Word FontInvisible;
unsigned char FontOrMask[16];
Word SystemState=3;
#define BRGR 0x42524752 #define BRGR 0x42524752
/********************************** /**********************************
...@@ -359,49 +346,6 @@ void DLZSS(Byte *Dest,Byte *Src,LongWord Length) ...@@ -359,49 +346,6 @@ void DLZSS(Byte *Dest,Byte *Src,LongWord Length)
} while (Length); } while (Length);
} }
void DLZSSSound(Byte *Dest,Byte *Src,LongWord Length)
{
Word BitBucket;
Word RunCount;
Word Fun;
Byte *BackPtr;
if (!Length) {
return;
}
BitBucket = (Word) Src[0] | 0x100;
++Src;
do {
if (BitBucket&1) {
Dest[0] = Src[0];
++Src;
++Dest;
--Length;
} else {
RunCount = (Word) Src[1] | ((Word) Src[0]<<8);
Fun = 0x1000-(RunCount&0xfff);
BackPtr = Dest-Fun;
RunCount = ((RunCount>>12) & 0x0f) + 3;
if (Length >= RunCount) {
Length -= RunCount;
} else {
printf("Overrun: l:%d r:%d\n", Length, RunCount);
RunCount = Length;
Length = 0;
}
while (RunCount--) {
*Dest++ = *BackPtr++;
}
Src+=2;
}
BitBucket>>=1;
if (BitBucket==1) {
BitBucket = (Word)Src[0] | 0x100;
++Src;
}
} while (Length);
}
/********************************** /**********************************
Allocate some memory Allocate some memory
......
...@@ -19,6 +19,51 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -19,6 +19,51 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "wolfdef.h" #include "wolfdef.h"
Word SystemState=3;
void DLZSSSound(Byte *Dest,Byte *Src,LongWord Length)
{
Word BitBucket;
Word RunCount;
Word Fun;
Byte *BackPtr;
if (!Length) {
return;
}
BitBucket = (Word) Src[0] | 0x100;
++Src;
do {
if (BitBucket&1) {
Dest[0] = Src[0];
++Src;
++Dest;
--Length;
} else {
RunCount = (Word) Src[1] | ((Word) Src[0]<<8);
Fun = 0x1000-(RunCount&0xfff);
BackPtr = Dest-Fun;
RunCount = ((RunCount>>12) & 0x0f) + 3;
if (Length >= RunCount) {
Length -= RunCount;
} else {
printf("Overrun: l:%d r:%d\n", Length, RunCount);
RunCount = Length;
Length = 0;
}
while (RunCount--) {
*Dest++ = *BackPtr++;
}
Src+=2;
}
BitBucket>>=1;
if (BitBucket==1) {
BitBucket = (Word)Src[0] | 0x100;
++Src;
}
} while (Length);
}
/********************************** /**********************************
Stop the current song from playing Stop the current song from playing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment