mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-26 17:14:48 -04:00
github publish
This commit is contained in:
commit
506e23bf32
542 changed files with 120675 additions and 0 deletions
37
LIBS/WAV_MEM.C
Normal file
37
LIBS/WAV_MEM.C
Normal file
|
@ -0,0 +1,37 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "WAV_MEM.H"
|
||||
|
||||
char *find_chunk(char *wav,char *name)
|
||||
{
|
||||
long next;
|
||||
|
||||
wav+=12;
|
||||
do
|
||||
{
|
||||
if (!strncmp(name,wav,4)) return wav+4;
|
||||
wav+=4;
|
||||
memcpy(&next,wav,4);
|
||||
wav+=next+4;
|
||||
}
|
||||
while (1);
|
||||
}
|
||||
|
||||
int get_chunk_size(char *wav)
|
||||
{
|
||||
long size;
|
||||
|
||||
memcpy(&size,wav,4);
|
||||
return(size);
|
||||
}
|
||||
|
||||
int read_chunk(char *wav,void *mem)
|
||||
{
|
||||
|
||||
wav+=4;
|
||||
memcpy(mem,wav,get_chunk_size(wav-4));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue