Subversion Repositories duke3d_hrp

Rev

Rev 333 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 333 Rev 375
Line 387... Line 387...
387
    if [ "${DEF_FILE}" != "" ] ; then
387
    if [ "${DEF_FILE}" != "" ] ; then
388
      cp -p      "${DEF_FILE}" "${EXTRACTDIR}/${DEF_FILE}"
388
      cp -p      "${DEF_FILE}" "${EXTRACTDIR}/${DEF_FILE}"
389
      parse_defs "${DEF_FILE}"
389
      parse_defs "${DEF_FILE}"
390
    fi
390
    fi
391
391
392
    HRP_TERM=`echo "${DEF_LINE}" | grep -owE "file|model|voxel|front|right|back|left|top|bottom|down"`
392
    #HRP_TERM=`echo "${DEF_LINE}" | grep -owE "file|model|voxel|front|right|back|left|top|bottom|down"`
-
 
393
    ## Old style added (except "defineskybox"):
-
 
394
    HRP_TERM=`echo "${DEF_LINE}" | grep -owE "definetexture|definemodel|definemodelskin|file|model|voxel|front|right|back|left|top|bottom|down"`
393
    #More skybox tokens: tile, pal, ft|rt|bk|lf|up|dn|forward|lt|ceiling|floor|ceil
395
    #More skybox tokens: tile, pal, ft|rt|bk|lf|up|dn|forward|lt|ceiling|floor|ceil
394
396
395
    if [ ! "$EXTRACT_COMMENTED_FILES" = "YES" ] ; then
397
    if [ ! "$EXTRACT_COMMENTED_FILES" = "YES" ] ; then
396
398
397
      COMMENT_TERM=`echo "${DEF_LINE}" | grep -oE "\\/\\*|\\*\\/"`
399
      COMMENT_TERM=`echo "${DEF_LINE}" | grep -oE "\\/\\*|\\*\\/"`
Line 423... Line 425...
423
        ;;
425
        ;;
424
      front|right|back|left|top|bottom|down)
426
      front|right|back|left|top|bottom|down)
425
        #HRP_FILE=`echo "${DEF_LINE}" | sed -r s/^.*${HRP_TERM}\ *\"//g | sed s/\".*//`
427
        #HRP_FILE=`echo "${DEF_LINE}" | sed -r s/^.*${HRP_TERM}\ *\"//g | sed s/\".*//`
426
        HRP_FILE=`echo "${DEF_LINE}" | sed -r --posix s/\\(^.*${HRP_TERM}\\ *\"\\)\\([^\"]*\\)\\(.*\\)/\\\2/`
428
        HRP_FILE=`echo "${DEF_LINE}" | sed -r --posix s/\\(^.*${HRP_TERM}\\ *\"\\)\\([^\"]*\\)\\(.*\\)/\\\2/`
427
        ;;
429
        ;;
-
 
430
      ## Old Style
-
 
431
      definemodel)
-
 
432
        HRP_FILE=`echo "${DEF_LINE}" | sed -r --posix s/\\(^.*${HRP_TERM}\\ *\"\\)\\([^\"]*\\)\\(.*\\)/\\\2/`
-
 
433
        ;;
-
 
434
      definemodelskin)
-
 
435
        HRP_FILE=`echo "${DEF_LINE}" | sed -r --posix s/\\(^.*${HRP_TERM}\\ 0\\ \"\\)\\([^\"]*\\)\\(.*\\)/\\\2/`
-
 
436
        ;;
-
 
437
      definetexture)
-
 
438
        # Won't work atm if filename in quotes (too lazy)
-
 
439
        #HRP_FILE=`echo "${DEF_LINE}" | sed -r --posix s/\\(\\.*\\)\\(\\ \\)\\(.*\\)\\($\\)/\\\3/`
-
 
440
        HRP_FILE=`echo "${DEF_LINE}" | sed -r --posix s/\\(\\.*\\)\\(\\ \\)\\([0-9a-zA-Z\\_\\/\\.]*\\)\\(.*\\)/\\\3/`
-
 
441
        #echo "DEF_LINE : ${DEF_LINE}"
-
 
442
        #echo "HRP_FILE : ${HRP_FILE}"
-
 
443
        ;;
428
      *)
444
      *)
429
        HRP_FILE=""
445
        HRP_FILE=""
430
        ;;
446
        ;;
431
    esac
447
    esac
432
448