Why is it that when I move my build pictures from:
unitpics/
to
bitmaps/unitpics/
my build pictures are red?
build picture issues.
Moderator: Moderators
Re: build picture issues.
rts\Sim\Units\UnitDefHandler.cpp
all the things it tries have "unitpics/"+... in them, so I think you can not change it to load from another folder.
I guess eventually it ends up here and that makes it red:
Code: Select all
if (!texName.empty()) {
bitmap.Load("unitpics/" + texName);
}
else {
if (!LoadBuildPic("unitpics/" + unitDef->name + ".dds", bitmap) &&
!LoadBuildPic("unitpics/" + unitDef->name + ".png", bitmap) &&
!LoadBuildPic("unitpics/" + unitDef->name + ".pcx", bitmap) &&
!LoadBuildPic("unitpics/" + unitDef->name + ".bmp", bitmap)) {
bitmap.Alloc(1, 1); // last resort
}
I guess eventually it ends up here and that makes it red:
Code: Select all
void CBitmap::AllocDummy()
{
channels = 4;
Alloc(1, 1);
mem[0] = 255; // Red allows us to easily see textures that failed to load
Re: build picture issues.
why is stuff like this not in a config file...
Re: build picture issues.
just in case any developer does make it a config thing, please be sure to add some way to get that value as well - i'm currently depending (perhaps incorrectly, but oh well) that it's in a known location
Re: build picture issues.
that should be handled in the unitdefs_post lua file
mantis'd
hopefully it can get addressed. I didn't realize it was hardcoded otherwise I could have maed patch last night what a waste of a day. cannot maek patch today, spending time with IRL friends and well I am now behind so sunday I will be focused on this green bean sandwich I am making.
mantis'd
hopefully it can get addressed. I didn't realize it was hardcoded otherwise I could have maed patch last night what a waste of a day. cannot maek patch today, spending time with IRL friends and well I am now behind so sunday I will be focused on this green bean sandwich I am making.
Re: build picture issues.
There's been a discussion on mantis between myself and smoth about the pros and cons of changing this.
What does anyone else think?
What does anyone else think?
Re: build picture issues.
I always wanted this too when I was still developing. I wanted to put ALL of the little image directories (sidepics and anims* come to mind off the top of my head) into bitmaps but didn't really campaign very hard for it.
I don't see why you can't just add a line to one of the gamedata files, like modrules or resources or whatever: unitpicloc = "bitmaps/unitpics" and just have it assume unitpicloc = "unitpics" if undefined. Wouldn't require any _post additions or any def editing, and it shouldn't break any OGL binds or whatever.
*I don't know if these were ever moved or anything. Anims should have been eliminated a long, long time ago. If I remember right, we could define the cursors with a text file, and that text file could reference bitmaps anywhere in the vfs, so I had already moved the actual images into bitmaps but the anims folder remained to house all those text files. I would rather just merge the text files into one cursors.lua and dump that in gamedata once and for all. But again, I'm out of the loop, so maybe that's already been done!
I don't see why you can't just add a line to one of the gamedata files, like modrules or resources or whatever: unitpicloc = "bitmaps/unitpics" and just have it assume unitpicloc = "unitpics" if undefined. Wouldn't require any _post additions or any def editing, and it shouldn't break any OGL binds or whatever.
*I don't know if these were ever moved or anything. Anims should have been eliminated a long, long time ago. If I remember right, we could define the cursors with a text file, and that text file could reference bitmaps anywhere in the vfs, so I had already moved the actual images into bitmaps but the anims folder remained to house all those text files. I would rather just merge the text files into one cursors.lua and dump that in gamedata once and for all. But again, I'm out of the loop, so maybe that's already been done!