noxworld-dev / opennox

OpenNox main repository.
GNU General Public License v3.0
458 stars 25 forks source link

Create timer and timerGroup struct #698

Closed blmarket closed 3 months ago

blmarket commented 4 months ago

Motivation

To make the conversion easier, need to have a better understanding of undefined structs in the C code where it's hard to understand when the code has lots of pointer offset access. I found those 2 structs have a minimal external dependency (only need to use platform ticks) so created this change.

Changes

Made assumption of structs from the C code.

To avoid any possible regression, only the function parameter type has been updated. Some go unit tests were introduced to demonstrate the fields are working as expected.

Required sign-off