shithub: choc

Download patch

ref: 94d08c9b7ef79f8e0c0a986ba5b66f33ef8ecc64
parent: 3895cd3c5ccb494996f0c16db4b68b7c68cfd8c1
author: Jacob Moody <moody@posixcafe.org>
date: Sun Jan 29 02:53:14 EST 2023

first libhexen.a compile

--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -22,7 +22,9 @@
 #include <stdlib.h>
 #include <time.h>
 
+#ifndef __plan9__
 #include "config.h"
+#endif
 
 #include "h2def.h"
 #include "ct_chat.h"
--- /dev/null
+++ b/src/hexen/mkfile
@@ -1,0 +1,73 @@
+</$objtype/mkfile
+
+CFLAGS=-Fpw -I/sys/include/npe -I/sys/include/npe/SDL2 -I.. -D__plan9__ -I../../textscreen -D__${objtype}__ -p -D__plan9_keep_main__ -DPROGRAM_PREFIX="9" -DPACKAGE_STRING="" -DPACKAGE_NAME="9"
+LIB=libhexen.a
+
+HFILES=\
+	am_data.h \
+	am_map.h \
+	ct_chat.h \
+	h2def.h \
+	info.h \
+	m_random.h \
+	p_action.h \
+	p_local.h \
+	p_spec.h \
+	r_local.h \
+	s_sound.h \
+	sounds.h \
+	st_start.h \
+	textdefs.h \
+	xddefs.h
+
+OFILES=\
+	a_action.$O \
+	am_map.$O \
+	ct_chat.$O \
+	d_net.$O \
+	f_finale.$O \
+	g_game.$O \
+	h2_main.$O \
+	info.$O \
+	in_lude.$O \
+	m_random.$O \
+	mn_menu.$O \
+	p_acs.$O \
+	p_anim.$O \
+	p_ceilng.$O \
+	p_doors.$O \
+	p_enemy.$O \
+	p_floor.$O \
+	p_inter.$O \
+	p_lights.$O \
+	p_map.$O \
+	p_maputl.$O \
+	p_mobj.$O \
+	po_man.$O \
+	p_plats.$O \
+	p_pspr.$O \
+	p_setup.$O \
+	p_sight.$O \
+	p_spec.$O \
+	p_switch.$O \
+	p_telept.$O \
+	p_things.$O \
+	p_tick.$O \
+	p_user.$O \
+	r_bsp.$O \
+	r_data.$O \
+	r_draw.$O \
+	r_main.$O \
+	r_plane.$O \
+	r_segs.$O \
+	r_things.$O \
+	s_sound.$O \
+	sb_bar.$O \
+	sc_man.$O \
+	sn_sonix.$O \
+	sounds.$O \
+	st_start.$O \
+	sv_save.$O \
+
+
+</sys/src/cmd/mksyslib
--- a/src/hexen/r_local.h
+++ b/src/hexen/r_local.h
@@ -27,6 +27,9 @@
 #define MAXWIDTH                        1120
 #define MAXHEIGHT                       832
 
+#ifdef __plan9__
+#undef PI
+#endif
 #define PI                                      3.141592657
 
 #define CENTERY                         (SCREENHEIGHT/2)
--- a/src/hexen/st_start.c
+++ b/src/hexen/st_start.c
@@ -20,7 +20,9 @@
 
 #include <stdarg.h>
 
+#ifndef __plan9__
 #include "config.h"
+#endif
 
 #include "h2def.h"
 #include "i_system.h"