Resource.cpp/bin

From Bohemia Interactive Community
Jump to navigation Jump to search
bohemia interactive logo black.png
Disclaimer: This page describes internal undocumented structures of Bohemia Interactive software.

This page contains unofficial information.

Some usage of this information may constitute a violation of the rights of Bohemia Interactive and is in no way endorsed or recommended by Bohemia Interactive.

Bohemia Interactive is not willing to tolerate use of such tools if it contravenes any general licenses granted to end users of this community wiki or BI products.

bin\resource.bin is exclusively used in OFP and contains the resource dialogs.

In Arma, it has been subsumed into the standard bin\config.bin

Hindsight being that wonderful invention, it was probably better to retain it and keep dialogs out of config namespace. Certainly a little more thought was needed than simply cut and pasting the entire resource as-was.

RscDialog classes are heavily polluting. Unlike other items, there is no cfgResource class container and hence almost everything written for dialogs is a root parent. You alter or delete a root parent at your peril. Hunting for anything other than RscDialogs in the engine's post built config is noisy and time consuming. Naming and creating new dialogs is ofpec_tag critical because there is no context to refer to them, other than the root parent. If you've named your dialog "widget". You can be certain, someone else has too.

Along with the config.bin file, resource.cpp also has global defines, which, in bis, take the form of enums. These are almost the only instances of global defines in the game. This has been a clever approach, because only the engine.exe and the bin\config are tightly coupled. The nature of the engine can change, it's id's for specific dialogs(solely as an eg) can change, but all pbo's which access that reference do not require recompiles.