View topic - build picture issues.



All times are UTC + 1 hour


Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: build picture issues.
PostPosted: 07 Jul 2012, 00:18 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
Why is it that when I move my build pictures from:

unitpics/

to

bitmaps/unitpics/

my build pictures are red?


Top
 Offline Profile  
 
PostPosted: 07 Jul 2012, 10:40 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
rts\Sim\Units\UnitDefHandler.cpp
Code:
   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
      }
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:
void CBitmap::AllocDummy()
{
   channels = 4;
   Alloc(1, 1);
   mem[0] = 255; // Red allows us to easily see textures that failed to load


Top
 Offline Profile  
 
PostPosted: 07 Jul 2012, 11:40 
Damned Developer
User avatar

Joined: 01 Jun 2006, 12:15
Location: Banned user for reason “Do not post pictures of people fucking cars”
why is stuff like this not in a config file...


Top
 Offline Profile  
 
PostPosted: 07 Jul 2012, 12:05 
Moderator

Joined: 05 Aug 2009, 19:42
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


Top
 Online Profile  
 
PostPosted: 07 Jul 2012, 16:27 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
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.


Top
 Offline Profile  
 
PostPosted: 07 Jul 2012, 18:11 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
i loled


Top
 Offline Profile  
 
PostPosted: 09 Jul 2012, 19:16 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
There's been a discussion on mantis between myself and smoth about the pros and cons of changing this.

What does anyone else think?


Top
 Offline Profile  
 
PostPosted: 12 Jul 2012, 13:59 
Imperial Winter Developer

Joined: 06 Feb 2005, 13:42
Location: Indianapolis
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!


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.