-
Notifications
You must be signed in to change notification settings - Fork 33
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
Entity vtable fixes and new stuff #397
base: main
Are you sure you want to change the base?
Conversation
…e, add missing parameters, make the vtable hooks not require giving the full signature, instead you can point to the function pointer. Fix auto doc (again)
// there is actually base class that consists of up to the left/right channel, used for the sfx | ||
// then normal sounds that you can find in entities, screens itp. have up to the paddings | ||
// finally music in GameManages has the extra bool in BackgroundSound |
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.
Should i split this? (if yes, would love some name suggestions)
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.
I guess it would be nice if it means more of those sound types exposed. But I don't really know about name, since now I guess we only have to use a name without altering the SoundMeta one...
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.
You can edit the name, as long as there is no new
constructor exposed to lua, no one should really care about the metatable name
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.
Honestly, I can't come up with any name ideas, since I'm not completely sure what's the difference between those clases 🐈.
Is the current SoundMeta for loop-able long sounds? Having a bool for play_ending_secuence
makes it sound like it's repeatable and can be ended by game logic, and also the start_over
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.
I guess you could leave it for another PR if you wanted
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.
The start_over
is more of a name i give it to make sense in the API rather then what actual functionality it holds.
The class name doesn't need to reflect much. In the source code it's probably just base class like "Sound".
That base class is used for stuff like: play and forget. You can just play sfx and not worry about it as the internals of it will deal with cleaning after it finishes etc.
Then SoundMeda
is for sounds you want you either reuse or need to maintain (like keep updating the position etc.), it also used when you need to know if previous sound is still playing. Pretty sure you need to call the destroy function on it yourself
At the end is BackgroundSound
which is probably only implemented for the main "music" in game_manager
There might be more that we don't know of, or that don't differ by the class members (only virtual overrides)
… and vice versa. Some comments fix, clean up Entity file a little,expose some more stuff
…t them etc. some comments and name changes, filter out bad pointers in vtable_sizes generated by info_dump
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.
Most of it is great! Just some small things to fix
…ble function that have different name for hook vs function itself, some comments here and there
…n entity and movable
No description provided.