Index: head/games/xray_re-tools/Makefile =================================================================== --- head/games/xray_re-tools/Makefile (revision 493683) +++ head/games/xray_re-tools/Makefile (revision 493684) @@ -1,60 +1,68 @@ # Created by: Alexey Dokuchaev # $FreeBSD$ PORTNAME= xray_re-tools 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 \ libnvtt.so:graphics/nvidia-texture-tools USE_GITHUB= yes GH_ACCOUNT= abramcumner GH_TAGNAME= 52721d2 MAKEFILE= ${FILESDIR}/Makefile BUILD_WRKSRC= ${WRKSRC}/sources WITHOUT_FBSD10_FIX= yes PLIST_FILES= bin/xr_converter post-extract: @${MV} ${WRKSRC}/sources/3rd\ party ${WRKSRC}/sources/3rd-party @${MV} ${WRKSRC}/sources/utils/converter/opcode/Ice/IceTrilist.h \ ${WRKSRC}/sources/utils/converter/opcode/Ice/IceTriList.h @${LN} -s StdAfx.h ${WRKSRC}/sources/utils/converter/opcode/Stdafx.h post-patch: @${REINPLACE_CMD} -e '/#include/s,Math,math,' \ -e '/#include/s,\.\\Ice\\,Ice/,' \ ${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::&,' \ ${WRKSRC}/sources/xray_re/xr_scene.cxx @${REINPLACE_CMD} -e 's,sprintf_s,xr_snprintf,' \ ${WRKSRC}/sources/xray_re/xr_scene_ways.cxx @${REINPLACE_CMD} -e '/return/s,_stricmp,strcasecmp,' \ ${WRKSRC}/sources/xray_re/xr_string_utils.h @${REINPLACE_CMD} -e 's,MINGW32__),& || defined(__FreeBSD__),' \ ${WRKSRC}/sources/xray_re/xr_types.h do-install: ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/converter \ ${STAGEDIR}${PREFIX}/bin/xr_converter # 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 PATCH_ARGS+= -l Index: head/games/xray_re-tools/files/patch-sources_xray__re_xr__packet.h =================================================================== --- head/games/xray_re-tools/files/patch-sources_xray__re_xr__packet.h (nonexistent) +++ head/games/xray_re-tools/files/patch-sources_xray__re_xr__packet.h (revision 493684) @@ -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 + } + + template 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 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)); + } Property changes on: head/games/xray_re-tools/files/patch-sources_xray__re_xr__packet.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/xray_re-tools/pkg-descr =================================================================== --- head/games/xray_re-tools/pkg-descr (revision 493683) +++ head/games/xray_re-tools/pkg-descr (revision 493684) @@ -1,11 +1,12 @@ 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 WWW: https://github.com/abramcumner/xray_re-tools