API Documentation

Our attempt at remaking DID’s flight sims.
mikew
Data Genius
Posts: 603
Joined: 2022-Jan-09, 20:21

Re: API Documentation

Post by mikew »

I'm still having trouble with this so it seems I'm not the rockstar programmer I thought I was. :(

So, i have these 2 files derived from that Colombia .bmp from above:
tfx_e.7z
(7.28 KiB) Downloaded 261 times
colpal.dat is 1024 bytes and contains 256 colours arranged as ARGB.
colmap.dat is 40000 bytes giving a 200x200 index to those colours with the first byte at the south west corner.

May I ask what is the best way to load in the files, then use them so the world is a big version of that picture with each tile the same colour as the corresponding pixel?
mikew
Data Genius
Posts: 603
Joined: 2022-Jan-09, 20:21

Re: API Documentation

Post by mikew »

This really has made me look at the way I've approached programming over the years.
The car analogy is that by knowing the key 'activates' the machine, and putting a lever to the 'R' position and using the right pedal to speed up and slow down allows me to go anywhere...as long as I have plenty of time and avoid steep hills.
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: API Documentation

Post by Krishty »

I forgot: The latest source update removes the isNoFlyZone() methods from the terrain. These were the two zones above Red Sea where ATC would say You are entering restricted airspace, leave immediately. We never made proper use of them (and I don’t think TAW did either), so into the trash they go.

If your plugin stops compiling, simply remove the isNoFlyZone() assignment and the terrain_isNoFlyZone() function.

I have updated documentation and samples accordingly.
Menrva
Legendary Modder
Posts: 6
Joined: 2023-Apr-09, 14:53

Re: API Documentation

Post by Menrva »

About the No Fly Zone over the Red Sea, which areas exactly? I find it interesting. I know that if you fly out of bounds in TAW, you get that message by ATC not to fly into restricted airspace, soon before the mission is stopped/closed automatically. Quite a clever solution compared to what I saw in other flight sims.
mikew
Data Genius
Posts: 603
Joined: 2022-Jan-09, 20:21

Re: API Documentation

Post by mikew »

If you look in 'borders.txt' in the TAW 'f22data' folder, there are no fly zones defined around the religious sites of Medina and Mecca in Saudi and Axum in Ethiopia. I don't know if these were used in the game or was the 'leave immediately' warning just when you flew in enemy airspace in general.
Reaching the end of the map was handled differently I think.
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: API Documentation

Post by Krishty »

Right – entering these three places triggers the “You are entering restricted airspace, leave immediately or be shot down” message.

Leaving the edge of the map triggers the “You are leaving UN airspace” message – which seems to be a leftover from TFX, in which you flew for the UN.
Scorpion82
Pilot
Posts: 54
Joined: 2022-Oct-17, 17:07

Re: API Documentation

Post by Scorpion82 »

Interesting in EF2000 there was no message that I can remember, but might be wrong on it. I only remember that the mission ended when you left the area, while I was testing the Autopilot logic in tracking mode with no target.
Post Reply