Skip to content

Commit 1efd263

Browse files
committed
Prepare 13.5.0 release.
1 parent f78fe39 commit 1efd263

File tree

6 files changed

+34
-32
lines changed

6 files changed

+34
-32
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Changes relevant to the users of python-tcod are documented here.
44
This project adheres to [Semantic Versioning](https://semver.org/) since version `2.0.0`.
55

66
## [Unreleased]
7+
8+
## [13.5.0] - 2022-02-11
79
### Added
810
- `tcod.sdl.audio`, a new module exposing SDL audio devices. This does not include an audio mixer yet.
911
- `tcod.sdl.mouse`, for SDL mouse and cursor handing.

tcod/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def sdl_renderer(self) -> Optional[tcod.sdl.render.Renderer]:
376376
def sdl_atlas(self) -> Optional[tcod.render.SDLTilesetAtlas]:
377377
"""Return a :any:`tcod.render.SDLTilesetAtlas` referencing libtcod's SDL texture atlas if it exists.
378378
379-
.. versionadded:: unreleased
379+
.. versionadded:: 13.5
380380
"""
381381
if self._context_p.type not in (lib.TCOD_RENDERER_SDL, lib.TCOD_RENDERER_SDL2):
382382
return None

tcod/sdl/audio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""SDL2 audio playback and recording tools.
22
3-
.. versionadded:: unreleased
3+
.. versionadded:: 13.5
44
"""
55
from __future__ import annotations
66

tcod/sdl/mouse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""SDL mouse and cursor functions.
22
3-
.. versionadded:: unreleased
3+
.. versionadded:: 13.5
44
"""
55
from __future__ import annotations
66

tcod/sdl/render.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class BlendFactor(enum.IntEnum):
4545
:any:`compose_blend_mode`
4646
https://wiki.libsdl.org/SDL_BlendFactor
4747
48-
.. versionadded:: unreleased
48+
.. versionadded:: 13.5
4949
"""
5050

5151
ZERO = 0x1
@@ -77,7 +77,7 @@ class BlendOperation(enum.IntEnum):
7777
:any:`compose_blend_mode`
7878
https://wiki.libsdl.org/SDL_BlendOperation
7979
80-
.. versionadded:: unreleased
80+
.. versionadded:: 13.5
8181
"""
8282

8383
ADD = 0x1
@@ -100,7 +100,7 @@ class BlendMode(enum.IntEnum):
100100
:any:`Renderer.draw_blend_mode`
101101
:any:`compose_blend_mode`
102102
103-
.. versionadded:: unreleased
103+
.. versionadded:: 13.5
104104
"""
105105

106106
NONE = 0x00000000
@@ -128,7 +128,7 @@ def compose_blend_mode(
128128
.. seealso::
129129
https://wiki.libsdl.org/SDL_ComposeCustomBlendMode
130130
131-
.. versionadded:: unreleased
131+
.. versionadded:: 13.5
132132
"""
133133
return BlendMode(
134134
lib.SDL_ComposeCustomBlendMode(
@@ -157,7 +157,7 @@ def __init__(self, sdl_texture_p: Any, sdl_renderer_p: Any = None) -> None:
157157
self.access: Final[TextureAccess] = TextureAccess(query[1])
158158
"""Texture access mode, read only.
159159
160-
.. versionchanged:: unreleased
160+
.. versionchanged:: 13.5
161161
Attribute is now a :any:`TextureAccess` value.
162162
"""
163163
self.width: Final[int] = query[2]
@@ -178,7 +178,7 @@ def _query(self) -> Tuple[int, int, int, int]:
178178
def update(self, pixels: NDArray[Any], rect: Optional[Tuple[int, int, int, int]] = None) -> None:
179179
"""Update the pixel data of this texture.
180180
181-
.. versionadded:: unreleased
181+
.. versionadded:: 13.5
182182
"""
183183
if rect is None:
184184
rect = (0, 0, self.width, self.height)
@@ -202,7 +202,7 @@ def alpha_mod(self, value: int) -> None:
202202
def blend_mode(self) -> BlendMode:
203203
"""Texture blend mode, can be set.
204204
205-
.. versionchanged:: unreleased
205+
.. versionchanged:: 13.5
206206
Property now returns a BlendMode instance.
207207
"""
208208
out = ffi.new("SDL_BlendMode*")
@@ -271,7 +271,7 @@ def copy(
271271
center: The (x, y) point where rotation is applied. If None then the center of `dest` is used.
272272
flip: Flips the `texture` when drawing it.
273273
274-
.. versionchanged:: unreleased
274+
.. versionchanged:: 13.5
275275
`source` and `dest` can now be float tuples.
276276
Added the `angle`, `center`, and `flip` parameters.
277277
"""
@@ -349,7 +349,7 @@ def upload_texture(
349349
def draw_color(self) -> Tuple[int, int, int, int]:
350350
"""Get or set the active RGBA draw color for this renderer.
351351
352-
.. versionadded:: unreleased
352+
.. versionadded:: 13.5
353353
"""
354354
rgba = ffi.new("uint8_t[4]")
355355
_check(lib.SDL_GetRenderDrawColor(self.p, rgba, rgba + 1, rgba + 2, rgba + 3))
@@ -363,7 +363,7 @@ def draw_color(self, rgba: Tuple[int, int, int, int]) -> None:
363363
def draw_blend_mode(self) -> BlendMode:
364364
"""Get or set the active blend mode of this renderer.
365365
366-
.. versionadded:: unreleased
366+
.. versionadded:: 13.5
367367
"""
368368
out = ffi.new("SDL_BlendMode*")
369369
_check(lib.SDL_GetRenderDrawBlendMode(self.p, out))
@@ -380,7 +380,7 @@ def output_size(self) -> Tuple[int, int]:
380380
.. seealso::
381381
https://wiki.libsdl.org/SDL_GetRendererOutputSize
382382
383-
.. versionadded:: unreleased
383+
.. versionadded:: 13.5
384384
"""
385385
out = ffi.new("int[2]")
386386
_check(lib.SDL_GetRendererOutputSize(self.p, out, out + 1))
@@ -392,7 +392,7 @@ def clip_rect(self) -> Optional[Tuple[int, int, int, int]]:
392392
393393
Set to None to disable clipping.
394394
395-
.. versionadded:: unreleased
395+
.. versionadded:: 13.5
396396
"""
397397
if not lib.SDL_RenderIsClipEnabled(self.p):
398398
return None
@@ -412,7 +412,7 @@ def integer_scaling(self) -> bool:
412412
.. seealso::
413413
https://wiki.libsdl.org/SDL_RenderSetIntegerScale
414414
415-
.. versionadded:: unreleased
415+
.. versionadded:: 13.5
416416
"""
417417
return bool(lib.SDL_RenderGetIntegerScale(self.p))
418418

@@ -429,7 +429,7 @@ def logical_size(self) -> Tuple[int, int]:
429429
.. seealso::
430430
https://wiki.libsdl.org/SDL_RenderSetLogicalSize
431431
432-
.. versionadded:: unreleased
432+
.. versionadded:: 13.5
433433
"""
434434
out = ffi.new("int[2]")
435435
lib.SDL_RenderGetLogicalSize(self.p, out, out + 1)
@@ -446,7 +446,7 @@ def scale(self) -> Tuple[float, float]:
446446
.. seealso::
447447
https://wiki.libsdl.org/SDL_RenderSetScale
448448
449-
.. versionadded:: unreleased
449+
.. versionadded:: 13.5
450450
"""
451451
out = ffi.new("float[2]")
452452
lib.SDL_RenderGetScale(self.p, out, out + 1)
@@ -463,7 +463,7 @@ def viewport(self) -> Optional[Tuple[int, int, int, int]]:
463463
.. seealso::
464464
https://wiki.libsdl.org/SDL_RenderSetViewport
465465
466-
.. versionadded:: unreleased
466+
.. versionadded:: 13.5
467467
"""
468468
rect = ffi.new("SDL_Rect*")
469469
lib.SDL_RenderGetViewport(self.p, rect)
@@ -477,7 +477,7 @@ def viewport(self, rect: Optional[Tuple[int, int, int, int]]) -> None:
477477
def set_vsync(self, enable: bool) -> None:
478478
"""Enable or disable VSync for this renderer.
479479
480-
.. versionadded:: unreleased
480+
.. versionadded:: 13.5
481481
"""
482482
_check(lib.SDL_RenderSetVSync(self.p, enable))
483483

@@ -489,7 +489,7 @@ def read_pixels(
489489
out: Optional[NDArray[Any]] = None,
490490
) -> NDArray[Any]:
491491
"""
492-
.. versionadded:: unreleased
492+
.. versionadded:: 13.5
493493
"""
494494
if format is None:
495495
format = lib.SDL_PIXELFORMAT_RGBA32
@@ -516,41 +516,41 @@ def read_pixels(
516516
def clear(self) -> None:
517517
"""Clear the current render target with :any:`draw_color`.
518518
519-
.. versionadded:: unreleased
519+
.. versionadded:: 13.5
520520
"""
521521
_check(lib.SDL_RenderClear(self.p))
522522

523523
def fill_rect(self, rect: Tuple[float, float, float, float]) -> None:
524524
"""Fill a rectangle with :any:`draw_color`.
525-
.. versionadded:: unreleased
525+
.. versionadded:: 13.5
526526
"""
527527
_check(lib.SDL_RenderFillRectF(self.p, (rect,)))
528528

529529
def draw_rect(self, rect: Tuple[float, float, float, float]) -> None:
530530
"""Draw a rectangle outline.
531531
532-
.. versionadded:: unreleased
532+
.. versionadded:: 13.5
533533
"""
534534
_check(lib.SDL_RenderDrawRectF(self.p, (rect,)))
535535

536536
def draw_point(self, xy: Tuple[float, float]) -> None:
537537
"""Draw a point.
538538
539-
.. versionadded:: unreleased
539+
.. versionadded:: 13.5
540540
"""
541541
_check(lib.SDL_RenderDrawPointF(self.p, (xy,)))
542542

543543
def draw_line(self, start: Tuple[float, float], end: Tuple[float, float]) -> None:
544544
"""Draw a single line.
545545
546-
.. versionadded:: unreleased
546+
.. versionadded:: 13.5
547547
"""
548548
_check(lib.SDL_RenderDrawLineF(self.p, *start, *end))
549549

550550
def fill_rects(self, rects: NDArray[Union[np.intc, np.float32]]) -> None:
551551
"""Fill multiple rectangles from an array.
552552
553-
.. versionadded:: unreleased
553+
.. versionadded:: 13.5
554554
"""
555555
assert len(rects.shape) == 2
556556
assert rects.shape[1] == 4
@@ -565,7 +565,7 @@ def fill_rects(self, rects: NDArray[Union[np.intc, np.float32]]) -> None:
565565
def draw_rects(self, rects: NDArray[Union[np.intc, np.float32]]) -> None:
566566
"""Draw multiple outlined rectangles from an array.
567567
568-
.. versionadded:: unreleased
568+
.. versionadded:: 13.5
569569
"""
570570
assert len(rects.shape) == 2
571571
assert rects.shape[1] == 4
@@ -580,7 +580,7 @@ def draw_rects(self, rects: NDArray[Union[np.intc, np.float32]]) -> None:
580580
def draw_points(self, points: NDArray[Union[np.intc, np.float32]]) -> None:
581581
"""Draw an array of points.
582582
583-
.. versionadded:: unreleased
583+
.. versionadded:: 13.5
584584
"""
585585
assert len(points.shape) == 2
586586
assert points.shape[1] == 2
@@ -595,7 +595,7 @@ def draw_points(self, points: NDArray[Union[np.intc, np.float32]]) -> None:
595595
def draw_lines(self, points: NDArray[Union[np.intc, np.float32]]) -> None:
596596
"""Draw a connected series of lines from an array.
597597
598-
.. versionadded:: unreleased
598+
.. versionadded:: 13.5
599599
"""
600600
assert len(points.shape) == 2
601601
assert points.shape[1] == 2
@@ -618,7 +618,7 @@ def geometry(
618618
) -> None:
619619
"""Render triangles from texture and vertex data.
620620
621-
.. versionadded:: unreleased
621+
.. versionadded:: 13.5
622622
"""
623623
assert xy.dtype == np.float32
624624
assert len(xy.shape) == 2

tcod/sdl/video.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def mouse_rect(self) -> Optional[Tuple[int, int, int, int]]:
284284
285285
Setting this will not automatically grab the cursor.
286286
287-
.. versionadded:: unreleased
287+
.. versionadded:: 13.5
288288
"""
289289
_version_at_least((2, 0, 18))
290290
rect = lib.SDL_GetWindowMouseRect(self.p)

0 commit comments

Comments
 (0)