13 October 2023, 01:22 | #3461 | |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,483
|
Quote:
There's some structure poking after these are loaded too, but hopefully with a bit of patience we can figure out what the end runtime representation of the data is, and that should make interpreting the code easier. |
|
13 October 2023, 21:29 | #3462 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,483
|
If anyone fancies having a go at deciphering the level data structures, I have hex dumps of five test levels in a branch of my mod.
https://github.com/0xABADCAFE/karlos...evel_A/HexDump I've been diffing these for successive levels that each add an extra zone, but don't have much time just now to really drill into it. Last edited by Karlos; 14 October 2023 at 01:12. Reason: Thumb typos... |
14 October 2023, 16:16 | #3463 |
Registered User
Join Date: Oct 2020
Location: Bicester
Posts: 2,023
|
Probably won't have time over the weekend, got the in-laws over
|
14 October 2023, 17:21 | #3464 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,483
|
|
16 October 2023, 20:57 | #3465 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,483
|
I've been staring at this seemingly innocuous bit of code for ages and I can't decide on what it is actually doing, or rather, intending to do:
https://github.com/0xABADCAFE/alienb...e/hires.s#L405 This is after figuring out most of what is being pointed to by a0-a4 at this point also. Clip data is being poked into some region of the Zone structure for each zone (I think) but I feel like I'm missing something obvious, possibly because I keep coming back to it after a long work day. On the plus side, I've made some headway into understanding the data strucutres in the level files https://github.com/0xABADCAFE/alienb...ce/defs.i#L436 Last edited by Karlos; 16 October 2023 at 21:03. |
16 October 2023, 22:31 | #3466 |
Registered User
Join Date: Oct 2020
Location: Bicester
Posts: 2,023
|
Code:
; ; LEVEL DATA FILES ; ; twolev.bin data header, after the text messages (first: LVLT_MESSAGE_LENGTH * LVLT_NUM_MESSAGES) STRUCTURE TLBT,12 ; todo - what are the first 12 bytes? UWORD TLBT_NumControlPoints_w ; 12 UWORD TLBT_NumPoints_w ; 14 UWORD TLBT_NumZones_w ; 16 UWORD TLBT_Unk1_w ; 18 UWORD TLBT_NumObjects_w ; 20 ULONG TLBT_PointsOffset_l ; 22 ULONG TLBT_FloorLineOffset_l ; 26 ULONG TLBT_ObjectDataOffset_l ; 30 ULONG TLBT_ShotDataOffset_l ; 34 - this in twolev.bin ? ULONG TLBT_AlienShotDataOffset_l ; 38 - this in twolev.bin ? ULONG TLBT_ObjectPointsOffset_l ; 42 ULONG TLBT_Plr1ObjectOffset_l ; 46 ULONG TLBT_Plr2ObjectOffset_l ; 50 LABEL TLBT_SizeOf_l ; This is the end of the header |
16 October 2023, 22:35 | #3467 | |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,483
|
Quote:
By first 12, you mean after the 1600 bytes of text data for the messages, I assume. Last edited by Karlos; 16 October 2023 at 22:54. |
|
16 October 2023, 22:48 | #3468 |
Registered User
Join Date: Oct 2020
Location: Bicester
Posts: 2,023
|
what is TLBT_Unk1_w ?
|
16 October 2023, 22:53 | #3469 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,483
|
|
16 October 2023, 23:19 | #3470 | |
Registered User
Join Date: Oct 2020
Location: Bicester
Posts: 2,023
|
Quote:
|
|
16 October 2023, 23:22 | #3471 |
Registered User
Join Date: Oct 2020
Location: Bicester
Posts: 2,023
|
|
17 October 2023, 19:04 | #3472 |
Registered User
Join Date: Oct 2020
Location: Bicester
Posts: 2,023
|
don't want to cause confusion but these are the offsets for ab3d1 that John Grivin used to recreate the levels in quake 1 map format, some may be similar
Code:
#define BINOFS_P1X 0 #define BINOFS_P1Z 2 #define BINOFS_P1ZN 4 #define BINOFS_P2X 6 #define BINOFS_P2Z 8 #define BINOFS_P2ZN 4 #define BINOFS_NUMPTS 14 #define BINOFS_NUMZN 16 #define BINOFS_PTRPTS 16+6 #define BINOFS_PTRFL 20+6 // offsets in level bin file #define GRAOFS_PTRDOOR 0 #define GRAOFS_PTRLIFT 4 #define GRAOFS_PTRSWTCH 8 #define GRAOFS_PTRGRA 12 #define GRAOFS_PTRZN 16 // offsets in level graphics file #define ZNOFS_NUM 0 #define ZNOFS_LFH 2 #define ZNOFS_LRH 6 #define ZNOFS_UFH 10 #define ZNOFS_URH 14 #define ZNOFS_WH 18 #define ZNOFS_EDGES 32 #define ZNOFS_PTS 34 #define ZNOFS_TELZN 38 #define ZNOFS_TELX 40 #define ZNOFS_TELZ 42 // offsets in zonedata #define FLOFS_SX 0 #define FLOFS_SZ 2 #define FLOFS_XO 4 #define FLOFS_ZO 6 #define FLOFS_ZONE 8 // offsets in floorline data |
17 October 2023, 19:15 | #3473 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,483
|
I expect some format differences but only around point lighting which is probably twice the size. I wouldn't be surprised if the rest is the same.
What I am trying to get to is what the runtime representation ends up as after it's all loaded and poked together. |
17 October 2023, 20:06 | #3474 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,483
|
I might simplify that by having a hotkey to dump the structure of the current zone and any things that it has pointers to (perhaps not objects). It could even perhaps do it for all the zones in the PVS depending on how monstrously verbose it is.
Understanding some of the higher level algorithms looking at the (mostly undocumented) code is like trying to understand the shape of a sandcastle from individual grains Last edited by Karlos; 17 October 2023 at 20:14. |
17 October 2023, 21:00 | #3475 |
mä vaan
Join Date: Nov 2001
Location: Finland
Posts: 1,686
|
Sorry my ignorance, but where to get latest build?
Could they be in first post? |
17 October 2023, 21:02 | #3476 | |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,483
|
Quote:
https://github.com/0xABADCAFE/karlos.../main/Game/bin |
|
18 October 2023, 15:29 | #3477 | |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,483
|
Quote:
From Plr_Initialise: Code:
move.l Lvl_DataPtr_l,a1 add.l #160*10,a1 ; message data ... move.w (a1),Plr1_SnapXOff_l move.w 2(a1),Plr1_SnapZOff_l move.w (a1),Plr1_XOff_l move.w 2(a1),Plr1_ZOff_l move.w 6(a1),Plr2_SnapXOff_l move.w 8(a1),Plr2_SnapZOff_l move.w 6(a1),Plr2_XOff_l move.w 8(a1),Plr2_ZOff_l Last edited by Karlos; 18 October 2023 at 15:39. |
|
18 October 2023, 16:02 | #3478 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,483
|
There's a motif I keep seeing in the code (now that we have symbolic names for most of the constants/offsets, things like this keep creeping up):
Code:
; d0.w contains a Zone ID - calculate the Zone address pointer move.l Lvl_ZoneAddsPtr_l,a0 ; Lvl_ZoneAddsPtr_l is a table of 32-bit offsets from Lvl_DataPtr_l move.l (a0,d0.w*4),a0 add.l Lvl_DataPtr_l,a0 ; now a0 contains the zone address Then you can save the extra address addition step wherever you dereference. Last edited by Karlos; 18 October 2023 at 16:41. |
18 October 2023, 17:03 | #3479 | |
Registered User
Join Date: Oct 2020
Location: Bicester
Posts: 2,023
|
Quote:
|
|
18 October 2023, 17:37 | #3480 |
Amiga Games Database
Join Date: Jun 2006
Location: South West England
Posts: 1,291
|
Immediately thinks of conversation between Spock and Kirk, in The Wrath of Khan.
"Take us down, Mr Sulu, 300 metres." ..... sorry. |
Currently Active Users Viewing This Thread: 2 (0 members and 2 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Alien Breed 3D II The Killing Grounds RTG patch | Angus | Retrogaming General Discussion | 63 | 14 December 2022 15:20 |
Alien Breed & Alien Breed '92: SE - delay when picking up items / opening doors | Ian | support.WinUAE | 16 | 23 December 2016 15:50 |
Alien Breed 3D II : The Killing Grounds code booklet | alexh | support.Games | 19 | 10 October 2012 22:17 |
Alien Breed 3D 2 - The Killing Grounds | Ironclaw | support.Games | 12 | 13 September 2005 13:07 |
HD Version of Alien Breed I ? | Kintaro | request.Old Rare Games | 20 | 31 July 2003 10:48 |
|
|