# HG changeset patch # User Matti Hamalainen # Date 1503148018 -10800 # Node ID 7daf69b39f344b06ee86231b92513fc6d44e1cea # Parent 08913cea6de10b828ad720dd9838557f3de9a433 Cleanups, add license, file_id.diz, fix and update build system. diff -r 08913cea6de1 -r 7daf69b39f34 LICENSE.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LICENSE.txt Sat Aug 19 16:06:58 2017 +0300 @@ -0,0 +1,50 @@ +DMLIB - Demo engine / development and utility framework +Programmed and designed by Matti Hämäläinen (ccr/TNSP) +(C) Copyright 2002-2017 Tecnic Software productions (TNSP) + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. The name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +----------------------------------------------------------------------- + +stb_image - public domain JPEG/PNG reader by various authors +http://nothings.org/stb_image.c + +----------------------------------------------------------------------- + +The Simple DirectMedia Layer (SDL for short) is a cross-platfrom library +designed to make it easy to write multi-media software, such as games and +emulators. + +The Simple DirectMedia Layer library source code is available from: +http://www.libsdl.org/ + +This library is distributed under the terms of the GNU LGPL license: +http://www.gnu.org/copyleft/lesser.html + +----------------------------------------------------------------------- diff -r 08913cea6de1 -r 7daf69b39f34 Makefile --- a/Makefile Tue Oct 04 00:15:43 2016 +0300 +++ b/Makefile Sat Aug 19 16:06:58 2017 +0300 @@ -1,27 +1,38 @@ # # Generic build target # -DMLIB = ./dmlib/ -MAKE ?= make +include config.mak export DMLIB +export BINPATH -unix: - $(MAKE) -f $(DMLIB)Makefile EXEEXT=.bin +linux-bin: + $(MAKE) -f $(DMLIB)Makefile EXEEXT=-linux.bin mingw-win32: $(MAKE) -f $(DMLIB)Makefile.cross-mingw \ - OBJPATH=./obj/win32/ \ + OBJPATH=$(BPATH)/obj/win32/ \ MINGW_PREFIX=i686-w64-mingw32- \ MINGW_PATH=/usr/i686-w64-mingw32 mingw-win64: $(MAKE) -f $(DMLIB)Makefile.cross-mingw \ - OBJPATH=./obj/win64/ \ + OBJPATH=$(BPATH)/obj/win64/ \ MINGW_PREFIX=x86_64-w64-mingw32- \ MINGW_PATH=/usr/x86_64-w64-mingw32 +$(DATA): + cd $(BPATH)/data && $(DMLIB)/tools/packed -p $@ -c -x \*~ -v * + +package: linux-bin mingw-win32 $(DATA) + strip $(BINPATH)/*.bin $(BINPATH)/*.exe + $(RM) $(PACKAGE) + @cp SDL.dll LICENSE.txt README.txt file_id.diz $(BINPATH) + cd $(BINPATH) && zip -x "*~" -9 $(PACKAGE) * + + clean: - -$(MAKE) -f $(DMLIB)Makefile clean EXEEXT=.bin + -$(RM) $(DATA) + -$(MAKE) -f $(DMLIB)Makefile clean EXEEXT=-linux.bin -$(MAKE) -f $(DMLIB)Makefile.cross-mingw clean \ No newline at end of file diff -r 08913cea6de1 -r 7daf69b39f34 README.txt --- a/README.txt Tue Oct 04 00:15:43 2016 +0300 +++ b/README.txt Sat Aug 19 16:06:58 2017 +0300 @@ -12,9 +12,6 @@ greets: pwp, iso, bilotrip, trilobit, jynttaveikot and other elites -notice: linux version is a x86/32 binary and requires 32-bit libs. - - ----------------------------------------------------------------------- stb_image - public domain JPEG/PNG reader by Sean Barrett & others diff -r 08913cea6de1 -r 7daf69b39f34 build-data.sh --- a/build-data.sh Tue Oct 04 00:15:43 2016 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -#!/bin/sh -. ./build.cfg -CPWD=`pwd` -CPACKED="$CPWD/packed.bin" - -if test ! -x "$CPACKED"; then - make -f Makefile clean - make -f Makefile EXEEXT=".bin" TOOL_BINPATH="$CPWD/" "$CPACKED" -fi - -cd "$CPWD/data" && $CPACKED -c -p "$CPWD/$CBINPATH/$CPACKFILE" * - -if test ! -e "$CPWD/$CPACKFILE"; then - ln -s "$CPWD/$CBINPATH/$CPACKFILE" "$CPWD/$CPACKFILE" -fi diff -r 08913cea6de1 -r 7daf69b39f34 build.cfg --- a/build.cfg Tue Oct 04 00:15:43 2016 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -CPACKFILE="orvellys.dat" -CEXE=krapula -CBINPATH=exe/ -CZIP=ap-krapula.zip diff -r 08913cea6de1 -r 7daf69b39f34 build.sh --- a/build.sh Tue Oct 04 00:15:43 2016 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -#!/bin/sh -. ./build.cfg -CPWD=`pwd` - -for build in intel:core2; do - # Split into platform and march - platform=`echo "$build"|cut -d ':' -f 1` - march=`echo "$build"|cut -d ':' -f 2` - - # Build Unix binary - make -f Makefile clean - make -f Makefile EXTRA_CFLAGS="-O3 -march=$march" EXEEXT=".bin" BINPATH="$CPWD/" - (strip "$CPWD/${CEXE}.bin" && mv "$CPWD/${CEXE}.bin" "$CPWD/${CBINPATH}/${CEXE}-linux-x86.bin") || exit 1 - - # Build Win32 executable - make -f Makefile.w32 clean - make -f Makefile.w32 EXTRA_CFLAGS="-O3 -march=$march" EXEEXT=".exe" BINPATH="$CPWD/" - (mv "$CPWD/${CEXE}.exe" "$CPWD/${CBINPATH}/${CEXE}-win32.exe") || exit 1 -done - -(cd "$CPWD" && exec ./build-data.sh) || exit 1 - -rm -f "$CPWD/$CZIP" - -cd "$CPWD/${CBINPATH}/" && zip -9 "$CPWD/$CZIP" * diff -r 08913cea6de1 -r 7daf69b39f34 config.mak --- a/config.mak Tue Oct 04 00:15:43 2016 +0300 +++ b/config.mak Sat Aug 19 16:06:58 2017 +0300 @@ -2,6 +2,13 @@ DEMO_BIN=krapula DEMO_OBJS=demo.o dmsimple.o +BPATH := $(shell pwd) +DMLIB := $(BPATH)/dmlib/ +PACKAGE = $(BPATH)/ap-krapula.zip +BINPATH = $(BPATH)/bin/ +DATA = $(BINPATH)/orvellys.dat +MAKE ?= make + TOOL_BINPATH=bin/ TESTS_BINPATH=$(TOOL_BINPATH) diff -r 08913cea6de1 -r 7daf69b39f34 demo.c --- a/demo.c Tue Oct 04 00:15:43 2016 +0300 +++ b/demo.c Sat Aug 19 16:06:58 2017 +0300 @@ -319,10 +319,14 @@ "0.2", "(c) 2012 Anciat Prodz & TNSP", "PENIS."); engine->optPackFilename = "orvellys.dat"; - engine->optDataPath = NULL; - engine->optResFlags = DRF_USE_PACK | DRF_PRELOAD_RES; + engine->optDataPath = NULL; + engine->optResFlags = DRF_USE_PACK | DRF_PRELOAD_RES +#ifdef DM_USE_STDIO + | DRF_USE_STDIO +#endif + ; - engine->optAudioSetup = DM_ASETUP_JSS; + engine->optAudioSetup = DM_ASETUP_JSS; engine->optVidSetup = DM_VSETUP_ASPECT; engine->optVidWidth = 640; @@ -362,7 +366,7 @@ // Initialize music player JSSModule *mod = NULL; - engineGetResModule(engine, mod, "krapula.jss"); + engineGetResModule(engine, mod, "krapula.xm"); if ((i = jssConvertModuleForPlaying(mod)) != DMERR_OK) { diff -r 08913cea6de1 -r 7daf69b39f34 file_id.diz --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/file_id.diz Sat Aug 19 16:06:58 2017 +0300 @@ -0,0 +1,4 @@ + anciat productionz + lauantai aamun krapula + feat nosfe + win32 / linux