游戏开发论坛

 找回密码
 立即注册
搜索
查看: 6050|回复: 2

谁还有h12_tree.zip吗,万分感谢!

[复制链接]

36

主题

100

帖子

725

积分

高级会员

Rank: 4

积分
725
发表于 2008-11-11 01:46:00 | 显示全部楼层 |阅读模式
Visual Studio 6 Service Pack 5和Processor Pack 就是装不上,把所有__declspec(align(16))都注掉,关了sse和3dnow优化,算是通过编译,就差资源了,哪位兄弟帮一下忙。

36

主题

100

帖子

725

积分

高级会员

Rank: 4

积分
725
 楼主| 发表于 2008-11-12 13:42:00 | 显示全部楼层

Re: 谁还有h12_tree.zip吗,万分感谢!

没有资源,只好用Lost Coast的了。可是读vtf文件出错,文件头格式与代码不匹配,研究一晚终于通过,在vtf下的vtf.cpp中把VTFFileHeader_t改成如下:


  1. struct VTFFileHeader_t
  2. {
  3.         char fileTypeString[4]; // "VTF" Valve texture file
  4.         int version[2]; // version[0].version[1]
  5.         int headerSize;
  6.         unsigned short width;
  7.         unsigned short height;
  8.         unsigned int flags;
  9.         unsigned short numFrames;
  10.         unsigned short startFrame;
  11.         int tmp;
  12.         VectorAligned reflectivity; // This is a linear value, right?  Average of all frames?
  13.         int tmp2;
  14.         float bumpScale;
  15.         ImageFormat imageFormat;
  16.         unsigned char numMipLevels;

  17.         ImageFormat lowResImageFormat;
  18.         unsigned char lowResImageWidth;
  19.         unsigned char lowResImageHeight;
  20.         char tmp3;
  21.         int tmp4;
  22.         int tmp5;
  23. };

复制代码


可以读出vtf了,不过DXT5格式的纹理仍不正常。

36

主题

100

帖子

725

积分

高级会员

Rank: 4

积分
725
 楼主| 发表于 2008-11-14 17:11:00 | 显示全部楼层

Re: 谁还有h12_tree.zip吗,万分感谢!


修正后的文件头,dxt5也没问题了
  1. struct VTFFileHeader_t
  2. {
  3.         char fileTypeString[4]; // "VTF" Valve texture file
  4.         int version[2]; // version[0].version[1]
  5.         int headerSize;
  6.         unsigned short width;
  7.         unsigned short height;
  8.         unsigned int flags;
  9.         unsigned short numFrames;
  10.         unsigned short startFrame;
  11.         int tmp;
  12.         VectorAligned reflectivity; // This is a linear value, right?  Average of all frames?
  13.         int tmp2;
  14.         float bumpScale;
  15.         ImageFormat imageFormat;
  16.         unsigned char numMipLevels;

  17.         ImageFormat lowResImageFormat;
  18.         unsigned char lowResImageWidth;
  19.         unsigned char lowResImageHeight;
  20.         char tmp3;
  21. };
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2024-5-8 13:07

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表