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

Sfml3 #48

Merged
merged 11 commits into from
Jan 23, 2025
Merged

Sfml3 #48

merged 11 commits into from
Jan 23, 2025

Conversation

Hapaxia
Copy link
Owner

@Hapaxia Hapaxia commented Jan 23, 2025

Bring the SFML 3 branch into main.

Hapaxia added 10 commits May 8, 2023 23:54
patch update.

since updating Selba Ward to no longer use quads, Line uses a triangle strip. However, it had been setup similar to other objects - that instead use triangles - following the 6 vertices per quad rule. this caused attempts at accessing vertices that didn't exist as the triangle strip only needs 4 vertices for a quad.

this fixes that problem, reducing all vertex looping to only go 4 times and no attempting to access the 5th and 6th vertex that do not exist.
update all to work with the latest (wip) version of SFML 3 - currently in the 'master' branch during development.
fixes the order of the colours in the 16-colour Windows palette.
contracted the texture rectangle slightly (by 0.1 on each side) to reduce chance of texture bleeding.
update to latest version of SFML 3, the official release version: 3.0.0.

Included:
update all years (to 2025),
code style change (removed leading "virtual" from all virtual overrides and replaced with trailing "override"),
using size.x and size.y instead of width and height, position.x and position.y instead of top and left, as well as size instead of getSize() (of rect),
updated drawable version numbers (the patch number) since all have these changes (that don't affect interface),
changed draw method from trial version (const ref states to value copied states),
removed macro to allow "noexcept" to be absent for older VS versions,
removed macro that allowed aiming specific code at specific SFML 2 versions,
some extra specificity to enum scope,
removal of Exception.hpp as it only included Common.hpp and all drawables already include Common themselves,
SpinningCard and Sprite3d update getTexture() code to continue to retrieve a pointers properly,
usage of vector.data() instead of pointer to first element,
renderTexture's "create" replaced with "resize".

note that drawables that have been significantly versioned have not been updated just yet.
updated Spline to version 1.7:

added copy constructor,
added ability to export all positions at once,
fixed draw method by removing leading "virtual" and adding trailing "override",
changed pointer to front() to just data(),
updated year (to 2025) in header.
update year (to 2025)
modified SFML 2 code to SFML 3 code.
update Polygon to version 1.4:

allow constructor to take vertex positions from initializer list,

allow a Polygon to be constructed from another polygon (constructor or assigned),

allow direct access to a Polygon's vertex,

allow ability to switch direction of vertices,

allow ability to set colour and texture co-ordinates for each vertex,

allow the usage of a texture,

adds ability to change the triangle limit,

adds automatic wireframe,

adds ability to get information such as its perimeter or area,

adds a point-in-polygon test,

adds local and global bounds,

adds ability to get "centroid" and "centre of mass" (different things),

allows the exporting of vertex positions or wireframe vertices,

allow holes.
@Hapaxia Hapaxia self-assigned this Jan 23, 2025
@Hapaxia Hapaxia merged commit 19162ca into master Jan 23, 2025
0 of 24 checks 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.

1 participant