Author Topic: OP2 Mission SDK Version 4.1.0 released  (Read 390 times)

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 964
OP2 Mission SDK Version 4.1.0 released
« on: February 10, 2020, 10:36:29 AM »
Today, I finalized the release of OP2 Mission SDK version 4.1.0. You can find the release at https://github.com/OutpostUniverse/OP2MissionSDK/releases. Hooman contributed heavily both to new content and peer review of what I wrote. TechCor's recent pushes to HFL were much appreciated, although the bulk of those changes will not be realized on the next release.

For future mission development, I would encourage pulling the master branch of OP2 Mission Repository instead of downloading a zip of this release.

There are recent significant updates to HFL that did not make this release. I suspect the next release of the SDK will include these changes and be a major release containing some breaking changes.

A couple of release vignettes are below followed by the final change log.

-------------

Garage Bay Enum (Adapted from Hooman's post):

You can now more clearly articulate garage bay use through the building bay enum defined in OP2Helper:

Old Code:
Code: [Select]
truck.PutInGarage(0, garage.Location().x, garage.Location().y);

The first parameter, the 0, is not very self documenting as to what it means. It's actually the bay index. To improve readability we've introduced an enum for the bay index so the code can instead be written as:

New Code:

Code: [Select]
truck.PutInGarage(Bay0, garage.Location().x, garage.Location().y);


Deprecate AllPlayers constant

There were two ways to set All Players. We deprecated the AllPlayers constant and would now encourage using PlayerNum::PlayerAll instead. Expect AllPlayers to be removed in a future release.

New Code:
Code: [Select]
TethysGame::ForceMoraleGood(PlayerNum::PlayerAll);


Clarify DirectX dependency

In Outpost2 DLL's TApp.h, there was a hidden dependency on IDirectDraw by forward declaring the object within GetDirectDraw's function prototype. This was separated out and commented on for clarity.

Code: [Select]
// Imported from DirectX headers
struct IDirectDraw;

---------------

### Version 4.1.0
Version 4.1.0 focuses on improving internal library implementation and C++ standards compliance. A few minor enhancements are made in OP2Helper including a BuildingBays enum. the constant AllPlayers in Outpost2DLL is now deprecated and should be replaced by PlayerNum::PlayerAll. Targeting a specific version of the Windows SDK was removed from all three major libraries.

#### Outpost2DLL
 - Bug: Fix documentation of RecordVehReinforceGroup to prevent a hanging bug within Outpost2.exe
 - Add a readme
 - Deprecate AllPlayers constant (Use PlayerNum::PlayerAll instead)
 - Improve C++ standards compliance and readability of source code
 - Clearly forward declare dependence on DirectX IDirectDraw
 - Improve comments on UnitClassifications enum and typedef
 - Improve implementation of internal headers

#### OP2Helper
 - Add a readme
 - Add function CenterViewOn
 - Represent building bays as an enum

#### HFL
 - Improve Readme
 - Improve example level code to prevent save/load bug and use modern features of Outpost2DLL
 - Improve C++ standards compliance and readability of source code
 - Remove excessive internal casting