Giter Site home page Giter Site logo

iwi's Introduction

GitHub release (latest by date)

iwi

IWI (Infirnity Ward Image) processing library

Supported games

  • Call of Duty 2
  • Call of Duty 4 Modern Warfare
  • Call of Duty 5
  • Call of Duty Modern Warfare 2
  • Call of Duty Modern Warfare 3
  • Call of Duty Black Ops
  • Call of Duty Black Ops 2

Installation

go get -u github.com/mauserzjeh/iwi

Usage

// import the library
import "github.com/mauserzjeh/iwi"

iwiFile, err := iwi.ReadIWI("path/to/iwi/file.iwi")

// check for errors
if err != nil {
    log.Fatal(err)
}

// iwiFile holds the data of the .iwi file
header := iwiFile.Header // access information about the header
info := iwiFile.Info // access information about the file
data := iwiFile.Data // access the image data that was read in (only the highest mip)

The library exposes various constants to check for version and format

const (
	// IWI Versions
	IWI_VERSION_COD2   = 0x05 // CoD2
	IWI_VERSION_COD4   = 0x06 // CoD4
	IWI_VERSION_COD5   = 0x06 // CoD5
	IWI_VERSION_CODMW2 = 0x08 // CoDMW2
	IWI_VERSION_CODMW3 = 0x08 // CoDMW3
	IWI_VERSION_CODBO1 = 0x0D // CoDBO1
	IWI_VERSION_CODBO2 = 0x1B // CoDBO2

	// IWI Format
	IWI_FORMAT_ARGB32 = 0x01 // ARGB32
	IWI_FORMAT_RGB24  = 0x02 // RGB24
	IWI_FORMAT_GA16   = 0x03 // GA16
	IWI_FORMAT_A8     = 0x04 // A8
	IWI_FORMAT_DXT1   = 0x0B // DXT1
	IWI_FORMAT_DXT3   = 0x0C // DXT3
	IWI_FORMAT_DXT5   = 0x0D // DXT5
)

iwi's People

Contributors

mauserzjeh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.