thunderchero wrote: ↑Fri Sep 01, 2023 9:36 pm
I hate to even ask, but my Pakled side is showing here.
information overload I'd say
let me try clean up this tribble riddle
for the phaser slots, we have 16 bytes stored in trek.exe per ship model slot
makes 1 byte each for 16 phasers max
essential information, I quote it again, is:
Spocks-cuddly-tribble wrote: ↑Sun May 31, 2020 4:17 pm
Bits 1-8 (read from right to left):
Code: Select all
1 - forward
2 - rear
3 - right
4 - left
5 - up
6 - down
7 - narrow firing arc
8 - wide firing arc
link is broken, but "read right to left" obviously refers to the binary representation of numbers
01h = 00000001
02h = 00000010
03h = 00000011
04h = 00000100
05h = 00000101
06h = 00000110
07h = 00000111
08h = 00001000
but since it's a BITMASK and he states "Bits 1-8", what is meant is:
Code: Select all
1 = 00000001 = 01h (horizontal: forward) where the rightmost bit is the lowest bit
2 = 00000010 = 02h (horizontal: rear)
3 = 00000100 = 04h (horizontal: right)
4 = 00001000 = 08h (horizontal: left)
5 = 00010000 = 10h (vertical: top)
6 = 00100000 = 20h (vertical: down)
7 = 01000000 = 40h (narrow firing arc / 60 degree)
8 = 10000000 = 80h (wide firing arc / 180 degree)
horizontal orientation can be combined for forward+left/right and rear + left/right giving the 45 compas orientation degree of
Code: Select all
00h = invalid / no orientation specified
01h = North
02h = South
03h = invalid (not set)
04h = West
05h = North East
06h = South East
07h = invalid (not set)
08h = East
09h = North West
0Ah = South West
0Bh = invalid (not set)
0Ch = invalid (not set)
0Dh = invalid (not set)
0Eh = invalid (not set)
0Fh = invalid (not set)
the firing arc has the following modes:
Code: Select all
00h = 00000000 = defaults to 120 degree
40h = 01000000 = narrow firing arc / 60 degree
80h = 10000000 = wide firing arc / 180 degree
C0h = 11000000 = turret / 360 degree
from a programmer perspective I wonder why not to use 8Ch for the turret, doubling the 180 degree firing arc
then why not also have a forwared-rear and a top-down turret and allow limit the turret firing arcs with narrow or default arc
then even combinations of 7h = forward/rear/left could be made valid and be the remainder of the east firing arc
but it would make code implementation more complex and SCT checked ASM code for combinations above:
Spocks-cuddly-tribble wrote: ↑Sun May 31, 2020 4:17 pm
0h = not set
1h = 0
2h = pi
3h = not set
4h = 1.5pi
5h = 1.75pi
6h = 1.25pi
7h = not set
8h = 0.5pi
9h = 0.25pi
Ah = 0.75pi
B-F= not set
0h, 3h, 7h, Bh and all above are not supported
I hope this is more Pakled conforming. And I already see next request to somehow integrate editing options to UE
---
@all Pakleds around, this is a combination of the narrow firing arc 40h with 04h=west, 08h=east, 10h=top and 20h=down, all to be confirmed
narrow angle I guess is proposed for better visibility
edit: list updated for exchanged left / right
edit2: fixed turret firing arc