From bc63e87c50080f2a729eb17faac8483995329ea8 Mon Sep 17 00:00:00 2001 From: Carsten Teibes Date: Tue, 24 Oct 2023 15:27:32 +0200 Subject: [PATCH] Documentation updates --- res/unix/OpenJazz.6.adoc | 4 ++-- src/io/gfx/video.cpp | 33 ++++++++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/res/unix/OpenJazz.6.adoc b/res/unix/OpenJazz.6.adoc index 10a0f1d3..ae98bd6e 100644 --- a/res/unix/OpenJazz.6.adoc +++ b/res/unix/OpenJazz.6.adoc @@ -130,7 +130,7 @@ Alireza Nejati:: Menu plasma effect newspaz:: Bug fixes, enemy improvements Carsten Teibes (carstene1ns):: Maintenance, bug fixes, documentation + -Integrating the ports (Wii, 3DS, PSP, PSVita, ...) + +Integrating the ports (Wii, 3DS, PSP, PSVita, SDL2, ...) + Additional coding (logger, CLI, ...) + Modernizing + UI improvements @@ -144,4 +144,4 @@ pocketinsanity:: PocketPC port Ricerind:: Mac OS X port Slaanesh:: GP32 port GPF:: Dreamcast port -Cameron Cawley (ccawley2011):: RISC OS port +Cameron Cawley (ccawley2011):: RISC OS, SDL2 port diff --git a/src/io/gfx/video.cpp b/src/io/gfx/video.cpp index 5d4c7bab..b8ba9c08 100644 --- a/src/io/gfx/video.cpp +++ b/src/io/gfx/video.cpp @@ -215,8 +215,11 @@ bool Video::init (SetupOptions cfg) { } - -void Video::commonDeinit() { +/** + * Shared Deinitialisation code for reset() and deinit() + * + */ +void Video::commonDeinit () { // canvas is used when scaling or built with SDL2 if (canvas != screen && canvas) { SDL_FreeSurface(canvas); @@ -241,7 +244,10 @@ void Video::commonDeinit() { #endif } - +/** + * Deinitialise video output. + * + */ void Video::deinit () { commonDeinit(); @@ -729,6 +735,12 @@ void drawRect (int x, int y, int width, int height, int index) { } +/** + * Sets the Color key of provided surface. + * + * @param surface Surface to change + * @param index Color index + */ void enableColorKey (SDL_Surface* surface, unsigned int index) { #if OJ_SDL2 @@ -739,6 +751,13 @@ void enableColorKey (SDL_Surface* surface, unsigned int index) { } +/** + * Returns the Color key of provided surface. + * + * @param surface Surface to query + * + * @return color index + */ unsigned int getColorKey (SDL_Surface* surface) { #if OJ_SDL2 @@ -756,6 +775,14 @@ unsigned int getColorKey (SDL_Surface* surface) { } +/** + * Sets the palette colors of provided surface. + * + * @param surface Surface to change + * @param palette Palette to copy colors from + * @param start index of first color copy + * @param length number of colors to copy + */ void setLogicalPalette (SDL_Surface* surface, SDL_Color *palette, int start, int length) { #if OJ_SDL2