View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0003160 | Spring engine | General | public | 2012-07-07 17:25 | 2012-07-09 20:10 | ||||||||
Reporter | smoth | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | tweak | Reproducibility | always | ||||||||
Status | new | Resolution | open | ||||||||||
Product Version | 89.0 | ||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0003160: Unit build pictures are hard coded to /unitpics/, they should not be | ||||||||||||
Description | rts\Sim\Units\UnitDefHandler.cpp 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 } There is NO reason this string processing should be in the code. It should be moved to the unitdefs lua file. | ||||||||||||
Tags | No tags attached. | ||||||||||||
Checked infolog.txt for Errors | |||||||||||||
Attached Files |
|
![]() |
|
smoth (reporter) 2012-07-07 17:28 |
*unitdefs_post.lua sorrty |
FLOZi (reporter) 2012-07-07 18:43 |
That will break all games for your own OCD desire to put all images under bitmaps/ you realise? |
smoth (reporter) 2012-07-08 01:54 Last edited: 2012-07-08 01:55 |
There is no reason for this to be in the engine out of our control. It is vestigial crap from the old stuff before unitdefs_post. It isn't THAT huge a thing to feed it into a tag in unit defs post. After ALL the other things we have had to patch which were FAR more complex. As it stands now, I CANNOT OVER RIDE IT. give me a real reason the engine should be hard coding directory structure for content on this level. |
FLOZi (reporter) 2012-07-08 20:43 Last edited: 2012-07-08 20:44 |
A hardcoded structure promotes well-structured content with a standardized layout - bringing obvious benefits to new content developers looking into different existing games and anyone wishing to maintain an older game not of their making. Give me a real reason you need to have your build icons under bitmaps/? I'm pretty confident this example is not the only such hardcoding of structure to remain - would you propose being able to store models in the sounds directory? (Assuming you can't already :P) |
smoth (reporter) 2012-07-08 22:15 |
1) Because they are just images. They clutter the root directory of the game. They may be reused for other things(and are) The engine should not care where the files are stored just that it has the right path in vfs. are a few. 2) Because I want use them for more than unitpictures in the build menu. 3) I don't care where people put what, just that I would like to be able to organize my project in a way that seems logical to me. |
FLOZi (reporter) 2012-07-08 22:28 |
The only thing that really stands out there to me is reuse - You are aware of the # operator for gl.Texture? |
smoth (reporter) 2012-07-08 23:21 |
Nope, what is the relevance? |
FLOZi (reporter) 2012-07-09 00:17 Last edited: 2012-07-09 00:18 |
http://springrts.com/wiki/Lua_OpenGL_Api#Textures gl.Texture("0000012") -- 'load/bind' the texture of unitdefid 12 build icon edit: crap, mantis changes numbers to issue links gl.Texture("#twelve_but_in_digits") |
smoth (reporter) 2012-07-09 02:11 |
I don't follow how it solves the problem. |
FLOZi (reporter) 2012-07-09 03:24 Last edited: 2012-07-09 03:25 |
Well, just that you can already reuse build icons for basically anything except CEG textures (could be done via resources.lua) and maybe decals (can't quite remember how those are loaded)? I don't see how having them under /bitmaps/ makes reuse any easier. Perhaps a forum discussion to canvas opinions on this proposal? (Well I guess the thread is already there) |
smoth (reporter) 2012-07-09 20:10 |
by all means, debate it in the thread. Hoenstly I think that at the VERY least we should have some variables to load the base directory name. It may just be that I am being "OCD" but I feel it is a smart way of handling things to not hard set this stuff. |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2012-07-07 17:25 | smoth | New Issue | |
2012-07-07 17:28 | smoth | Note Added: 0008901 | |
2012-07-07 18:43 | FLOZi | Note Added: 0008905 | |
2012-07-08 01:54 | smoth | Note Added: 0008921 | |
2012-07-08 01:55 | smoth | Note Edited: 0008921 | View Revisions |
2012-07-08 20:43 | FLOZi | Note Added: 0008930 | |
2012-07-08 20:44 | FLOZi | Note Edited: 0008930 | View Revisions |
2012-07-08 22:15 | smoth | Note Added: 0008931 | |
2012-07-08 22:28 | FLOZi | Note Added: 0008932 | |
2012-07-08 23:21 | smoth | Note Added: 0008933 | |
2012-07-09 00:17 | FLOZi | Note Added: 0008935 | |
2012-07-09 00:18 | FLOZi | Note Edited: 0008935 | View Revisions |
2012-07-09 02:11 | smoth | Note Added: 0008936 | |
2012-07-09 03:24 | FLOZi | Note Added: 0008937 | |
2012-07-09 03:24 | FLOZi | Note Edited: 0008937 | View Revisions |
2012-07-09 03:25 | FLOZi | Note Edited: 0008937 | View Revisions |
2012-07-09 20:10 | smoth | Note Added: 0008939 |