shithub: choc

Download patch

ref: 3895cd3c5ccb494996f0c16db4b68b7c68cfd8c1
parent: ed0a9496b367e21e854ca457a3d19b1937874683
author: Jacob Moody <moody@posixcafe.org>
date: Sun Jan 29 02:42:27 EST 2023

first libheretic.a compile

--- a/src/heretic/d_main.c
+++ b/src/heretic/d_main.c
@@ -24,7 +24,9 @@
 
 #include "net_client.h"
 
+#ifndef __plan9__
 #include "config.h"
+#endif
 #include "ct_chat.h"
 #include "doomdef.h"
 #include "deh_main.h"
--- /dev/null
+++ b/src/heretic/mkfile
@@ -1,0 +1,72 @@
+</$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=""
+LIB=libheretic.a
+
+OFILES=\
+	am_map.$O \
+	ct_chat.$O \
+	deh_ammo.$O \
+	deh_frame.$O \
+	deh_htext.$O \
+	deh_htic.$O \
+	deh_sound.$O \
+	deh_thing.$O \
+	deh_weapon.$O \
+	d_main.$O \
+	d_net.$O \
+	f_finale.$O \
+	g_game.$O \
+	info.$O \
+	in_lude.$O \
+	m_random.$O \
+	mn_menu.$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 \
+	p_plats.$O \
+	p_pspr.$O \
+	p_saveg.$O \
+	p_setup.$O \
+	p_sight.$O \
+	p_spec.$O \
+	p_switch.$O \
+	p_telept.$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 \
+	sb_bar.$O \
+	sounds.$O \
+	s_sound.$O \
+
+HFILES=\
+	am_data.h \
+	am_map.h \
+	ct_chat.h \
+	deh_htic.h \
+	doomdata.h \
+	doomdef.h \
+	dstrings.h \
+	info.h \
+	m_random.h \
+	p_action.h \
+	p_local.h \
+	p_spec.h \
+	r_local.h \
+	sounds.h \
+	s_sound.h \
+
+
+</sys/src/cmd/mksyslib
--- a/src/heretic/r_local.h
+++ b/src/heretic/r_local.h
@@ -28,6 +28,9 @@
 #define MAXWIDTH			1120
 #define	MAXHEIGHT			832
 
+#ifdef __plan9__
+#undef PI
+#endif
 #define	PI					3.141592657
 
 #define	CENTERY				(SCREENHEIGHT/2)