Skip to content

Commit

Permalink
2007-02-01 Krzysztof Kosciuszkiewicz <[email protected]>
Browse files Browse the repository at this point in the history
	* V115

	* Rewrite of vtest2.c, uses only ogg,vorbis,theora and Just Works (TM).

	* Added gamedata.h with data structures that can be stored in files and
	with prototypes of functions that read/write the structures.

	* Added gamedata.c with heavy and ugly macrology for defining portable
	functions that access data structures on disk. Bottom part could be
	autogenerated from gamedata.h

	* Rewrite of Replay() in replay.c to use functions from gamedata.h

	* Removed -I. from CFLAGS and changed sources accordingly.

	* Partial rewrite of sdl.c to enable migration to sdl surfaces for
	graphics and overlays for movies. Performance sucks at the moment.
  • Loading branch information
drvee committed Feb 1, 2007
1 parent f92e966 commit e8082ba
Show file tree
Hide file tree
Showing 24 changed files with 1,636 additions and 788 deletions.
2 changes: 1 addition & 1 deletion Buzz_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ typedef int32_t i32;
#include <sys/stat.h>

// EMS Includes
#include "sv_lib.h"
// #include "sv_lib.h"

#pragma pack(1)

Expand Down
20 changes: 20 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
2007-02-01 Krzysztof Kosciuszkiewicz <[email protected]>

* V115

* Rewrite of vtest2.c, uses only ogg,vorbis,theora and Just Works (TM).

* Added gamedata.h with data structures that can be stored in files and
with prototypes of functions that read/write the structures.

* Added gamedata.c with heavy and ugly macrology for defining portable
functions that access data structures on disk. Bottom part could be
autogenerated from gamedata.h

* Rewrite of Replay() in replay.c to use functions from gamedata.h

* Removed -I. from CFLAGS and changed sources accordingly.

* Partial rewrite of sdl.c to enable migration to sdl surfaces for
graphics and overlays for movies. Performance sucks at the moment.

2007-01-31 Michael McCarty <[email protected]>

* V114
Expand Down
21 changes: 10 additions & 11 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ EXTRA_WARNINGS = -Wextra -Wno-unused-parameter \
-Wno-char-subscripts -Wno-deprecated-declarations \
-Werror

CFLAGS = -g -Wall -I. `sdl-config --cflags` -std=c99
CFLAGS = -g -Wall `sdl-config --cflags` -std=c99

# Personal Makefile
-include Makefile.$(LOGNAME)
Expand Down Expand Up @@ -52,9 +52,9 @@ uninstall:
rm -rf $(DESTDIR)/usr/share/doc/raceintospace
rm -f $(DESTDIR)/usr/share/raceintospace/README

BARIS_HFILES = Buzz_inc.h data.h endianness.h externs.h mis.h mtype.h \
macros.h music.h pace.h pcx_hdr.h proto.h records.h soundfx.h \
sv_lib.h uc.h soundint.h
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

BARIS_OBJS = admin.o aimast.o aimis.o aipur.o ast0.o ast1.o \
ast2.o ast3.o ast4.o budget.o crew.o endgame.o \
Expand All @@ -64,31 +64,30 @@ BARIS_OBJS = admin.o aimast.o aimis.o aipur.o ast0.o ast1.o \
news_suq.o \
place.o port.o prefs.o prest.o radar.o rdplex.o records.o \
replay.o review.o rush.o start.o \
vab.o pace.o gx.o gr.o sdl.o music.o
vab.o pace.o gx.o gr.o sdl.o music.o gamedata.o

$(PROG_NAME): $(BARIS_OBJS)
$(CC) $(CFLAGS) -o $(PROG_NAME) $(BARIS_OBJS) $(LIBS)

# $(BARIS_OBJS): $(BARIS_HFILES)


imgsplit: imgsplit.o
$(CC) $(CFLAGS) -o imgsplit imgsplit.o -lm

vtest: vtest.o
$(CC) $(CFLAGS) -o vtest vtest.o -lasound -lm

ifeq (@have_avformat@, yes)
ifeq (@have_theora@@have_vorbis@,yesyes)
PROGS += vtest2

vtest2.o: vtest2.c
@echo "$(CC) ...flags... -c $*.c"
@$(CC) $(CFLAGS) `ffmpeg-config --cflags` $(EXTRA_WARNINGS) -c $*.c
@$(CC) $(CFLAGS) $(EXTRA_WARNINGS) -c $*.c

vtest2: vtest2.o
$(CC) $(CFLAGS) -o vtest2 vtest2.o `ffmpeg-config --libs avcodec avformat` `sdl-config --libs`
$(CC) $(LDFLAGS) -o vtest2 vtest2.o -logg -lvorbis -ltheora -lSDL
else
vtest2: FORCE
@echo "You don't have libavformat required for vtest2!"; exit 1
@echo "You don't have libogg and/or libtheora required for vtest2!"; exit 1
endif

decode: decode.o
Expand Down
13 changes: 2 additions & 11 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
note: some of the wait_??.frm movies are 14 frames per second instead of 8

for i in *; do (cd $i; for j in *.ppm; do cjpeg -optimize -quality 30 $j > $j.jpeg; echo $i/$j; done) done

mjpeg compressing all the movies: 50 megabytes

ueva_08


autosave

on a mission failure, replay mission doesn't show the explosion
Expand All @@ -16,6 +7,8 @@ think that it also pauses audio and video.

in the baby screens, don't down sample then up sample

factor out common parts of replay.c and mis_c.c

=======
fades
implement config opts for no anim
Expand All @@ -32,8 +25,6 @@ optimize grPutPixel and grGetPixel
the gx routines should clip - thats easy, but right now they
make assertions about arguments. Problem fixed in port.c

try mpeg encoding the video

Yank strings into a separate string table

================================================================
Expand Down
2 changes: 2 additions & 0 deletions av.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#define _AV_H

#include <SDL/SDL.h>

#define AV_NUM_CHANNELS 2
#define AV_ALL_CHANNELS -1
#define AV_SOUND_CHANNEL 0
Expand Down
20 changes: 19 additions & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,29 @@ dnl Get the operating system and version number...
uname=`uname`

AC_PROG_CC
AC_C_INLINE
AC_C_BIGENDIAN(AC_DEFINE([__BIG_ENDIAN__]))

AC_CHECK_LIB(vorbisfile,main)
AC_CHECK_LIB(asound,main)
AC_CHECK_LIB(m,main)
AC_CHECK_LIB(SDL,main)
AC_CHECK_LIB([SDL],main)
dnl avcodec depends on avformat so just test the former
AC_CHECK_LIB(ogg,ogg_stream_init,
[
AC_DEFINE([HAVE_LIBOGG])
AC_SUBST(have_ogg, yes)
AC_CHECK_LIB(theora,theora_decode,
[
AC_DEFINE([HAVE_LIBTHEORA])
AC_SUBST(have_theora, yes)
])
AC_CHECK_LIB(vorbis,vorbis_synthesis,
[
AC_DEFINE([HAVE_LIBVORBIS])
AC_SUBST(have_vorbis, yes)
])
])

AX_CREATE_STDINT_H(int_types.h)

Expand Down
14 changes: 12 additions & 2 deletions data.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,18 @@ Astronaut.TrainingLevel: 0 = None
*/

#include "data_defs.h"
// BARIS program definitions

#define NUM_PLAYERS 2
#define MAX_LAUNCHPADS 3
#define MAX_MISSIONS 3

// Astronaut related
#define ASTRONAUT_POOLS 5
#define ASTRONAUT_CREW_MAX 8
#define ASTRONAUT_FLT_CREW_MAX 4

#define ASTRONAUT_MOOD_THRESHOLD 40

#pragma pack (1)

Expand Down Expand Up @@ -516,7 +526,7 @@ typedef struct {
} PatchHdrSmall;


#define MAX_REPLAY_ITEMS 200L
#define MAX_REPLAY_ITEMS 200L
#define MAX_REPLAY_ITEM_OFFSETS 35

// Mission Replay Data Structure
Expand Down
13 changes: 0 additions & 13 deletions data_defs.h

This file was deleted.

Loading

0 comments on commit e8082ba

Please sign in to comment.