-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move all usage of dword_587000_155144 #713
Open
blmarket
wants to merge
5
commits into
noxworld-dev:dev
Choose a base branch
from
blmarket:feat-155144
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blmarket
commented
Aug 1, 2024
src/struct_155144.go
Outdated
func sub_4875D0(a1 **Struct264) *Struct264 { | ||
if *a1 != nil { | ||
// FIXME: should be no cast | ||
*a1 = (*Struct264)(unsafe.Pointer((*a1).getList().Next())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks we need a better type definition for list items...
Few items to discuss:
|
Current Go code is not equivalent with corresponding C code: https://github.com/noxworld-dev/opennox/blob/dev/src/legacy/GAME1_1.c#L5178 Logical explanation: Only the listHead is guaranteed to have field_2 set to itself, while list members does not have such guarantee. So the best way to check the listItem is to check the current pointer is same with field_2 (or head)
Hey @blmarket ! I'll check it out soon, was on vacation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, can you take a quick look and see it makes sense? Would like to check before working on adding unit test & etc.
Context
Working on audio effects, trying to make small incremental changes.
dword_587000_155144
is actually a pointer to a struct defined globally, storing 2 linked lists and a counter variable.Next steps
There will be more changes defining
Struct88
andStruct264
which are actually 88 and 264 byte sized struct dynamically allocated.Required sign-off
open source licenses in case if OpenNox Project will adopt such a non-GPL license in the future.