Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Feb 2019 15:09:35 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r493684 - in head/games/xray_re-tools: . files
Message-ID:  <201902231509.x1NF9ZQT088975@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Sat Feb 23 15:09:35 2019
New Revision: 493684
URL: https://svnweb.freebsd.org/changeset/ports/493684

Log:
  - Mute service target after it was debugged and works as intended
  - Amend the COMMENT line and port description, add missing articles
  - Fix several (mostly harmless) bugs reported by PVS Studio

Added:
  head/games/xray_re-tools/files/patch-sources_xray__re_xr__packet.h   (contents, props changed)
Modified:
  head/games/xray_re-tools/Makefile
  head/games/xray_re-tools/pkg-descr

Modified: head/games/xray_re-tools/Makefile
==============================================================================
--- head/games/xray_re-tools/Makefile	Sat Feb 23 15:04:25 2019	(r493683)
+++ head/games/xray_re-tools/Makefile	Sat Feb 23 15:09:35 2019	(r493684)
@@ -6,7 +6,7 @@ DISTVERSION=	g20180902
 CATEGORIES=	games converters
 
 MAINTAINER=	danfe@FreeBSD.org
-COMMENT=	X-Ray engine assets converter (unofficial)
+COMMENT=	X-Ray engine game asset converter (unofficial)
 
 LIB_DEPENDS=	liblzo2.so:archivers/lzo2 \
 		libvorbisfile.so:audio/libvorbis \
@@ -34,6 +34,14 @@ post-patch:
 		${WRKSRC}/sources/utils/converter/opcode/OPC_IceHook.h
 	@${REINPLACE_CMD} -e 's,string& version,string version,' \
 		${WRKSRC}/sources/utils/converter/level_tools.cxx
+	@${REINPLACE_CMD} -e '19s,attenuation1,attenuation2,' \
+		${WRKSRC}/sources/xray_re/xr_d3d_light.cxx
+	@${REINPLACE_CMD} -e '/OGF3_S_SMPARAMS_VERSION/s,||,\&\&,' \
+		${WRKSRC}/sources/xray_re/xr_ogf_v3.cxx
+	@${REINPLACE_CMD} -e 's,mP0,mP1,' \
+		${WRKSRC}/sources/utils/converter/opcode/Ice/IceLSS.h
+	@${REINPLACE_CMD} -e 's,} if,} else if,' \
+		${WRKSRC}/sources/utils/converter/level_mesh_ladders.cxx
 	@${REINPLACE_CMD} -e 's,push_back,this->&,' \
 		${WRKSRC}/sources/xray_re/xr_influence.h
 	@${REINPLACE_CMD} -e 's,type_info& type,std::&,' \
@@ -52,7 +60,7 @@ do-install:
 # Alternative to DOS2UNIX_FILES that preserves original timestamps,
 # to be used together with `-l' switch added to PATCH_ARGS below.
 fixpatches:
-	${FIND} ${FILESDIR} -name patch-* | ${XARGS} ${SED} -i '' \
+	@${FIND} ${FILESDIR} -name patch-* | ${XARGS} ${SED} -i '' \
 		-E 's,[[:cntrl:]]*$$,,'
 
 .include <bsd.port.mk>

Added: head/games/xray_re-tools/files/patch-sources_xray__re_xr__packet.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/xray_re-tools/files/patch-sources_xray__re_xr__packet.h	Sat Feb 23 15:09:35 2019	(r493684)
@@ -0,0 +1,20 @@
+--- sources/xray_re/xr_packet.h.orig	2018-09-02 12:42:44 UTC
++++ sources/xray_re/xr_packet.h
+@@ -180,14 +180,14 @@ inline void xr_ini_packet::w_seq(std::vector<uint16_t>
+ }
+ 
+ template<typename T> inline void xr_ini_packet::write(const T& value){
+-	int n = xr_snprintf(m_key_buffer, sizeof(m_key_buffer), "%06d", ++m_counter);
++	xr_snprintf(m_key_buffer, sizeof(m_key_buffer), "%06d", ++m_counter);
+ 	w->write(m_key_buffer, value);
+ 	w_seek(w_tell() + sizeof(T));
+ }
+ 
+ template<typename T> inline void xr_ini_packet::write_number(const T& value){
+-	int n = xr_snprintf(m_key_buffer, sizeof(m_key_buffer), "%06d", ++m_counter);
+-	n = xr_snprintf(m_temp_buffer, sizeof(m_temp_buffer), "%d", value);
++	xr_snprintf(m_key_buffer, sizeof(m_key_buffer), "%06d", ++m_counter);
++	xr_snprintf(m_temp_buffer, sizeof(m_temp_buffer), "%d", value);
+ 	w->write(m_key_buffer, m_temp_buffer, false);
+ 	w_seek(w_tell() + sizeof(T));
+ }

Modified: head/games/xray_re-tools/pkg-descr
==============================================================================
--- head/games/xray_re-tools/pkg-descr	Sat Feb 23 15:04:25 2019	(r493683)
+++ head/games/xray_re-tools/pkg-descr	Sat Feb 23 15:09:35 2019	(r493684)
@@ -1,9 +1,10 @@
 Portable (POSIX) subset of the X-Ray unofficial toolset used for modding the
 S.T.A.L.K.E.R. game series by GSC Game World.  Currently includes standalone
-converter utility which is useful for casual gamers to unpack game resources.
+converter utility which is useful for casual gamers to unpack game resources
+in order to adjust various game parameters.
 
-Usage examples, first for Russian release version of Shadow of Chernobyl and
-second for Clear Sky and Call of Pripyat:
+Usage examples, the first for Russian release version of Shadow of Chernobyl
+and the second for Clear Sky and Call of Pripyat:
 
   $ xr_converter -unpack /path/to/gamedata.db0 -2947ru -dir ./put_it_here
   $ xr_converter -unpack /path/to/resources.db0 -xdb -dir ./put_it_here



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902231509.x1NF9ZQT088975>