Jump to content

2 posts in this topic

Posted

its kind of hard to explain.

Im making a resorce editor program. for now I can extract resources from any file knowing only which kind of folders the resoures are in (ex. "PNG" "UIFILE") I give the program order to extract this folder and it gets all the resources and extracts into folder. So far so good. Now when I have to replace a resource comes a problem: I know how I could replace resource in file but for these I need to know what type the resource is (ex "PNG" or "UIFILE") AND which id the resource is (686, 678). There comes the problem, even tho I know the resource ID I need to determine which type is it. I was thinking creating datatable for it: ex columns resname, id, reslocation and add rows for each resource extracted and when need to replace then read the table, but maybe there is better way of doing this.

I thought that maybe something like this would solve my problem: creating table, but im not familar with tables
[CODE]
ID ResName ResType ResLoc
------------------------------------------------------------
0 567 PNG C:\users....
1 587 BMP C:\users....
[/CODE]

Hope you'll guys get the point, any help really appreciated

Share this post


Link to post
Share on other sites

Posted

Managed to get it work somehow but the way im using is not very polite. Since im always extracting resources anyway I extracted these with names like "IMAGE675" and afterwards if I need to update I split the string between letters and numbers and I got ID + Type.
If anyone has better suggestion, im open for it, but for now it works.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.