Permalink
Browse files

MegaZeux 2.80h release.

  • Loading branch information...
ajs1984 committed Aug 11, 2008
1 parent 98c1ee0 commit 1b766c6eae29343c1ce4bd356b2fb5b75c302057
Showing with 7,904 additions and 5,501 deletions.
  1. +10 −28 Makefile
  2. +20 −12 Makefile.in
  3. +21 −4 Makefile.platform
  4. +6 −0 arch/Makefile.dist
  5. +20 −4 arch/Makefile.linux
  6. +5 −4 arch/Makefile.macos
  7. +4 −4 arch/Makefile.win32
  8. +15 −0 config.sh
  9. +10 −2 config.txt
  10. +0 −16 contrib/README.1ST
  11. 0 contrib/gdm2s3m/build.bat
  12. +15 −23 contrib/gdm2s3m/src/Makefile
  13. +21 −38 contrib/libmodplug/src/Makefile
  14. +117 −0 docs/changelog.txt
  15. BIN mzx_edit.chr
  16. +17 −4 package.sh
  17. +10 −3 src/Makefile
  18. +25 −7 src/audio.cpp
  19. +5 −3 src/audio.h
  20. +152 −217 src/block.cpp
  21. +1 −3 src/block.h
  22. +17 −13 src/board.cpp
  23. +2 −3 src/board.h
  24. +1,327 −590 src/char_ed.cpp
  25. +3 −3 src/char_ed.h
  26. +1 −3 src/charset.h
  27. +2 −0 src/config.h
  28. +34 −13 src/configure.cpp
  29. +7 −4 src/configure.h
  30. +1 −3 src/const.h
  31. +42 −7 src/counter.cpp
  32. +3 −3 src/counter.h
  33. +0 −40 src/counter_first_letter.h
  34. +6 −7 src/data.cpp
  35. +3 −5 src/data.h
  36. +3 −10 src/decrypt.cpp
  37. +2 −4 src/decrypt.h
  38. +2 −3 src/delay.cpp
  39. +2 −3 src/delay.h
  40. +388 −286 src/edit.cpp
  41. +1 −3 src/edit.h
  42. +424 −614 src/edit_di.cpp
  43. +4 −3 src/edit_di.h
  44. +1 −3 src/error.cpp
  45. +1 −3 src/error.h
  46. +86 −34 src/event.cpp
  47. +12 −4 src/event.h
  48. +74 −77 src/expr.cpp
  49. +24 −6 src/expr.h
  50. +4 −3 src/fill.cpp
  51. +1 −3 src/fill.h
  52. +2 −4 src/fix.cpp
  53. +2 −3 src/fsafeopen.cpp
  54. +1 −2 src/fsafeopen.h
  55. +189 −318 src/game.cpp
  56. +4 −3 src/game.h
  57. +3 −5 src/game2.cpp
  58. +1 −3 src/game2.h
  59. +1 −3 src/getpw.cpp
  60. +388 −164 src/graphics.cpp
  61. +47 −16 src/graphics.h
  62. +1 −3 src/helpsys.cpp
  63. +1 −3 src/helpsys.h
  64. +1 −3 src/hexchar.cpp
  65. +1 −3 src/hexchar.h
  66. +4 −4 src/idarray.cpp
  67. +1 −3 src/idarray.h
  68. +3 −4 src/idput.cpp
  69. +1 −3 src/idput.h
  70. +90 −24 src/intake.cpp
  71. +6 −7 src/intake.h
  72. +2 −4 src/killgbl.cpp
  73. +5 −6 src/macro.cpp
  74. +3 −5 src/macro.h
  75. +17 −31 src/main.cpp
  76. +25 −26 src/mzm.cpp
  77. +2 −4 src/mzm.h
  78. +2 −4 src/pal_ed.cpp
  79. +1 −3 src/pal_ed.h
  80. +671 −638 src/param.cpp
  81. +1 −3 src/param.h
  82. +0 −138 src/password.cpp
  83. +0 −41 src/password.h
  84. +164 −162 src/rasm.cpp
  85. +27 −27 src/rasm.h
  86. +470 −284 src/robo_ed.cpp
  87. +3 −4 src/robo_ed.h
  88. +49 −30 src/robot.cpp
  89. +12 −10 src/robot.h
  90. +67 −43 src/runrobo2.cpp
  91. +17 −13 src/scrdisp.cpp
  92. +1 −3 src/scrdisp.h
  93. +2 −4 src/sfx.cpp
  94. +1 −3 src/sfx.h
  95. +105 −135 src/sfx_edit.cpp
  96. +2 −4 src/sfx_edit.h
  97. +7 −10 src/sprite.cpp
  98. +2 −6 src/sprite.h
  99. +1 −3 src/struct.h
  100. +3 −5 src/txt2hlp.cpp
  101. +2 −4 src/ver1to2.cpp
  102. +2,303 −969 src/window.cpp
  103. +190 −101 src/window.h
  104. +45 −66 src/world.cpp
  105. +4 −9 src/world.h
View
@@ -1,37 +1,19 @@
#
# Slave MegaZeux makefile
#
-include Makefile.platform
-include Makefile.in
-
-SUBDIRS = contrib/gdm2s3m/src contrib/libmodplug/src src
-all: subdir
+include Makefile.platform
subdir:
- list='$(SUBDIRS)'; \
- for subdir in $$list; do \
- pwd=`pwd`; \
- cd $$subdir && make && cd $$pwd; \
- done;
+ cd contrib/libmodplug/src && make && cd ../../..
+ cd contrib/gdm2s3m/src && make && cd ../../..
+ cd src && make && cd ..
clean:
- list='$(SUBDIRS)'; \
- for subdir in $$list; do \
- pwd=`pwd`; \
- cd $$subdir && make clean && cd $$pwd; \
- done;
+ cd contrib/libmodplug/src && make clean && cd ../../..
+ cd contrib/gdm2s3m/src && make clean && cd ../../..
+ cd src && make clean && cd ..
-install:
- mkdir -p ${PREFIX}/share/megazeux && \
- chown root:root ${PREFIX}/share/megazeux && \
- chmod 0755 ${PREFIX}/share/megazeux && \
- install -o root -m 0644 mzx_default.chr ${PREFIX}/share/megazeux && \
- install -o root -m 0644 mzx_blank.chr ${PREFIX}/share/megazeux && \
- install -o root -m 0644 mzx_smzx.chr ${PREFIX}/share/megazeux && \
- install -o root -m 0644 mzx_ascii.chr ${PREFIX}/share/megazeux && \
- install -o root -m 0644 smzx.pal ${PREFIX}/share/megazeux && \
- install -o root -m 0644 mzx_help.fil ${PREFIX}/share/megazeux && \
- install -o root -m 0644 config.txt /etc/megazeux-config && \
- install -o root -m 0755 ${TARGET} ${PREFIX}/bin && \
- ln -sf ${TARGET} ${PREFIX}/bin/megazeux
+distclean: clean
+ rm -f src/config.h
+ cp -f arch/Makefile.dist Makefile.platform
View
@@ -4,24 +4,32 @@
CC = gcc
CXX = g++
+# path to gdm2s3m sources
+GDM2S3M = contrib/gdm2s3m/src
+MODPLUG = contrib/libmodplug/src
+
# default target name
-TARGET = mzx280g
-VERSION = 2.80g
+TARGET = mzx280h
+VERSION = 2.80h
-ifdef DEBUG
-# debug C++ flags
-CXXFLAGS = -g -funsigned-char -Wall -DMZX_VERSION=\"${VERSION}\" -DDEBUG
+ifneq ("${DATE}", "0")
+VERSTRING = ${VERSION}\ \(`date +%Y%m%d`\)
else
-# optimised C++ flags
-CXXFLAGS = -O2 -funsigned-char -ffast-math -Wall -DMZX_VERSION=\"${VERSION}\"
+VERSTRING = ${VERSION}
endif
-CXXFLAGS += -I../contrib/libmodplug/src -I../contrib/libmodplug/src/include
-CXXFLAGS += -I../contrib/gdm2s3m/src
-LIBS += ../contrib/libmodplug/src/libmodplug.a
-LIBS += ../contrib/gdm2s3m/src/libgdm2s3m.a
+ifdef DEBUG
+CFLAGS = -g -Wall -DDEBUG
+CXXFLAGS = -g -Wall -DDEBUG
+else
+CFLAGS += -O2 -Wall
+CXXFLAGS += -O2 -Wall
+endif
-.SUFFIXES: .cpp
+.SUFFIXES: .cpp .c
%.o: %.cpp
${CXX} ${CXXFLAGS} ${INCLUDES} -c $<
+
+%.o: %.c
+ ${CC} ${CFLAGS} ${INCLUDES} -c $<
View
@@ -2,14 +2,31 @@
# linux makefile generics
#
+all: subdir
+
# location of strip (must be defined)
STRIP = strip --strip-unneeded
-# standard linker includes
-INCLUDES = -I${PREFIX}/include -I${PREFIX}/include/SDL
-
# standard libraries
-LIBS = -L${PREFIX}/lib -lSDL -lpthread
+LIBS = ../${GDM2S3M}/libgdm2s3m.a ../${MODPLUG}/libmodplug.a \
+ -L${PREFIX}/lib -lSDL -lpthread -lX11
+
+# linux os specific install target
+install:
+ mkdir -p ${PREFIX}/share/megazeux && \
+ chown root:root ${PREFIX}/share/megazeux && \
+ chmod 0755 ${PREFIX}/share/megazeux && \
+ install -o root -m 0644 mzx_default.chr ${PREFIX}/share/megazeux && \
+ install -o root -m 0644 mzx_blank.chr ${PREFIX}/share/megazeux && \
+ install -o root -m 0644 mzx_smzx.chr ${PREFIX}/share/megazeux && \
+ install -o root -m 0644 mzx_ascii.chr ${PREFIX}/share/megazeux && \
+ install -o root -m 0644 mzx_edit.chr ${PREFIX}/share/megazeux && \
+ install -o root -m 0644 smzx.pal ${PREFIX}/share/megazeux && \
+ install -o root -m 0644 mzx_help.fil ${PREFIX}/share/megazeux && \
+ install -o root -m 0644 config.txt /etc/megazeux-config && \
+ install -o root -m 0755 ${TARGET} ${PREFIX}/bin && \
+ ln -sf ${TARGET} ${PREFIX}/bin/megazeux
# install prefix
PREFIX=/usr
+TARGET=mzx280h
View
@@ -0,0 +1,6 @@
+# placebo makefile
+
+all:
+ @echo "Please run config.sh before make!"
+ @echo "usage: ./config.sh <linux|win32|macos> <prefix>"
+ @echo " e.g.: ./config.sh win32 /usr"
View
@@ -2,11 +2,27 @@
# linux makefile generics
#
+all: subdir
+
# location of strip (must be defined)
STRIP = strip --strip-unneeded
-# standard linker includes
-INCLUDES = -I${PREFIX}/include -I${PREFIX}/include/SDL
-
# standard libraries
-LIBS = -L${PREFIX}/lib -lSDL -lpthread
+LIBS = ../${GDM2S3M}/libgdm2s3m.a ../${MODPLUG}/libmodplug.a \
+ -L${PREFIX}/lib -lSDL -lpthread -lX11
+
+# linux os specific install target
+install:
+ mkdir -p ${PREFIX}/share/megazeux && \
+ chown root:root ${PREFIX}/share/megazeux && \
+ chmod 0755 ${PREFIX}/share/megazeux && \
+ install -o root -m 0644 mzx_default.chr ${PREFIX}/share/megazeux && \
+ install -o root -m 0644 mzx_blank.chr ${PREFIX}/share/megazeux && \
+ install -o root -m 0644 mzx_smzx.chr ${PREFIX}/share/megazeux && \
+ install -o root -m 0644 mzx_ascii.chr ${PREFIX}/share/megazeux && \
+ install -o root -m 0644 mzx_edit.chr ${PREFIX}/share/megazeux && \
+ install -o root -m 0644 smzx.pal ${PREFIX}/share/megazeux && \
+ install -o root -m 0644 mzx_help.fil ${PREFIX}/share/megazeux && \
+ install -o root -m 0644 config.txt /etc/megazeux-config && \
+ install -o root -m 0755 ${TARGET} ${PREFIX}/bin && \
+ ln -sf ${TARGET} ${PREFIX}/bin/megazeux
View
@@ -2,11 +2,12 @@
# macos makefile generics
#
+all: subdir
+
# location of strip (must be defined)
STRIP = strip
-# standard linker includes
-INCLUDES = -I${PREFIX}/include -I${PREFIX}/include/SDL
-
# standard libraries
-LIBS = -L${PREFIX}/lib -lSDLmain -lSDL -lpthread -framework Cocoa
+LIBS = ../${GDM2S3M}/libgdm2s3m.a ../${MODPLUG}/libmodplug.a \
+ -L${PREFIX}/lib -lSDLmain -lSDL -lpthread \
+ -framework Cocoa
View
@@ -2,17 +2,17 @@
# win32 makefile generics
#
+all: subdir
+
# windows requires a binary extension
BINEXT = .exe
# location of strip (must be defined)
STRIP = strip --strip-unneeded
-# standard linker includes
-INCLUDES = -I${PREFIX}/include -I${PREFIX}/include/SDL
-
# standard libraries
-LIBS = -L${PREFIX}/lib -lmingw32 -lSDLmain -lSDL
+LIBS = ../${GDM2S3M}/libgdm2s3m.a ../${MODPLUG}/libmodplug.a \
+ -L/usr/lib -lmingw32 -lSDLmain -lSDL
# debug does something different
ifdef DEBUG
View
@@ -36,6 +36,7 @@ if [ "$ARCH" = "win32" -o "$ARCH" = "macos" ]; then
echo "#define MZX_BLANK_CHR \"mzx_blank.chr\"" >> src/config.h
echo "#define MZX_SMZX_CHR \"mzx_smzx.chr\"" >> src/config.h
echo "#define MZX_ASCII_CHR \"mzx_ascii.chr\"" >> src/config.h
+ echo "#define MZX_EDIT_CHR \"mzx_edit.chr\"" >> src/config.h
echo "#define SMZX_PAL \"smzx.pal\"" >> src/config.h
echo "#define MZX_HELP_FIL \"mzx_help.fil\"" >> src/config.h
echo "#define CONFIG_TXT \"config.txt\"" >> src/config.h
@@ -46,9 +47,23 @@ if [ "$ARCH" = "linux" ]; then
echo "#define MZX_BLANK_CHR \"$PREFIX/share/megazeux/mzx_blank.chr\"" >> src/config.h
echo "#define MZX_SMZX_CHR \"$PREFIX/share/megazeux/mzx_smzx.chr\"" >> src/config.h
echo "#define MZX_ASCII_CHR \"$PREFIX/share/megazeux/mzx_ascii.chr\"" >> src/config.h
+ echo "#define MZX_EDIT_CHR \"$PREFIX/share/megazeux/mzx_edit.chr\"" >> src/config.h
echo "#define SMZX_PAL \"$PREFIX/share/megazeux/smzx.pal\"" >> src/config.h
echo "#define MZX_HELP_FIL \"$PREFIX/share/megazeux/mzx_help.fil\"" >> src/config.h
echo "#define CONFIG_TXT \"/etc/megazeux-config\"" >> src/config.h
+
+ echo "TARGET=`grep TARGET Makefile.in | cut -d ' ' -f 6`" \
+ >> Makefile.platform
+fi
+
+if [ "$ARCH" != "win32" ]; then
+ # try to run X
+ X -version >/dev/null 2>&1
+
+ # X queried successfully
+ if [ "$?" = "0" ]; then
+ echo "#define CONFIG_X11" >> src/config.h
+ fi
fi
echo "All done!"
View
@@ -83,6 +83,9 @@
# Volume samples play at
#sample_volume = 8
+# Volume PC speaker SFX play at
+#pc_speaker_volume = 8
+
### Game options ###
@@ -199,7 +202,7 @@
# How many backups to be made. Set to zero to disable backups.
-#backup_count = 0
+#backup_count = 3
# How often (in seconds) backups should be made
@@ -252,4 +255,9 @@
#pause_on_unfocus = 0
-include Cmacro.cnf
+# Set to 0 if you want input boxes and strings in the robot editor
+# to use the game set for characters 32-127, as opposed to the protected
+# GUI set.
+
+#mask_midchars = 1
+
View
@@ -1,16 +0,0 @@
-This subdirectory wasn't actually present in the old tarballs,
-but you need it to compile MegaZeux. The gdm2s3m library is too
-obscure to find elsewhere on the internet, so we package it locally.
-
-The version of libmodplug from 2.80h is included because this was the
-first really portable, patched version. However in the interests of
-good history, we won't patch it forwards to 0.8.4, and we stick with
-version 0.7.2. This may have some bugs 0.8.4 didn't, but it should
-be the most "realistic" interpretation of these old source packages.
-
-It's also worth noticing that big endian platforms weren't supported
-in these old MegaZeux versions, so there will be bugs there and the
-same fix applied to libmodplug later isn't present in versions with
-this "hacked" directory.
-
---ajs
View
0 contrib/gdm2s3m/build.bat 100644 → 100755
No changes.
@@ -1,31 +1,23 @@
-##
-# gdm2s3m Makefile fragment
-##
+#
+# src/ makefile
+#
-.PHONY: all clean
+include ../../../Makefile.in
+include ../../../Makefile.platform
-.SUFFIXES: .c
+# must be build with c99
+CFLAGS += -std=c99
-CFLAGS := -Wall -std=c99
-o := o
+#
+# objects to build
+#
-gdm2s3m_base = .
-gdm2s3m_cflags := -W -Wmissing-format-attribute -Wpointer-arith -Wcast-align
-gdm2s3m_cflags += -Wwrite-strings -pedantic -I${gdm2s3m_base}
-gdm2s3m = ${gdm2s3m_base}/libgdm2s3m.a
+objs = error.o gdm.o s3m.o utility.o gdm2s3m.o
-gdm2s3m_objs = \
- ${gdm2s3m_base}/error.${o} ${gdm2s3m_base}/gdm.${o} \
- ${gdm2s3m_base}/s3m.${o} ${gdm2s3m_base}/utility.${o} \
- ${gdm2s3m_base}/gdm2s3m.${o}
+subdir: libs
-${gdm2s3m_base}/%.${o}: ${gdm2s3m_base}/%.c
- ${CC} ${CFLAGS} ${gdm2s3m_cflags} -c $< -o $@
-
-all: ${gdm2s3m}
-
-${gdm2s3m}: ${gdm2s3m_objs}
- ar crus ${gdm2s3m} ${gdm2s3m_objs}
+libs: ${objs}
+ ar crus libgdm2s3m.a ${objs}
clean:
- rm -f ${gdm2s3m} ${gdm2s3m_objs}
+ rm -f ${objs} libgdm2s3m.a
Oops, something went wrong.

0 comments on commit 1b766c6

Please sign in to comment.