Code Monkey home page Code Monkey logo

ra3bar-ra3launcher's Introduction

RA3Bar-RA3QuickLoader

For more details about this project: https://www.gamereplays.org/community/index.php?showtopic=1013524

Or also here if you can speak Chinese: https://tieba.baidu.com/p/5735228567

Features

  • Start Red Alert 3 nearly instantly
  • You can now click Red Alert 3's splash screen to open RA3's Control Center. This could be pretty handy if you wish to play Mods[1] with current version of C&C:Online Launcher.
  • You can now add custom command-line arguments directly inside the Control Center. Again, this could be pretty handy if you want to add some command line arguments when using C&C:Online Launcher.
  • Control Center's Game Browser is now equipped with a simple replay parser which can display some match information such as date, game duration, map, and player list. It can also fix corrupted replays damaged by game crash.
  • If you can't open (and watch) .RA3Replay files with RA3.exe, now you can set the replay file association in a rather easy way: right click on the replay file, and choose (this new) RA3.exe in the Open With... menu. Then you can watch replays by just double-clicking on the file.

The replay parsing functions of this project is largerly based on louisdx's cnc3reader.

[1]: In case you don't know how to load Mods: you need go to Control Center → Game Browser → Mod. To install a Mod, put them in My Documents\Red Alert 3\Mods.

How to build

If you are using MinGW64, you can build like this:

g++ -c UserInterface.cpp -o UserInterface.o -Wall -std=c++17 -DUNICODE -D_UNICODE
g++ -c main.cpp -o main.o -Wall -std=c++17 -DUNICODE -D_UNICODE
windres -i resource.rc -o resource.res -O coff
g++ UserInterface.o main.o resource.res -o RA3.exe -mwindows -static-libgcc -static-libstdc++ -lComctl32 -lShlwapi -static -lpthread

I think Visual Studio should also be able to build with these files without any problems, but I haven't tried it yet.

About this program

Recently a lot of people needs to wait for like 30 seconds when launching Red Alert 3.

This is because Red Alert 3's game launcher, RA3.exe, will firstly check "Comrade News"[2] before starting the main game process. But EA recently shut down the server files.ea.com, and RA3.exe would need to wait until the connection times out, before starting the game.

While this problem can be fixed in some rather simple way, such as by editing the host file or by cutting off the Internet connection when launching the game (so the connection to EA server would fail instantly instead of waiting 30 seconds), I thought I could write a my own RA3.exe to solve this problem. After all, RA3.exe is just a game launcher, isn't it? It looks like I just need write a program which calls CreateProcess() to start game's main process, and this should be a really simple task!

So I started this project by using only Win32 API (because I thought it would be enough), and eventually I discovered that... the things aren't that easy like what I thought... And I'm not very good at coding (you can confirm this by reading my code :P), so this project has nearly become a big pain for me, but fortunately, I still completed it!

[2]: Example link of Comrade News: http://files.ea.com/downloads/eagames/cc/tiberium/RedAlert3/RA3ComradeNews/RA3ComradeNews_english.html

ra3bar-ra3launcher's People

Contributors

lanyizi avatar qzlin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ra3bar-ra3launcher's Issues

Can't compile

$ g++ -c .\UserInterface.cpp -o .\UserInterface.o -Wall -std=c++17 -DUNICODE -D_UNICODE
In file included from .\Common.hpp:14,
                 from .\UserInterface.hpp:6,
                 from .\UserInterface.cpp:16:
.\ReplaysAndMods.hpp: In function 'ReplaysAndMods::ReplayDetails ReplaysAndMods::getReplayDetails(const wstring&)':
.\ReplaysAndMods.hpp:347:22: warning: comparison of integer expressions of different signedness: 'std::vector<char>::size_type' {aka 'long long unsigned int'} and 'long long int' [-Wsign-compare]
     if(buffer.size() >= fileSize) {
        ~~~~~~~~~~~~~~^~~~~~~~~~~
.\UserInterface.cpp: In lambda function:
.\UserInterface.cpp:668:63: error: inconsistent types 'int' and 'long long int' deduced for lambda return type
   return reinterpret_cast<INT_PTR>(commandLineBackground.get()); //per https://msdn.microsoft.com/en-us/library/windows/desktop/bb761691(v=vs.85).aspx
                                                               ^
$

关于数字签名

你好,岚依,我是那位apa战队的humor,我想说一下这个exe可能出现的问题
snipaste_2018-06-09_20-10-51
snipaste_2018-06-09_20-10-28
因为你提供的exe没有·ea的签名戳,会不会出现一些问题?

点击开启控制台的问题

当我用这个exe开启游戏并想点击开启控制台时【在根目录打开】出现了一个提示

我想这可能是因为我的游戏语言导致的---我的语言是法语,,,,,希望增加一些语言的支持
snipaste_2018-06-09_20-18-51

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.