Skip to content

Conversation

sam-stajnko
Copy link

@sam-stajnko sam-stajnko commented Aug 3, 2025

Description

Below are the names of some functions in the Python or C# implementation of the Splashkit library that obviously have issues (ie. repeated words and substrings).

  • quad_from_from_line
  • draw_bitmap_on_bitmap_on_bitmap
  • draw_bitmap_on_bitmap_on_bitmap_with_options
  • pixel_drawn_at_point_in_cell_in_cell_pt
  • set_interface_font_font_as_string
  • vector_from_center_sprite_to_point_point

I have fixed the issue by navigating to each header file containing the function declaration and modifying the suffix attribute in the header docs. In most cases, this involved removing a substring from the suffix that was already in the function’s base name and therefore, didn’t need to be added again in the suffix.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation (update or new)

How Has This Been Tested?

This was tested by running the translator and checking the api.json file to see if the correct function signatures were being generated.

To verify this pull request, you can do the same by going through the commit history and finding the commit named "Generate Files". I have reverted this commit because I don't want it included when this PR finally gets merged but I have left a commit so you don't have to run the translator yourself.

Testing Checklist

  • Checked api.json to verify that the functions are being generated with the right name (no repeated words/sub-strings).

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have requested a review from ... on the Pull Request

Copy link

@dijidiji dijidiji left a comment

Choose a reason for hiding this comment

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

I reviewed the header files and confirmed that the signatures in api.json are generated as expected.

How Has This Been Tested?

I've copied api.json to my local splashkit.io-starlight repo for testing:

  • Tested in latest Chrome
  • Tested in latest Firefox
  • npm run build
  • npm run preview
image

Confirmed the new signatures showed up when including the relevant files:

  • splashkit.py:
def quad_from_line(line_origin, line_end, width):
def draw_bitmap_on_bitmap(destination, bmp, x, y):
def draw_bitmap_on_bitmap_with_options(destination, bmp, x, y, opts):
def set_interface_font_with_string(fnt):
def vector_from_center_sprite_to_point(s, pt):
  • SplashKit.cs:
public bool Bitmap.PixelDrawnAtPoint(Point2D pt);
public Vector2D Sprite.VectorFromCenterToPoint(Point2D pt);

Copy link

@Oliver-Quail Oliver-Quail left a comment

Choose a reason for hiding this comment

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

I have reviewed this PR and checked locally as well. I concur with dijidiji that api.json are generated as expected.

I approve this PR

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.

4 participants