GithubHelp home page GithubHelp logo

jayveer / ctxrtool Goto Github PK

View Code? Open in Web Editor NEW
16.0 4.0 2.0 29 KB

A program for converting CTXR textures from Metal Gear Solid: Master Collection to DDS and vice versa

C++ 90.66% C 9.34%
dds metal-gear-solid metal-gear-solid-3 mgs mgs3 mod texture ctxr metal-gear-solid-master-collection

ctxrtool's People

Contributors

arefdsg avatar jayveer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ctxrtool's Issues

help!

Good afternoon! I am a novice modder, decided to try myself in this, found your program, but I can not run it and understand how to use it, can you please explain?

Cant extract DDS properly

Hello, im trying to extract 00393ebb.ctxr inside textures\flatlist_win but it always extracts wrong. TGA extract works fine, but i want to insert a edited texture.

This is the command im using:
for /R %%i in (*.ctxr) do CtxrTool.exe "%%i"

Im doing something wrong?

Thank you and keep the good work

Add option for all files/folder convert in loop

For now you can only convert one file at once, but there should be a possibility to convert a whole folder or use "*" for every file in the selected folder (drag & drop from all files in the folder throws a windows error).

Struct mapping & enums

Hi, great work with the tool, I've been looking into some of the stuff around texture rendering too, luckily they left a lot in the renderer.dll file that lays out some of the types/enums for it.

Came up with a 010 editor template that maps out some more of the CTXR header, figured it's worth posting in case it can help at all.

BigEndian();

enum<uint32> CBaseTexture_EFormat
{
  kFormat_A8R8G8B8 = 0x0, // DXGI_FORMAT_B8G8R8A8_UNORM
  // 0x1 isn't defined in Renderer.dll, but seems to use DXGI_FORMAT_B8G8R8X8_UNORM
  // maybe kFormat_X8R8G8B8 = 0x1,
  kFormat_A16B16G16R16F = 0x2, // DXGI_FORMAT_R16G16B16A16_FLOAT
  kFormat_R32F = 0x3, // DXGI_FORMAT_R32_FLOAT
  kFormat_D24X8 = 0x4, // DXGI_FORMAT_D24_UNORM_S8_UINT
  kFormat_DXT1 = 0x5, // DXGI_FORMAT_BC1_UNORM
  kFormat_DXT3 = 0x6, // DXGI_FORMAT_BC2_UNORM
  kFormat_DXT5 = 0x7, // DXGI_FORMAT_BC3_UNORM
  kFormat_A32B32G32R32F = 0x8, // DXGI_FORMAT_R32G32B32A32_FLOAT
  kFormat_Luminance8 = 0x9, // DXGI_FORMAT_R8_UNORM
  kFormat_D24FS8 = 0xA, // not mapped to DXGI_FORMAT?
  kFormat_Count = 0xB,
  kFormat_Invalid = 0xFFFFFFFF,
};

enum<uint32> CBaseTexture_EType
{
  kType_Normal = 0x0,
  kType_Cube = 0x1, // reads 6 * MipCount images from the file if this is set?
};

// struct is packed without padding, requires the following in VC++
// #pragma pack(push, 1)
struct CTxrHeader
{
  uint32 Magic_0;
  uint32 Version_4;
  uint16 Width_8;
  uint16 Height_A;
  uint16 Depth_C;
  CBaseTexture_EFormat Format_E;
  byte Flags_12;
  int unk_13;
  int unk_17;
  int unk_1B;
  if (Version_4 >= 6)
  {
    byte unk_1F;
    byte unk_20;
  }
  if (Version_4 >= 7)
  {
    byte unk_21;
  }
  CBaseTexture_EType TextureType_22;
  byte MipCount_26;
};
// #pragma pack(pop)

CTxrHeader Header;

.

.

Edit models

Is it possible to edit the models in the future?

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.