Subversion Repositories duke3d_hrp

Rev

Rev 384 | Rev 408 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 384 Rev 407
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
 
2
 
3
# Duke Nukem 3D High Resolution Pack Extractor  v0.4  2012-07-04
3
# Duke Nukem 3D High Resolution Pack Extractor  v0.4.1  2012-07-29
4
#
4
#
5
# Author: LeoD
5
# Author: LeoD
6
# License: ISC license : http://opensource.org/licenses/isc-license.txt
6
# License: ISC license : http://opensource.org/licenses/isc-license.txt
7
#
7
#
8
# This script extracts a PolyMER or PolyMOST only HRP from your working copy
8
# This script extracts a PolyMER or PolyMOST only HRP from your working copy
Line 15... Line 15...
15
# Or maybe MSYS' bash gets finally updated to 4.* and I'll use its regex engine.
15
# Or maybe MSYS' bash gets finally updated to 4.* and I'll use its regex engine.
16
 
16
 
17
DEF_TOP=UNDEFINED
17
DEF_TOP=UNDEFINED
18
SET_VERSION=YES            # [YES|NO]
18
SET_VERSION=YES            # [YES|NO]
19
EXTRACT_COMMENTED_FILES=NO # [YES|NO]
19
EXTRACT_COMMENTED_FILES=NO # [YES|NO]
20
DUKEPLUS_POLYMOST_COMPATIBILTY_APPROACH=none # [none|polymost|polymer|mixed]
20
DUKEPLUS_POLYMOST_COMPATIBILTY_APPROACH=polymost # [none|polymost|polymer|mixed]
21
 
21
 
22
ask()
22
ask()
23
{
23
{
24
  echo -n "$@" '[y/N] ' ; read ans
24
  echo -n "$@" '[y/N] ' ; read ans
25
  case "$ans" in
25
  case "$ans" in
Line 349... Line 349...
349
      cp -pi $SPR/firstperson/duke_hand_n.png                "$SPRE/firstperson"
349
      cp -pi $SPR/firstperson/duke_hand_n.png                "$SPRE/firstperson"
350
      cp -pi $SPR/firstperson/duke_hand_s.png                "$SPRE/firstperson"
350
      cp -pi $SPR/firstperson/duke_hand_s.png                "$SPRE/firstperson"
351
      ;;
351
      ;;
352
    polymost)
352
    polymost)
353
      echo "  # Using (\"Polymost approach\")"
353
      echo "  # Using (\"Polymost approach\")"
354
      cp -pi $SPR/firstperson_polymost/2510_devastator.md3   "$SPRE/firstperson"
354
      #cp -pi $SPR/firstperson_polymost/2510_devastator.md3   "$SPRE/firstperson"
355
      cp -pi $SPR/firstperson_polymost/2510_devastator.png   "$SPRE/firstperson"
355
      #cp -pi $SPR/firstperson_polymost/2510_devastator.png   "$SPRE/firstperson"
356
      #cp -pi $SPR/firstperson/2510_devastator_s.png          "$SPRE/firstperson"
356
      ##cp -pi $SPR/firstperson/2510_devastator_s.png          "$SPRE/firstperson"
357
      cp -pi $SPR/firstperson_polymost/2510_devastator_g.png "$SPRE/firstperson"
357
      #cp -pi $SPR/firstperson_polymost/2510_devastator_g.png "$SPRE/firstperson"
358
      cp -pi $SPR/firstperson_polymost/2524_pistol.md3       "$SPRE/firstperson"
358
      cp -pi $SPR/firstperson_polymost/2524_pistol.md3       "$SPRE/firstperson"
359
      cp -pi $SPR/firstperson_polymost/2524_pistol.png       "$SPRE/firstperson"
359
      #cp -pi $SPR/firstperson_polymost/2524_pistol.png       "$SPRE/firstperson"
360
      cp -pi $SPR/firstperson_polymost/2524_pistol_g.png     "$SPRE/firstperson"
360
      #cp -pi $SPR/firstperson_polymost/2524_pistol_g.png     "$SPRE/firstperson"
361
      cp -pi $SPR/firstperson_polymost/2530_clip.md3         "$SPRE/firstperson"
361
      #cp -pi $SPR/firstperson_polymost/2530_clip.md3         "$SPRE/firstperson"
362
      cp -pi $SPR/pickups/0040_pistolammo.jpg                "$SPRE/pickups"
362
      #cp -pi $SPR/pickups/0040_pistolammo.jpg                "$SPRE/pickups"
363
      cp -pi $SPR/firstperson_polymost/2532_cliphand.md3     "$SPRE/firstperson"
363
      #cp -pi $SPR/firstperson_polymost/2532_cliphand.md3     "$SPRE/firstperson"
364
      cp -pi $SPR/firstperson/2532_cliphand.png              "$SPRE/firstperson"
364
      #cp -pi $SPR/firstperson/2532_cliphand.png              "$SPRE/firstperson"
365
      cp -pi $SPR/firstperson/duke_hand_d.png                "$SPRE/firstperson"
365
      #cp -pi $SPR/firstperson/duke_hand_d.png                "$SPRE/firstperson"
366
      cp -pi $SPR/firstperson/duke_hand_n.png                "$SPRE/firstperson"
366
      #cp -pi $SPR/firstperson/duke_hand_n.png                "$SPRE/firstperson"
367
      cp -pi $SPR/firstperson/duke_hand_s.png                "$SPRE/firstperson"
367
      #cp -pi $SPR/firstperson/duke_hand_s.png                "$SPRE/firstperson"
368
      ;;
368
      ;;
369
    mixed)
369
    mixed)
370
      echo "  # Using (\"Mixed approach\")"
370
      echo "  # Using (\"Mixed approach\")"
371
      echo "    # Not applied / Not yet implemented"
371
      echo "    # Not applied / Not yet implemented"
372
      ;;
372
      ;;
373
    none)
373
    none)
374
      #echo "  Not applied"
374
      echo "  Not applied"
375
      echo "  # Not yet implemented"
375
      #echo "  # Not yet implemented"
376
      ;;
376
      ;;
377
    *)
377
    *)
378
      echo "  # Bad parameter"
378
      echo "  # Bad parameter"
379
      ;;
379
      ;;
380
  esac
380
  esac
Line 512... Line 512...
512
  if [ "${HRPTYPE}" = "polymost" ] || [ "${HRPTYPE}" = "polymost_override" ] ; then
512
  if [ "${HRPTYPE}" = "polymost" ] || [ "${HRPTYPE}" = "polymost_override" ] ; then
513
    echo "### Creating Polymost maphacks ... ###"
513
    echo "### Creating Polymost maphacks ... ###"
514
    create_polymost_mhk
514
    create_polymost_mhk
515
 
515
 
516
    #echo "### DukePlus<>Polymost HRP compatibility patch ... ###"
516
    #echo "### DukePlus<>Polymost HRP compatibility patch ... ###"
517
    #dukeplus_polymost_compatibility $DUKEPLUS_POLYMOST_COMPATIBILTY_APPROACH
517
    dukeplus_polymost_compatibility $DUKEPLUS_POLYMOST_COMPATIBILTY_APPROACH
518
  fi
518
  fi
519
 
519
 
520
  echo "### Parsing DEF file hierarchy ... ###"
520
  echo "### Parsing DEF file hierarchy ... ###"
521
  if [ "$EXTRACT_COMMENTED_FILES" = "YES" ] ; then
521
  if [ "$EXTRACT_COMMENTED_FILES" = "YES" ] ; then
522
    echo "  # Extract commented textures and models: $EXTRACT_COMMENTED_FILES"
522
    echo "  # Extract commented textures and models: $EXTRACT_COMMENTED_FILES"