Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jul 1999 14:57:00 -0700 (PDT)
From:      dbushong@CSUA.Berkeley.EDU (David Bushong)
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/12554: file(1) magic entry for WarCraft II PUD files
Message-ID:  <199907072157.OAA14210@soda.CSUA.Berkeley.EDU>

next in thread | raw e-mail | index | archive | help

>Number:         12554
>Category:       bin
>Synopsis:       File to go in /usr/src/usr.bin/file/Magdir/warcraft2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul  7 15:10:00 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     David Bushong
>Release:        FreeBSD 3.2-STABLE i386
>Organization:
none
>Environment:

        N.A.

>Description:

        This is magic for WarCraft II (a DOS/Windows RTS game from Blizzard
        Entertainment) PUD (map) files.  I came up with this while working
        on a clone for UN*X: http://www.csua.berkeley.edu/~xcraft/
        The results look like this:

timber-wolf ~/src/xcraft/server/puds [2:23pm] file crossover.pud 
crossover.pud: WarCraft II PUD, "Cross over", 128x128

timber-wolf ~/src/xcraft/server/puds [2:23pm] file nowhere.pud 
nowhere.pud: WarCraft II PUD, "Nowhere to run, nowhere to hide", 32x32

        (the magic extracts the map size and title, and has a very unique
        match for the first few bytes, so there's no danger of collision)

>How-To-Repeat:

Here's the code.  I'd suggest /usr/src/usr.bin/file/Magdir/warcraft2, but
/usr/src/usr.bin/file/Magdir/pud would probably work equally well.

#------------------------------------------------------------------------------
# warcraft2: file(1) magic for WarCraft II PUD (map) files
#
# From:  David Bushong <david@bushong.net>
#
0       string          TYPE\x10\0\0\0WAR2\ MAP         WarCraft II PUD
>Fix:

        N.A.


Enjoy.


>Release-Note:
>Audit-Trail:
>Unformatted:
 >0x2a   string          >\0                             \b, "%s"
 >0x74   leshort         x                               \b, %d
 >>0x76  leshort         x                               \bx%d
 
 if that didn't make it through, here it is uuencoded:
 
 begin 644 warcraft2
 M(RTM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM
 M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+0HC('=A<F-R869T
 M,CH@9FEL92@Q*2!M86=I8R!F;W(@5V%R0W)A9G0@24D@4%5$("AM87`I(&9I
 M;&5S"B,*(R!&<F]M.B`@1&%V:60@0G5S:&]N9R`\9&%V:61`8G5S:&]N9RYN
 M970^"B,*,`ES=')I;F<)"5194$5<>#$P7#!<,%PP5T%2,EP@34%0"0E787)#
 M<F%F="!)22!0540*/C!X,F$)<W1R:6YG"0D^7#`)"0D)7&(L("(E<R(*/C!X
 M-S0);&5S:&]R=`D)>`D)"0E<8BP@)60*/CXP>#<V"6QE<VAO<G0)"7@)"0D)
 &7&)X)60*
 `
 end
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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