:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::

Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Tue Jul 07, 2020 5:14 am
All times are UTC + 0
 Forum index » Modding Central » C&C: Remastered Collection Editing Forums
Code for reading the .MEG files of the remaster
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
Author Message
jonwil
Disk Thrower


Joined: 24 Jul 2005

PostPosted: Sun Jun 21, 2020 9:27 am    Post subject:  Code for reading the .MEG files of the remaster Reply with quote

Here is some code for reading the .MEG files of the C&C remaster. It is licensed under GPLv3 (same license as the remaster codebase) and requires RawFileClass/FileClass from the remaster codebase.

MegFileManager functions:
MegFileManager constructor takes the path to the remaster folder (so the one with the exe files in it, not the data folder where the .MEG files are)
MegFileManager::Load takes the path (full path) to a .MEG File and loads that file.
MegFileManager::Exists takes the path to a game file and will tell you if that file exists in any of the loaded .MEG files,.
MegFileManager::Open takes the path to a game file and returns a FileClass which you can then use to read the file contents etc.
MegFileManager::Close takes the FileClass instance and closes/destroys it.
LoadMegs takes the path to the remaster folder (so the one with the exe files in it, not the data folder where the .MEG files are) and loads the same .MEG files (in the same order) as the remaster map editor does and lets you access them through TheMegFileManager.
CloseMegs is called to free TheMegFileManager.

I am hoping this code will be useful to people working with the remaster.


megcode.7z
 Description:

Download
 Filename:  megcode.7z
 Filesize:  1.68 KB
 Downloaded:  7 Time(s)


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
 Forum index » Modding Central » C&C: Remastered Collection Editing Forums
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.2008s ][ Queries: 12 (0.0883s) ][ Debug on ]