Jump to content

ExportDLL Interface Task List


TonyE
 Share

Recommended Posts

  • 3 weeks later...

Implemented: Expose functions to the ExportDLL to replace the EventHead, TopGroup, and such passed by the GE. Currently the DLL is notified when there is a change but the DLL cannot change those root items and should be able to.(2009.095)

 

HCE - 2009.095 - 2013/09/08

===========================

- Chg:0000 GE ExportDll interface added pointers to functions in the

funcRefs: PHCDLL_FUNC_REF linked list sent by DLLInit:

 

QueueHarpoonEvent(HarpoonEventPtr): void - This is only for

adding items to HarpoonEventHead, not for events on path legs.

If HarpoonEventHead does not exist, this will create it.

NewWeatherGroup(void): GroupPtr - If WeatherGroups does not

exist, this will create it. You still need to set the new

group's position, speed, heading, and strength.

KilledOff(UnitPtr): void - This adds UnitPtr do the

AllDeadUnitsPtr list, creating the AllDeadUnitsPtr list in

the process if required.

CreateSonoBuoy(void): SonoBuoyRegionPtr - Creates a SB

and sets SonoBuoyRegionHead if it doesn't exist yet. You

still have to assign all of the characteristic, location,

etc.

CreateVictoryCondition(void): VictoryConditionsPtr -

Creates a Victory Condition and sets VictoryConditionsList

if it doesn't already exist yet. You still have to fill in

the required data fields.

CreateGroup(uchar side, long sLon, long sLat): GroupPtr -

Creates a new HCGroupPtr, gives it a group ID, and adds

it to the list of groups. Establishes StartGroup if it

hasn't been established yet.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Added more items to the "To Implement" section

 

2.Expose the disk_id_to_annex_id function.

3.Expose the GetLoadoutIndex function.

4.Expose a CheckLocationDepth-like function that takes lat/lon instead of map coordinates. See SCENCHEK.C ~ ln 707 for components.

Link to comment
Share on other sites

Implemented: Expose more functions to the ExportDLL (2009.102)

 

HCE - 2009.102 - 2013/10/15

===========================

- Chg:0000 GE ExportDll DLLInit call will now pass the maximum DLL Interface

version supported by the GE. This is in the form of a

LongWord/unsigned long. The full call now looks like:

DLLFunc(hwndHC, harpoon_path, APP_BUILD, SaveVersion, &dllFuncRefs, &GEClosing, &DLLExport.DLLBusy, dllVerInterface);

- Chg:0000 GE ExportDll interface added pointers to functions in the

funcRefs: PHCDLL_FUNC_REF linked list sent by DLLInit:

 

disk_id_to_annex_id(ushort): ushort - If you pass in

a Disk AnnexID (from the PE or annex csv files, i.e. 2048

for first ship in the database), you will get a Memory

AnnexID back out IF that item is present in the scenario.

GetLoadoutIndex(ushort PlaneID, ushort LoadoutID): uchar -

Whether you pass in Disk AnnexIDs or Memory AnnexIDs for

PlaneID and LoadoutID, you will get back the index into

the plane's array of loadouts for the LoadoutID loadout.

This can be used in THCReadyAirEvent events.

dllCheckLatLonDepth(double latitude, double longitude): short -

Given a decimal lat/lon, return the HC water depth or land.

See uHCTypeDefs.pas //--- altitude bands section for help

in deciphering the altitudes. Any value > SeaLevel (6)

is considered Land.

- Chg:0000 GE ExportDLL Interface version is now 8 to accommodate the

additions to funcRefs.

Link to comment
Share on other sites

  • 1 month later...
  • Write functions that can look up platform information from the database. This doesn't necessarily need to be via the ExportDLL interface but is required to do things like see which weapons are in a loadout.

I'm getting a start on this. What are you looking for in terms of capabilities? I'm looking at dumping the commondb.res file (the platform database part of it anyway) either to an xml file or a SQLite database but your input is welcome and may well push me to an entirely different solution.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...

 

  • Write functions that can look up platform information from the database. This doesn't necessarily need to be via the ExportDLL interface but is required to do things like see which weapons are in a loadout.

I'm getting a start on this. What are you looking for in terms of capabilities? I'm looking at dumping the commondb.res file (the platform database part of it anyway) either to an xml file or a SQLite database but your input is welcome and may well push me to an entirely different solution.

 

Did this progress Tony? I'm thinking about what project I might do next and if an ability to look at the 'current in use' data base has passed me by I'd like to know.

Looking at weapon stuff would be good as I'm wondering about whether it is time to look at replenishments and restricting aircraft load out munitions.

Link to comment
Share on other sites

 

 

  • Write functions that can look up platform information from the database. This doesn't necessarily need to be via the ExportDLL interface but is required to do things like see which weapons are in a loadout.

I'm getting a start on this. What are you looking for in terms of capabilities? I'm looking at dumping the commondb.res file (the platform database part of it anyway) either to an xml file or a SQLite database but your input is welcome and may well push me to an entirely different solution.

 

Did this progress Tony? I'm thinking about what project I might do next and if an ability to look at the 'current in use' data base has passed me by I'd like to know.

Looking at weapon stuff would be good as I'm wondering about whether it is time to look at replenishments and restricting aircraft load out munitions.

 

No, this got mired in 16-bit to 32-bit compatibility land and me not yet finishing the XML scenario file format. I have been thinking about it quite a bit since the refueling changes, assuming you would be knocking on my door like you just did. I'll do a proof of concept in the next build (2015.012 is sitting here ready to go out the door so 2015.013 perhaps) with a single annex. The idea is to keep it simple for me for now, just pass you the pointer to the raw structure and make you do all of the legwork. On the plus side that is how you interact with everything else right now, on the minus side it doesn't in and of itself paint a happier future.
Link to comment
Share on other sites

pointer to raw game structure seems fine to me if that is a lot less work. In at least some cases it also lets you manipulate the game so there's an advantage?

I'm working on a warning for ships grounding and looking at some interaction with neutrals but after that I'm thinking about having a go at replenishments and restricting munitions for aircraft loadouts. I think the replenishment and aircraft loadouts is the only matter that would justify much effort on your part, and I suspect we'd need access to at least some DB annex to do it.

The fuel to offload addition did wonders and I'm now happy enough with what I've done - if there was a clamouring for selectively refuelling individual units or tankers that have run the refuel cells dry then I'd ask for more :)

Link to comment
Share on other sites

  • 2 weeks later...

Priority ranked list of capabilities to add to the ExportDLL interface:

  • Write functions that can look up platform information from the database. This doesn't necessarily need to be via the ExportDLL interface but is required to do things like see which weapons are in a loadout.
It has begun in 2015.014...

HCExportDLLDB.jpg

  • Like 1
Link to comment
Share on other sites

 

Priority ranked list of capabilities to add to the ExportDLL interface:

  • Write functions that can look up platform information from the database. This doesn't necessarily need to be via the ExportDLL interface but is required to do things like see which weapons are in a loadout.
It has begun in 2015.014...

 

Expanded in 2015.015 to much more easily look up information when you have a unit you want to relate to its database information.
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...