Skip to content
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

Added Camera & Script type. Updated native parameters and return types. #11

Merged
merged 4 commits into from
Dec 4, 2024

Conversation

EvilBlunt
Copy link
Contributor

No description provided.

@emoose
Copy link
Contributor

emoose commented Dec 2, 2024

This changed IS_ACCESSORY_EQUIPPPED back to _IS_ACCESSORY_EQUIPPED btw, not sure if that was intended or not?
The misspelled EQUIPPPED matches the hash for it, but guess that would be a bit harder to remember when writing scripts (and looks kinda dumb too)

Game does have a couple weird/misspelled natives there, maybe an "alias" field with a better name for those could be useful, then native.h generator could output invokers for both orig name + alias.
or I guess could just use the renamed ver and keep the orig name in comment.

@EvilBlunt
Copy link
Contributor Author

EvilBlunt commented Dec 2, 2024

This changed IS_ACCESSORY_EQUIPPPED back to _IS_ACCESSORY_EQUIPPED btw, not sure if that was intended or not? The misspelled EQUIPPPED matches the hash for it, but guess that would be a bit harder to remember when writing scripts (and looks kinda dumb too)

Game does have a couple weird/misspelled natives there, maybe an "alias" field with a better name for those could be useful, then native.h generator could output invokers for both orig name + alias. or I guess could just use the renamed ver and keep the orig name in comment.

I did change it as intended, I thought it was misspelled and I checked the string to hash it didn't match and must've made a mistake when checking, I just ran the hash again and matches.

Copy link
Owner

@TheRouletteBoi TheRouletteBoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the suggestions in my comments so this pr can be merged

natives.json Outdated
"type": "Any",
"name": "p0"
"type": "const char*",
"name": "ActorSetName"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To maintain consistency with our coding standards, we require that all parameter names use camelCase. Parameters should not start with capital letters. Update the code to reflect this convention.

natives.json Outdated
"type": "Any",
"name": "p0"
"type": "const char*",
"name": "music_name"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameters should not include underscores. Please update the code to reflect this convention. Parameter names should use camelCase.

natives.json Outdated
"type": "Any",
"name": "p1"
"type": "const char*",
"name": "layout_name"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use camelCase

natives.json Outdated
},
{
"type": "const char*",
"name": "input_string"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use camelCase

natives.json Outdated
"type": "Any",
"name": "p0"
"type": "Vector3*",
"name": "in_coords"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use camelCase

natives.json Outdated
"type": "Any",
"name": "p2"
"type": "Vector3",
"name": "out_coords"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use camelCase

natives.json Outdated
},
{
"type": "Vector3*",
"name": "Direction"
"type": "Vector3",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure but aren't Vector3 types are passed as dereference?

@TheRouletteBoi TheRouletteBoi self-requested a review December 4, 2024 01:26
Copy link
Owner

@TheRouletteBoi TheRouletteBoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of Script and Script* we use ScrHandle so it's okay to get rid of type 'Script'
The same goes for Camera and Camera* we use Cam and Cam*

schema.json Outdated
@@ -62,14 +63,15 @@
"Ped", "Ped*",
"Player", "Player*",
"ScrHandle", "ScrHandle*",
"Script", "Script*",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of Script and Script* we use ScrHandle so it's okay to get rid of type 'Script'
The same goes for Camera and Camera* we use Cam and Cam*

@TheRouletteBoi
Copy link
Owner

also please revert native _IS_ACCESSORY_EQUIPPED to it's original name

@TheRouletteBoi TheRouletteBoi merged commit 03dd9a6 into TheRouletteBoi:master Dec 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants