Skip to content

Commit 3b70282

Browse files
committed
Fixed pyproject.toml
1 parent 1e99b6d commit 3b70282

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

pyproject.toml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1-
[build-system]
2-
build-backend = 'mesonpy'
3-
requires = ['meson-python']
4-
51
[project]
62
name = 'itz_particle_manager'
73
version = '0.1'
84
description = 'A particle manager module from ItzPr3d4t0r'
95
readme = 'README.md'
106
requires-python = '>=3.8'
7+
license = {file = 'LICENSE'}
118
authors = [
129
{name = 'ItzPr3d4t0r'}
13-
]
10+
]
11+
12+
[build-system]
13+
requires = [
14+
'meson-python',
15+
'meson<=1.5.0',
16+
'ninja<=1.11.1.1',
17+
]
18+
build-backend = 'mesonpy'
19+
20+
[tool.meson-python.args]
21+
install = ['--tags=runtime,python-runtime,pg-tag']
22+

src/include/particle_manager.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,14 @@ pm_draw(ParticleManager *self, PyObject *arg)
218218
SURF_INIT_CHECK((&dest->surf));
219219

220220
Py_ssize_t i, j;
221+
221222
for (i = 0; i < self->g_used; i++) {
222223
ParticleGroup *g = &self->groups[i];
223224
for (j = 0; j < g->n_particles; j++) {
224225
const Py_ssize_t img_ix = (Py_ssize_t)g->p_time.data[j];
225-
if (img_ix < 0 || img_ix > g->n_img_frames[0] - 1)
226+
if (img_ix > g->n_img_frames[0] - 1) {
226227
continue;
228+
}
227229

228230
const SDL_Surface *img = pgSurface_AsSurface(g->images[g->p_img_ix[j]][img_ix]);
229231

src/particle_group.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ init_group(ParticleGroup *g, Py_ssize_t n_particles, PyObject **images,
88
{
99
g->n_particles = n_particles;
1010
g->n_img_sequences = n_img_sequences;
11-
g->max_ix = -1;
11+
g->max_ix = n_particles - 1;
1212

1313
if (!farr_init(&g->p_pos, 2 * n_particles) ||
1414
!farr_init(&g->p_vel, 2 * n_particles) ||

0 commit comments

Comments
 (0)