Skip to content

Commit

Permalink
Misc changes for 1.9 missed in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-gordon committed Oct 28, 2022
1 parent c1b0325 commit 2d21552
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 21 deletions.
38 changes: 19 additions & 19 deletions Replayer_Amiga/hvl_replay.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ struct hvl_tune *hvl_load_ahx( uint8 *buf, uint32 buflen, uint32 defstereo, uint
bptr += 22 + bptr[21]*4;
}

ht = IExec->AllocVec( hs, MEMF_ANY );
ht = IExec->AllocVecTags( hs, TAG_END );
if( !ht )
{
IExec->FreeVec( buf );
Expand Down Expand Up @@ -534,39 +534,39 @@ struct hvl_tune *hvl_LoadTune( TEXT *name, uint32 freq, uint32 defstereo )
TEXT *nptr;
uint32 buflen, i, j, posn, insn, ssn, chnn, hs, trkl, trkn;
BPTR lock, fh;
struct FileInfoBlock *fib;
struct ExamineData *exd;
struct hvl_plsentry *ple;

fib = IDOS->AllocDosObjectTags( DOS_FIB, TAG_DONE );
if( !fib )
{
printf( "Out of memory\n" );
return NULL;
}

lock = IDOS->Lock( name, ACCESS_READ );
if( !lock )
{
IDOS->FreeDosObject( DOS_FIB, fib );
printf( "Unable to find '%s'\n", name );
return NULL;
}

IDOS->Examine( lock, fib );
if( !FIB_IS_FILE( fib ) )
exd = IDOS->ExamineObjectTags( EX_LockInput, lock, TAG_END );
if( NULL == exd )
{
IDOS->UnLock( lock );
printf( "Bad file!\n" );
return NULL;
}

if( !EXD_IS_FILE( exd ) )
{
IDOS->UnLock( lock );
IDOS->FreeDosObject( DOS_FIB, fib );
IDOS->FreeDosObject( DOS_EXAMINEDATA, exd );
printf( "Bad file!\n" );
return NULL;
}

buflen = fib->fib_Size;
buf = IExec->AllocVec( buflen, MEMF_ANY );
buflen = exd->FileSize;
buf = IExec->AllocVecTags( buflen, TAG_END );
if( !buf )
{
IDOS->UnLock( lock );
IDOS->FreeDosObject( DOS_FIB, fib );
IDOS->FreeDosObject( DOS_EXAMINEDATA, exd );
printf( "Out of memory!\n" );
return NULL;
}
Expand All @@ -576,7 +576,7 @@ struct hvl_tune *hvl_LoadTune( TEXT *name, uint32 freq, uint32 defstereo )
{
IExec->FreeVec( buf );
IDOS->UnLock( lock );
IDOS->FreeDosObject( DOS_FIB, fib );
IDOS->FreeDosObject( DOS_EXAMINEDATA, exd );
printf( "Can't open file\n" );
return NULL;
}
Expand All @@ -585,12 +585,12 @@ struct hvl_tune *hvl_LoadTune( TEXT *name, uint32 freq, uint32 defstereo )
{
IExec->FreeVec( buf );
IDOS->Close( fh );
IDOS->FreeDosObject( DOS_FIB, fib );
IDOS->FreeDosObject( DOS_EXAMINEDATA, exd );
printf( "Unable to read from file!\n" );
return NULL;
}
IDOS->Close( fh );
IDOS->FreeDosObject( DOS_FIB, fib );
IDOS->FreeDosObject( DOS_EXAMINEDATA, exd );

if( ( buf[0] == 'T' ) &&
( buf[1] == 'H' ) &&
Expand Down Expand Up @@ -647,7 +647,7 @@ struct hvl_tune *hvl_LoadTune( TEXT *name, uint32 freq, uint32 defstereo )
bptr += 22 + bptr[21]*5;
}

ht = IExec->AllocVec( hs, MEMF_ANY );
ht = IExec->AllocVecTags( hs, TAG_END );
if( !ht )
{
IExec->FreeVec( buf );
Expand Down
2 changes: 2 additions & 0 deletions Replayer_Amiga/play_hvl.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include <proto/exec.h>
#include <proto/dos.h>

#define __USE_BASETYPE__ 1

#include <proto/ahi.h>

#include "hvl_replay.h"
Expand Down
2 changes: 1 addition & 1 deletion Replayer_Windows/ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Hively Tracker Windows Command Line Player Change Log
1.9
===

+ 1.8 replayer bug fixes
+ 1.9 replayer bug fixes


1.8
Expand Down
1 change: 1 addition & 0 deletions Replayer_Windows/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ LFLAGS += -g -lm -lwinmm
TARGET = play_hvl.exe

OBJECTS = hvl_replay.o \
hvl_tables.o \
main.o


Expand Down
2 changes: 1 addition & 1 deletion hvl2wav/makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PLATFORM = $(shell uname)
PLATFORM ?= $(shell uname)

####### DEFAULT SETTINGS HERE #######

Expand Down

0 comments on commit 2d21552

Please sign in to comment.