Skip to content

Commit

Permalink
2007-02-25 Krzysztof Kosciuszkiewicz <[email protected]>
Browse files Browse the repository at this point in the history
	* V142
	* pace.c (brandom): Use higher bits from rand().
	(randomize): Uses wall time as RNG seed.
	Removed biostime().
	* utils.c: New file, factored out from pace.c.
	* mmfile.c (mm_decode_audio): Support for many channels.
	(mm_convert_audio): New function, but SDL resampling is crap.
	* admin.c (FileAccess, EndOfTurnSave): Use randomize().
	* Makefile: Added utils object file.
  • Loading branch information
drvee committed Feb 25, 2007
1 parent 2873ee6 commit 7ba7dc6
Show file tree
Hide file tree
Showing 23 changed files with 375 additions and 312 deletions.
17 changes: 17 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
2007-02-25 Krzysztof Kosciuszkiewicz <[email protected]>

* V142

* pace.c (brandom): Use higher bits from rand().
(randomize): Uses wall time as RNG seed.
Removed biostime().

* utils.c: New file, factored out from pace.c.

* mmfile.c (mm_decode_audio): Support for many channels.
(mm_convert_audio): New function, but SDL resampling is crap.

* admin.c (FileAccess, EndOfTurnSave): Use randomize().

* Makefile: Added utils object file.

2007-02-24 Pace Willisson <[email protected]>

* V141
Expand Down
7 changes: 4 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,21 @@ PROGS = $(addsuffix @EXEEXT@, \
EXTRA_SOURCES = AUTHORS README COPYING DEVELOPER TODO ChangeLog \
raceintospace.6 \
configure Makefile.in race.h.in \
$(shell ls m4/*.m4) \
$(wildcard m4/*.m4) \
$(shell find os_macosx -name CVS -prune -o -type f -print) \
os_win32/configure.mingw os_win32/Shuttle.ico \
os_win32/installer.nsi.in os_win32/Makefile.os

BARIS_HFILES = av.h Buzz_inc.h data.h endianness.h externs.h gamedata.h \
int_types.h macros.h mis.h music.h pace.h proto.h records.h soundfx.h \
soundint.h mmfile.h options.h fs.h
soundint.h mmfile.h options.h fs.h utils.h

BARIS_OBJS = $(addsuffix .@OBJEXT@, \
admin aimast aimis aipur ast0 ast1 ast2 ast3 ast4 budget crew endgame \
endianness futbub future hardef intel intro main mc2 mc mis_c mis_m museum \
newmis news news_sup news_suq place port prefs prest radar rdplex records \
replay review rush start vab pace gx gr sdl music gamedata mmfile options fs \
utils \
)

all: $(PROG_NAME)
Expand Down Expand Up @@ -96,7 +97,7 @@ $(PROG_NAME): $(BARIS_OBJS)
@echo "$(CC) ...flags... -c $<"
@$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_WARNINGS) -c $<

vtest2@EXEEXT@: $(addsuffix @OBJEXT@, vtest2 mmfile)
vtest2@EXEEXT@: $(addsuffix .@OBJEXT@, vtest2 mmfile utils)
$(CC) $(CFLAGS) -o $@ $^ @OGG_LIBS@ @VORBIS_LIBS@ @THEORA_LIBS@ @SDL_LIBS@

imgsplit@EXEEXT@: imgsplit.@OBJEXT@
Expand Down
5 changes: 3 additions & 2 deletions admin.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "Buzz_inc.h"
#include "externs.h"
#include "av.h"
#include "utils.h"

#define MODEM_ERROR 4
#define NOTSAME 2
Expand Down Expand Up @@ -348,7 +349,7 @@ void FileAccess(char mode)
int moo = 0;
srand(SaveHdr->compSize);
for(moo=0;moo<SaveHdr->compSize;moo++) load_buffer[moo]^=random(256);
srand(biostime(0,0L));
randomize();
}
#endif
RLED((char *) load_buffer,(char *)Data,SaveHdr->compSize);
Expand Down Expand Up @@ -1381,7 +1382,7 @@ void EndOfTurnSave(char *inData, int dataLen)
}
// Reseed the random number generator
// -- this may have been the source of created complaints about randomness
srand(biostime(0,0L));
randomize();
}
#endif

Expand Down
1 change: 1 addition & 0 deletions fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "fs.h"
#include "options.h"
#include "pace.h"
#include "utils.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
Expand Down
1 change: 1 addition & 0 deletions gx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <assert.h>
#include "externs.h"
#include "av.h"
#include "utils.h"
#include <SDL.h>

extern unsigned char *screen;
Expand Down
1 change: 1 addition & 0 deletions intro.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include "Buzz_inc.h"
#include "externs.h"
#include "utils.h"
GXHEADER local2;

struct CREDIT {
Expand Down
1 change: 1 addition & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include "Buzz_inc.h"
#include "options.h"
#include "utils.h"

#ifdef CONFIG_MACOSX
// SDL.h needs to be included here to replace the original main() with
Expand Down
1 change: 1 addition & 0 deletions mis_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "mis.h"
#include "av.h"
#include "mmfile.h"
#include "utils.h"

#define FRM_Delay 22

Expand Down
1 change: 1 addition & 0 deletions mis_m.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "Buzz_inc.h"
#include "externs.h"
#include "mis.h"
#include "utils.h"

#define MIS_SET 0 // FAILURES ON

Expand Down
Loading

0 comments on commit 7ba7dc6

Please sign in to comment.