Go Back   Novahq.net Forum > Games > Delta Force

Delta Force Anything to do with the Delta Force series of games, DF1, DF2, LW, TFD, BHD, DFX, AF etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-23-2022, 03:51 PM
Baldo_the_Don is offline Baldo_the_Don
Baldo_the_Don's Avatar
Registered User

Join Date: Jul 2012
Posts: 529

Baldo's compass heading to .cin and .end heading conversion chart

YEARS! For years I have been wondering about what to do about .cin and .end file heading problems. Tonight, I was inspired and a solution occurred to me. I'll skip the details and explain this much:

Take a directional compass. Hold it at the 45° - 225° axis. Flip it over. That is the compass that DFBHD(TS) applies to camera heading entries in .cin and .end files.

I tried drawing this on scrap paper. I tried to work out a simple math formula. I tried to work out a complex math formula. I considered drawing a wheel with 360 compass heading points and the .cin/.end equivalents. Then I realized it doesn't have to be a circle. It can be a list!

From my notes:

Code:
22:24 23.07.2022
----------------
Compass heading to .cin/.end heading conversion chart!

000 = 090
001 = 089
002 = 088
003 = 087
004 = 086
005 = 085
006 = 084
007 = 083
008 = 082
009 = 081
010 = 080
011 = 079
012 = 078
013 = 077
014 = 076
015 = 075
016 = 074
017 = 073
018 = 072
019 = 071
020 = 070
021 = 069
022 = 068
023 = 067
024 = 066
025 = 065
026 = 064
027 = 063
028 = 062
029 = 061
030 = 060
031 = 059
032 = 058
033 = 057
034 = 056
035 = 055
036 = 054
037 = 053
038 = 052
039 = 051
040 = 050
041 = 049
042 = 048
043 = 047
044 = 046
045 = 045
046 = 044
047 = 043
048 = 042
049 = 041
050 = 040
051 = 039
052 = 038
053 = 037
054 = 036
055 = 035
056 = 034
057 = 033
058 = 032
059 = 031
060 = 030
061 = 029
062 = 028
063 = 027
064 = 026
065 = 025
066 = 024
067 = 023
068 = 022
069 = 021
070 = 020
071 = 019
072 = 018
073 = 017
074 = 016
075 = 015
076 = 014
077 = 013
078 = 012
079 = 011
080 = 010
081 = 009
082 = 008
083 = 007
084 = 006
085 = 005
086 = 004
087 = 003
088 = 002
089 = 001
090 = 000
091 = 359
092 = 358
093 = 357
094 = 356
095 = 355
096 = 354
097 = 353
098 = 352
099 = 351
100 = 350
101 = 349
102 = 348
103 = 347
104 = 346
105 = 345
106 = 344
107 = 343
108 = 342
109 = 341
110 = 340
111 = 339
112 = 338
113 = 337
114 = 336
115 = 335
116 = 334
117 = 333
118 = 332
119 = 331
120 = 330
121 = 329
122 = 328
123 = 327
124 = 326
125 = 325
126 = 324
127 = 323
128 = 322
129 = 321
130 = 320
131 = 319
132 = 318
133 = 317
134 = 316
135 = 315
136 = 314
137 = 313
138 = 312
139 = 311
140 = 310
141 = 309
142 = 308
143 = 307
144 = 306
145 = 305
146 = 304
147 = 303
148 = 302
149 = 301
150 = 300
151 = 299
152 = 298
153 = 297
154 = 296
155 = 295
156 = 294
157 = 293
158 = 292
159 = 291
160 = 290
161 = 289
162 = 288
163 = 287
164 = 286
165 = 285
166 = 284
167 = 283
168 = 282
169 = 281
170 = 280
171 = 279
172 = 278
173 = 277
174 = 276
175 = 275
176 = 274
177 = 273
178 = 272
179 = 271
180 = 270
181 = 269
182 = 268
183 = 267
184 = 266
185 = 265
186 = 264
187 = 263
188 = 262
189 = 261
190 = 260
191 = 259
192 = 258
193 = 257
194 = 256
195 = 255
196 = 254
197 = 253
198 = 252
199 = 251
200 = 250
201 = 249
202 = 248
203 = 247
204 = 246
205 = 245
206 = 244
207 = 243
208 = 242
209 = 241
210 = 240
211 = 239
212 = 238
213 = 237
214 = 236
215 = 235
216 = 234
217 = 233
218 = 232
219 = 231
220 = 230
221 = 229
222 = 228
223 = 227
224 = 226
225 = 225
226 = 224
227 = 223
228 = 222
229 = 221
230 = 220
231 = 219
232 = 218
233 = 217
234 = 216
235 = 215
236 = 214
237 = 213
238 = 212
239 = 211
240 = 210
241 = 209
242 = 208
243 = 207
244 = 206
245 = 205
246 = 204
247 = 203
248 = 202
249 = 201
250 = 200
251 = 199
252 = 198
253 = 197
254 = 196
255 = 195
256 = 194
257 = 193
258 = 192
259 = 191
260 = 190
261 = 189
262 = 188
263 = 187
264 = 186
265 = 185
266 = 184
267 = 183
268 = 182
269 = 181
270 = 180
271 = 179
272 = 178
273 = 177
274 = 176
275 = 175
276 = 174
277 = 173
278 = 172
279 = 171
280 = 170
281 = 169
282 = 168
283 = 167
284 = 166
285 = 165
286 = 164
287 = 163
288 = 162
289 = 161
290 = 160
291 = 159
292 = 158
293 = 157
294 = 156
295 = 155
296 = 154
297 = 153
298 = 152
299 = 151
300 = 150
301 = 149
302 = 148
303 = 147
304 = 146
305 = 145
306 = 144
307 = 143
308 = 142
309 = 141
310 = 140
311 = 139
312 = 138
313 = 137
314 = 136
315 = 135
316 = 134
317 = 133
318 = 132
319 = 131
320 = 130
321 = 129
322 = 128
323 = 127
324 = 126
325 = 125
326 = 124
327 = 123
328 = 122
329 = 121
330 = 120
331 = 119
332 = 118
333 = 117
334 = 116
335 = 115
336 = 114
337 = 113
338 = 112
339 = 111
340 = 110
341 = 109
342 = 108
343 = 107
344 = 106
345 = 105
346 = 104
347 = 103
348 = 102
349 = 101
350 = 100
351 = 099
352 = 098
353 = 097
354 = 096
355 = 095
356 = 094
357 = 093
358 = 092
359 = 091

There!
I've proofread the list several times, but if you find a mistake, tell me and I'll edit this post or get it edited.
__________________
/////////////////////- SIGNATURE STARTS -//////////////////////
The NSO Deadline Mod at NovaHQ.net:
//////////////////////- SIGNATURE ENDS -///////////////////////
Reply With Quote
  #2  
Old 07-23-2022, 04:41 PM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

Very nice, going to try this in joint ops. I'm not sure if they work in joint ops, but i remember playing with them in DFX.
Reply With Quote
  #3  
Old 07-29-2022, 06:23 PM
Baldo_the_Don is offline Baldo_the_Don
Baldo_the_Don's Avatar
Registered User

Join Date: Jul 2012
Posts: 529

Six column edit:

Code:
000 = 090      060 = 030      120 = 330      180 = 270      240 = 210      300 = 150
001 = 089      061 = 029      121 = 329      181 = 269      241 = 209      301 = 149
002 = 088      062 = 028      122 = 328      182 = 268      242 = 208      302 = 148
003 = 087      063 = 027      123 = 327      183 = 267      243 = 207      303 = 147
004 = 086      064 = 026      124 = 326      184 = 266      244 = 206      304 = 146
005 = 085      065 = 025      125 = 325      185 = 265      245 = 205      305 = 145
006 = 084      066 = 024      126 = 324      186 = 264      246 = 204      306 = 144
007 = 083      067 = 023      127 = 323      187 = 263      247 = 203      307 = 143
008 = 082      068 = 022      128 = 322      188 = 262      248 = 202      308 = 142
009 = 081      069 = 021      129 = 321      189 = 261      249 = 201      309 = 141
010 = 080      070 = 020      130 = 320      190 = 260      250 = 200      310 = 140
011 = 079      071 = 019      131 = 319      191 = 259      251 = 199      311 = 139
012 = 078      072 = 018      132 = 318      192 = 258      252 = 198      312 = 138
013 = 077      073 = 017      133 = 317      193 = 257      253 = 197      313 = 137
014 = 076      074 = 016      134 = 316      194 = 256      254 = 196      314 = 136
015 = 075      075 = 015      135 = 315      195 = 255      255 = 195      315 = 135
016 = 074      076 = 014      136 = 314      196 = 254      256 = 194      316 = 134
017 = 073      077 = 013      137 = 313      197 = 253      257 = 193      317 = 133
018 = 072      078 = 012      138 = 312      198 = 252      258 = 192      318 = 132
019 = 071      079 = 011      139 = 311      199 = 251      259 = 191      319 = 131
020 = 070      080 = 010      140 = 310      200 = 250      260 = 190      320 = 130
021 = 069      081 = 009      141 = 309      201 = 249      261 = 189      321 = 129
022 = 068      082 = 008      142 = 308      202 = 248      262 = 188      322 = 128
023 = 067      083 = 007      143 = 307      203 = 247      263 = 187      323 = 127
024 = 066      084 = 006      144 = 306      204 = 246      264 = 186      324 = 126
025 = 065      085 = 005      145 = 305      205 = 245      265 = 185      325 = 125
026 = 064      086 = 004      146 = 304      206 = 244      266 = 184      326 = 124
027 = 063      087 = 003      147 = 303      207 = 243      267 = 183      327 = 123
028 = 062      088 = 002      148 = 302      208 = 242      268 = 182      328 = 122
029 = 061      089 = 001      149 = 301      209 = 241      269 = 181      329 = 121
030 = 060      090 = 000      150 = 300      210 = 240      270 = 180      330 = 120
031 = 059      091 = 359      151 = 299      211 = 239      271 = 179      331 = 119
032 = 058      092 = 358      152 = 298      212 = 238      272 = 178      332 = 118
033 = 057      093 = 357      153 = 297      213 = 237      273 = 177      333 = 117
034 = 056      094 = 356      154 = 296      214 = 236      274 = 176      334 = 116
035 = 055      095 = 355      155 = 295      215 = 235      275 = 175      335 = 115
036 = 054      096 = 354      156 = 294      216 = 234      276 = 174      336 = 114
037 = 053      097 = 353      157 = 293      217 = 233      277 = 173      337 = 113
038 = 052      098 = 352      158 = 292      218 = 232      278 = 172      338 = 112
039 = 051      099 = 351      159 = 291      219 = 231      279 = 171      339 = 111
040 = 050      100 = 350      160 = 290      220 = 230      280 = 170      340 = 110
041 = 049      101 = 349      161 = 289      221 = 229      281 = 169      341 = 109
042 = 048      102 = 348      162 = 288      222 = 228      282 = 168      342 = 108
043 = 047      103 = 347      163 = 287      223 = 227      283 = 167      343 = 107
044 = 046      104 = 346      164 = 286      224 = 226      284 = 166      344 = 106
045 = 045      105 = 345      165 = 285      225 = 225      285 = 165      345 = 105
046 = 044      106 = 344      166 = 284      226 = 224      286 = 164      346 = 104
047 = 043      107 = 343      167 = 283      227 = 223      287 = 163      347 = 103
048 = 042      108 = 342      168 = 282      228 = 222      288 = 162      348 = 102
049 = 041      109 = 341      169 = 281      229 = 221      289 = 161      349 = 101
050 = 040      110 = 340      170 = 280      230 = 220      290 = 160      350 = 100
051 = 039      111 = 339      171 = 279      231 = 229      291 = 159      351 = 099
052 = 038      112 = 338      172 = 278      232 = 218      292 = 158      352 = 098
053 = 037      113 = 337      173 = 277      233 = 217      293 = 157      353 = 097
054 = 036      114 = 336      174 = 276      234 = 216      294 = 156      354 = 096
055 = 035      115 = 335      175 = 275      235 = 215      295 = 155      355 = 095
056 = 034      116 = 334      176 = 274      236 = 214      296 = 154      356 = 094
057 = 033      117 = 333      177 = 273      237 = 213      297 = 153      357 = 093
058 = 032      118 = 332      178 = 272      238 = 212      298 = 152      358 = 092
059 = 031      119 = 331      179 = 271      239 = 211      299 = 151      359 = 091
__________________
/////////////////////- SIGNATURE STARTS -//////////////////////
The NSO Deadline Mod at NovaHQ.net:
//////////////////////- SIGNATURE ENDS -///////////////////////
Reply With Quote
  #4  
Old 07-29-2022, 08:41 PM
devilsclaw is offline devilsclaw
Registered User

Join Date: Nov 2002
Posts: 76

The math for this is:
output = ((360 - ((input - 90) % 360)) % 360)

librecalc example:
Code:
=MOD(360 - MOD(A1 - 90,360), 360)
C Source code
Code:
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>

int main(int argc, char** argv) {
  int in = strtoul(argv[1], 0, 10);
  int out = 0;

  out = (360 - ((in - 90) % 360)) % 360;
  printf("in %i : out %i\n", in, out);

// Test code
//  for(in = 0; in < 360; in++) {
//    out = (360 - ((in - 90) % 360)) % 360;
//    printf("%i,%i\n", in, out);
//  }
}
I did not have this before I made it from looking at your table
Reply With Quote
  #5  
Old 07-30-2022, 12:00 PM
Baldo_the_Don is offline Baldo_the_Don
Baldo_the_Don's Avatar
Registered User

Join Date: Jul 2012
Posts: 529

Oh... I'm the giant on whose shoulder you stand... or maybe the apple that fell on Newton's head. Or like that one scientist that discovered microwaves 'cause the chocolate he liked to keep in his pocket kept melting in the lab he definitely should never have been snacking in.

I could tell people I am Devilsclaw's melted chocolate! They'll think I'm a weirdo, never speak to me again, and warn others not to! The catastrophic dream of the introvert.

* sigh *

I'm glad I could help.



Edit: I can't figure out what the percent symbol means. The formulas are unclear to me. Subtract 90 from the MEd heading, then 'percent symbol' it with 360. Subtract that from 360, then 'percent symbol' it with 360.

It's like listening to scottish people talking to each other. I can almost understand it, but the synapses I need are not connected.
__________________
/////////////////////- SIGNATURE STARTS -//////////////////////
The NSO Deadline Mod at NovaHQ.net:
//////////////////////- SIGNATURE ENDS -///////////////////////

Last edited by Baldo_the_Don; 07-30-2022 at 09:39 PM.
Reply With Quote
  #6  
Old 08-02-2022, 02:54 AM
mg is offline mg
Registered User

Join Date: Jun 2022
Posts: 27

Quote:
Originally Posted by Baldo_the_Don View Post
I can't figure out what the percent symbol means.
In C that'd be the modulo operator.
Reply With Quote
  #7  
Old 08-02-2022, 08:23 AM
devilsclaw is offline devilsclaw
Registered User

Join Date: Nov 2002
Posts: 76

% is the modulus which returns only the remainder of the division.

example 9 / 5 = 1 but 9 % 5 = 4

The above is C math. with out doubles/floats all values are integer real numbers.
Reply With Quote
  #8  
Old 08-02-2022, 08:29 AM
devilsclaw is offline devilsclaw
Registered User

Join Date: Nov 2002
Posts: 76

so (x % 360) will return 0 to 359 even if you put (329487392473 % 360) = 313 the value will be between the 0 to 359 range
Reply With Quote
  #9  
Old 08-02-2022, 03:19 PM
Baldo_the_Don is offline Baldo_the_Don
Baldo_the_Don's Avatar
Registered User

Join Date: Jul 2012
Posts: 529

So in C math, 9 / 5 doesn't mean "Nine divided by 5 (1.8)," rather "How many whole, unbroken fives fit in nine? (1)." And 9 % 5 asks for what's left after all the fives are gone and will always be less than five.

I think I've got it.

And just now playing around with my calculator, I worked out that if you take the MEd heading and subtract 450, you get a negative of the .cin/.end heading you need, and if the answer is more than -360, add 360.

'Cause 130 - 90 = 40, and... oh wait. See 40 goes into 360 9 times with 0 left over, but we're looking for how many times 360 goes into 40, and I can't picture that in my head. Anyway, I was using the C math wrong and got a lot of zero, and I know we're looking for 320...

But 130 - 90 = 40 + -360 = -320. But since 130 - 450 is the same as 130 - 90 + -360, that'll do.

So, like, 13 - 450 = -437 + 360 = -77. The chart says 13 = 77.

Heading minus 450, maybe plus 360, then invert. It's not the right way, but it's workable, and maybe less annoying than looking it up in a chart.

Wow! Look at us all braining around today!
__________________
/////////////////////- SIGNATURE STARTS -//////////////////////
The NSO Deadline Mod at NovaHQ.net:
//////////////////////- SIGNATURE ENDS -///////////////////////

Last edited by Baldo_the_Don; 08-02-2022 at 03:58 PM.
Reply With Quote
  #10  
Old 08-04-2022, 08:56 PM
devilsclaw is offline devilsclaw
Registered User

Join Date: Nov 2002
Posts: 76

https://youtu.be/mhd9FXYdf4s?t=719
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:15 AM.




Powered by vBulletin®