ID:1371237
 
(See the best response by Kaiochao.)
I'm writing some code to dynamically parse/load .dmm map files, and am looking for a way to, given text string, access a file in the resource cache. The particular setup I am using will guarantee that the file in question (e.g. "black.dmi") already exists in the .rsc file. However, file() and fcopy_rsc() seem to assume that I am trying to access an external file, which is not the case.

In other words, How can I resolve a standard text string, e.g. "black.dmi", to a cache entry, e.g. 'black.dmi', if I already know that such a cache entry exists?
Best response
It can't be done.

However, I just made this utility that will allow you to generate a code file that contains a list you can use.
//  what you want:
icon = '[something].dmi'

// what you can do after using the tool:
icon = icons["[something]"]

It won't go through sub-folders at the moment because I should be sleeping. I might update it to include that functionality later.