1
Q-Gears / Re: Current state.
« on: 2012-03-15 13:18:19 »
Is Xeno part active?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Thanks for responding extremely quickly .I cann't check it because I don't have MSVS 2010.
I cannnot make the one in the [kg_xeno] folder work at all. There are quite a few errors when visual studio c++ 2010 try to compile it.
The one in the [KursProj_anim_model_editor] had quite a few errors. I have to mannually put in the SDL library, SDL_tft library and the libxml libary. After that visual studio c++ 2010 did "build" the solution and I could run the debug from the visual studio c++ but it all black, i couldn't see anything.
#ifndef _DEBUG
root->loadPlugin( "RenderSystem_GL.dll" );
#else
root->loadPlugin( "RenderSystem_GL_d.dll" );
#endif
A Makefile for Linux would be nice. Since I have not dug into the code to see exactly how it all works and links. I have no idea how to get it to compile under Linux, but it is suppose to compile for Linux. Some help would be appreciated.Q-Gears is broken for linux. It's need to rewrite some sources that use Windows specifics and again and again rewrite project file.
Traceback (most recent call last):
File "model.py", line 1057, in <module>
main(*sys.argv[1:])
File "model.py", line 984, in main
object.draw_normals = not object.draw_normals
AttributeError: OpenGLObject instance has no attribute 'draw_normals'
That looks great!It'll look greater when I'll apply alpha channel and remove invisible blocks, but information about this is in unknown parts of animation files.
void
TextureFile::GetSurfaces(Surface* pClut, Surface* pVram)
{
TextureHeader* texture_header = (TextureHeader*)(mpBuffer);
// palette
if (texture_header->id == 0x00001101)
{
u16 vram_x = texture_header->vram_x + texture_header->move_x;
u16 vram_y = texture_header->vram_y + texture_header->move_y;
for (int y = vram_y; y < vram_y + texture_header->height; ++y)
{
for (int x = vram_x; x < vram_x + texture_header->width; ++x)
{
u16 src1 = GetU16LE(0x10 + (x - vram_x) * 0x02 + (y - vram_y) * texture_header->width * 0x02);
*(pClut->pixels + x * 4 + pClut->width * 4 * y + 0) = ((src1 ) & 31) * 255 / 31;
*(pClut->pixels + x * 4 + pClut->width * 4 * y + 1) = ((src1 >> 5) & 31) * 255 / 31;
*(pClut->pixels + x * 4 + pClut->width * 4 * y + 2) = ((src1 >> 10) & 31) * 255 / 31;
// set alpha only for first entry in clut if byte is set or all zero
*(pClut->pixels + x * 4 + pClut->width * 4 * y + 3) = (x == vram_x && (src1 & 0x8000) || (src1 == 0)) ? 0 : 255;
}
}
}
// textures
else if (texture_header->id == 0x00001100)
{
u16 vram_x = texture_header->vram_x + texture_header->move_x;
u16 vram_y = texture_header->vram_y + texture_header->move_y;
for (int y = vram_y; y < vram_y + texture_header->height; y++)
{
for (int x = vram_x * 2; x < vram_x * 2 + texture_header->width * 2; x++)
{
*(pVram->pixels + x + pVram->width * 4 * y) = GetU8(0x10 + (x - vram_x * 2) + (y - vram_y) * texture_header->width * 2);
}
}
}
}
And for Surface::pixels you create array of heigth*width*4 size, I understood that you use 32bpp. I clearly see converting to 32bpp in CLUT's part of code.
It depends on bpp (bits per pixel). Width of VRAM is 512 in case of 16bpp. Xenogears as I remember mostly use 4bpp so it gives you 2048 pixel width.Is 4bpp texture use CLUT such pallete? But CLUT have 128 colors (more then 16, which can be address by 4 bits) and you store texures in 32bpp class Surface without converting.