diff --git a/coresdk/src/backend/gpio_driver.cpp b/coresdk/src/backend/gpio_driver.cpp new file mode 100644 index 00000000..6e0ebc49 --- /dev/null +++ b/coresdk/src/backend/gpio_driver.cpp @@ -0,0 +1,108 @@ +// gpio_driver.cpp +// This file is part of the SplashKit Core Library. +// Copyright (©) 2024 Aditya Parmar. All Rights Reserved. + +#include "gpio_driver.h" + +#include +#include +#include // Add this line to include the necessary header for the exit() function + +#ifdef RASPBERRY_PI +#include "pigpiod_if2.h" + + +using namespace std; +// Use https://abyz.me.uk/rpi/pigpio/pdif2.html for reference +namespace splashkit_lib +{ + int pi; + + // Check if pigpio_init() has been called before any other GPIO functions + bool check_pi() + { + + if (pi < 0) + { + cout << "gpio_init() must be called before any other GPIO functions" << endl; + return true; + } + else + return false; + } + + // Initialize the GPIO library + int sk_gpio_init() + { + + pi = pigpio_start(0, 0); + return pi; + } + + // Read the value of a GPIO pin + int sk_gpio_read(int pin) + { + + if (check_pi()) + { + return gpio_read(pi, pin); + } + } + + // Write a value to a GPIO pin + void sk_gpio_write(int pin, int value) + { + + check_pi(); + gpio_write(pi, pin, value); + } + + // Set the mode of a GPIO pin + void sk_gpio_set_mode(int pin, int mode) + { + + check_pi(); + set_mode(pi, pin, mode); + } + + int sk_gpio_get_mode(int pin) + { + + check_pi(); + return get_mode(pi, pin); + } + void sk_gpio_set_pull_up_down(int pin, int pud) + { + + check_pi(); + set_pull_up_down(pi, pin, pud); + } + void sk_set_pwm_range(int pin, int range) + { + + check_pi(); + set_PWM_range(pi, pin, range); + } + void sk_set_pwm_frequency(int pin, int frequency) + { + + check_pi(); + set_PWM_frequency(pi, pin, frequency); + } + void sk_set_pwm_dutycycle(int pin, int dutycycle) + { + + check_pi(); + set_PWM_dutycycle(pi, pin, dutycycle); + } + + // Cleanup the GPIO library + void sk_gpio_cleanup() + { + + check_pi(); + + pigpio_stop(pi); + } +} +#endif \ No newline at end of file diff --git a/coresdk/src/backend/gpio_driver.h b/coresdk/src/backend/gpio_driver.h new file mode 100644 index 00000000..c022d105 --- /dev/null +++ b/coresdk/src/backend/gpio_driver.h @@ -0,0 +1,24 @@ +// gpio_driver.h +// This file is part of the SplashKit Core Library. +// Copyright (©) 2024 Aditya Parmar. All Rights Reserved. + +#ifndef SPLASHKIT_GPIO_H +#define SPLASHKIT_GPIO_H + +#include // Include the appropriate header file for stdint.h +#ifdef RASPBERRY_PI +namespace splashkit_lib +{ + int sk_gpio_init(); + int sk_gpio_read(int pin); + void sk_gpio_set_mode(int pin, int mode); + int sk_gpio_get_mode(int pin); + void sk_gpio_set_pull_up_down(int pin, int pud); + void sk_gpio_write(int pin, int value); + void sk_set_pwm_range(int pin, int range); + void sk_set_pwm_frequency(int pin, int frequency); + void sk_set_pwm_dutycycle(int pin, int dutycycle); + void sk_gpio_cleanup(); +} +#endif +#endif /* defined(gpio_driver) */ \ No newline at end of file diff --git a/coresdk/src/coresdk/raspi_gpio.cpp b/coresdk/src/coresdk/raspi_gpio.cpp new file mode 100644 index 00000000..ef54d5eb --- /dev/null +++ b/coresdk/src/coresdk/raspi_gpio.cpp @@ -0,0 +1,232 @@ +// raspi_gpio.cpp +// splashkit +// Created by Aditya Parmar on 20/01/2024. +// Copyright © 2024 XQuestCode. All rights reserved. +#include "raspi_gpio.h" +#include "gpio_driver.h" +#include +using namespace std; + +namespace splashkit_lib +{ + // Each index points to PIN_1, PIN_2, PIN_3, etc. + int BCMpinData[] = { + -1, -1, 2, -1, 3, -2, 4, 14, -2, 15, 17, 18, 27, -2, 22, 23, -1, 24, 10, -2, 9, 25, 11, 8, -2, 7, 0, 1, 5, -2, -6, 12, 13, -2, 19, 16, 26, 20, -2, 21}; + + int boardToBCM(pins pin) + { + if (pin >= PIN_1 && pin <= PIN_40) + { + return BCMpinData[static_cast(pin) - static_cast(PIN_1)]; + } + cout << "Invalid board pin" << endl; + return -1; + } + bool has_gpio() + { +#ifdef RASPBERRY_PI + return true; +#else + return false; +#endif + } + + // Initialize GPIO resources + void raspi_init() + { +#ifdef RASPBERRY_PI + sk_gpio_init(); +#else + cout << "GPIO not supported on this platform" << endl; +#endif + } + + // Set the mode of the given pin + void raspi_set_mode(pins pin, pin_modes mode) + { +#ifdef RASPBERRY_PI + int bcmPin = boardToBCM(pin); + if (bcmPin == -1) + { + cout << "Cant modify a HIGH Pin" << endl; + } + else if (bcmPin == -2) + { + cout << "Cant modify a Ground pin" << endl; + } + else + { + sk_gpio_set_mode(bcmPin, static_cast(mode)); + } +#else + cout << "Unable to set mode - GPIO not supported on this platform" << endl; +#endif + } + pin_modes raspi_get_mode(pins pin) + { +#ifdef RASPBERRY_PI + int bcmPin = boardToBCM(pin); + if (bcmPin == -1) + { + cout << "Cant modify a HIGH Pin" << endl; + } + else if (bcmPin == -2) + { + cout << "Cant modify a Ground pin" << endl; + } + else + { + return static_cast(sk_gpio_get_mode(bcmPin)); + } + return GPIO_DEFAULT_MODE; +#else + return GPIO_DEFAULT_MODE; + cout << "Unable to get mode - GPIO not supported on this platform" << endl; +#endif + } + + // Write a value to the given pin + void raspi_write(pins pin, pin_values value) + { +#ifdef RASPBERRY_PIv + int bcmPin = boardToBCM(pin); + if (bcmPin == -1) + { + cout << "Cant write a HIGH Pin" << endl; + } + else if (bcmPin == -2) + { + cout << "Cant write a Ground pin" << endl; + } + else + { + sk_gpio_write(bcmPin, static_cast(value)); + } +#else + cout << "Unable to write pin - GPIO not supported on this platform" << endl; +#endif + } + + // Read the value of the given pin + pin_values raspi_read(pins pin) + { +#ifdef RASPBERRY_PI + int bcmPin = boardToBCM(pin); + if (bcmPin == -1) + { + cout << "Reading of PIN: " << pin << " would always be HIGH" << endl; + return GPIO_HIGH; + } + else if (bcmPin == -2) + { + + cout << "Reading of PIN: " << pin << " would always be LOW" << endl; + return GPIO_LOW; + } + return static_cast(sk_gpio_read(bcmPin)); +#else + cout << "Unable to read pin - GPIO not supported on this platform" << endl; + return GPIO_DEFAULT_VALUE; +#endif + } + void raspi_set_pull_up_down(pins pin, pull_up_down pud) + { +#ifdef RASPBERRY_PI + int bcmPin = boardToBCM(pin); + if (bcmPin == -1) + { + cout << "Cant modify a HIGH Pin" << endl; + } + else if (bcmPin == -2) + { + cout << "Cant modify a Ground pin" << endl; + } + else + { + sk_gpio_set_pull_up_down(bcmPin, static_cast(pud)); + } +#else + cout << "Unable to set pull up/down - GPIO not supported on this platform" << endl; +#endif + } + void raspi_set_pwm_range(pins pin, int range) + { +#ifdef RASPBERRY_PI + int bcmPin = boardToBCM(pin); + if (bcmPin == -1) + { + cout << "Cant modify a HIGH Pin" << endl; + } + else if (bcmPin == -2) + { + cout << "Cant modify a Ground pin" << endl; + } + else + { + sk_set_pwm_range(bcmPin, range); + } +#else + cout << "Unable to set pwm range - GPIO not supported on this platform" << endl; +#endif + } + void raspi_set_pwm_frequency(pins pin, int frequency) + { +#ifdef RASPBERRY_PI + int bcmPin = boardToBCM(pin); + if (bcmPin == -1) + { + cout << "Cant modify a HIGH Pin" << endl; + } + else if (bcmPin == -2) + { + cout << "Cant modify a Ground pin" << endl; + } + else + { + sk_set_pwm_frequency(bcmPin, frequency); + } +#else + cout << "Unable to set pwm frequency - GPIO not supported on this platform" << endl; +#endif + } + void raspi_set_pwm_dutycycle(pins pin, int dutycycle) + { +#ifdef RASPBERRY_PI + int bcmPin = boardToBCM(pin); + if (bcmPin == -1) + { + cout << "Cant modify a HIGH Pin" << endl; + } + else if (bcmPin == -2) + { + cout << "Cant modify a Ground pin" << endl; + } + else + { + sk_set_pwm_dutycycle(bcmPin, dutycycle); + } +#else + cout << "Unable to set pwm dutycycle - GPIO not supported on this platform" << endl; +#endif + } + + // Cleanup GPIO resources + void raspi_cleanup() + { +#ifdef RASPBERRY_PI + cout << "Cleaning GPIO pins" << endl; + for (int i = 1; i <= 40; i++) + { + int bcmPin = boardToBCM(static_cast(i)); + if (bcmPin > 0) + { + raspi_set_mode(static_cast(bcmPin), GPIO_INPUT); + raspi_write(static_cast(bcmPin), GPIO_LOW); + } + } + sk_gpio_cleanup(); +#else + cout << "Unable to set cleanup - GPIO not supported on this platform" << endl; +#endif + } +} diff --git a/coresdk/src/coresdk/raspi_gpio.h b/coresdk/src/coresdk/raspi_gpio.h new file mode 100644 index 00000000..d1986d1b --- /dev/null +++ b/coresdk/src/coresdk/raspi_gpio.h @@ -0,0 +1,119 @@ +/** + * @header raspi_gpio + * @brief Splashkit allows you to read and write to the GPIO pins on the Raspberry Pi. + * @author Aditya Parmar + * @attribute group raspberry + * @attribute static raspberry + */ + +#ifndef raspi_gpio_hpp +#define raspi_gpio_hpp + +#include +#include "gpio_driver.h" +#include "types.h" + +namespace splashkit_lib +{ + /** + * @brief Initializes the GPIO library. + * + * This function initializes the GPIO library for use. It should be called before any other GPIO functions. + */ + void raspi_init(); + + /** + * Checks if the system has GPIO capabilities. + * + * @return true if the system has GPIO capabilities, false otherwise. + */ + bool has_gpio(); + + /** + * @brief Sets the mode of the specified pin. + * + * This function sets the mode of the specified pin to the specified mode. + * + * @param pin The pin to set the mode for. + * @param mode The mode to set for the pin. + */ + void raspi_set_mode(pins pin, pin_modes mode); + + /** + * @brief Gets the mode of the specified pin. + * + * This function retrieves the mode of the specified pin. + * + * @param pin The pin to get the mode for. + * @returns The mode of the pin. + */ + pin_modes raspi_get_mode(pins pin); + + /** + * @brief Writes a value to the specified pin. + * + * This function writes the specified value to the specified pin. + * + * @param pin The pin to write the value to. + * @param value The value to write to the pin. + */ + void raspi_write(pins pin, pin_values value); + + /** + * @brief Sets the pull up/down mode for the specified pin. + * + * This function sets the pull-up/down mode for the specified pin. + * + * @param pin The pin to set the pull up/down mode for. + * @param pud The pull up/down mode to set for the pin. + */ + void raspi_set_pull_up_down(pins pin, pull_up_down pud); + + /** + * @brief Sets the PWM range for the specified pin. + * + * This function sets the PWM range for the specified pin. + * + * @param pin The pin to set the PWM range for. + * @param range The PWM range to set for the pin. + */ + void raspi_set_pwm_range(pins pin, int range); + + /** + * @brief Sets the PWM frequency for the specified pin. + * + * This function sets the PWM frequency for the specified pin. + * + * @param pin The pin to set the PWM frequency for. + * @param frequency The PWM frequency to set for the pin. + */ + void raspi_set_pwm_frequency(pins pin, int frequency); + + /** + * @brief Sets the PWM duty cycle for the specified pin. + * + * This function sets the PWM duty cycle for the specified pin. + * + * @param pin The pin to set the PWM duty cycle for. + * @param dutycycle The PWM duty cycle to set for the pin. + */ + void raspi_set_pwm_dutycycle(pins pin, int dutycycle); + + /** + * @brief Reads the value from the specified pin. + * + * This function reads the value from the specified pin. + * + * @param pin The pin to read the value from. + * @returns The value read from the pin. + */ + pin_values raspi_read(pins pin); + + /** + * @brief Cleans up and releases any resources used by the GPIO library. + * + * This function should be called when you are finished using the GPIO library. It sets all pin modes to INPUT and values to LOW. + */ + void raspi_cleanup(); +} +#endif /* raspi_gpio_hpp */ diff --git a/coresdk/src/coresdk/terminal.cpp b/coresdk/src/coresdk/terminal.cpp index e1183d42..24029c9f 100644 --- a/coresdk/src/coresdk/terminal.cpp +++ b/coresdk/src/coresdk/terminal.cpp @@ -7,16 +7,9 @@ // #include - -#ifdef WINDOWS - #include -#else - #include -#endif - #include "types.h" - #include +# #include using std::map; @@ -28,202 +21,9 @@ using std::cin; namespace splashkit_lib { - inline bool operator< (const color& lhs, const color& rhs) - { - if ( lhs.a != rhs.a ) return lhs.a < rhs.a; - if ( lhs.r != rhs.r ) return lhs.r < rhs.r; - if ( lhs.g != rhs.g ) return lhs.g < rhs.g; - if ( lhs.b != rhs.b ) return lhs.b < rhs.b; - return false; - } - - struct color_pair_data - { - int idx; - }; - - static bool _ncurses_active = false; - static map, int> _color_pair_map; - - static map _color_map; - - int map_color(color clr) - { - // Try and find it first... - if ( _color_map.count(clr) > 0 ) - return _color_map[clr]; - - // Now need to register it... - if ( _color_map.size() >= COLORS) - { - LOG(ERROR) << "You have exceeded the number of colors available in the terminal. The terminal only supports " << COLORS << " colors."; - return 0; - } - - int result = static_cast(_color_map.size()); - - short r, g, b; - r = static_cast(clr.r * 1000); - g = static_cast(clr.g * 1000); - b = static_cast(clr.b * 1000); - - init_color(result, r, g, b); - _color_map[clr] = result; - - return result; - } - - int map_color_pair(color fg, color bg) - { - pair clr_pair = pair(fg, bg); - - // Find it? - if ( _color_pair_map.count(clr_pair) > 0 ) - return _color_pair_map[clr_pair]; - - // Create it - int result = static_cast(_color_pair_map.size() + 1); - _color_pair_map[clr_pair] = result; - - init_pair(result, map_color(fg), map_color(bg)); - - return result; - } - - color color_black(); - color color_cyan(); - color color_dark_red(); - color color_green(); - color color_dark_blue(); - color color_dark_cyan(); - color color_dark_gray(); - color color_dark_green(); - color color_yellow(); - color color_light_yellow(); - color color_magenta(); - color color_dark_magenta(); - color color_white(); - color color_gray(); - color color_red(); - color color_blue(); - - void move_cursor_to(int x, int y); - void set_terminal_colors(color foreground, color background); - void set_terminal_bold(bool value); - void set_terminal_echo_input(bool value); - void set_terminal_clear_color(color background); - - void activate_advanced_terminal() - { - if ( _ncurses_active ) return; - - if ( initscr() != nullptr ) - { - _ncurses_active = true; - if ( has_colors() ) - { - start_color(); - use_default_colors(); - - _color_pair_map.clear(); - _color_map.clear(); - - //dull - map_color( color_black() ); - map_color( color_dark_red() ); - map_color( color_dark_green() ); - map_color( color_yellow() ); - map_color( color_dark_blue() ); - map_color( color_dark_magenta() ); - map_color( color_dark_cyan() ); - map_color( color_gray() ); - - //bright - map_color( color_dark_gray() ); - map_color( color_red() ); - map_color( color_green() ); - map_color( color_light_yellow() ); - map_color( color_blue() ); - map_color( color_magenta() ); - map_color( color_cyan() ); - map_color( color_white() ); - - } - else - LOG(WARNING) << "The terminal you are using does not support colors"; - - keypad(stdscr, true); - - set_terminal_echo_input(true); - set_terminal_bold(false); - move_cursor_to(0, 0); - attron(COLOR_PAIR(0)); - bkgdset(COLOR_PAIR(0)); - clear(); - } - else - { - LOG(WARNING) << "Failed to activate advanced terminal."; - } - } - - void set_terminal_echo_input(bool value) - { - if ( not _ncurses_active ) - { - LOG(WARNING) << "You must activate advanced terminal features to set echo status"; - return; - } - - if ( value ) echo(); - else noecho(); - } - - void clear_terminal() - { - if ( not _ncurses_active ) - { - LOG(WARNING) << "You must activate advanced terminal features to clear the terminal"; - return; - } - - clear(); - } - - void refresh_terminal() - { - if ( not _ncurses_active ) - { - LOG(WARNING) << "You must activate advanced terminal features to refresh the terminal"; - return; - } - - refresh(); - } - - bool advanced_terminal_active() - { - return _ncurses_active; - } - - void end_advanced_terminal() - { - if ( not _ncurses_active ) - { - LOG(WARNING) << "You must have activated advanced terminal before ending them"; - return; - } - - endwin(); - _ncurses_active = false; - } - void write(string text) { - if ( _ncurses_active ) - printw("%s", text.c_str()); - else - cout << text; + cout << text; } void write(int data) @@ -243,18 +43,12 @@ namespace splashkit_lib void write_line() { - if (_ncurses_active ) - printw("\n"); - else - cout << endl; + cout << endl; } void write_line(string line) { - if (_ncurses_active ) - printw("%s\n", line.c_str()); - else - cout << line << endl; + cout << line << endl; } void write_line(int data) @@ -269,106 +63,20 @@ namespace splashkit_lib void write_line(char data) { - write_line(string("") + data); - } - - int terminal_width() - { - if ( not _ncurses_active ) - { - LOG(WARNING) << "You must activate advanced terminal features to get terminal width"; - return 0; - } - - int x, y; - getmaxyx(stdscr,y,x); - - return x; - } - - int terminal_height() - { - if ( not _ncurses_active ) - { - LOG(WARNING) << "You must activate advanced terminal features to get terminal height"; - return 0; - } - int x, y; - getmaxyx(stdscr,y,x); - return y; - } - - void set_terminal_colors(color foreground, color background) - { - if ( not _ncurses_active ) - { - LOG(WARNING) << "You must activate advanced terminal features to print bold text"; - return; - } - if ( not can_change_color() ) - { - LOG(WARNING) << "Unable to change terminal colors in this Terminal"; - return; - } - - int pair = map_color_pair(foreground, background); - attron(COLOR_PAIR(pair)); - bkgdset(COLOR_PAIR(pair)); - } - - void set_terminal_bold(bool value) - { - if ( not _ncurses_active ) - { - LOG(WARNING) << "You must activate advanced terminal features to print bold text"; - return; - } - - if (value) attron(A_BOLD); - else attroff(A_BOLD); - } - - void move_cursor_to(int x, int y) - { - if ( not _ncurses_active ) - { - LOG(WARNING) << "You must activate advanced terminal features to move within the terminal"; - return; - } - - move(y, x); - } - - void write_at(string text, int x, int y) - { - move_cursor_to(x, y); - write(text); + write_line(std::to_string(data)); } string read_line() { - if ( not _ncurses_active ) - { - string result; - getline(std::cin, result); - return result; - } - else - { - char line[2096]; - getnstr(line, 2095); - return string(line); - } + string result; + getline(std::cin, result); + return result; } char read_char() { char result = 0; - if ( not _ncurses_active ) - cin >> result; - else - result = getch(); - + cin >> result; return result; } } diff --git a/coresdk/src/coresdk/terminal.h b/coresdk/src/coresdk/terminal.h index 1c38dcb4..8f568577 100644 --- a/coresdk/src/coresdk/terminal.h +++ b/coresdk/src/coresdk/terminal.h @@ -18,82 +18,6 @@ using std::string; namespace splashkit_lib { - /** - * Start using the advanced terminal. Once you call this you will need - * to make sure you call `refresh_terminal` to show anything you have - * written. This will allow use of colors, bold, positioning, and other - * advanced options. - */ - void activate_advanced_terminal(); - - /** - * Is the terminal currently in advanced mode? - * - * @return True if the terminal is in advanced mode. - */ - bool advanced_terminal_active(); - - /** - * Finish using advanced mode. The existing terminal display will be lost - * and the user will see what was in the terminal before you called - * `activate_advanced_terminal`. - */ - void end_advanced_terminal(); - - /** - * In advanced mode, this will move the cursor to a given col, row of the - * terminal. You can check the terminal size using `terminal_width` and - * `terminal_height`. If you try to move outside this bounds then then move - * will not occur. - * - * @param x The column to move to, must be between 0 and `terminal_width` - * @param y The row to move to, must be between 0 and `terminal_height` - */ - void move_cursor_to(int x, int y); - - /** - * In advanced mode, this will display what has been written to the - * terminal. You need to call this for anything to be shown in advanced - * mode. - */ - void refresh_terminal(); - - /** - * In advanced mode, this will clear the terminal to the background color - * you set in `set_terminal_color`. - */ - void clear_terminal(); - - /** - * In advanced mode, this gives you the number of columns in the terminal. - * - * @return The number of columns in the terminal - */ - int terminal_width(); - - /** - * In advanced mode, this gives you the number of rows in the terminal. - * - * @return The number of rows in the terminal - */ - int terminal_height(); - - /** - * In advanced mode, this allows you to set if the text should draw as bold. - * - * @param value Pass true to have the terminal write in bold - */ - void set_terminal_bold(bool value); - - /** - * In advanced mode, this allows you to stop text read with `read_char` - * appearing on the terminal. You can use this for reading passwords, or to - * control what is written. - * - * @param value Pass true if you want characters to appear as typed. - */ - void set_terminal_echo_input(bool value); - /** * Write the supplied text to the Terminal. * @@ -169,77 +93,6 @@ namespace splashkit_lib */ void write_line(char data); - /** - * In advanced mode, this will write the supplied text at the indicated - * column and row. - * - * @param text The text to write - * @param x The row to position the text at - * @param y The column to position the text at - */ - void write_at(string text, int x, int y); - - /** - * In advanced mode this allows you to set the color of the foreground and - * the background. The foreground is the color of the text. - * - * - * Note that only the following colors are guaranteed to work on all - * Terminals (others may work): - * - * - * - `color_black` - * - * - * - `color_dark_gray` - * - * - * - `color_gray` - * - * - * - `color_white` - * - * - * - `color_red` - * - * - * - `color_dark_red` - * - * - * - `color_green` - * - * - * - `color_dark_green` - * - * - * - `color_blue` - * - * - * - `color_dark_blue` - * - * - * - `color_cyan` - * - * - * - `color_dark_cyan` - * - * - * - `color_light_yellow` - * - * - * - `color_yellow` - * - * - * - `color_magenta` - * - * - * - `color_dark_magenta` - * - * - * @param foreground The color of text that is drawn. - * @param background The color of the background behind drawn text. - */ - void set_terminal_colors(color foreground, color background); /** * Read a line of text from the terminal. The user will see the text as @@ -250,9 +103,7 @@ namespace splashkit_lib string read_line(); /** - * Get a single character input by the user. This works in both standard and - * advanced modes. In advanced mode, you can set if the character should - * also be echoed to the terminal using `set_terminal_echo_input`. + * Get a single character input by the user. * * @return The character typed by the user. */ diff --git a/coresdk/src/coresdk/types.h b/coresdk/src/coresdk/types.h index 569c4076..2ea0c3ef 100644 --- a/coresdk/src/coresdk/types.h +++ b/coresdk/src/coresdk/types.h @@ -61,10 +61,10 @@ namespace splashkit_lib */ enum font_style { - NORMAL_FONT = 0, - BOLD_FONT = 1, - ITALIC_FONT = 2, - UNDERLINE_FONT = 4 + NORMAL_FONT = 0, + BOLD_FONT = 1, + ITALIC_FONT = 2, + UNDERLINE_FONT = 4 }; /** @@ -219,9 +219,9 @@ namespace splashkit_lib */ enum drawing_dest { - DRAW_TO_SCREEN, // no camera effect - DRAW_TO_WORLD, // camera effect - DRAW_DEFAULT // camera effect on screen, but not on bitmaps + DRAW_TO_SCREEN, // no camera effect + DRAW_TO_WORLD, // camera effect + DRAW_DEFAULT // camera effect on screen, but not on bitmaps }; /** @@ -249,20 +249,20 @@ namespace splashkit_lib */ struct drawing_options { - void *dest; // The bitmap or window used to draw on to - float scale_x; // Scale data - float scale_y; // - float angle; // Angle for rotations - float anchor_offset_x; // Centre point for rotations - float anchor_offset_y; // - bool flip_x; // Flip data - bool flip_y; // - bool is_part; // Draw just a part? - rectangle part; // Part to draw - int draw_cell; // The cell to draw - overridden by animation or part - drawing_dest camera; // Draw to world or screen coordinates (camera has effect?) - int line_width; // Specify the width of line drawings. - animation anim; // The animation for bitmap drawing + void *dest; // The bitmap or window used to draw on to + float scale_x; // Scale data + float scale_y; // + float angle; // Angle for rotations + float anchor_offset_x; // Centre point for rotations + float anchor_offset_y; // + bool flip_x; // Flip data + bool flip_y; // + bool is_part; // Draw just a part? + rectangle part; // Part to draw + int draw_cell; // The cell to draw - overridden by animation or part + drawing_dest camera; // Draw to world or screen coordinates (camera has effect?) + int line_width; // Specify the width of line drawings. + animation anim; // The animation for bitmap drawing }; /** @@ -315,5 +315,148 @@ namespace splashkit_lib HTTP_STATUS_NOT_IMPLEMENTED = 501, HTTP_STATUS_SERVICE_UNAVAILABLE = 503 }; + + /** + * Raspberry Pi GPIO Board Pin Descriptions: + * + * @constant PIN_1 3.3V Power Supply + * @constant PIN_2 5V Power Supply + * @constant PIN_3 GPIO2 / SDA (I2C) + * @constant PIN_4 5V Power Supply + * @constant PIN_5 GPIO3 / SCL (I2C) + * @constant PIN_6 Ground + * @constant PIN_7 GPIO4 + * @constant PIN_8 GPIO14 / TXD (UART) + * @constant PIN_9 Ground + * @constant PIN_10 GPIO15 / RXD (UART) + * @constant PIN_11 GPIO17 + * @constant PIN_12 GPIO18 / PCM_CLK + * @constant PIN_13 GPIO27 + * @constant PIN_14 Ground + * @constant PIN_15 GPIO22 + * @constant PIN_16 GPIO23 + * @constant PIN_17 3.3V Power Supply + * @constant PIN_18 GPIO24 + * @constant PIN_19 GPIO10 / MOSI (SPI) + * @constant PIN_20 Ground + * @constant PIN_21 GPIO9 / MISO (SPI) + * @constant PIN_22 GPIO25 + * @constant PIN_23 GPIO11 / SCLK (SPI) + * @constant PIN_24 GPIO8 / CE0 (SPI) + * @constant PIN_25 Ground + * @constant PIN_26 GPIO7 / CE1 (SPI) + * @constant PIN_27 ID_SD (I2C ID EEPROM) + * @constant PIN_28 ID_SC (I2C ID EEPROM) + * @constant PIN_29 GPIO5 + * @constant PIN_30 Ground + * @constant PIN_31 GPIO6 + * @constant PIN_32 GPIO12 + * @constant PIN_33 GPIO13 + * @constant PIN_34 Ground + * @constant PIN_35 GPIO19 / MISO (PCM) + * @constant PIN_36 GPIO16 / CE0 (PCM) + * @constant PIN_37 GPIO26 + * @constant PIN_38 GPIO20 / MOSI (PCM) + * @constant PIN_39 Ground + * @constant PIN_40 GPIO21 / SCLK (PCM) + */ + enum pins + { + PIN_1 = 1, + PIN_2 = 2, + PIN_3 = 3, + PIN_4 = 4, + PIN_5 = 5, + PIN_6 = 6, + PIN_7 = 7, + PIN_8 = 8, + PIN_9 = 9, + PIN_10 = 10, + PIN_11 = 11, + PIN_12 = 12, + PIN_13 = 13, + PIN_14 = 14, + PIN_15 = 15, + PIN_16 = 16, + PIN_17 = 17, + PIN_18 = 18, + PIN_19 = 19, + PIN_20 = 20, + PIN_21 = 21, + PIN_22 = 22, + PIN_23 = 23, + PIN_24 = 24, + PIN_25 = 25, + PIN_26 = 26, + PIN_27 = 27, + PIN_28 = 28, + PIN_29 = 29, + PIN_30 = 30, + PIN_31 = 31, + PIN_32 = 32, + PIN_33 = 33, + PIN_34 = 34, + PIN_35 = 35, + PIN_36 = 36, + PIN_37 = 37, + PIN_38 = 38, + PIN_39 = 39, + PIN_40 = 40, + }; +#include + + /** + * GPIO Pin Modes: + * + * @constant GPIO_INPUT Input mode. + * @constant GPIO_OUTPUT Output mode. + * @constant GPIO_ALT0 Alternate function mode 0. + * @constant GPIO_ALT1 Alternate function mode 1. + * @constant GPIO_ALT2 Alternate function mode 2. + * @constant GPIO_ALT3 Alternate function mode 3. + * @constant GPIO_ALT4 Alternate function mode 4. + * @constant GPIO_ALT5 Alternate function mode 5. + * @constant GPIO_DEFAULT_MODE Default mode. + */ + enum pin_modes + { + GPIO_INPUT = 0, + GPIO_OUTPUT = 1, + GPIO_ALT0 = 4, + GPIO_ALT1 = 5, + GPIO_ALT2 = 6, + GPIO_ALT3 = 7, + GPIO_ALT4 = 3, + GPIO_ALT5 = 2, + GPIO_DEFAULT_MODE = -1, + }; + + /** + * GPIO Pin Values: + * + * @constant GPIO_LOW Logic low (0). + * @constant GPIO_HIGH Logic high (1). + * @constant GPIO_DEFAULT_VALUE Default value. + */ + enum pin_values + { + GPIO_LOW = 0, + GPIO_HIGH = 1, + GPIO_DEFAULT_VALUE = -1 + }; + + /** + * GPIO Pull-up/Pull-down Configurations: + * + * @constant PUD_OFF No pull-up or pull-down resistor. + * @constant PUD_DOWN Enable pull-down resistor. + * @constant PUD_UP Enable pull-up resistor. + */ + enum pull_up_down + { + PUD_OFF = 0, + PUD_DOWN = 1, + PUD_UP = 2 + }; } #endif /* types_hpp */ diff --git a/coresdk/src/coresdk/vector_2d.cpp b/coresdk/src/coresdk/vector_2d.cpp index 18f4a6be..bc013818 100644 --- a/coresdk/src/coresdk/vector_2d.cpp +++ b/coresdk/src/coresdk/vector_2d.cpp @@ -12,7 +12,6 @@ #include "line_geometry.h" #include "circle_geometry.h" #include "utility_functions.h" - #include using std::to_string; diff --git a/coresdk/src/keynote_code.cpp b/coresdk/src/keynote_code.cpp index a5aeff6e..89db4ee0 100644 --- a/coresdk/src/keynote_code.cpp +++ b/coresdk/src/keynote_code.cpp @@ -10,7 +10,6 @@ void test_bitmaps() draw_bitmap("background", 0, 0); - refresh_screen(); } diff --git a/coresdk/src/test/test_main.cpp b/coresdk/src/test/test_main.cpp index 2071f2b3..5afe93b8 100644 --- a/coresdk/src/test/test_main.cpp +++ b/coresdk/src/test/test_main.cpp @@ -52,6 +52,7 @@ void setup_tests() add_test("RESTful Web Service", run_restful_web_service); add_test("UDP Networking Test", run_udp_networking_test); add_test("TCP Networking Test", run_tcp_networking_test); + add_test("GPIO Tests", run_gpio_tests); } diff --git a/coresdk/src/test/test_main.h b/coresdk/src/test/test_main.h index 2a44834a..7e1924f7 100644 --- a/coresdk/src/test/test_main.h +++ b/coresdk/src/test/test_main.h @@ -32,7 +32,7 @@ void run_networking_test(); void run_restful_web_service(); void run_udp_networking_test(); void run_tcp_networking_test(); - +void run_gpio_tests(); void run_terminal_test(); void run_logging_test(); diff --git a/coresdk/src/test/test_raspi_gpio.cpp b/coresdk/src/test/test_raspi_gpio.cpp new file mode 100644 index 00000000..a32924cd --- /dev/null +++ b/coresdk/src/test/test_raspi_gpio.cpp @@ -0,0 +1,44 @@ +/*********************************************** +* XQuestCode || Aditya Parmar +* Code with Creativity +* 🚀 © 2024 Aditya Parmar. All Rights Reserved. +***********************************************/ +#include +#include "raspi_gpio.h" +using namespace std; +using namespace splashkit_lib; + +// Function to run GPIO tests +void run_gpio_tests() +{ + // Initialize the GPIO + cout << "Initializing GPIO" << endl; + raspi_init(); + + // Set GPIO pin 11 as an output + cout << "Setting GPIO pin 11 as an output" << endl; + raspi_set_mode(PIN_11, GPIO_OUTPUT); + + // Read the initial value of GPIO pin 11 + int defaultValue = raspi_read(PIN_11); + cout << "Value of Pin 11: " << defaultValue << endl; + + // Write HIGH to GPIO pin 11 + cout << "Writing HIGH to GPIO pin 11" << endl; + raspi_write(PIN_11, GPIO_HIGH); + + // Read the value of GPIO pin 11 + int value = raspi_read(PIN_11); + cout << "GPIO 11 value: " << value << endl; + + // Write HIGH to GPIO pin 17 + cout << "Writing HIGH to GPIO pin 17" << endl; + raspi_write(PIN_17, GPIO_HIGH); + + // Write HIGH to Ground PIN + cout << "Writing HIGH to Ground PIN" << endl; + raspi_write(PIN_6, GPIO_HIGH); + + // Clean up the GPIO + raspi_cleanup(); +} \ No newline at end of file diff --git a/coresdk/src/test/test_terminal.cpp b/coresdk/src/test/test_terminal.cpp index b26648ff..8920a344 100644 --- a/coresdk/src/test/test_terminal.cpp +++ b/coresdk/src/test/test_terminal.cpp @@ -8,16 +8,14 @@ #include "terminal.h" #include "utils.h" -#include "color.h" #include -using namespace std; +using namespace std; using namespace splashkit_lib; void test_simple_terminal() { write_line("Hello World!" + to_string(10)); - write("Hello"); write(" "); write("World!"); @@ -26,56 +24,10 @@ void test_simple_terminal() write('a'); write_line(); write_line('c'); - - if ( advanced_terminal_active() ) - { - refresh_terminal(); - } - - delay(1000); -} - -void test_advanced_terminal() -{ - move_cursor_to(34, 10); - - set_terminal_colors(COLOR_RED, COLOR_GREEN); - clear_terminal(); - write_line("Hello World!"); - - write_at("Enter Name:", 34, 11); - move_cursor_to(34, 12); - refresh_terminal(); - - set_terminal_colors(COLOR_WHITE, COLOR_GREEN); - string name = read_line(); - - clear_terminal(); - - - write_at("HELLO", (terminal_width() - 5) / 2, 1); - set_terminal_bold(true); - write_at(name, static_cast(terminal_width() - name.length()) / 2 , terminal_height() / 2); - set_terminal_bold(false); - - refresh_terminal(); - delay(1000); - end_advanced_terminal(); } void run_terminal_test() { - int go = 0; - - cout << "Activate advanced terminal (1-yes, 0-no): "; - cin >> go; - - if ( go != 0 ) - { - activate_advanced_terminal(); - } - test_simple_terminal(); - test_advanced_terminal(); } diff --git a/generated/clib/lib_type_mapper.cpp b/generated/clib/lib_type_mapper.cpp index 5aee98b4..b729922e 100644 --- a/generated/clib/lib_type_mapper.cpp +++ b/generated/clib/lib_type_mapper.cpp @@ -257,6 +257,30 @@ int __sklib__to_sklib_http_status_code(http_status_code v) { http_status_code __sklib__to_http_status_code(int v) { return static_cast(v); } +int __sklib__to_sklib_pin_modes(pin_modes v) { + return static_cast(v); +} +pin_modes __sklib__to_pin_modes(int v) { + return static_cast(v); +} +int __sklib__to_sklib_pin_values(pin_values v) { + return static_cast(v); +} +pin_values __sklib__to_pin_values(int v) { + return static_cast(v); +} +int __sklib__to_sklib_pins(pins v) { + return static_cast(v); +} +pins __sklib__to_pins(int v) { + return static_cast(v); +} +int __sklib__to_sklib_pull_up_down(pull_up_down v) { + return static_cast(v); +} +pull_up_down __sklib__to_pull_up_down(int v) { + return static_cast(v); +} int __sklib__to_sklib_http_method(http_method v) { return static_cast(v); } diff --git a/generated/clib/lib_type_mapper.h b/generated/clib/lib_type_mapper.h index 6ffc7a76..25063f4b 100644 --- a/generated/clib/lib_type_mapper.h +++ b/generated/clib/lib_type_mapper.h @@ -41,6 +41,7 @@ #include "point_geometry.h" #include "quad_geometry.h" #include "random.h" +#include "raspi_gpio.h" #include "rectangle_drawing.h" #include "rectangle_geometry.h" #include "resources.h" @@ -144,6 +145,14 @@ int __sklib__to_sklib_font_style(font_style v); font_style __sklib__to_font_style(int v); int __sklib__to_sklib_http_status_code(http_status_code v); http_status_code __sklib__to_http_status_code(int v); +int __sklib__to_sklib_pin_modes(pin_modes v); +pin_modes __sklib__to_pin_modes(int v); +int __sklib__to_sklib_pin_values(pin_values v); +pin_values __sklib__to_pin_values(int v); +int __sklib__to_sklib_pins(pins v); +pins __sklib__to_pins(int v); +int __sklib__to_sklib_pull_up_down(pull_up_down v); +pull_up_down __sklib__to_pull_up_down(int v); int __sklib__to_sklib_http_method(http_method v); http_method __sklib__to_http_method(int v); __sklib_matrix_2d __sklib__to_sklib_matrix_2d(matrix_2d v); diff --git a/generated/clib/sk_clib.cpp b/generated/clib/sk_clib.cpp index da97571b..2fc9eb71 100644 --- a/generated/clib/sk_clib.cpp +++ b/generated/clib/sk_clib.cpp @@ -3723,6 +3723,56 @@ int __sklib__rnd__int(int ubound) { int __skreturn = rnd(__skparam__ubound); return __sklib__to_int(__skreturn); } +int __sklib__has_gpio() { + bool __skreturn = has_gpio(); + return __sklib__to_int(__skreturn); +} +void __sklib__raspi_cleanup() { + raspi_cleanup(); +} +int __sklib__raspi_get_mode__pins(int pin) { + pins __skparam__pin = __sklib__to_pins(pin); + pin_modes __skreturn = raspi_get_mode(__skparam__pin); + return __sklib__to_int(__skreturn); +} +void __sklib__raspi_init() { + raspi_init(); +} +int __sklib__raspi_read__pins(int pin) { + pins __skparam__pin = __sklib__to_pins(pin); + pin_values __skreturn = raspi_read(__skparam__pin); + return __sklib__to_int(__skreturn); +} +void __sklib__raspi_set_mode__pins__pin_modes(int pin, int mode) { + pins __skparam__pin = __sklib__to_pins(pin); + pin_modes __skparam__mode = __sklib__to_pin_modes(mode); + raspi_set_mode(__skparam__pin, __skparam__mode); +} +void __sklib__raspi_set_pull_up_down__pins__pull_up_down(int pin, int pud) { + pins __skparam__pin = __sklib__to_pins(pin); + pull_up_down __skparam__pud = __sklib__to_pull_up_down(pud); + raspi_set_pull_up_down(__skparam__pin, __skparam__pud); +} +void __sklib__raspi_set_pwm_dutycycle__pins__int(int pin, int dutycycle) { + pins __skparam__pin = __sklib__to_pins(pin); + int __skparam__dutycycle = __sklib__to_int(dutycycle); + raspi_set_pwm_dutycycle(__skparam__pin, __skparam__dutycycle); +} +void __sklib__raspi_set_pwm_frequency__pins__int(int pin, int frequency) { + pins __skparam__pin = __sklib__to_pins(pin); + int __skparam__frequency = __sklib__to_int(frequency); + raspi_set_pwm_frequency(__skparam__pin, __skparam__frequency); +} +void __sklib__raspi_set_pwm_range__pins__int(int pin, int range) { + pins __skparam__pin = __sklib__to_pins(pin); + int __skparam__range = __sklib__to_int(range); + raspi_set_pwm_range(__skparam__pin, __skparam__range); +} +void __sklib__raspi_write__pins__pin_values(int pin, int value) { + pins __skparam__pin = __sklib__to_pins(pin); + pin_values __skparam__value = __sklib__to_pin_values(value); + raspi_write(__skparam__pin, __skparam__value); +} void __sklib__draw_quad__color__quad_ref(__sklib_color clr, const __sklib_quad q) { color __skparam__clr = __sklib__to_color(clr); quad __skparam__q = __sklib__to_quad(q); @@ -4915,24 +4965,6 @@ __sklib_vector_2d __sklib__vector_from_to__sprite__sprite(__sklib_sprite s1, __s vector_2d __skreturn = vector_from_to(__skparam__s1, __skparam__s2); return __sklib__to_sklib_vector_2d(__skreturn); } -void __sklib__activate_advanced_terminal() { - activate_advanced_terminal(); -} -int __sklib__advanced_terminal_active() { - bool __skreturn = advanced_terminal_active(); - return __sklib__to_int(__skreturn); -} -void __sklib__clear_terminal() { - clear_terminal(); -} -void __sklib__end_advanced_terminal() { - end_advanced_terminal(); -} -void __sklib__move_cursor_to__int__int(int x, int y) { - int __skparam__x = __sklib__to_int(x); - int __skparam__y = __sklib__to_int(y); - move_cursor_to(__skparam__x, __skparam__y); -} char __sklib__read_char() { char __skreturn = read_char(); return __sklib__to_char(__skreturn); @@ -4941,30 +4973,6 @@ __sklib_string __sklib__read_line() { string __skreturn = read_line(); return __sklib__to_sklib_string(__skreturn); } -void __sklib__refresh_terminal() { - refresh_terminal(); -} -void __sklib__set_terminal_bold__bool(int value) { - bool __skparam__value = __sklib__to_bool(value); - set_terminal_bold(__skparam__value); -} -void __sklib__set_terminal_colors__color__color(__sklib_color foreground, __sklib_color background) { - color __skparam__foreground = __sklib__to_color(foreground); - color __skparam__background = __sklib__to_color(background); - set_terminal_colors(__skparam__foreground, __skparam__background); -} -void __sklib__set_terminal_echo_input__bool(int value) { - bool __skparam__value = __sklib__to_bool(value); - set_terminal_echo_input(__skparam__value); -} -int __sklib__terminal_height() { - int __skreturn = terminal_height(); - return __sklib__to_int(__skreturn); -} -int __sklib__terminal_width() { - int __skreturn = terminal_width(); - return __sklib__to_int(__skreturn); -} void __sklib__write__char(char data) { char __skparam__data = __sklib__to_char(data); write(__skparam__data); @@ -4981,12 +4989,6 @@ void __sklib__write__string(__sklib_string text) { string __skparam__text = __sklib__to_string(text); write(__skparam__text); } -void __sklib__write_at__string__int__int(__sklib_string text, int x, int y) { - string __skparam__text = __sklib__to_string(text); - int __skparam__x = __sklib__to_int(x); - int __skparam__y = __sklib__to_int(y); - write_at(__skparam__text, __skparam__x, __skparam__y); -} void __sklib__write_line__char(char data) { char __skparam__data = __sklib__to_char(data); write_line(__skparam__data); diff --git a/generated/clib/sk_clib.h b/generated/clib/sk_clib.h index b2c2f5c0..e2a8df74 100644 --- a/generated/clib/sk_clib.h +++ b/generated/clib/sk_clib.h @@ -58,6 +58,10 @@ typedef int __sklib_sprite_event_kind; typedef int __sklib_drawing_dest; typedef int __sklib_font_style; typedef int __sklib_http_status_code; +typedef int __sklib_pin_modes; +typedef int __sklib_pin_values; +typedef int __sklib_pins; +typedef int __sklib_pull_up_down; typedef int __sklib_http_method; typedef struct { __sklib_double elements[9]; @@ -864,6 +868,17 @@ __sklib_vector_triangle __sklib__triangles_from__quad_ref(const __sklib_quad q); int __sklib__rnd__int__int(int min, int max); float __sklib__rnd(); int __sklib__rnd__int(int ubound); +int __sklib__has_gpio(); +void __sklib__raspi_cleanup(); +int __sklib__raspi_get_mode__pins(int pin); +void __sklib__raspi_init(); +int __sklib__raspi_read__pins(int pin); +void __sklib__raspi_set_mode__pins__pin_modes(int pin, int mode); +void __sklib__raspi_set_pull_up_down__pins__pull_up_down(int pin, int pud); +void __sklib__raspi_set_pwm_dutycycle__pins__int(int pin, int dutycycle); +void __sklib__raspi_set_pwm_frequency__pins__int(int pin, int frequency); +void __sklib__raspi_set_pwm_range__pins__int(int pin, int range); +void __sklib__raspi_write__pins__pin_values(int pin, int value); void __sklib__draw_quad__color__quad_ref(__sklib_color clr, const __sklib_quad q); void __sklib__draw_quad__color__quad_ref__drawing_options_ref(__sklib_color clr, const __sklib_quad q, const __sklib_drawing_options opts); void __sklib__draw_quad_on_bitmap__bitmap__color__quad_ref(__sklib_bitmap destination, __sklib_color clr, const __sklib_quad q); @@ -1081,24 +1096,12 @@ void __sklib__update_sprite_animation__sprite__float(__sklib_sprite s, float pct void __sklib__update_sprite_animation__sprite__float__bool(__sklib_sprite s, float pct, int with_sound); __sklib_vector_2d __sklib__vector_from_center_sprite_to_point__sprite__point_2d_ref(__sklib_sprite s, const __sklib_point_2d pt); __sklib_vector_2d __sklib__vector_from_to__sprite__sprite(__sklib_sprite s1, __sklib_sprite s2); -void __sklib__activate_advanced_terminal(); -int __sklib__advanced_terminal_active(); -void __sklib__clear_terminal(); -void __sklib__end_advanced_terminal(); -void __sklib__move_cursor_to__int__int(int x, int y); char __sklib__read_char(); __sklib_string __sklib__read_line(); -void __sklib__refresh_terminal(); -void __sklib__set_terminal_bold__bool(int value); -void __sklib__set_terminal_colors__color__color(__sklib_color foreground, __sklib_color background); -void __sklib__set_terminal_echo_input__bool(int value); -int __sklib__terminal_height(); -int __sklib__terminal_width(); void __sklib__write__char(char data); void __sklib__write__double(double data); void __sklib__write__int(int data); void __sklib__write__string(__sklib_string text); -void __sklib__write_at__string__int__int(__sklib_string text, int x, int y); void __sklib__write_line__char(char data); void __sklib__write_line(); void __sklib__write_line__double(double data); diff --git a/generated/cpp/adapter_type_mapper.cpp b/generated/cpp/adapter_type_mapper.cpp index 7af93681..ff8884d2 100644 --- a/generated/cpp/adapter_type_mapper.cpp +++ b/generated/cpp/adapter_type_mapper.cpp @@ -258,6 +258,30 @@ int __skadapter__to_sklib_http_status_code(http_status_code v) { http_status_code __skadapter__to_http_status_code(int v) { return static_cast(v); } +int __skadapter__to_sklib_pin_modes(pin_modes v) { + return static_cast(v); +} +pin_modes __skadapter__to_pin_modes(int v) { + return static_cast(v); +} +int __skadapter__to_sklib_pin_values(pin_values v) { + return static_cast(v); +} +pin_values __skadapter__to_pin_values(int v) { + return static_cast(v); +} +int __skadapter__to_sklib_pins(pins v) { + return static_cast(v); +} +pins __skadapter__to_pins(int v) { + return static_cast(v); +} +int __skadapter__to_sklib_pull_up_down(pull_up_down v) { + return static_cast(v); +} +pull_up_down __skadapter__to_pull_up_down(int v) { + return static_cast(v); +} int __skadapter__to_sklib_http_method(http_method v) { return static_cast(v); } diff --git a/generated/cpp/adapter_type_mapper.h b/generated/cpp/adapter_type_mapper.h index 5e1442f6..4f32a3c3 100644 --- a/generated/cpp/adapter_type_mapper.h +++ b/generated/cpp/adapter_type_mapper.h @@ -95,6 +95,14 @@ int __skadapter__to_sklib_font_style(font_style v); font_style __skadapter__to_font_style(int v); int __skadapter__to_sklib_http_status_code(http_status_code v); http_status_code __skadapter__to_http_status_code(int v); +int __skadapter__to_sklib_pin_modes(pin_modes v); +pin_modes __skadapter__to_pin_modes(int v); +int __skadapter__to_sklib_pin_values(pin_values v); +pin_values __skadapter__to_pin_values(int v); +int __skadapter__to_sklib_pins(pins v); +pins __skadapter__to_pins(int v); +int __skadapter__to_sklib_pull_up_down(pull_up_down v); +pull_up_down __skadapter__to_pull_up_down(int v); int __skadapter__to_sklib_http_method(http_method v); http_method __skadapter__to_http_method(int v); __sklib_matrix_2d __skadapter__to_sklib_matrix_2d(matrix_2d v); diff --git a/generated/cpp/raspi_gpio.h b/generated/cpp/raspi_gpio.h new file mode 100644 index 00000000..bea531b9 --- /dev/null +++ b/generated/cpp/raspi_gpio.h @@ -0,0 +1,28 @@ +// +// SplashKit Generated Raspi Gpio C++ Code +// DO NOT MODIFY +// + +#ifndef __raspi_gpio_h +#define __raspi_gpio_h + +#include "types.h" +#include +#include +#include +using std::string; +using std::vector; + +bool has_gpio(); +void raspi_cleanup(); +pin_modes raspi_get_mode(pins pin); +void raspi_init(); +pin_values raspi_read(pins pin); +void raspi_set_mode(pins pin, pin_modes mode); +void raspi_set_pull_up_down(pins pin, pull_up_down pud); +void raspi_set_pwm_dutycycle(pins pin, int dutycycle); +void raspi_set_pwm_frequency(pins pin, int frequency); +void raspi_set_pwm_range(pins pin, int range); +void raspi_write(pins pin, pin_values value); + +#endif /* __raspi_gpio_h */ diff --git a/generated/cpp/splashkit.cpp b/generated/cpp/splashkit.cpp index 001cef13..619d2f68 100644 --- a/generated/cpp/splashkit.cpp +++ b/generated/cpp/splashkit.cpp @@ -3854,6 +3854,56 @@ int rnd(int ubound) { int __skreturn = __sklib__rnd__int(__skparam__ubound); return __skadapter__to_int(__skreturn); } +bool has_gpio() { + int __skreturn = __sklib__has_gpio(); + return __skadapter__to_bool(__skreturn); +} +void raspi_cleanup() { + __sklib__raspi_cleanup(); +} +pin_modes raspi_get_mode(pins pin) { + int __skparam__pin = __skadapter__to_int(pin); + int __skreturn = __sklib__raspi_get_mode__pins(__skparam__pin); + return __skadapter__to_pin_modes(__skreturn); +} +void raspi_init() { + __sklib__raspi_init(); +} +pin_values raspi_read(pins pin) { + int __skparam__pin = __skadapter__to_int(pin); + int __skreturn = __sklib__raspi_read__pins(__skparam__pin); + return __skadapter__to_pin_values(__skreturn); +} +void raspi_set_mode(pins pin, pin_modes mode) { + int __skparam__pin = __skadapter__to_int(pin); + int __skparam__mode = __skadapter__to_int(mode); + __sklib__raspi_set_mode__pins__pin_modes(__skparam__pin, __skparam__mode); +} +void raspi_set_pull_up_down(pins pin, pull_up_down pud) { + int __skparam__pin = __skadapter__to_int(pin); + int __skparam__pud = __skadapter__to_int(pud); + __sklib__raspi_set_pull_up_down__pins__pull_up_down(__skparam__pin, __skparam__pud); +} +void raspi_set_pwm_dutycycle(pins pin, int dutycycle) { + int __skparam__pin = __skadapter__to_int(pin); + int __skparam__dutycycle = __skadapter__to_int(dutycycle); + __sklib__raspi_set_pwm_dutycycle__pins__int(__skparam__pin, __skparam__dutycycle); +} +void raspi_set_pwm_frequency(pins pin, int frequency) { + int __skparam__pin = __skadapter__to_int(pin); + int __skparam__frequency = __skadapter__to_int(frequency); + __sklib__raspi_set_pwm_frequency__pins__int(__skparam__pin, __skparam__frequency); +} +void raspi_set_pwm_range(pins pin, int range) { + int __skparam__pin = __skadapter__to_int(pin); + int __skparam__range = __skadapter__to_int(range); + __sklib__raspi_set_pwm_range__pins__int(__skparam__pin, __skparam__range); +} +void raspi_write(pins pin, pin_values value) { + int __skparam__pin = __skadapter__to_int(pin); + int __skparam__value = __skadapter__to_int(value); + __sklib__raspi_write__pins__pin_values(__skparam__pin, __skparam__value); +} void draw_quad(color clr, const quad &q) { __sklib_color __skparam__clr = __skadapter__to_sklib_color(clr); const __sklib_quad __skparam__q = __skadapter__to_sklib_quad(q); @@ -5089,24 +5139,6 @@ vector_2d vector_from_to(sprite s1, sprite s2) { __sklib_vector_2d __skreturn = __sklib__vector_from_to__sprite__sprite(__skparam__s1, __skparam__s2); return __skadapter__to_vector_2d(__skreturn); } -void activate_advanced_terminal() { - __sklib__activate_advanced_terminal(); -} -bool advanced_terminal_active() { - int __skreturn = __sklib__advanced_terminal_active(); - return __skadapter__to_bool(__skreturn); -} -void clear_terminal() { - __sklib__clear_terminal(); -} -void end_advanced_terminal() { - __sklib__end_advanced_terminal(); -} -void move_cursor_to(int x, int y) { - int __skparam__x = __skadapter__to_int(x); - int __skparam__y = __skadapter__to_int(y); - __sklib__move_cursor_to__int__int(__skparam__x, __skparam__y); -} char read_char() { char __skreturn = __sklib__read_char(); return __skadapter__to_char(__skreturn); @@ -5115,30 +5147,6 @@ string read_line() { __sklib_string __skreturn = __sklib__read_line(); return __skadapter__to_string(__skreturn); } -void refresh_terminal() { - __sklib__refresh_terminal(); -} -void set_terminal_bold(bool value) { - int __skparam__value = __skadapter__to_int(value); - __sklib__set_terminal_bold__bool(__skparam__value); -} -void set_terminal_colors(color foreground, color background) { - __sklib_color __skparam__foreground = __skadapter__to_sklib_color(foreground); - __sklib_color __skparam__background = __skadapter__to_sklib_color(background); - __sklib__set_terminal_colors__color__color(__skparam__foreground, __skparam__background); -} -void set_terminal_echo_input(bool value) { - int __skparam__value = __skadapter__to_int(value); - __sklib__set_terminal_echo_input__bool(__skparam__value); -} -int terminal_height() { - int __skreturn = __sklib__terminal_height(); - return __skadapter__to_int(__skreturn); -} -int terminal_width() { - int __skreturn = __sklib__terminal_width(); - return __skadapter__to_int(__skreturn); -} void write(char data) { char __skparam__data = __skadapter__to_char(data); __sklib__write__char(__skparam__data); @@ -5156,13 +5164,6 @@ void write(string text) { __sklib__write__string(__skparam__text); __skadapter__free__sklib_string(__skparam__text); } -void write_at(string text, int x, int y) { - __sklib_string __skparam__text = __skadapter__to_sklib_string(text); - int __skparam__x = __skadapter__to_int(x); - int __skparam__y = __skadapter__to_int(y); - __sklib__write_at__string__int__int(__skparam__text, __skparam__x, __skparam__y); - __skadapter__free__sklib_string(__skparam__text); -} void write_line(char data) { char __skparam__data = __skadapter__to_char(data); __sklib__write_line__char(__skparam__data); diff --git a/generated/cpp/splashkit.h b/generated/cpp/splashkit.h index c907249f..ce78318f 100644 --- a/generated/cpp/splashkit.h +++ b/generated/cpp/splashkit.h @@ -33,6 +33,7 @@ #include "point_geometry.h" #include "quad_geometry.h" #include "random.h" +#include "raspi_gpio.h" #include "rectangle_drawing.h" #include "rectangle_geometry.h" #include "resources.h" diff --git a/generated/cpp/terminal.h b/generated/cpp/terminal.h index c21013c5..0b38a6be 100644 --- a/generated/cpp/terminal.h +++ b/generated/cpp/terminal.h @@ -6,31 +6,18 @@ #ifndef __terminal_h #define __terminal_h -#include "types.h" #include #include #include using std::string; using std::vector; -void activate_advanced_terminal(); -bool advanced_terminal_active(); -void clear_terminal(); -void end_advanced_terminal(); -void move_cursor_to(int x, int y); char read_char(); string read_line(); -void refresh_terminal(); -void set_terminal_bold(bool value); -void set_terminal_colors(color foreground, color background); -void set_terminal_echo_input(bool value); -int terminal_height(); -int terminal_width(); void write(char data); void write(double data); void write(int data); void write(string text); -void write_at(string text, int x, int y); void write_line(char data); void write_line(); void write_line(double data); diff --git a/generated/cpp/types.h b/generated/cpp/types.h index b2d2b8f4..a3ad7464 100644 --- a/generated/cpp/types.h +++ b/generated/cpp/types.h @@ -51,6 +51,69 @@ typedef enum { HTTP_STATUS_NOT_IMPLEMENTED = 501, HTTP_STATUS_SERVICE_UNAVAILABLE = 503 } http_status_code; +typedef enum { + GPIO_INPUT = 0, + GPIO_OUTPUT = 1, + GPIO_ALT0 = 4, + GPIO_ALT1 = 5, + GPIO_ALT2 = 6, + GPIO_ALT3 = 7, + GPIO_ALT4 = 3, + GPIO_ALT5 = 2, + GPIO_DEFAULT_MODE = 1 +} pin_modes; +typedef enum { + GPIO_LOW = 0, + GPIO_HIGH = 1, + GPIO_DEFAULT_VALUE = 1 +} pin_values; +typedef enum { + PIN_1 = 1, + PIN_2 = 2, + PIN_3 = 3, + PIN_4 = 4, + PIN_5 = 5, + PIN_6 = 6, + PIN_7 = 7, + PIN_8 = 8, + PIN_9 = 9, + PIN_10 = 10, + PIN_11 = 11, + PIN_12 = 12, + PIN_13 = 13, + PIN_14 = 14, + PIN_15 = 15, + PIN_16 = 16, + PIN_17 = 17, + PIN_18 = 18, + PIN_19 = 19, + PIN_20 = 20, + PIN_21 = 21, + PIN_22 = 22, + PIN_23 = 23, + PIN_24 = 24, + PIN_25 = 25, + PIN_26 = 26, + PIN_27 = 27, + PIN_28 = 28, + PIN_29 = 29, + PIN_30 = 30, + PIN_31 = 31, + PIN_32 = 32, + PIN_33 = 33, + PIN_34 = 34, + PIN_35 = 35, + PIN_36 = 36, + PIN_37 = 37, + PIN_38 = 38, + PIN_39 = 39, + PIN_40 = 40 +} pins; +typedef enum { + PUD_OFF = 0, + PUD_DOWN = 1, + PUD_UP = 2 +} pull_up_down; typedef struct { double x; double y; diff --git a/generated/csharp/SplashKit.cs b/generated/csharp/SplashKit.cs index d9073c33..3edc6ba3 100644 --- a/generated/csharp/SplashKit.cs +++ b/generated/csharp/SplashKit.cs @@ -118,6 +118,26 @@ public static class SplashKit [MethodImpl(MethodImplOptions.AggressiveInlining)] private static HttpStatusCode __skadapter__to_http_status_code(int v) { return (HttpStatusCode)v; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static int __skadapter__to_sklib_pin_modes(PinModes v) { return (int)v; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static PinModes __skadapter__to_pin_modes(int v) { return (PinModes)v; } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static int __skadapter__to_sklib_pin_values(PinValues v) { return (int)v; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static PinValues __skadapter__to_pin_values(int v) { return (PinValues)v; } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static int __skadapter__to_sklib_pins(Pins v) { return (int)v; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static Pins __skadapter__to_pins(int v) { return (Pins)v; } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static int __skadapter__to_sklib_pull_up_down(PullUpDown v) { return (int)v; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static PullUpDown __skadapter__to_pull_up_down(int v) { return (PullUpDown)v; } + [MethodImpl(MethodImplOptions.AggressiveInlining)] private static int __skadapter__to_sklib_http_method(HttpMethod v) { return (int)v; } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -3101,6 +3121,39 @@ private static void __skadapter__update_from_vector_bool(ref __sklib_vector_bool [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__rnd__int", CharSet=CharSet.Ansi)] private static extern int __sklib__rnd__int(int ubound); + [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__has_gpio", CharSet=CharSet.Ansi)] + private static extern int __sklib__has_gpio(); + + [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__raspi_cleanup", CharSet=CharSet.Ansi)] + private static extern void __sklib__raspi_cleanup(); + + [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__raspi_get_mode__pins", CharSet=CharSet.Ansi)] + private static extern int __sklib__raspi_get_mode__pins(int pin); + + [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__raspi_init", CharSet=CharSet.Ansi)] + private static extern void __sklib__raspi_init(); + + [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__raspi_read__pins", CharSet=CharSet.Ansi)] + private static extern int __sklib__raspi_read__pins(int pin); + + [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__raspi_set_mode__pins__pin_modes", CharSet=CharSet.Ansi)] + private static extern void __sklib__raspi_set_mode__pins__pin_modes(int pin, int mode); + + [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__raspi_set_pull_up_down__pins__pull_up_down", CharSet=CharSet.Ansi)] + private static extern void __sklib__raspi_set_pull_up_down__pins__pull_up_down(int pin, int pud); + + [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__raspi_set_pwm_dutycycle__pins__int", CharSet=CharSet.Ansi)] + private static extern void __sklib__raspi_set_pwm_dutycycle__pins__int(int pin, int dutycycle); + + [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__raspi_set_pwm_frequency__pins__int", CharSet=CharSet.Ansi)] + private static extern void __sklib__raspi_set_pwm_frequency__pins__int(int pin, int frequency); + + [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__raspi_set_pwm_range__pins__int", CharSet=CharSet.Ansi)] + private static extern void __sklib__raspi_set_pwm_range__pins__int(int pin, int range); + + [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__raspi_write__pins__pin_values", CharSet=CharSet.Ansi)] + private static extern void __sklib__raspi_write__pins__pin_values(int pin, int value); + [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__draw_quad__color__quad_ref", CharSet=CharSet.Ansi)] private static extern void __sklib__draw_quad__color__quad_ref(__sklib_color clr, __sklib_quad q); @@ -3752,45 +3805,12 @@ private static void __skadapter__update_from_vector_bool(ref __sklib_vector_bool [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__vector_from_to__sprite__sprite", CharSet=CharSet.Ansi)] private static extern __sklib_vector_2d __sklib__vector_from_to__sprite__sprite(__sklib_ptr s1, __sklib_ptr s2); - [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__activate_advanced_terminal", CharSet=CharSet.Ansi)] - private static extern void __sklib__activate_advanced_terminal(); - - [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__advanced_terminal_active", CharSet=CharSet.Ansi)] - private static extern int __sklib__advanced_terminal_active(); - - [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__clear_terminal", CharSet=CharSet.Ansi)] - private static extern void __sklib__clear_terminal(); - - [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__end_advanced_terminal", CharSet=CharSet.Ansi)] - private static extern void __sklib__end_advanced_terminal(); - - [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__move_cursor_to__int__int", CharSet=CharSet.Ansi)] - private static extern void __sklib__move_cursor_to__int__int(int x, int y); - [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__read_char", CharSet=CharSet.Ansi)] private static extern char __sklib__read_char(); [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__read_line", CharSet=CharSet.Ansi)] private static extern __sklib_string __sklib__read_line(); - [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__refresh_terminal", CharSet=CharSet.Ansi)] - private static extern void __sklib__refresh_terminal(); - - [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__set_terminal_bold__bool", CharSet=CharSet.Ansi)] - private static extern void __sklib__set_terminal_bold__bool(int value); - - [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__set_terminal_colors__color__color", CharSet=CharSet.Ansi)] - private static extern void __sklib__set_terminal_colors__color__color(__sklib_color foreground, __sklib_color background); - - [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__set_terminal_echo_input__bool", CharSet=CharSet.Ansi)] - private static extern void __sklib__set_terminal_echo_input__bool(int value); - - [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__terminal_height", CharSet=CharSet.Ansi)] - private static extern int __sklib__terminal_height(); - - [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__terminal_width", CharSet=CharSet.Ansi)] - private static extern int __sklib__terminal_width(); - [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__write__char", CharSet=CharSet.Ansi)] private static extern void __sklib__write__char(char data); @@ -3803,9 +3823,6 @@ private static void __skadapter__update_from_vector_bool(ref __sklib_vector_bool [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__write__string", CharSet=CharSet.Ansi)] private static extern void __sklib__write__string(__sklib_string text); - [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__write_at__string__int__int", CharSet=CharSet.Ansi)] - private static extern void __sklib__write_at__string__int__int(__sklib_string text, int x, int y); - [DllImport("splashkit.dll", CallingConvention=CallingConvention.Cdecl, EntryPoint="__sklib__write_line__char", CharSet=CharSet.Ansi)] private static extern void __sklib__write_line__char(char data); @@ -10656,6 +10673,84 @@ public static int Rnd(int ubound) __skreturn = __sklib__rnd__int(__skparam__ubound); return __skadapter__to_int(__skreturn); } + public static bool HasGpio() + { + int __skreturn; + __skreturn = __sklib__has_gpio(); + return __skadapter__to_bool(__skreturn); + } + public static void RaspiCleanup() + { + __sklib__raspi_cleanup(); + } + public static PinModes RaspiGetMode(Pins pin) + { + int __skparam__pin; + int __skreturn; + __skparam__pin = __skadapter__to_sklib_pins(pin); + __skreturn = __sklib__raspi_get_mode__pins(__skparam__pin); + return __skadapter__to_pin_modes(__skreturn); + } + public static void RaspiInit() + { + __sklib__raspi_init(); + } + public static PinValues RaspiRead(Pins pin) + { + int __skparam__pin; + int __skreturn; + __skparam__pin = __skadapter__to_sklib_pins(pin); + __skreturn = __sklib__raspi_read__pins(__skparam__pin); + return __skadapter__to_pin_values(__skreturn); + } + public static void RaspiSetMode(Pins pin, PinModes mode) + { + int __skparam__pin; + int __skparam__mode; + __skparam__pin = __skadapter__to_sklib_pins(pin); + __skparam__mode = __skadapter__to_sklib_pin_modes(mode); + __sklib__raspi_set_mode__pins__pin_modes(__skparam__pin, __skparam__mode); + } + public static void RaspiSetPullUpDown(Pins pin, PullUpDown pud) + { + int __skparam__pin; + int __skparam__pud; + __skparam__pin = __skadapter__to_sklib_pins(pin); + __skparam__pud = __skadapter__to_sklib_pull_up_down(pud); + __sklib__raspi_set_pull_up_down__pins__pull_up_down(__skparam__pin, __skparam__pud); + } + public static void RaspiSetPwmDutycycle(Pins pin, int dutycycle) + { + int __skparam__pin; + int __skparam__dutycycle; + __skparam__pin = __skadapter__to_sklib_pins(pin); + __skparam__dutycycle = __skadapter__to_sklib_int(dutycycle); + __sklib__raspi_set_pwm_dutycycle__pins__int(__skparam__pin, __skparam__dutycycle); + } + public static void RaspiSetPwmFrequency(Pins pin, int frequency) + { + int __skparam__pin; + int __skparam__frequency; + __skparam__pin = __skadapter__to_sklib_pins(pin); + __skparam__frequency = __skadapter__to_sklib_int(frequency); + __sklib__raspi_set_pwm_frequency__pins__int(__skparam__pin, __skparam__frequency); + } + public static void RaspiSetPwmRange(Pins pin, int range) + { + int __skparam__pin; + int __skparam__range; + __skparam__pin = __skadapter__to_sklib_pins(pin); + __skparam__range = __skadapter__to_sklib_int(range); + __sklib__raspi_set_pwm_range__pins__int(__skparam__pin, __skparam__range); + } + public static void RaspiWrite(Pins pin, PinValues value) + { + int __skparam__pin; + int __skparam__value; + __skparam__pin = __skadapter__to_sklib_pins(pin); + __skparam__value = __skadapter__to_sklib_pin_values(value); + __sklib__raspi_write__pins__pin_values(__skparam__pin, __skparam__value); + } public static void DrawQuad(Color clr, Quad q) { __sklib_color __skparam__clr; @@ -12649,32 +12744,6 @@ public static Vector2D VectorFromTo(Sprite s1, Sprite s2) __skreturn = __sklib__vector_from_to__sprite__sprite(__skparam__s1, __skparam__s2); return __skadapter__to_vector_2d(__skreturn); } - public static void ActivateAdvancedTerminal() - { - __sklib__activate_advanced_terminal(); - } - public static bool AdvancedTerminalActive() - { - int __skreturn; - __skreturn = __sklib__advanced_terminal_active(); - return __skadapter__to_bool(__skreturn); - } - public static void ClearTerminal() - { - __sklib__clear_terminal(); - } - public static void EndAdvancedTerminal() - { - __sklib__end_advanced_terminal(); - } - public static void MoveCursorTo(int x, int y) - { - int __skparam__x; - int __skparam__y; - __skparam__x = __skadapter__to_sklib_int(x); - __skparam__y = __skadapter__to_sklib_int(y); - __sklib__move_cursor_to__int__int(__skparam__x, __skparam__y); - } public static char ReadChar() { char __skreturn; @@ -12687,42 +12756,6 @@ public static string ReadLine() __skreturn = __sklib__read_line(); return __skadapter__to_string(__skreturn); } - public static void RefreshTerminal() - { - __sklib__refresh_terminal(); - } - public static void SetTerminalBold(bool value) - { - int __skparam__value; - __skparam__value = __skadapter__to_sklib_bool(value); - __sklib__set_terminal_bold__bool(__skparam__value); - } - public static void SetTerminalColors(Color foreground, Color background) - { - __sklib_color __skparam__foreground; - __sklib_color __skparam__background; - __skparam__foreground = __skadapter__to_sklib_color(foreground); - __skparam__background = __skadapter__to_sklib_color(background); - __sklib__set_terminal_colors__color__color(__skparam__foreground, __skparam__background); - } - public static void SetTerminalEchoInput(bool value) - { - int __skparam__value; - __skparam__value = __skadapter__to_sklib_bool(value); - __sklib__set_terminal_echo_input__bool(__skparam__value); - } - public static int TerminalHeight() - { - int __skreturn; - __skreturn = __sklib__terminal_height(); - return __skadapter__to_int(__skreturn); - } - public static int TerminalWidth() - { - int __skreturn; - __skreturn = __sklib__terminal_width(); - return __skadapter__to_int(__skreturn); - } public static void Write(char data) { char __skparam__data; @@ -12748,17 +12781,6 @@ public static void Write(string text) __sklib__write__string(__skparam__text); __skadapter__free__sklib_string(ref __skparam__text); } - public static void WriteAt(string text, int x, int y) - { - __sklib_string __skparam__text; - int __skparam__x; - int __skparam__y; - __skparam__text = __skadapter__to_sklib_string(text); - __skparam__x = __skadapter__to_sklib_int(x); - __skparam__y = __skadapter__to_sklib_int(y); - __sklib__write_at__string__int__int(__skparam__text, __skparam__x, __skparam__y); - __skadapter__free__sklib_string(ref __skparam__text); - } public static void WriteLine(char data) { char __skparam__data; @@ -15341,6 +15363,73 @@ public enum HttpStatusCode HttpStatusNotImplemented = 501, HttpStatusServiceUnavailable = 503 } + public enum PinModes + { + GpioInput = 0, + GpioOutput = 1, + GpioAlt0 = 4, + GpioAlt1 = 5, + GpioAlt2 = 6, + GpioAlt3 = 7, + GpioAlt4 = 3, + GpioAlt5 = 2, + GpioDefaultMode = 1 + } + public enum PinValues + { + GpioLow = 0, + GpioHigh = 1, + GpioDefaultValue = 1 + } + public enum Pins + { + Pin1 = 1, + Pin2 = 2, + Pin3 = 3, + Pin4 = 4, + Pin5 = 5, + Pin6 = 6, + Pin7 = 7, + Pin8 = 8, + Pin9 = 9, + Pin10 = 10, + Pin11 = 11, + Pin12 = 12, + Pin13 = 13, + Pin14 = 14, + Pin15 = 15, + Pin16 = 16, + Pin17 = 17, + Pin18 = 18, + Pin19 = 19, + Pin20 = 20, + Pin21 = 21, + Pin22 = 22, + Pin23 = 23, + Pin24 = 24, + Pin25 = 25, + Pin26 = 26, + Pin27 = 27, + Pin28 = 28, + Pin29 = 29, + Pin30 = 30, + Pin31 = 31, + Pin32 = 32, + Pin33 = 33, + Pin34 = 34, + Pin35 = 35, + Pin36 = 36, + Pin37 = 37, + Pin38 = 38, + Pin39 = 39, + Pin40 = 40 + } + public enum PullUpDown + { + PudOff = 0, + PudDown = 1, + PudUp = 2 + } public enum HttpMethod { HttpGetMethod, diff --git a/generated/docs/api.json b/generated/docs/api.json index 800107de..3810c586 100644 --- a/generated/docs/api.json +++ b/generated/docs/api.json @@ -61432,19 +61432,58 @@ ] }, - "resource_bundles": { - "brief": "SplashKit resource bundles allow you to quickly and easily load a\nnumber of resources in the `Resources` folder.", - "description": "Supports the loading and freeing of game resource bundles. Resource types\ninclude images, sounds, music and animation files to name a few. Resource\nfiles must be saved in specific locations of a `Resources` folder for\nyour game.", + "raspberry": { + "brief": "Splashkit allows you to read and write to the GPIO pins on the Raspberry Pi.", + "description": "", "functions": [ { - "signature": "void free_resource_bundle(const string name);", - "name": "free_resource_bundle", + "signature": "bool has_gpio();", + "name": "has_gpio", "method_name": null, - "unique_global_name": "free_resource_bundle", + "unique_global_name": "has_gpio", "unique_method_name": null, "suffix_name": null, - "description": "When you are finished with the resources in a bundle, you can free them all\nby calling this procedure. It will free the resource bundle and all of the\nassociated resources.", + "description": "Checks if the system has GPIO capabilities.", "brief": null, + "return": { + "type": "bool", + "description": "true if the system has GPIO capabilities, false otherwise.", + "is_pointer": false, + "is_reference": false, + "is_vector": false, + "type_parameter": null + }, + "parameters": { + }, + "attributes": { + "group": "raspberry", + "static": "raspberry" + }, + "signatures": { + "python": [ + "def has_gpio():" + ], + "pascal": [ + "function HasGpio(): Boolean" + ], + "csharp": [ + "public static bool Raspberry.HasGpio();", + "public static bool SplashKit.HasGpio();" + ], + "cpp": [ + "bool has_gpio()" + ] + } + }, + { + "signature": "void raspi_cleanup();", + "name": "raspi_cleanup", + "method_name": null, + "unique_global_name": "raspi_cleanup", + "unique_method_name": null, + "suffix_name": null, + "description": "This function should be called when you are finished using the GPIO library. It sets all pin modes to INPUT and values to LOW.", + "brief": "Cleans up and releases any resources used by the GPIO library.", "return": { "type": "void", "description": null, @@ -61454,64 +61493,51 @@ "type_parameter": null }, "parameters": { - "name": { - "type": "string", - "description": "The name of the resource bundle to be freed", - "is_pointer": false, - "is_const": true, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - } }, "attributes": { - "group": "resource_bundles", - "static": "resource_bundle" + "group": "raspberry", + "static": "raspberry" }, "signatures": { "python": [ - "def free_resource_bundle(name):" + "def raspi_cleanup():" ], "pascal": [ - "procedure FreeResourceBundle(name: String)" + "procedure RaspiCleanup()" ], "csharp": [ - "public static void ResourceBundle.FreeResourceBundle(string name);", - "public static void SplashKit.FreeResourceBundle(string name);" + "public static void Raspberry.RaspiCleanup();", + "public static void SplashKit.RaspiCleanup();" ], "cpp": [ - "void free_resource_bundle(const string name)" + "void raspi_cleanup()" ] } }, { - "signature": "bool has_resource_bundle(const string &name);", - "name": "has_resource_bundle", + "signature": "pin_modes raspi_get_mode(pins pin);", + "name": "raspi_get_mode", "method_name": null, - "unique_global_name": "has_resource_bundle", + "unique_global_name": "raspi_get_mode", "unique_method_name": null, "suffix_name": null, - "description": "Returns true when the named resource bundle has already been loaded.", - "brief": null, + "description": "This function retrieves the mode of the specified pin.", + "brief": "Gets the mode of the specified pin.", "return": { - "type": "bool", - "description": "True when the bundle is already loaded.", + "type": "pin_modes", + "description": "The mode of the pin.", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "name": { - "type": "string", - "description": "The name of the resource bundle.", + "pin": { + "type": "pins", + "description": "The pin to get the mode for.", "is_pointer": false, - "is_const": true, - "is_reference": true, + "is_const": false, + "is_reference": false, "is_array": false, "array_dimension_sizes": [ @@ -61521,34 +61547,34 @@ } }, "attributes": { - "group": "resource_bundles", - "static": "resource_bundle" + "group": "raspberry", + "static": "raspberry" }, "signatures": { "python": [ - "def has_resource_bundle(name):" + "def raspi_get_mode(pin):" ], "pascal": [ - "function HasResourceBundle(const name: String): Boolean" + "function RaspiGetMode(pin: Pins): PinModes" ], "csharp": [ - "public static bool ResourceBundle.HasResourceBundle(string name);", - "public static bool SplashKit.HasResourceBundle(string name);" + "public static PinModes Raspberry.RaspiGetMode(Pins pin);", + "public static PinModes SplashKit.RaspiGetMode(Pins pin);" ], "cpp": [ - "bool has_resource_bundle(const string &name)" + "pin_modes raspi_get_mode(pins pin)" ] } }, { - "signature": "void load_resource_bundle(const string &name,const string &filename);", - "name": "load_resource_bundle", + "signature": "void raspi_init();", + "name": "raspi_init", "method_name": null, - "unique_global_name": "load_resource_bundle", + "unique_global_name": "raspi_init", "unique_method_name": null, "suffix_name": null, - "description": "Loads all of the resources in the resource bundle. The resource bundle is a\ntext file that describes the resources you want to load. These rescources\nare then loaded when you call this procedure, and can all be released when\nyou call `release_resource_bundle`.\n\nSave the resource bundle text files into your projects `Resources` in the\n`bundles` folder. Use the following as the format for each of the\nresources.\n\nStart a line with a `//` to have it ignored when the bundle is loaded. This\ncan be used to add comments to your bundle.\n\n\n- To load an **animation** use the format:\n\n```\nANIM,name,filename\n```\n\nFor example, the following will load an animation named \"WalkingScript\" that\nloads the animation from \"kermit.txt\" in your games animation `Resources`.\n\n```\nANIM,WalkingScript,kermit.txt\n```\n\n- To load a **bitmap** use the format: \n\n```\nBMP,name,filename\n```\n\nFor example, the following will load a bitmap named \"Logo\" using the\n\"Logo.png\" file.\n\n```\nBITMAP,Logo,logo.png\n```\n\n- To load a **bitmap** that has a number of cells, you can extend the\nbitmap format with the cell details. This has the format:\n\n```\nBMP,name,filename,cell-width,cell-height,columns,rows,count\n```\n\nThe following will setup the \"Player\" bitmap to have cells that are 75\npixels wide, and 42 pixels height. There are 4 columns in 1 row, giving\na total of 4 cells.\n\n```\nBITMAP,Player,player.png,75,42,4,1,4\n```\n\n- To load a font use FONT,name,filename. For example, the following loads a\nfont named \"GameFont\" that represents the \"demolition.otf\".\n\n```\nFONT,GameFont,demolition.otf\n```\n\n- To load music, use MUSIC,name,filename. The following loads \"GameMusic\"\nfor the \"magical_night.ogg\" file.\n\n```\nMUSIC,GameMusic,magical_night.ogg\n```\n\n- To load a sound effect, use SOUND,name,filename. For example the following\nloads \"error\" from the \"error.wav\" file.\n\n```\nSOUND,error,error.wav\n```\n\n- To create a timer use TIMER,name. The following creates a timer named as\n\"my timer\".\n\n```\nTIMER,my timer\n```\n\n- You can also load another resource bundle using BUNDLE,name,filename.\nThe following loads \"another bundle\" from the \"another.txt\" file.\n\n```\nBUNDLE,another bundle,another.txt\n```", - "brief": null, + "description": "This function initializes the GPIO library for use. It should be called before any other GPIO functions.", + "brief": "Initializes the GPIO library.", "return": { "type": "void", "description": null, @@ -61558,93 +61584,49 @@ "type_parameter": null }, "parameters": { - "name": { - "type": "string", - "description": "The name of the bundle when it is loaded.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "filename": { - "type": "string", - "description": "The filename to load.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - } }, "attributes": { - "group": "resource_bundles", - "static": "resource_bundle" + "group": "raspberry", + "static": "raspberry" }, "signatures": { "python": [ - "def load_resource_bundle(name, filename):" + "def raspi_init():" ], "pascal": [ - "procedure LoadResourceBundle(const name: String; const filename: String)" + "procedure RaspiInit()" ], "csharp": [ - "public static void ResourceBundle.LoadResourceBundle(string name, string filename);", - "public static void SplashKit.LoadResourceBundle(string name, string filename);" + "public static void Raspberry.RaspiInit();", + "public static void SplashKit.RaspiInit();" ], "cpp": [ - "void load_resource_bundle(const string &name, const string &filename)" + "void raspi_init()" ] } - } - ], - "typedefs": [ - - ], - "structs": [ - - ], - "enums": [ - - ], - "defines": [ - - ] - }, - "resources": { - "brief": "SplashKit resource functions allow you to locate resources in a\nproject's `Resources` folder.", - "description": "", - "functions": [ + }, { - "signature": "void deregister_free_notifier(free_notifier *handler);", - "name": "deregister_free_notifier", + "signature": "pin_values raspi_read(pins pin);", + "name": "raspi_read", "method_name": null, - "unique_global_name": "deregister_free_notifier", + "unique_global_name": "raspi_read", "unique_method_name": null, "suffix_name": null, - "description": "Remove the function from the list of functions receiving notification\nof resource freeing.", - "brief": null, + "description": "This function reads the value from the specified pin.", + "brief": "Reads the value from the specified pin.", "return": { - "type": "void", - "description": null, + "type": "pin_values", + "description": "The value read from the pin.", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "handler": { - "type": "free_notifier", - "description": "The function to remove", - "is_pointer": true, + "pin": { + "type": "pins", + "description": "The pin to read the value from.", + "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, @@ -61656,49 +61638,49 @@ } }, "attributes": { - "group": "resources", - "static": "resources" + "group": "raspberry", + "static": "raspberry" }, "signatures": { "python": [ - "def deregister_free_notifier(handler):" + "def raspi_read(pin):" ], "pascal": [ - "procedure DeregisterFreeNotifier(handler: FreeNotifier)" + "function RaspiRead(pin: Pins): PinValues" ], "csharp": [ - "public static void Resources.DeregisterFreeNotifier(FreeNotifier handler);", - "public static void SplashKit.DeregisterFreeNotifier(FreeNotifier handler);" + "public static PinValues Raspberry.RaspiRead(Pins pin);", + "public static PinValues SplashKit.RaspiRead(Pins pin);" ], "cpp": [ - "void deregister_free_notifier(free_notifier *handler)" + "pin_values raspi_read(pins pin)" ] } }, { - "signature": "string path_to_resource(const string &filename,resource_kind kind);", - "name": "path_to_resource", + "signature": "void raspi_set_mode(pins pin,pin_modes mode);", + "name": "raspi_set_mode", "method_name": null, - "unique_global_name": "path_to_resource", + "unique_global_name": "raspi_set_mode", "unique_method_name": null, "suffix_name": null, - "description": "Gets the path to a give file of a certain resource kind.", - "brief": null, + "description": "This function sets the mode of the specified pin to the specified mode.", + "brief": "Sets the mode of the specified pin.", "return": { - "type": "string", - "description": "The full path to the resource.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "filename": { - "type": "string", - "description": "The name of the file of the resource kind.", + "pin": { + "type": "pins", + "description": "The pin to set the mode for.", "is_pointer": false, - "is_const": true, - "is_reference": true, + "is_const": false, + "is_reference": false, "is_array": false, "array_dimension_sizes": [ @@ -61706,9 +61688,9 @@ "is_vector": false, "type_parameter": null }, - "kind": { - "type": "resource_kind", - "description": "The kind of resource you are loading.", + "mode": { + "type": "pin_modes", + "description": "The mode to set for the pin.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -61721,85 +61703,124 @@ } }, "attributes": { - "group": "resources", - "static": "resources" + "group": "raspberry", + "static": "raspberry" }, "signatures": { "python": [ - "def path_to_resource(filename, kind):" + "def raspi_set_mode(pin, mode):" ], "pascal": [ - "function PathToResource(const filename: String; kind: ResourceKind): String" + "procedure RaspiSetMode(pin: Pins; mode: PinModes)" ], "csharp": [ - "public static string Resources.PathToResource(string filename, ResourceKind kind);", - "public static string SplashKit.PathToResource(string filename, ResourceKind kind);" + "public static void Raspberry.RaspiSetMode(Pins pin, PinModes mode);", + "public static void SplashKit.RaspiSetMode(Pins pin, PinModes mode);" ], "cpp": [ - "string path_to_resource(const string &filename, resource_kind kind)" + "void raspi_set_mode(pins pin, pin_modes mode)" ] } }, { - "signature": "string path_to_resources();", - "name": "path_to_resources", + "signature": "void raspi_set_pull_up_down(pins pin,pull_up_down pud);", + "name": "raspi_set_pull_up_down", "method_name": null, - "unique_global_name": "path_to_resources", + "unique_global_name": "raspi_set_pull_up_down", "unique_method_name": null, "suffix_name": null, - "description": "Returns the path to the resources folder for the SplashKit program. This\nwill be auto detected at startup, but can be changed using\n`set_resources_path`.", - "brief": null, + "description": "This function sets the pull-up/down mode for the specified pin.", + "brief": "Sets the pull up/down mode for the specified pin.", "return": { - "type": "string", - "description": "Path to SplashKit Resources folder.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { + "pin": { + "type": "pins", + "description": "The pin to set the pull up/down mode for.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "pud": { + "type": "pull_up_down", + "description": "The pull up/down mode to set for the pin.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } }, "attributes": { - "group": "resources", - "static": "resources" + "group": "raspberry", + "static": "raspberry" }, "signatures": { "python": [ - "def path_to_resources():" + "def raspi_set_pull_up_down(pin, pud):" ], "pascal": [ - "function PathToResources(): String" + "procedure RaspiSetPullUpDown(pin: Pins; pud: PullUpDown)" ], "csharp": [ - "public static string Resources.PathToResources();", - "public static string SplashKit.PathToResources();" + "public static void Raspberry.RaspiSetPullUpDown(Pins pin, PullUpDown pud);", + "public static void SplashKit.RaspiSetPullUpDown(Pins pin, PullUpDown pud);" ], "cpp": [ - "string path_to_resources()" + "void raspi_set_pull_up_down(pins pin, pull_up_down pud)" ] } }, { - "signature": "string path_to_resources(resource_kind kind);", - "name": "path_to_resources", + "signature": "void raspi_set_pwm_dutycycle(pins pin,int dutycycle);", + "name": "raspi_set_pwm_dutycycle", "method_name": null, - "unique_global_name": "path_to_resources_for_kind", + "unique_global_name": "raspi_set_pwm_dutycycle", "unique_method_name": null, "suffix_name": null, - "description": "Returns the path to the folder containing a given resource kind. This is\nthe path SplashkKit will search when you load a resource.", - "brief": null, + "description": "This function sets the PWM duty cycle for the specified pin.", + "brief": "Sets the PWM duty cycle for the specified pin.", "return": { - "type": "string", - "description": "The path to the folder containing this kind of resource.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "kind": { - "type": "resource_kind", - "description": "The type of resource you want the path for.", + "pin": { + "type": "pins", + "description": "The pin to set the PWM duty cycle for.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "dutycycle": { + "type": "int", + "description": "The PWM duty cycle to set for the pin.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -61812,35 +61833,34 @@ } }, "attributes": { - "suffix": "for_kind", - "group": "resources", - "static": "resources" + "group": "raspberry", + "static": "raspberry" }, "signatures": { "python": [ - "def path_to_resources_for_kind(kind):" + "def raspi_set_pwm_dutycycle(pin, dutycycle):" ], "pascal": [ - "function PathToResources(kind: ResourceKind): String" + "procedure RaspiSetPwmDutycycle(pin: Pins; dutycycle: Integer)" ], "csharp": [ - "public static string Resources.PathToResources(ResourceKind kind);", - "public static string SplashKit.PathToResources(ResourceKind kind);" + "public static void Raspberry.RaspiSetPwmDutycycle(Pins pin, int dutycycle);", + "public static void SplashKit.RaspiSetPwmDutycycle(Pins pin, int dutycycle);" ], "cpp": [ - "string path_to_resources(resource_kind kind)" + "void raspi_set_pwm_dutycycle(pins pin, int dutycycle)" ] } }, { - "signature": "void register_free_notifier(free_notifier *fn);", - "name": "register_free_notifier", + "signature": "void raspi_set_pwm_frequency(pins pin,int frequency);", + "name": "raspi_set_pwm_frequency", "method_name": null, - "unique_global_name": "register_free_notifier", + "unique_global_name": "raspi_set_pwm_frequency", "unique_method_name": null, "suffix_name": null, - "description": "Register a function to be called when any resource is freed.", - "brief": null, + "description": "This function sets the PWM frequency for the specified pin.", + "brief": "Sets the PWM frequency for the specified pin.", "return": { "type": "void", "description": null, @@ -61850,10 +61870,23 @@ "type_parameter": null }, "parameters": { - "fn": { - "type": "free_notifier", - "description": "The function to be called when a resource is freed.", - "is_pointer": true, + "pin": { + "type": "pins", + "description": "The pin to set the PWM frequency for.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "frequency": { + "type": "int", + "description": "The PWM frequency to set for the pin.", + "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, @@ -61865,34 +61898,34 @@ } }, "attributes": { - "group": "resources", - "static": "resources" + "group": "raspberry", + "static": "raspberry" }, "signatures": { "python": [ - "def register_free_notifier(fn):" + "def raspi_set_pwm_frequency(pin, frequency):" ], "pascal": [ - "procedure RegisterFreeNotifier(fn: FreeNotifier)" + "procedure RaspiSetPwmFrequency(pin: Pins; frequency: Integer)" ], "csharp": [ - "public static void Resources.RegisterFreeNotifier(FreeNotifier fn);", - "public static void SplashKit.RegisterFreeNotifier(FreeNotifier fn);" + "public static void Raspberry.RaspiSetPwmFrequency(Pins pin, int frequency);", + "public static void SplashKit.RaspiSetPwmFrequency(Pins pin, int frequency);" ], "cpp": [ - "void register_free_notifier(free_notifier *fn)" + "void raspi_set_pwm_frequency(pins pin, int frequency)" ] } }, { - "signature": "void set_resources_path(const string &path);", - "name": "set_resources_path", + "signature": "void raspi_set_pwm_range(pins pin,int range);", + "name": "raspi_set_pwm_range", "method_name": null, - "unique_global_name": "set_resources_path", + "unique_global_name": "raspi_set_pwm_range", "unique_method_name": null, "suffix_name": null, - "description": "Sets the path to the SplashKit resources folder. Resource paths are then\nlocated within this folder.", - "brief": null, + "description": "This function sets the PWM range for the specified pin.", + "brief": "Sets the PWM range for the specified pin.", "return": { "type": "void", "description": null, @@ -61902,12 +61935,25 @@ "type_parameter": null }, "parameters": { - "path": { - "type": "string", - "description": "The file path to the SplashKit Resources folder.", + "pin": { + "type": "pins", + "description": "The pin to set the PWM range for.", "is_pointer": false, - "is_const": true, - "is_reference": true, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "range": { + "type": "int", + "description": "The PWM range to set for the pin.", + "is_pointer": false, + "is_const": false, + "is_reference": false, "is_array": false, "array_dimension_sizes": [ @@ -61917,37 +61963,34 @@ } }, "attributes": { - "group": "resources", - "static": "resources" + "group": "raspberry", + "static": "raspberry" }, "signatures": { "python": [ - "def set_resources_path(path):" + "def raspi_set_pwm_range(pin, range):" ], "pascal": [ - "procedure SetResourcesPath(const path: String)" + "procedure RaspiSetPwmRange(pin: Pins; range: Integer)" ], "csharp": [ - "public static void Resources.SetResourcesPath(string path);", - "public static void SplashKit.SetResourcesPath(string path);" + "public static void Raspberry.RaspiSetPwmRange(Pins pin, int range);", + "public static void SplashKit.RaspiSetPwmRange(Pins pin, int range);" ], "cpp": [ - "void set_resources_path(const string &path)" + "void raspi_set_pwm_range(pins pin, int range)" ] } - } - ], - "typedefs": [ + }, { - "signature": "typedef void (free_notifier)(void *pointer);", - "name": "free_notifier", - "description": "The free notifier can be registered with the system. It is called every\ntime a resource is freed.", - "brief": null, - "attributes": { - "group": "resources", - "static": "resources" - }, - "is_function_pointer": true, + "signature": "void raspi_write(pins pin,pin_values value);", + "name": "raspi_write", + "method_name": null, + "unique_global_name": "raspi_write", + "unique_method_name": null, + "suffix_name": null, + "description": "This function writes the specified value to the specified pin.", + "brief": "Writes a value to the specified pin.", "return": { "type": "void", "description": null, @@ -61957,10 +62000,23 @@ "type_parameter": null }, "parameters": { - "pointer": { - "type": "void", - "description": "The pointer to the resource that is being freed.", - "is_pointer": true, + "pin": { + "type": "pins", + "description": "The pin to write the value to.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "value": { + "type": "pin_values", + "description": "The value to write to the pin.", + "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, @@ -61970,72 +62026,53 @@ "is_vector": false, "type_parameter": null } + }, + "attributes": { + "group": "raspberry", + "static": "raspberry" + }, + "signatures": { + "python": [ + "def raspi_write(pin, value):" + ], + "pascal": [ + "procedure RaspiWrite(pin: Pins; value: PinValues)" + ], + "csharp": [ + "public static void Raspberry.RaspiWrite(Pins pin, PinValues value);", + "public static void SplashKit.RaspiWrite(Pins pin, PinValues value);" + ], + "cpp": [ + "void raspi_write(pins pin, pin_values value)" + ] } } + ], + "typedefs": [ + ], "structs": [ ], "enums": [ - { - "signature": "enum resource_kind {ANIMATION_RESOURCE,BUNDLE_RESOURCE,FONT_RESOURCE,IMAGE_RESOURCE,JSON_RESOURCE,MUSIC_RESOURCE,SERVER_RESOURCE,SOUND_RESOURCE,TIMER_RESOURCE,OTHER_RESOURCE};", - "name": "resource_kind", - "description": "SplashKit is able to manage a number of different kinds of resources\nfor you.", - "brief": null, - "constants": { - "ANIMATION_RESOURCE": { - "description": "Animation scripts are loaded as Animation\nresources. These are located in the projects\n`Resources/animations` folder." - }, - "BUNDLE_RESOURCE": { - "description": "Resource bundles contain lists of other\nresources. These are located in the projects\n`Resources/bundles` folder." - }, - "FONT_RESOURCE": { - "description": "Fonts resources are located in the\n`Resources/fonts` folder." - }, - "IMAGE_RESOURCE": { - "description": "Image resources are located in the\n`Resources/images` folder." - }, - "JSON_RESOURCE": { - "description": "JSON resources are located in the projects\n`Resources/json` folder." - }, - "MUSIC_RESOURCE": { - "description": "Music resources can be played as music, and\nlive in the program's `Resources/sounds`\nfolder." - }, - "SERVER_RESOURCE": { - "description": "Server resources that can be sent as responses\nto web server requests." - }, - "SOUND_RESOURCE": { - "description": "Sound resources can be played as sound\neffects, and live in the program's\n`Resources/sounds` folder." - }, - "TIMER_RESOURCE": { - "description": "Timer resources are not saved to file, but\ncan be created by SplashkKit resource\nbundles." - }, - "OTHER_RESOURCE": { - "description": "Other resources can be loaded, these will be\nlocated directly in these project's\n`Resources` folder." - } - }, - "attributes": { - "group": "resources", - "static": "resources" - } - } + ], "defines": [ ] }, - "sprites": { - "brief": "SplashKit Sprites allows you to create images you can easily\nmove and animate.", - "description": "SplashKit sprites are game elements that can be moved, and animated. Sprites\nare located at a position in the game, have a velocity, and an animation.\nThe sprite can also have arbitary data associated with it for game specific\npurposes.", + "resource_bundles": { + "brief": "SplashKit resource bundles allow you to quickly and easily load a\nnumber of resources in the `Resources` folder.", + "description": "Supports the loading and freeing of game resource bundles. Resource types\ninclude images, sounds, music and animation files to name a few. Resource\nfiles must be saved in specific locations of a `Resources` folder for\nyour game.", "functions": [ { - "signature": "void call_for_all_sprites(sprite_float_function *fn,float val);", - "name": "call_for_all_sprites", + "signature": "void free_resource_bundle(const string name);", + "name": "free_resource_bundle", "method_name": null, - "unique_global_name": "call_for_all_sprites_with_value", + "unique_global_name": "free_resource_bundle", "unique_method_name": null, "suffix_name": null, - "description": "Call the supplied function for all sprites in the current pack.", + "description": "When you are finished with the resources in a bundle, you can free them all\nby calling this procedure. It will free the resource bundle and all of the\nassociated resources.", "brief": null, "return": { "type": "void", @@ -62046,24 +62083,11 @@ "type_parameter": null }, "parameters": { - "fn": { - "type": "sprite_float_function", - "description": "The sprite function to call on all sprites.", - "is_pointer": true, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "val": { - "type": "float", - "description": "The value passed to the function for each sprite.", + "name": { + "type": "string", + "description": "The name of the resource bundle to be freed", "is_pointer": false, - "is_const": false, + "is_const": true, "is_reference": false, "is_array": false, "array_dimension_sizes": [ @@ -62074,50 +62098,49 @@ } }, "attributes": { - "suffix": "with_value", - "group": "sprites", - "static": "sprite" + "group": "resource_bundles", + "static": "resource_bundle" }, "signatures": { "python": [ - "def call_for_all_sprites_with_value(fn, val):" + "def free_resource_bundle(name):" ], "pascal": [ - "procedure CallForAllSprites(fn: SpriteFloatFunction; val: Single)" + "procedure FreeResourceBundle(name: String)" ], "csharp": [ - "public static void Sprite.CallForAllSprites(SpriteFloatFunction fn, float val);", - "public static void SplashKit.CallForAllSprites(SpriteFloatFunction fn, float val);" + "public static void ResourceBundle.FreeResourceBundle(string name);", + "public static void SplashKit.FreeResourceBundle(string name);" ], "cpp": [ - "void call_for_all_sprites(sprite_float_function *fn, float val)" + "void free_resource_bundle(const string name)" ] } }, { - "signature": "void call_for_all_sprites(sprite_function *fn);", - "name": "call_for_all_sprites", + "signature": "bool has_resource_bundle(const string &name);", + "name": "has_resource_bundle", "method_name": null, - "unique_global_name": "call_for_all_sprites", + "unique_global_name": "has_resource_bundle", "unique_method_name": null, "suffix_name": null, - "description": "Call the supplied function for all sprites in the current pack.", + "description": "Returns true when the named resource bundle has already been loaded.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "bool", + "description": "True when the bundle is already loaded.", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "fn": { - "type": "sprite_function", - "description": "The sprite function to call on all sprites.", - "is_pointer": true, - "is_const": false, - "is_reference": false, + "name": { + "type": "string", + "description": "The name of the resource bundle.", + "is_pointer": false, + "is_const": true, + "is_reference": true, "is_array": false, "array_dimension_sizes": [ @@ -62127,33 +62150,33 @@ } }, "attributes": { - "group": "sprites", - "static": "sprite" + "group": "resource_bundles", + "static": "resource_bundle" }, "signatures": { "python": [ - "def call_for_all_sprites(fn):" + "def has_resource_bundle(name):" ], "pascal": [ - "procedure CallForAllSprites(fn: SpriteFunction)" + "function HasResourceBundle(const name: String): Boolean" ], "csharp": [ - "public static void Sprite.CallForAllSprites(SpriteFunction fn);", - "public static void SplashKit.CallForAllSprites(SpriteFunction fn);" + "public static bool ResourceBundle.HasResourceBundle(string name);", + "public static bool SplashKit.HasResourceBundle(string name);" ], "cpp": [ - "void call_for_all_sprites(sprite_function *fn)" + "bool has_resource_bundle(const string &name)" ] } }, { - "signature": "void call_on_sprite_event(sprite_event_handler *handler);", - "name": "call_on_sprite_event", + "signature": "void load_resource_bundle(const string &name,const string &filename);", + "name": "load_resource_bundle", "method_name": null, - "unique_global_name": "call_on_sprite_event", + "unique_global_name": "load_resource_bundle", "unique_method_name": null, "suffix_name": null, - "description": "Register a procedure to be called when an events occur on any sprite.", + "description": "Loads all of the resources in the resource bundle. The resource bundle is a\ntext file that describes the resources you want to load. These rescources\nare then loaded when you call this procedure, and can all be released when\nyou call `release_resource_bundle`.\n\nSave the resource bundle text files into your projects `Resources` in the\n`bundles` folder. Use the following as the format for each of the\nresources.\n\nStart a line with a `//` to have it ignored when the bundle is loaded. This\ncan be used to add comments to your bundle.\n\n\n- To load an **animation** use the format:\n\n```\nANIM,name,filename\n```\n\nFor example, the following will load an animation named \"WalkingScript\" that\nloads the animation from \"kermit.txt\" in your games animation `Resources`.\n\n```\nANIM,WalkingScript,kermit.txt\n```\n\n- To load a **bitmap** use the format: \n\n```\nBMP,name,filename\n```\n\nFor example, the following will load a bitmap named \"Logo\" using the\n\"Logo.png\" file.\n\n```\nBITMAP,Logo,logo.png\n```\n\n- To load a **bitmap** that has a number of cells, you can extend the\nbitmap format with the cell details. This has the format:\n\n```\nBMP,name,filename,cell-width,cell-height,columns,rows,count\n```\n\nThe following will setup the \"Player\" bitmap to have cells that are 75\npixels wide, and 42 pixels height. There are 4 columns in 1 row, giving\na total of 4 cells.\n\n```\nBITMAP,Player,player.png,75,42,4,1,4\n```\n\n- To load a font use FONT,name,filename. For example, the following loads a\nfont named \"GameFont\" that represents the \"demolition.otf\".\n\n```\nFONT,GameFont,demolition.otf\n```\n\n- To load music, use MUSIC,name,filename. The following loads \"GameMusic\"\nfor the \"magical_night.ogg\" file.\n\n```\nMUSIC,GameMusic,magical_night.ogg\n```\n\n- To load a sound effect, use SOUND,name,filename. For example the following\nloads \"error\" from the \"error.wav\" file.\n\n```\nSOUND,error,error.wav\n```\n\n- To create a timer use TIMER,name. The following creates a timer named as\n\"my timer\".\n\n```\nTIMER,my timer\n```\n\n- You can also load another resource bundle using BUNDLE,name,filename.\nThe following loads \"another bundle\" from the \"another.txt\" file.\n\n```\nBUNDLE,another bundle,another.txt\n```", "brief": null, "return": { "type": "void", @@ -62164,64 +62187,25 @@ "type_parameter": null }, "parameters": { - "handler": { - "type": "sprite_event_handler", - "description": "The function to call when any sprite raises an event", - "is_pointer": true, - "is_const": false, - "is_reference": false, + "name": { + "type": "string", + "description": "The name of the bundle when it is loaded.", + "is_pointer": false, + "is_const": true, + "is_reference": true, "is_array": false, "array_dimension_sizes": [ ], "is_vector": false, "type_parameter": null - } - }, - "attributes": { - "group": "sprites", - "static": "sprite" - }, - "signatures": { - "python": [ - "def call_on_sprite_event(handler):" - ], - "pascal": [ - "procedure CallOnSpriteEvent(handler: SpriteEventHandler)" - ], - "csharp": [ - "public static void Sprite.CallOnSpriteEvent(SpriteEventHandler handler);", - "public static void SplashKit.CallOnSpriteEvent(SpriteEventHandler handler);" - ], - "cpp": [ - "void call_on_sprite_event(sprite_event_handler *handler)" - ] - } - }, - { - "signature": "point_2d center_point(sprite s);", - "name": "center_point", - "method_name": null, - "unique_global_name": "center_point", - "unique_method_name": null, - "suffix_name": null, - "description": "Returns the center point of the passed in sprite. This is based on the sprite's\nPosition, Width and Height.", - "brief": null, - "return": { - "type": "point_2d", - "description": "The center point of the sprite", - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { - "s": { - "type": "sprite", - "description": "The sprite to get the details from.", + }, + "filename": { + "type": "string", + "description": "The filename to load.", "is_pointer": false, - "is_const": false, - "is_reference": false, + "is_const": true, + "is_reference": true, "is_array": false, "array_dimension_sizes": [ @@ -62231,50 +62215,65 @@ } }, "attributes": { - "class": "sprite", - "getter": "center_point", - "group": "sprites", - "static": "sprite", - "self": "s" + "group": "resource_bundles", + "static": "resource_bundle" }, "signatures": { "python": [ - "def center_point(s):" + "def load_resource_bundle(name, filename):" ], "pascal": [ - "function CenterPoint(s: Sprite): Point2D" + "procedure LoadResourceBundle(const name: String; const filename: String)" ], "csharp": [ - "public Point2D Sprite.CenterPoint { get }", - "public static Point2D SplashKit.CenterPoint(Sprite s);" + "public static void ResourceBundle.LoadResourceBundle(string name, string filename);", + "public static void SplashKit.LoadResourceBundle(string name, string filename);" ], "cpp": [ - "point_2d center_point(sprite s)" + "void load_resource_bundle(const string &name, const string &filename)" ] } - }, + } + ], + "typedefs": [ + + ], + "structs": [ + + ], + "enums": [ + + ], + "defines": [ + + ] + }, + "resources": { + "brief": "SplashKit resource functions allow you to locate resources in a\nproject's `Resources` folder.", + "description": "", + "functions": [ { - "signature": "sprite create_sprite(bitmap layer);", - "name": "create_sprite", + "signature": "void deregister_free_notifier(free_notifier *handler);", + "name": "deregister_free_notifier", "method_name": null, - "unique_global_name": "create_sprite", + "unique_global_name": "deregister_free_notifier", "unique_method_name": null, "suffix_name": null, - "description": "Creates a sprite for the passed in bitmap image. The sprite will use the\ncell information within the bitmap if it is animated at a later stage.\n\nThis version of create_sprite will initialise the sprite to use\npixel level collisions, no animations, and have one layer named 'layer1'.\nThis version of the constructor will assign a default name to the sprite\nfor resource management purposes.", + "description": "Remove the function from the list of functions receiving notification\nof resource freeing.", "brief": null, "return": { - "type": "sprite", - "description": "The new sprite with image.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "layer": { - "type": "bitmap", - "description": "The bitmap for the sprite's image.", - "is_pointer": false, + "handler": { + "type": "free_notifier", + "description": "The function to remove", + "is_pointer": true, "is_const": false, "is_reference": false, "is_array": false, @@ -62286,51 +62285,49 @@ } }, "attributes": { - "class": "sprite", - "constructor": true, - "group": "sprites", - "static": "sprite" + "group": "resources", + "static": "resources" }, "signatures": { "python": [ - "def create_sprite(layer):" + "def deregister_free_notifier(handler):" ], "pascal": [ - "function CreateSprite(layer: Bitmap): Sprite" + "procedure DeregisterFreeNotifier(handler: FreeNotifier)" ], "csharp": [ - "public static Sprite SplashKit.CreateSprite(Bitmap layer);", - "public Sprite(Bitmap layer);" + "public static void Resources.DeregisterFreeNotifier(FreeNotifier handler);", + "public static void SplashKit.DeregisterFreeNotifier(FreeNotifier handler);" ], "cpp": [ - "sprite create_sprite(bitmap layer)" + "void deregister_free_notifier(free_notifier *handler)" ] } }, { - "signature": "sprite create_sprite(bitmap layer,animation_script ani);", - "name": "create_sprite", + "signature": "string path_to_resource(const string &filename,resource_kind kind);", + "name": "path_to_resource", "method_name": null, - "unique_global_name": "create_sprite_with_animation", + "unique_global_name": "path_to_resource", "unique_method_name": null, "suffix_name": null, - "description": "Creates a sprite for the passed in bitmap image. The sprite will use the\ncell information within the bitmap if it is animated at a later stage.\nThis version of `create_sprite` will initialise the sprite to use\npixel level collisions, the specified animation template, the layer have\nname 'layer1'.\n\nThis version of the constructor will assign a default name to the sprite\nfor resource management purposes.", + "description": "Gets the path to a give file of a certain resource kind.", "brief": null, "return": { - "type": "sprite", - "description": "The new sprite with image and animation script.", + "type": "string", + "description": "The full path to the resource.", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "layer": { - "type": "bitmap", - "description": "The bitmap for the sprite's image.", + "filename": { + "type": "string", + "description": "The name of the file of the resource kind.", "is_pointer": false, - "is_const": false, - "is_reference": false, + "is_const": true, + "is_reference": true, "is_array": false, "array_dimension_sizes": [ @@ -62338,9 +62335,9 @@ "is_vector": false, "type_parameter": null }, - "ani": { - "type": "animation_script", - "description": "The animation script for the sprite's animations.", + "kind": { + "type": "resource_kind", + "description": "The kind of resource you are loading.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -62353,117 +62350,85 @@ } }, "attributes": { - "class": "sprite", - "constructor": true, - "suffix": "with_animation", - "group": "sprites", - "static": "sprite" + "group": "resources", + "static": "resources" }, "signatures": { "python": [ - "def create_sprite_with_animation(layer, ani):" + "def path_to_resource(filename, kind):" ], "pascal": [ - "function CreateSprite(layer: Bitmap; ani: AnimationScript): Sprite" + "function PathToResource(const filename: String; kind: ResourceKind): String" ], "csharp": [ - "public static Sprite SplashKit.CreateSprite(Bitmap layer, AnimationScript ani);", - "public Sprite(Bitmap layer, AnimationScript ani);" + "public static string Resources.PathToResource(string filename, ResourceKind kind);", + "public static string SplashKit.PathToResource(string filename, ResourceKind kind);" ], "cpp": [ - "sprite create_sprite(bitmap layer, animation_script ani)" + "string path_to_resource(const string &filename, resource_kind kind)" ] } }, { - "signature": "sprite create_sprite(const string &bitmap_name);", - "name": "create_sprite", + "signature": "string path_to_resources();", + "name": "path_to_resources", "method_name": null, - "unique_global_name": "create_sprite_with_bitmap_named", + "unique_global_name": "path_to_resources", "unique_method_name": null, "suffix_name": null, - "description": "Creates a sprite for the passed in bitmap image. The sprite will use the\ncell information within the bitmap if it is animated at a later stage.\n\nThis version of create_sprite will initialise the sprite to use\npixel level collisions, no animations, and have one layer named 'layer1'.\nThis version of the constructor will assign a default name to the sprite\nfor resource management purposes.", + "description": "Returns the path to the resources folder for the SplashKit program. This\nwill be auto detected at startup, but can be changed using\n`set_resources_path`.", "brief": null, "return": { - "type": "sprite", - "description": "The new sprite with image.", + "type": "string", + "description": "Path to SplashKit Resources folder.", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "bitmap_name": { - "type": "string", - "description": "The name of the bitmap to use as the sprite's layer", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - } }, "attributes": { - "class": "sprite", - "constructor": true, - "suffix": "with_bitmap_named", - "group": "sprites", - "static": "sprite" + "group": "resources", + "static": "resources" }, "signatures": { "python": [ - "def create_sprite_with_bitmap_named(bitmap_name):" + "def path_to_resources():" ], "pascal": [ - "function CreateSprite(const bitmapName: String): Sprite" + "function PathToResources(): String" ], "csharp": [ - "public static Sprite SplashKit.CreateSprite(string bitmapName);", - "public Sprite(string bitmapName);" + "public static string Resources.PathToResources();", + "public static string SplashKit.PathToResources();" ], "cpp": [ - "sprite create_sprite(const string &bitmap_name)" + "string path_to_resources()" ] } }, { - "signature": "sprite create_sprite(const string &name,bitmap layer);", - "name": "create_sprite", + "signature": "string path_to_resources(resource_kind kind);", + "name": "path_to_resources", "method_name": null, - "unique_global_name": "create_sprite_named", + "unique_global_name": "path_to_resources_for_kind", "unique_method_name": null, "suffix_name": null, - "description": "Creates a sprite for the passed in bitmap image. The sprite will use the\ncell information within the sprite if it is animated at a later stage.\nThis version of create_sprite will initialise the sprite to use pixel level\ncollisions, no animation, the layer have name 'layer1'.", + "description": "Returns the path to the folder containing a given resource kind. This is\nthe path SplashkKit will search when you load a resource.", "brief": null, "return": { - "type": "sprite", - "description": "The new sprite with image and name.", + "type": "string", + "description": "The path to the folder containing this kind of resource.", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "name": { - "type": "string", - "description": "The name of the sprite for resource management.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "layer": { - "type": "bitmap", - "description": "The bitmap for the sprite's image.", + "kind": { + "type": "resource_kind", + "description": "The type of resource you want the path for.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -62476,76 +62441,48 @@ } }, "attributes": { - "class": "sprite", - "constructor": true, - "suffix": "named", - "group": "sprites", - "static": "sprite" + "suffix": "for_kind", + "group": "resources", + "static": "resources" }, "signatures": { "python": [ - "def create_sprite_named(name, layer):" + "def path_to_resources_for_kind(kind):" ], "pascal": [ - "function CreateSprite(const name: String; layer: Bitmap): Sprite" + "function PathToResources(kind: ResourceKind): String" ], "csharp": [ - "public static Sprite SplashKit.CreateSprite(string name, Bitmap layer);", - "public Sprite(string name, Bitmap layer);" + "public static string Resources.PathToResources(ResourceKind kind);", + "public static string SplashKit.PathToResources(ResourceKind kind);" ], "cpp": [ - "sprite create_sprite(const string &name, bitmap layer)" + "string path_to_resources(resource_kind kind)" ] } }, { - "signature": "sprite create_sprite(const string &name,bitmap layer,animation_script ani);", - "name": "create_sprite", + "signature": "void register_free_notifier(free_notifier *fn);", + "name": "register_free_notifier", "method_name": null, - "unique_global_name": "create_sprite_named_with_animation", + "unique_global_name": "register_free_notifier", "unique_method_name": null, "suffix_name": null, - "description": "Creates a sprite for the passed in bitmap image. The sprite will use the cell\ninformation within the sprite if it is animated at a later stage. This\nversion of create_sprite will initialise the sprite to use pixel level\ncollisions, the specified animation template, the layer have name 'layer1'.", + "description": "Register a function to be called when any resource is freed.", "brief": null, "return": { - "type": "sprite", - "description": "The new sprite with image, animation, and name.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "name": { - "type": "string", - "description": "The name of the sprite for resource management.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "layer": { - "type": "bitmap", - "description": "The bitmap for the sprite's image.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "ani": { - "type": "animation_script", - "description": "The animation script for the sprite's animations.", - "is_pointer": false, + "fn": { + "type": "free_notifier", + "description": "The function to be called when a resource is freed.", + "is_pointer": true, "is_const": false, "is_reference": false, "is_array": false, @@ -62557,62 +62494,46 @@ } }, "attributes": { - "class": "sprite", - "constructor": true, - "suffix": "named_with_animation", - "group": "sprites", - "static": "sprite" + "group": "resources", + "static": "resources" }, "signatures": { "python": [ - "def create_sprite_named_with_animation(name, layer, ani):" + "def register_free_notifier(fn):" ], "pascal": [ - "function CreateSprite(const name: String; layer: Bitmap; ani: AnimationScript): Sprite" + "procedure RegisterFreeNotifier(fn: FreeNotifier)" ], "csharp": [ - "public static Sprite SplashKit.CreateSprite(string name, Bitmap layer, AnimationScript ani);", - "public Sprite(string name, Bitmap layer, AnimationScript ani);" + "public static void Resources.RegisterFreeNotifier(FreeNotifier fn);", + "public static void SplashKit.RegisterFreeNotifier(FreeNotifier fn);" ], "cpp": [ - "sprite create_sprite(const string &name, bitmap layer, animation_script ani)" + "void register_free_notifier(free_notifier *fn)" ] } }, { - "signature": "sprite create_sprite(const string &bitmap_name,const string &animation_name);", - "name": "create_sprite", + "signature": "void set_resources_path(const string &path);", + "name": "set_resources_path", "method_name": null, - "unique_global_name": "create_sprite_with_bitmap_and_animation_named", + "unique_global_name": "set_resources_path", "unique_method_name": null, "suffix_name": null, - "description": "Creates a sprite. The bitmap_name is used to indicate the bitmap the sprite\nwill use, and the animation_name is used to indicate which animation_script\nto use.", + "description": "Sets the path to the SplashKit resources folder. Resource paths are then\nlocated within this folder.", "brief": null, "return": { - "type": "sprite", - "description": "The new sprite with the image and animation.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "bitmap_name": { - "type": "string", - "description": "The name of the bitmap to use as the sprite's image.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "animation_name": { + "path": { "type": "string", - "description": "The name of the animation script to use for this\nsprite.", + "description": "The file path to the SplashKit Resources folder.", "is_pointer": false, "is_const": true, "is_reference": true, @@ -62625,37 +62546,37 @@ } }, "attributes": { - "class": "sprite", - "constructor": true, - "suffix": "with_bitmap_and_animation_named", - "group": "sprites", - "static": "sprite" + "group": "resources", + "static": "resources" }, "signatures": { "python": [ - "def create_sprite_with_bitmap_and_animation_named(bitmap_name, animation_name):" + "def set_resources_path(path):" ], "pascal": [ - "function CreateSprite(const bitmapName: String; const animationName: String): Sprite" + "procedure SetResourcesPath(const path: String)" ], "csharp": [ - "public static Sprite SplashKit.CreateSprite(string bitmapName, string animationName);", - "public Sprite(string bitmapName, string animationName);" + "public static void Resources.SetResourcesPath(string path);", + "public static void SplashKit.SetResourcesPath(string path);" ], "cpp": [ - "sprite create_sprite(const string &bitmap_name, const string &animation_name)" + "void set_resources_path(const string &path)" ] } - }, + } + ], + "typedefs": [ { - "signature": "void create_sprite_pack(const string &name);", - "name": "create_sprite_pack", - "method_name": null, - "unique_global_name": "create_sprite_pack", - "unique_method_name": null, - "suffix_name": null, - "description": "Create a new sprite_pack with a given name. This pack can then be\nselected and used to control which sprites are drawn/updated in\nthe calls to draw_all_sprites and update_all_sprites.", + "signature": "typedef void (free_notifier)(void *pointer);", + "name": "free_notifier", + "description": "The free notifier can be registered with the system. It is called every\ntime a resource is freed.", "brief": null, + "attributes": { + "group": "resources", + "static": "resources" + }, + "is_function_pointer": true, "return": { "type": "void", "description": null, @@ -62665,12 +62586,12 @@ "type_parameter": null }, "parameters": { - "name": { - "type": "string", - "description": "The name of the new sprite pack.", - "is_pointer": false, - "is_const": true, - "is_reference": true, + "pointer": { + "type": "void", + "description": "The pointer to the resource that is being freed.", + "is_pointer": true, + "is_const": false, + "is_reference": false, "is_array": false, "array_dimension_sizes": [ @@ -62678,74 +62599,138 @@ "is_vector": false, "type_parameter": null } + } + } + ], + "structs": [ + + ], + "enums": [ + { + "signature": "enum resource_kind {ANIMATION_RESOURCE,BUNDLE_RESOURCE,FONT_RESOURCE,IMAGE_RESOURCE,JSON_RESOURCE,MUSIC_RESOURCE,SERVER_RESOURCE,SOUND_RESOURCE,TIMER_RESOURCE,OTHER_RESOURCE};", + "name": "resource_kind", + "description": "SplashKit is able to manage a number of different kinds of resources\nfor you.", + "brief": null, + "constants": { + "ANIMATION_RESOURCE": { + "description": "Animation scripts are loaded as Animation\nresources. These are located in the projects\n`Resources/animations` folder." + }, + "BUNDLE_RESOURCE": { + "description": "Resource bundles contain lists of other\nresources. These are located in the projects\n`Resources/bundles` folder." + }, + "FONT_RESOURCE": { + "description": "Fonts resources are located in the\n`Resources/fonts` folder." + }, + "IMAGE_RESOURCE": { + "description": "Image resources are located in the\n`Resources/images` folder." + }, + "JSON_RESOURCE": { + "description": "JSON resources are located in the projects\n`Resources/json` folder." + }, + "MUSIC_RESOURCE": { + "description": "Music resources can be played as music, and\nlive in the program's `Resources/sounds`\nfolder." + }, + "SERVER_RESOURCE": { + "description": "Server resources that can be sent as responses\nto web server requests." + }, + "SOUND_RESOURCE": { + "description": "Sound resources can be played as sound\neffects, and live in the program's\n`Resources/sounds` folder." + }, + "TIMER_RESOURCE": { + "description": "Timer resources are not saved to file, but\ncan be created by SplashkKit resource\nbundles." + }, + "OTHER_RESOURCE": { + "description": "Other resources can be loaded, these will be\nlocated directly in these project's\n`Resources` folder." + } }, "attributes": { - "group": "sprites", - "static": "sprite" - }, - "signatures": { - "python": [ - "def create_sprite_pack(name):" - ], - "pascal": [ - "procedure CreateSpritePack(const name: String)" - ], - "csharp": [ - "public static void Sprite.CreateSpritePack(string name);", - "public static void SplashKit.CreateSpritePack(string name);" - ], - "cpp": [ - "void create_sprite_pack(const string &name)" - ] + "group": "resources", + "static": "resources" } - }, + } + ], + "defines": [ + + ] + }, + "sprites": { + "brief": "SplashKit Sprites allows you to create images you can easily\nmove and animate.", + "description": "SplashKit sprites are game elements that can be moved, and animated. Sprites\nare located at a position in the game, have a velocity, and an animation.\nThe sprite can also have arbitary data associated with it for game specific\npurposes.", + "functions": [ { - "signature": "string current_sprite_pack();", - "name": "current_sprite_pack", + "signature": "void call_for_all_sprites(sprite_float_function *fn,float val);", + "name": "call_for_all_sprites", "method_name": null, - "unique_global_name": "current_sprite_pack", + "unique_global_name": "call_for_all_sprites_with_value", "unique_method_name": null, "suffix_name": null, - "description": "Returns the name of the currently selected sprite_pack.", + "description": "Call the supplied function for all sprites in the current pack.", "brief": null, "return": { - "type": "string", - "description": "The name of the current sprite pack.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { + "fn": { + "type": "sprite_float_function", + "description": "The sprite function to call on all sprites.", + "is_pointer": true, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "val": { + "type": "float", + "description": "The value passed to the function for each sprite.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } }, "attributes": { + "suffix": "with_value", "group": "sprites", "static": "sprite" }, "signatures": { "python": [ - "def current_sprite_pack():" + "def call_for_all_sprites_with_value(fn, val):" ], "pascal": [ - "function CurrentSpritePack(): String" + "procedure CallForAllSprites(fn: SpriteFloatFunction; val: Single)" ], "csharp": [ - "public static string Sprite.CurrentSpritePack();", - "public static string SplashKit.CurrentSpritePack();" + "public static void Sprite.CallForAllSprites(SpriteFloatFunction fn, float val);", + "public static void SplashKit.CallForAllSprites(SpriteFloatFunction fn, float val);" ], "cpp": [ - "string current_sprite_pack()" + "void call_for_all_sprites(sprite_float_function *fn, float val)" ] } }, { - "signature": "void draw_all_sprites();", - "name": "draw_all_sprites", + "signature": "void call_for_all_sprites(sprite_function *fn);", + "name": "call_for_all_sprites", "method_name": null, - "unique_global_name": "draw_all_sprites", + "unique_global_name": "call_for_all_sprites", "unique_method_name": null, "suffix_name": null, - "description": "draws all of the sprites in the current sprite pack. Packs can be\nswitched to select between different sets of sprites.", + "description": "Call the supplied function for all sprites in the current pack.", "brief": null, "return": { "type": "void", @@ -62756,6 +62741,19 @@ "type_parameter": null }, "parameters": { + "fn": { + "type": "sprite_function", + "description": "The sprite function to call on all sprites.", + "is_pointer": true, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } }, "attributes": { "group": "sprites", @@ -62763,28 +62761,28 @@ }, "signatures": { "python": [ - "def draw_all_sprites():" + "def call_for_all_sprites(fn):" ], "pascal": [ - "procedure DrawAllSprites()" + "procedure CallForAllSprites(fn: SpriteFunction)" ], "csharp": [ - "public static void Sprite.DrawAllSprites();", - "public static void SplashKit.DrawAllSprites();" + "public static void Sprite.CallForAllSprites(SpriteFunction fn);", + "public static void SplashKit.CallForAllSprites(SpriteFunction fn);" ], "cpp": [ - "void draw_all_sprites()" + "void call_for_all_sprites(sprite_function *fn)" ] } }, { - "signature": "void draw_sprite(sprite s,const vector_2d &offset);", - "name": "draw_sprite", - "method_name": "draw", - "unique_global_name": "draw_sprite_offset_by", - "unique_method_name": "sprite.draw_offset_by", + "signature": "void call_on_sprite_event(sprite_event_handler *handler);", + "name": "call_on_sprite_event", + "method_name": null, + "unique_global_name": "call_on_sprite_event", + "unique_method_name": null, "suffix_name": null, - "description": "Draws the sprite at its position in the game offset by a given amount. Only\nuse this method when you want to draw the sprite displaced from its location\nin your game. Otherwise you should change the sprite's location and then\nuse the standard ''draw_sprite'' routine.", + "description": "Register a procedure to be called when an events occur on any sprite.", "brief": null, "return": { "type": "void", @@ -62795,69 +62793,52 @@ "type_parameter": null }, "parameters": { - "s": { - "type": "sprite", - "description": "The sprite to draw.", - "is_pointer": false, + "handler": { + "type": "sprite_event_handler", + "description": "The function to call when any sprite raises an event", + "is_pointer": true, "is_const": false, "is_reference": false, "is_array": false, "array_dimension_sizes": [ - ], - "is_vector": false, - "type_parameter": null - }, - "offset": { - "type": "vector_2d", - "description": "The amount to offset the sprite.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - ], "is_vector": false, "type_parameter": null } }, "attributes": { - "class": "sprite", - "method": "draw", - "suffix": "offset_by", "group": "sprites", - "static": "sprite", - "self": "s" + "static": "sprite" }, "signatures": { "python": [ - "def draw_sprite_offset_by(s, offset):" + "def call_on_sprite_event(handler):" ], "pascal": [ - "procedure DrawSprite(s: Sprite; const offset: Vector2D)" + "procedure CallOnSpriteEvent(handler: SpriteEventHandler)" ], "csharp": [ - "public void Sprite.DrawSprite(Vector2D offset);", - "public static void SplashKit.DrawSprite(Sprite s, Vector2D offset);" + "public static void Sprite.CallOnSpriteEvent(SpriteEventHandler handler);", + "public static void SplashKit.CallOnSpriteEvent(SpriteEventHandler handler);" ], "cpp": [ - "void draw_sprite(sprite s, const vector_2d &offset)" + "void call_on_sprite_event(sprite_event_handler *handler)" ] } }, { - "signature": "void draw_sprite(sprite s);", - "name": "draw_sprite", - "method_name": "draw", - "unique_global_name": "draw_sprite", - "unique_method_name": "sprite.draw", + "signature": "point_2d center_point(sprite s);", + "name": "center_point", + "method_name": null, + "unique_global_name": "center_point", + "unique_method_name": null, "suffix_name": null, - "description": "Draws the sprite at its location in the world. This is affected by the\nposition of the camera and the sprites current location.\n\nThis is the standard routine for drawing sprites to the screen and should be\nused in most cases.", + "description": "Returns the center point of the passed in sprite. This is based on the sprite's\nPosition, Width and Height.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "point_2d", + "description": "The center point of the sprite", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -62866,7 +62847,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to draw.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -62880,48 +62861,48 @@ }, "attributes": { "class": "sprite", - "method": "draw", + "getter": "center_point", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def draw_sprite(s):" + "def center_point(s):" ], "pascal": [ - "procedure DrawSprite(s: Sprite)" + "function CenterPoint(s: Sprite): Point2D" ], "csharp": [ - "public void Sprite.DrawSprite();", - "public static void SplashKit.DrawSprite(Sprite s);" + "public Point2D Sprite.CenterPoint { get }", + "public static Point2D SplashKit.CenterPoint(Sprite s);" ], "cpp": [ - "void draw_sprite(sprite s)" + "point_2d center_point(sprite s)" ] } }, { - "signature": "void draw_sprite(sprite s,double x_offset,double y_offset);", - "name": "draw_sprite", - "method_name": "draw", - "unique_global_name": "draw_sprite_offset_x_y", - "unique_method_name": "sprite.draw_offset_x_y", + "signature": "sprite create_sprite(bitmap layer);", + "name": "create_sprite", + "method_name": null, + "unique_global_name": "create_sprite", + "unique_method_name": null, "suffix_name": null, - "description": "Draws the sprite at its position in the game offset by a given amount. Only\nuse this method when you want to draw the sprite displaced from its location\nin your game. Otherwise you should change the sprite's location and then\nuse the standard `draw_sprite` routine.", + "description": "Creates a sprite for the passed in bitmap image. The sprite will use the\ncell information within the bitmap if it is animated at a later stage.\n\nThis version of create_sprite will initialise the sprite to use\npixel level collisions, no animations, and have one layer named 'layer1'.\nThis version of the constructor will assign a default name to the sprite\nfor resource management purposes.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "sprite", + "description": "The new sprite with image.", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "s": { - "type": "sprite", - "description": "The sprite to draw.", + "layer": { + "type": "bitmap", + "description": "The bitmap for the sprite's image.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -62931,10 +62912,51 @@ ], "is_vector": false, "type_parameter": null - }, - "x_offset": { - "type": "double", - "description": "The amount to offset on the x axis.", + } + }, + "attributes": { + "class": "sprite", + "constructor": true, + "group": "sprites", + "static": "sprite" + }, + "signatures": { + "python": [ + "def create_sprite(layer):" + ], + "pascal": [ + "function CreateSprite(layer: Bitmap): Sprite" + ], + "csharp": [ + "public static Sprite SplashKit.CreateSprite(Bitmap layer);", + "public Sprite(Bitmap layer);" + ], + "cpp": [ + "sprite create_sprite(bitmap layer)" + ] + } + }, + { + "signature": "sprite create_sprite(bitmap layer,animation_script ani);", + "name": "create_sprite", + "method_name": null, + "unique_global_name": "create_sprite_with_animation", + "unique_method_name": null, + "suffix_name": null, + "description": "Creates a sprite for the passed in bitmap image. The sprite will use the\ncell information within the bitmap if it is animated at a later stage.\nThis version of `create_sprite` will initialise the sprite to use\npixel level collisions, the specified animation template, the layer have\nname 'layer1'.\n\nThis version of the constructor will assign a default name to the sprite\nfor resource management purposes.", + "brief": null, + "return": { + "type": "sprite", + "description": "The new sprite with image and animation script.", + "is_pointer": false, + "is_reference": false, + "is_vector": false, + "type_parameter": null + }, + "parameters": { + "layer": { + "type": "bitmap", + "description": "The bitmap for the sprite's image.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -62945,9 +62967,9 @@ "is_vector": false, "type_parameter": null }, - "y_offset": { - "type": "double", - "description": "The amount to offset on the y axis.", + "ani": { + "type": "animation_script", + "description": "The animation script for the sprite's animations.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -62961,88 +62983,116 @@ }, "attributes": { "class": "sprite", - "method": "draw", - "suffix": "offset_x_y", + "constructor": true, + "suffix": "with_animation", "group": "sprites", - "static": "sprite", - "self": "s" + "static": "sprite" }, "signatures": { "python": [ - "def draw_sprite_offset_x_y(s, x_offset, y_offset):" + "def create_sprite_with_animation(layer, ani):" ], "pascal": [ - "procedure DrawSprite(s: Sprite; xOffset: Double; yOffset: Double)" + "function CreateSprite(layer: Bitmap; ani: AnimationScript): Sprite" ], "csharp": [ - "public void Sprite.DrawSprite(double xOffset, double yOffset);", - "public static void SplashKit.DrawSprite(Sprite s, double xOffset, double yOffset);" + "public static Sprite SplashKit.CreateSprite(Bitmap layer, AnimationScript ani);", + "public Sprite(Bitmap layer, AnimationScript ani);" ], "cpp": [ - "void draw_sprite(sprite s, double x_offset, double y_offset)" + "sprite create_sprite(bitmap layer, animation_script ani)" ] } }, { - "signature": "void free_all_sprites();", - "name": "free_all_sprites", + "signature": "sprite create_sprite(const string &bitmap_name);", + "name": "create_sprite", "method_name": null, - "unique_global_name": "free_all_sprites", + "unique_global_name": "create_sprite_with_bitmap_named", "unique_method_name": null, "suffix_name": null, - "description": "Releases all of the sprites that have been loaded.", + "description": "Creates a sprite for the passed in bitmap image. The sprite will use the\ncell information within the bitmap if it is animated at a later stage.\n\nThis version of create_sprite will initialise the sprite to use\npixel level collisions, no animations, and have one layer named 'layer1'.\nThis version of the constructor will assign a default name to the sprite\nfor resource management purposes.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "sprite", + "description": "The new sprite with image.", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { + "bitmap_name": { + "type": "string", + "description": "The name of the bitmap to use as the sprite's layer", + "is_pointer": false, + "is_const": true, + "is_reference": true, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } }, "attributes": { + "class": "sprite", + "constructor": true, + "suffix": "with_bitmap_named", "group": "sprites", "static": "sprite" }, "signatures": { "python": [ - "def free_all_sprites():" + "def create_sprite_with_bitmap_named(bitmap_name):" ], "pascal": [ - "procedure FreeAllSprites()" + "function CreateSprite(const bitmapName: String): Sprite" ], "csharp": [ - "public static void Sprite.FreeAllSprites();", - "public static void SplashKit.FreeAllSprites();" + "public static Sprite SplashKit.CreateSprite(string bitmapName);", + "public Sprite(string bitmapName);" ], "cpp": [ - "void free_all_sprites()" + "sprite create_sprite(const string &bitmap_name)" ] } }, { - "signature": "void free_sprite(sprite s);", - "name": "free_sprite", + "signature": "sprite create_sprite(const string &name,bitmap layer);", + "name": "create_sprite", "method_name": null, - "unique_global_name": "free_sprite", + "unique_global_name": "create_sprite_named", "unique_method_name": null, "suffix_name": null, - "description": "Free the resources associated with a sprite.", + "description": "Creates a sprite for the passed in bitmap image. The sprite will use the\ncell information within the sprite if it is animated at a later stage.\nThis version of create_sprite will initialise the sprite to use pixel level\ncollisions, no animation, the layer have name 'layer1'.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "sprite", + "description": "The new sprite with image and name.", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "s": { - "type": "sprite", - "description": "The sprite to be destroyed.", + "name": { + "type": "string", + "description": "The name of the sprite for resource management.", + "is_pointer": false, + "is_const": true, + "is_reference": true, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "layer": { + "type": "bitmap", + "description": "The bitmap for the sprite's image.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -63056,39 +63106,39 @@ }, "attributes": { "class": "sprite", - "destructor": true, + "constructor": true, + "suffix": "named", "group": "sprites", - "static": "sprite", - "self": "s" + "static": "sprite" }, "signatures": { "python": [ - "def free_sprite(s):" + "def create_sprite_named(name, layer):" ], "pascal": [ - "procedure FreeSprite(s: Sprite)" + "function CreateSprite(const name: String; layer: Bitmap): Sprite" ], "csharp": [ - "public void Sprite.FreeSprite();", - "public static void SplashKit.FreeSprite(Sprite s);" + "public static Sprite SplashKit.CreateSprite(string name, Bitmap layer);", + "public Sprite(string name, Bitmap layer);" ], "cpp": [ - "void free_sprite(sprite s)" + "sprite create_sprite(const string &name, bitmap layer)" ] } }, { - "signature": "void free_sprite_pack(const string &name);", - "name": "free_sprite_pack", + "signature": "sprite create_sprite(const string &name,bitmap layer,animation_script ani);", + "name": "create_sprite", "method_name": null, - "unique_global_name": "free_sprite_pack", + "unique_global_name": "create_sprite_named_with_animation", "unique_method_name": null, "suffix_name": null, - "description": "Frees the sprite pack and all of its sprites.", + "description": "Creates a sprite for the passed in bitmap image. The sprite will use the cell\ninformation within the sprite if it is animated at a later stage. This\nversion of create_sprite will initialise the sprite to use pixel level\ncollisions, the specified animation template, the layer have name 'layer1'.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "sprite", + "description": "The new sprite with image, animation, and name.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -63097,59 +63147,101 @@ "parameters": { "name": { "type": "string", - "description": "The name of the sprite pack to destroy.", + "description": "The name of the sprite for resource management.", "is_pointer": false, "is_const": true, "is_reference": true, "is_array": false, "array_dimension_sizes": [ + ], + "is_vector": false, + "type_parameter": null + }, + "layer": { + "type": "bitmap", + "description": "The bitmap for the sprite's image.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "ani": { + "type": "animation_script", + "description": "The animation script for the sprite's animations.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + ], "is_vector": false, "type_parameter": null } }, "attributes": { + "class": "sprite", + "constructor": true, + "suffix": "named_with_animation", "group": "sprites", "static": "sprite" }, "signatures": { "python": [ - "def free_sprite_pack(name):" + "def create_sprite_named_with_animation(name, layer, ani):" ], "pascal": [ - "procedure FreeSpritePack(const name: String)" + "function CreateSprite(const name: String; layer: Bitmap; ani: AnimationScript): Sprite" ], "csharp": [ - "public static void Sprite.FreeSpritePack(string name);", - "public static void SplashKit.FreeSpritePack(string name);" + "public static Sprite SplashKit.CreateSprite(string name, Bitmap layer, AnimationScript ani);", + "public Sprite(string name, Bitmap layer, AnimationScript ani);" ], "cpp": [ - "void free_sprite_pack(const string &name)" + "sprite create_sprite(const string &name, bitmap layer, animation_script ani)" ] } }, { - "signature": "bool has_sprite(const string &name);", - "name": "has_sprite", + "signature": "sprite create_sprite(const string &bitmap_name,const string &animation_name);", + "name": "create_sprite", "method_name": null, - "unique_global_name": "has_sprite", + "unique_global_name": "create_sprite_with_bitmap_and_animation_named", "unique_method_name": null, "suffix_name": null, - "description": "Determines if SplashKit has a sprite for the supplied name.\nThis checks against all sprites, those loaded without a name\nare assigned a default.", + "description": "Creates a sprite. The bitmap_name is used to indicate the bitmap the sprite\nwill use, and the animation_name is used to indicate which animation_script\nto use.", "brief": null, "return": { - "type": "bool", - "description": "True if you have created a sprite with this name.", + "type": "sprite", + "description": "The new sprite with the image and animation.", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "name": { + "bitmap_name": { "type": "string", - "description": "The name of the sprite to locate.", + "description": "The name of the bitmap to use as the sprite's image.", + "is_pointer": false, + "is_const": true, + "is_reference": true, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "animation_name": { + "type": "string", + "description": "The name of the animation script to use for this\nsprite.", "is_pointer": false, "is_const": true, "is_reference": true, @@ -63162,37 +63254,40 @@ } }, "attributes": { + "class": "sprite", + "constructor": true, + "suffix": "with_bitmap_and_animation_named", "group": "sprites", "static": "sprite" }, "signatures": { "python": [ - "def has_sprite(name):" + "def create_sprite_with_bitmap_and_animation_named(bitmap_name, animation_name):" ], "pascal": [ - "function HasSprite(const name: String): Boolean" + "function CreateSprite(const bitmapName: String; const animationName: String): Sprite" ], "csharp": [ - "public static bool Sprite.HasSprite(string name);", - "public static bool SplashKit.HasSprite(string name);" + "public static Sprite SplashKit.CreateSprite(string bitmapName, string animationName);", + "public Sprite(string bitmapName, string animationName);" ], "cpp": [ - "bool has_sprite(const string &name)" + "sprite create_sprite(const string &bitmap_name, const string &animation_name)" ] } }, { - "signature": "bool has_sprite_pack(const string &name);", - "name": "has_sprite_pack", + "signature": "void create_sprite_pack(const string &name);", + "name": "create_sprite_pack", "method_name": null, - "unique_global_name": "has_sprite_pack", + "unique_global_name": "create_sprite_pack", "unique_method_name": null, "suffix_name": null, - "description": "Indicates if a given sprite_pack has already been created.", + "description": "Create a new sprite_pack with a given name. This pack can then be\nselected and used to control which sprites are drawn/updated in\nthe calls to draw_all_sprites and update_all_sprites.", "brief": null, "return": { - "type": "bool", - "description": "True if a sprite pack exists with the indicated name.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -63201,7 +63296,7 @@ "parameters": { "name": { "type": "string", - "description": "The name for the sprite pack.", + "description": "The name of the new sprite pack.", "is_pointer": false, "is_const": true, "is_reference": true, @@ -63219,28 +63314,67 @@ }, "signatures": { "python": [ - "def has_sprite_pack(name):" + "def create_sprite_pack(name):" ], "pascal": [ - "function HasSpritePack(const name: String): Boolean" + "procedure CreateSpritePack(const name: String)" ], "csharp": [ - "public static bool Sprite.HasSpritePack(string name);", - "public static bool SplashKit.HasSpritePack(string name);" + "public static void Sprite.CreateSpritePack(string name);", + "public static void SplashKit.CreateSpritePack(string name);" ], "cpp": [ - "bool has_sprite_pack(const string &name)" + "void create_sprite_pack(const string &name)" ] } }, { - "signature": "void move_sprite(sprite s);", - "name": "move_sprite", - "method_name": "move", - "unique_global_name": "move_sprite", - "unique_method_name": "sprite.move", + "signature": "string current_sprite_pack();", + "name": "current_sprite_pack", + "method_name": null, + "unique_global_name": "current_sprite_pack", + "unique_method_name": null, "suffix_name": null, - "description": "moves the sprite as indicated by its velocity. You can call this directly ot\nalternatively, this action is performed when the sprite is updated using\nthe ''update_sprite'' routine.", + "description": "Returns the name of the currently selected sprite_pack.", + "brief": null, + "return": { + "type": "string", + "description": "The name of the current sprite pack.", + "is_pointer": false, + "is_reference": false, + "is_vector": false, + "type_parameter": null + }, + "parameters": { + }, + "attributes": { + "group": "sprites", + "static": "sprite" + }, + "signatures": { + "python": [ + "def current_sprite_pack():" + ], + "pascal": [ + "function CurrentSpritePack(): String" + ], + "csharp": [ + "public static string Sprite.CurrentSpritePack();", + "public static string SplashKit.CurrentSpritePack();" + ], + "cpp": [ + "string current_sprite_pack()" + ] + } + }, + { + "signature": "void draw_all_sprites();", + "name": "draw_all_sprites", + "method_name": null, + "unique_global_name": "draw_all_sprites", + "unique_method_name": null, + "suffix_name": null, + "description": "draws all of the sprites in the current sprite pack. Packs can be\nswitched to select between different sets of sprites.", "brief": null, "return": { "type": "void", @@ -63251,51 +63385,35 @@ "type_parameter": null }, "parameters": { - "s": { - "type": "sprite", - "description": "The sprite to move.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - } }, "attributes": { - "class": "sprite", - "method": "move", "group": "sprites", - "static": "sprite", - "self": "s" + "static": "sprite" }, "signatures": { "python": [ - "def move_sprite(s):" + "def draw_all_sprites():" ], "pascal": [ - "procedure MoveSprite(s: Sprite)" + "procedure DrawAllSprites()" ], "csharp": [ - "public void Sprite.MoveSprite();", - "public static void SplashKit.MoveSprite(Sprite s);" + "public static void Sprite.DrawAllSprites();", + "public static void SplashKit.DrawAllSprites();" ], "cpp": [ - "void move_sprite(sprite s)" + "void draw_all_sprites()" ] } }, { - "signature": "void move_sprite(sprite s,const vector_2d &distance);", - "name": "move_sprite", - "method_name": "move", - "unique_global_name": "move_sprite_by_vector", - "unique_method_name": "sprite.move_by_vector", + "signature": "void draw_sprite(sprite s,const vector_2d &offset);", + "name": "draw_sprite", + "method_name": "draw", + "unique_global_name": "draw_sprite_offset_by", + "unique_method_name": "sprite.draw_offset_by", "suffix_name": null, - "description": "Moves the sprite a given distance based on the value passed in rather than\nbased on the sprite's velocity. Typically this method is used to apply\nother movement actions to the sprite and the velocity of the sprite is\nused the intended movement of the sprite.", + "description": "Draws the sprite at its position in the game offset by a given amount. Only\nuse this method when you want to draw the sprite displaced from its location\nin your game. Otherwise you should change the sprite's location and then\nuse the standard ''draw_sprite'' routine.", "brief": null, "return": { "type": "void", @@ -63308,7 +63426,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to move.", + "description": "The sprite to draw.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -63319,9 +63437,9 @@ "is_vector": false, "type_parameter": null }, - "distance": { + "offset": { "type": "vector_2d", - "description": "The vector that represents the direction and distance to\nmove the sprite.", + "description": "The amount to offset the sprite.", "is_pointer": false, "is_const": true, "is_reference": true, @@ -63335,36 +63453,36 @@ }, "attributes": { "class": "sprite", - "method": "move", - "suffix": "by_vector", + "method": "draw", + "suffix": "offset_by", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def move_sprite_by_vector(s, distance):" + "def draw_sprite_offset_by(s, offset):" ], "pascal": [ - "procedure MoveSprite(s: Sprite; const distance: Vector2D)" + "procedure DrawSprite(s: Sprite; const offset: Vector2D)" ], "csharp": [ - "public void Sprite.MoveSprite(Vector2D distance);", - "public static void SplashKit.MoveSprite(Sprite s, Vector2D distance);" + "public void Sprite.DrawSprite(Vector2D offset);", + "public static void SplashKit.DrawSprite(Sprite s, Vector2D offset);" ], "cpp": [ - "void move_sprite(sprite s, const vector_2d &distance)" + "void draw_sprite(sprite s, const vector_2d &offset)" ] } }, { - "signature": "void move_sprite(sprite s,const vector_2d &distance,float pct);", - "name": "move_sprite", - "method_name": "move", - "unique_global_name": "move_sprite_by_vector_percent", - "unique_method_name": "sprite.move_by_vector_percent", + "signature": "void draw_sprite(sprite s);", + "name": "draw_sprite", + "method_name": "draw", + "unique_global_name": "draw_sprite", + "unique_method_name": "sprite.draw", "suffix_name": null, - "description": "Moves the sprite a percentage of a given distance based on the value\npassed in rather than based on the sprite's velocity. Typically this\nmethod is used to apply other movement actions to the sprite and the\nvelocity of the sprite is used the intended movement of the sprite.", + "description": "Draws the sprite at its location in the world. This is affected by the\nposition of the camera and the sprites current location.\n\nThis is the standard routine for drawing sprites to the screen and should be\nused in most cases.", "brief": null, "return": { "type": "void", @@ -63377,33 +63495,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to move.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "distance": { - "type": "vector_2d", - "description": "The vector that represents the direction and distance to\nmove the sprite.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "pct": { - "type": "float", - "description": "The percentage of the distance to move the sprite.", + "description": "The sprite to draw.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -63417,36 +63509,35 @@ }, "attributes": { "class": "sprite", - "method": "move", - "suffix": "by_vector_percent", + "method": "draw", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def move_sprite_by_vector_percent(s, distance, pct):" + "def draw_sprite(s):" ], "pascal": [ - "procedure MoveSprite(s: Sprite; const distance: Vector2D; pct: Single)" + "procedure DrawSprite(s: Sprite)" ], "csharp": [ - "public void Sprite.MoveSprite(Vector2D distance, float pct);", - "public static void SplashKit.MoveSprite(Sprite s, Vector2D distance, float pct);" + "public void Sprite.DrawSprite();", + "public static void SplashKit.DrawSprite(Sprite s);" ], "cpp": [ - "void move_sprite(sprite s, const vector_2d &distance, float pct)" + "void draw_sprite(sprite s)" ] } }, { - "signature": "void move_sprite(sprite s,float pct);", - "name": "move_sprite", - "method_name": "move", - "unique_global_name": "move_sprite_percent", - "unique_method_name": "sprite.move_percent", + "signature": "void draw_sprite(sprite s,double x_offset,double y_offset);", + "name": "draw_sprite", + "method_name": "draw", + "unique_global_name": "draw_sprite_offset_x_y", + "unique_method_name": "sprite.draw_offset_x_y", "suffix_name": null, - "description": "Moves the sprite as indicated by a percentage of its velocity. You can call\nthis directly ot alternatively, this action is performed when the sprite is\nupdated using the ''update_sprite'' routines that require a percentage.", + "description": "Draws the sprite at its position in the game offset by a given amount. Only\nuse this method when you want to draw the sprite displaced from its location\nin your game. Otherwise you should change the sprite's location and then\nuse the standard `draw_sprite` routine.", "brief": null, "return": { "type": "void", @@ -63459,7 +63550,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to move.", + "description": "The sprite to draw.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -63470,9 +63561,22 @@ "is_vector": false, "type_parameter": null }, - "pct": { - "type": "float", - "description": "The percentage of the sprite's velocity to move.", + "x_offset": { + "type": "double", + "description": "The amount to offset on the x axis.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "y_offset": { + "type": "double", + "description": "The amount to offset on the y axis.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -63486,36 +63590,75 @@ }, "attributes": { "class": "sprite", - "method": "move", - "suffix": "percent", + "method": "draw", + "suffix": "offset_x_y", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def move_sprite_percent(s, pct):" + "def draw_sprite_offset_x_y(s, x_offset, y_offset):" ], "pascal": [ - "procedure MoveSprite(s: Sprite; pct: Single)" + "procedure DrawSprite(s: Sprite; xOffset: Double; yOffset: Double)" ], "csharp": [ - "public void Sprite.MoveSprite(float pct);", - "public static void SplashKit.MoveSprite(Sprite s, float pct);" + "public void Sprite.DrawSprite(double xOffset, double yOffset);", + "public static void SplashKit.DrawSprite(Sprite s, double xOffset, double yOffset);" ], "cpp": [ - "void move_sprite(sprite s, float pct)" + "void draw_sprite(sprite s, double x_offset, double y_offset)" ] } }, { - "signature": "void move_sprite_to(sprite s,double x,double y);", - "name": "move_sprite_to", - "method_name": "move_to", - "unique_global_name": "move_sprite_to", - "unique_method_name": "sprite.move_to", + "signature": "void free_all_sprites();", + "name": "free_all_sprites", + "method_name": null, + "unique_global_name": "free_all_sprites", + "unique_method_name": null, "suffix_name": null, - "description": "This method moves a sprite to a given position in the game.", + "description": "Releases all of the sprites that have been loaded.", + "brief": null, + "return": { + "type": "void", + "description": null, + "is_pointer": false, + "is_reference": false, + "is_vector": false, + "type_parameter": null + }, + "parameters": { + }, + "attributes": { + "group": "sprites", + "static": "sprite" + }, + "signatures": { + "python": [ + "def free_all_sprites():" + ], + "pascal": [ + "procedure FreeAllSprites()" + ], + "csharp": [ + "public static void Sprite.FreeAllSprites();", + "public static void SplashKit.FreeAllSprites();" + ], + "cpp": [ + "void free_all_sprites()" + ] + } + }, + { + "signature": "void free_sprite(sprite s);", + "name": "free_sprite", + "method_name": null, + "unique_global_name": "free_sprite", + "unique_method_name": null, + "suffix_name": null, + "description": "Free the resources associated with a sprite.", "brief": null, "return": { "type": "void", @@ -63528,33 +63671,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to move.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "x": { - "type": "double", - "description": "The sprite's new x location.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "y": { - "type": "double", - "description": "The sprite's new y location.", + "description": "The sprite to be destroyed.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -63568,35 +63685,35 @@ }, "attributes": { "class": "sprite", - "method": "move_to", + "destructor": true, "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def move_sprite_to(s, x, y):" + "def free_sprite(s):" ], "pascal": [ - "procedure MoveSpriteTo(s: Sprite; x: Double; y: Double)" + "procedure FreeSprite(s: Sprite)" ], "csharp": [ - "public void Sprite.MoveSpriteTo(double x, double y);", - "public static void SplashKit.MoveSpriteTo(Sprite s, double x, double y);" + "public void Sprite.FreeSprite();", + "public static void SplashKit.FreeSprite(Sprite s);" ], "cpp": [ - "void move_sprite_to(sprite s, double x, double y)" + "void free_sprite(sprite s)" ] } }, { - "signature": "void select_sprite_pack(const string &name);", - "name": "select_sprite_pack", + "signature": "void free_sprite_pack(const string &name);", + "name": "free_sprite_pack", "method_name": null, - "unique_global_name": "select_sprite_pack", + "unique_global_name": "free_sprite_pack", "unique_method_name": null, "suffix_name": null, - "description": "Selects the named sprite_pack (if it has been created). The\nselected sprite_pack determines which sprites are drawn and updated\nwith the draw_all_sprites and update_all_sprites code.", + "description": "Frees the sprite pack and all of its sprites.", "brief": null, "return": { "type": "void", @@ -63609,7 +63726,7 @@ "parameters": { "name": { "type": "string", - "description": "The name of the sprite pack to select.", + "description": "The name of the sprite pack to destroy.", "is_pointer": false, "is_const": true, "is_reference": true, @@ -63627,67 +63744,93 @@ }, "signatures": { "python": [ - "def select_sprite_pack(name):" + "def free_sprite_pack(name):" ], "pascal": [ - "procedure SelectSpritePack(const name: String)" + "procedure FreeSpritePack(const name: String)" ], "csharp": [ - "public static void Sprite.SelectSpritePack(string name);", - "public static void SplashKit.SelectSpritePack(string name);" + "public static void Sprite.FreeSpritePack(string name);", + "public static void SplashKit.FreeSpritePack(string name);" ], "cpp": [ - "void select_sprite_pack(const string &name)" + "void free_sprite_pack(const string &name)" ] } }, { - "signature": "int sprite_add_layer(sprite s,bitmap new_layer,const string &layer_name);", - "name": "sprite_add_layer", - "method_name": "add_layer", - "unique_global_name": "sprite_add_layer", - "unique_method_name": "sprite.add_layer", + "signature": "bool has_sprite(const string &name);", + "name": "has_sprite", + "method_name": null, + "unique_global_name": "has_sprite", + "unique_method_name": null, "suffix_name": null, - "description": "Adds a new layer to the sprite.", + "description": "Determines if SplashKit has a sprite for the supplied name.\nThis checks against all sprites, those loaded without a name\nare assigned a default.", "brief": null, "return": { - "type": "int", - "description": "The index of the new layer.", + "type": "bool", + "description": "True if you have created a sprite with this name.", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "s": { - "type": "sprite", - "description": "The sprite to add the layer to.", + "name": { + "type": "string", + "description": "The name of the sprite to locate.", "is_pointer": false, - "is_const": false, - "is_reference": false, + "is_const": true, + "is_reference": true, "is_array": false, "array_dimension_sizes": [ ], "is_vector": false, "type_parameter": null - }, - "new_layer": { - "type": "bitmap", - "description": "The new layer's bitmap.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "layer_name": { + } + }, + "attributes": { + "group": "sprites", + "static": "sprite" + }, + "signatures": { + "python": [ + "def has_sprite(name):" + ], + "pascal": [ + "function HasSprite(const name: String): Boolean" + ], + "csharp": [ + "public static bool Sprite.HasSprite(string name);", + "public static bool SplashKit.HasSprite(string name);" + ], + "cpp": [ + "bool has_sprite(const string &name)" + ] + } + }, + { + "signature": "bool has_sprite_pack(const string &name);", + "name": "has_sprite_pack", + "method_name": null, + "unique_global_name": "has_sprite_pack", + "unique_method_name": null, + "suffix_name": null, + "description": "Indicates if a given sprite_pack has already been created.", + "brief": null, + "return": { + "type": "bool", + "description": "True if a sprite pack exists with the indicated name.", + "is_pointer": false, + "is_reference": false, + "is_vector": false, + "type_parameter": null + }, + "parameters": { + "name": { "type": "string", - "description": "The name of the new layer.", + "description": "The name for the sprite pack.", "is_pointer": false, "is_const": true, "is_reference": true, @@ -63700,36 +63843,33 @@ } }, "attributes": { - "class": "sprite", - "method": "add_layer", - "self": "s", "group": "sprites", "static": "sprite" }, "signatures": { "python": [ - "def sprite_add_layer(s, new_layer, layer_name):" + "def has_sprite_pack(name):" ], "pascal": [ - "function SpriteAddLayer(s: Sprite; newLayer: Bitmap; const layerName: String): Integer" + "function HasSpritePack(const name: String): Boolean" ], "csharp": [ - "public int Sprite.SpriteAddLayer(Bitmap newLayer, string layerName);", - "public static int SplashKit.SpriteAddLayer(Sprite s, Bitmap newLayer, string layerName);" + "public static bool Sprite.HasSpritePack(string name);", + "public static bool SplashKit.HasSpritePack(string name);" ], "cpp": [ - "int sprite_add_layer(sprite s, bitmap new_layer, const string &layer_name)" + "bool has_sprite_pack(const string &name)" ] } }, { - "signature": "void sprite_add_to_velocity(sprite s,const vector_2d &value);", - "name": "sprite_add_to_velocity", - "method_name": "add_to_velocity", - "unique_global_name": "sprite_add_to_velocity", - "unique_method_name": "sprite.add_to_velocity", + "signature": "void move_sprite(sprite s);", + "name": "move_sprite", + "method_name": "move", + "unique_global_name": "move_sprite", + "unique_method_name": "sprite.move", "suffix_name": null, - "description": "Alters the current velocity of the sprite, adding the passed in vector_2d to the current velocity.\nWhen the sprite is updated (see `update_sprite`)\nthis vector_2d is used to move the sprite.", + "description": "moves the sprite as indicated by its velocity. You can call this directly ot\nalternatively, this action is performed when the sprite is updated using\nthe ''update_sprite'' routine.", "brief": null, "return": { "type": "void", @@ -63742,26 +63882,13 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change.", + "description": "The sprite to move.", "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, "array_dimension_sizes": [ - ], - "is_vector": false, - "type_parameter": null - }, - "value": { - "type": "vector_2d", - "description": "The amount to add to the sprite's velocity.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - ], "is_vector": false, "type_parameter": null @@ -63769,35 +63896,35 @@ }, "attributes": { "class": "sprite", - "method": "add_to_velocity", + "method": "move", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_add_to_velocity(s, value):" + "def move_sprite(s):" ], "pascal": [ - "procedure SpriteAddToVelocity(s: Sprite; const value: Vector2D)" + "procedure MoveSprite(s: Sprite)" ], "csharp": [ - "public void Sprite.SpriteAddToVelocity(Vector2D value);", - "public static void SplashKit.SpriteAddToVelocity(Sprite s, Vector2D value);" + "public void Sprite.MoveSprite();", + "public static void SplashKit.MoveSprite(Sprite s);" ], "cpp": [ - "void sprite_add_to_velocity(sprite s, const vector_2d &value)" + "void move_sprite(sprite s)" ] } }, { - "signature": "void sprite_add_value(sprite s,const string &name);", - "name": "sprite_add_value", - "method_name": "add_value", - "unique_global_name": "sprite_add_value", - "unique_method_name": "sprite.add_value", + "signature": "void move_sprite(sprite s,const vector_2d &distance);", + "name": "move_sprite", + "method_name": "move", + "unique_global_name": "move_sprite_by_vector", + "unique_method_name": "sprite.move_by_vector", "suffix_name": null, - "description": "Adds a new kind of value to the sprite", + "description": "Moves the sprite a given distance based on the value passed in rather than\nbased on the sprite's velocity. Typically this method is used to apply\nother movement actions to the sprite and the velocity of the sprite is\nused the intended movement of the sprite.", "brief": null, "return": { "type": "void", @@ -63810,7 +63937,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change.", + "description": "The sprite to move.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -63821,9 +63948,9 @@ "is_vector": false, "type_parameter": null }, - "name": { - "type": "string", - "description": "The name of the new value to store in the sprite.", + "distance": { + "type": "vector_2d", + "description": "The vector that represents the direction and distance to\nmove the sprite.", "is_pointer": false, "is_const": true, "is_reference": true, @@ -63837,35 +63964,36 @@ }, "attributes": { "class": "sprite", - "method": "add_value", + "method": "move", + "suffix": "by_vector", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_add_value(s, name):" + "def move_sprite_by_vector(s, distance):" ], "pascal": [ - "procedure SpriteAddValue(s: Sprite; const name: String)" + "procedure MoveSprite(s: Sprite; const distance: Vector2D)" ], "csharp": [ - "public void Sprite.SpriteAddValue(string name);", - "public static void SplashKit.SpriteAddValue(Sprite s, string name);" + "public void Sprite.MoveSprite(Vector2D distance);", + "public static void SplashKit.MoveSprite(Sprite s, Vector2D distance);" ], "cpp": [ - "void sprite_add_value(sprite s, const string &name)" + "void move_sprite(sprite s, const vector_2d &distance)" ] } }, { - "signature": "void sprite_add_value(sprite s,const string &name,float init_val);", - "name": "sprite_add_value", - "method_name": "add_value", - "unique_global_name": "sprite_add_value_with_default", - "unique_method_name": "sprite.add_value_with_default", + "signature": "void move_sprite(sprite s,const vector_2d &distance,float pct);", + "name": "move_sprite", + "method_name": "move", + "unique_global_name": "move_sprite_by_vector_percent", + "unique_method_name": "sprite.move_by_vector_percent", "suffix_name": null, - "description": "Adds a new kind of value to the sprite, setting the initial value\nto the value passed in.", + "description": "Moves the sprite a percentage of a given distance based on the value\npassed in rather than based on the sprite's velocity. Typically this\nmethod is used to apply other movement actions to the sprite and the\nvelocity of the sprite is used the intended movement of the sprite.", "brief": null, "return": { "type": "void", @@ -63878,7 +64006,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change.", + "description": "The sprite to move.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -63889,9 +64017,9 @@ "is_vector": false, "type_parameter": null }, - "name": { - "type": "string", - "description": "The name of the new value to store in the sprite.", + "distance": { + "type": "vector_2d", + "description": "The vector that represents the direction and distance to\nmove the sprite.", "is_pointer": false, "is_const": true, "is_reference": true, @@ -63902,9 +64030,9 @@ "is_vector": false, "type_parameter": null }, - "init_val": { + "pct": { "type": "float", - "description": "The initial value.", + "description": "The percentage of the distance to move the sprite.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -63918,40 +64046,40 @@ }, "attributes": { "class": "sprite", - "method": "add_value", - "suffix": "with_default", + "method": "move", + "suffix": "by_vector_percent", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_add_value_with_default(s, name, init_val):" + "def move_sprite_by_vector_percent(s, distance, pct):" ], "pascal": [ - "procedure SpriteAddValue(s: Sprite; const name: String; initVal: Single)" + "procedure MoveSprite(s: Sprite; const distance: Vector2D; pct: Single)" ], "csharp": [ - "public void Sprite.SpriteAddValue(string name, float initVal);", - "public static void SplashKit.SpriteAddValue(Sprite s, string name, float initVal);" + "public void Sprite.MoveSprite(Vector2D distance, float pct);", + "public static void SplashKit.MoveSprite(Sprite s, Vector2D distance, float pct);" ], "cpp": [ - "void sprite_add_value(sprite s, const string &name, float init_val)" + "void move_sprite(sprite s, const vector_2d &distance, float pct)" ] } }, { - "signature": "point_2d sprite_anchor_point(sprite s);", - "name": "sprite_anchor_point", - "method_name": null, - "unique_global_name": "sprite_anchor_point", - "unique_method_name": null, + "signature": "void move_sprite(sprite s,float pct);", + "name": "move_sprite", + "method_name": "move", + "unique_global_name": "move_sprite_percent", + "unique_method_name": "sprite.move_percent", "suffix_name": null, - "description": "Returns the anchor point of the sprite. This is the point around which the\nsprite rotates. This is in sprite coordinates, so as if the sprite is drawn\nat 0,0.", + "description": "Moves the sprite as indicated by a percentage of its velocity. You can call\nthis directly ot alternatively, this action is performed when the sprite is\nupdated using the ''update_sprite'' routines that require a percentage.", "brief": null, "return": { - "type": "point_2d", - "description": "The anchor point of the sprite.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -63960,7 +64088,20 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to move.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "pct": { + "type": "float", + "description": "The percentage of the sprite's velocity to move.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -63974,39 +64115,40 @@ }, "attributes": { "class": "sprite", - "getter": "anchor_point", + "method": "move", + "suffix": "percent", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_anchor_point(s):" + "def move_sprite_percent(s, pct):" ], "pascal": [ - "function SpriteAnchorPoint(s: Sprite): Point2D" + "procedure MoveSprite(s: Sprite; pct: Single)" ], "csharp": [ - "public Point2D Sprite.AnchorPoint { get }", - "public static Point2D SplashKit.SpriteAnchorPoint(Sprite s);" + "public void Sprite.MoveSprite(float pct);", + "public static void SplashKit.MoveSprite(Sprite s, float pct);" ], "cpp": [ - "point_2d sprite_anchor_point(sprite s)" + "void move_sprite(sprite s, float pct)" ] } }, { - "signature": "point_2d sprite_anchor_position(sprite s);", - "name": "sprite_anchor_position", - "method_name": null, - "unique_global_name": "sprite_anchor_position", - "unique_method_name": null, + "signature": "void move_sprite_to(sprite s,double x,double y);", + "name": "move_sprite_to", + "method_name": "move_to", + "unique_global_name": "move_sprite_to", + "unique_method_name": "sprite.move_to", "suffix_name": null, - "description": "The sprite anchor position, is the location of the anchor point in world\ncoordinates, based upon the position of the sprite.", + "description": "This method moves a sprite to a given position in the game.", "brief": null, "return": { - "type": "point_2d", - "description": "The location of the sprite's anchor point positioned at the sprite's location", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -64015,7 +64157,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to find where the anchor is in world coordinates", + "description": "The sprite to move.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -64025,49 +64167,23 @@ ], "is_vector": false, "type_parameter": null - } - }, - "attributes": { - "group": "sprites", - "static": "sprite" - }, - "signatures": { - "python": [ - "def sprite_anchor_position(s):" - ], - "pascal": [ - "function SpriteAnchorPosition(s: Sprite): Point2D" - ], - "csharp": [ - "public static Point2D Sprite.SpriteAnchorPosition(Sprite s);", - "public static Point2D SplashKit.SpriteAnchorPosition(Sprite s);" - ], - "cpp": [ - "point_2d sprite_anchor_position(sprite s)" - ] - } - }, - { - "signature": "bool sprite_animation_has_ended(sprite s);", - "name": "sprite_animation_has_ended", - "method_name": null, - "unique_global_name": "sprite_animation_has_ended", - "unique_method_name": null, - "suffix_name": null, - "description": "Indicates if the sprites animation has ended.", - "brief": null, - "return": { - "type": "bool", - "description": "True if the sprite animation has ended.", - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { - "s": { - "type": "sprite", - "description": "The sprite to get the details from.", + }, + "x": { + "type": "double", + "description": "The sprite's new x location.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "y": { + "type": "double", + "description": "The sprite's new y location.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -64081,51 +64197,51 @@ }, "attributes": { "class": "sprite", - "getter": "animation_has_ended", + "method": "move_to", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_animation_has_ended(s):" + "def move_sprite_to(s, x, y):" ], "pascal": [ - "function SpriteAnimationHasEnded(s: Sprite): Boolean" + "procedure MoveSpriteTo(s: Sprite; x: Double; y: Double)" ], "csharp": [ - "public bool Sprite.AnimationHasEnded { get }", - "public static bool SplashKit.SpriteAnimationHasEnded(Sprite s);" + "public void Sprite.MoveSpriteTo(double x, double y);", + "public static void SplashKit.MoveSpriteTo(Sprite s, double x, double y);" ], "cpp": [ - "bool sprite_animation_has_ended(sprite s)" + "void move_sprite_to(sprite s, double x, double y)" ] } }, { - "signature": "string sprite_animation_name(sprite s);", - "name": "sprite_animation_name", - "method_name": "animation_name", - "unique_global_name": "sprite_animation_name", - "unique_method_name": "sprite.animation_name", + "signature": "void select_sprite_pack(const string &name);", + "name": "select_sprite_pack", + "method_name": null, + "unique_global_name": "select_sprite_pack", + "unique_method_name": null, "suffix_name": null, - "description": "Returns the name of the sprite's current animation.", + "description": "Selects the named sprite_pack (if it has been created). The\nselected sprite_pack determines which sprites are drawn and updated\nwith the draw_all_sprites and update_all_sprites code.", "brief": null, "return": { - "type": "string", - "description": "The name of the current animation.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "s": { - "type": "sprite", - "description": "The sprite to get the details from.", + "name": { + "type": "string", + "description": "The name of the sprite pack to select.", "is_pointer": false, - "is_const": false, - "is_reference": false, + "is_const": true, + "is_reference": true, "is_array": false, "array_dimension_sizes": [ @@ -64135,40 +64251,37 @@ } }, "attributes": { - "class": "sprite", - "method": "animation_name", "group": "sprites", - "static": "sprite", - "self": "s" + "static": "sprite" }, "signatures": { "python": [ - "def sprite_animation_name(s):" + "def select_sprite_pack(name):" ], "pascal": [ - "function SpriteAnimationName(s: Sprite): String" + "procedure SelectSpritePack(const name: String)" ], "csharp": [ - "public string Sprite.SpriteAnimationName();", - "public static string SplashKit.SpriteAnimationName(Sprite s);" + "public static void Sprite.SelectSpritePack(string name);", + "public static void SplashKit.SelectSpritePack(string name);" ], "cpp": [ - "string sprite_animation_name(sprite s)" + "void select_sprite_pack(const string &name)" ] } }, { - "signature": "bool sprite_at(sprite s,const point_2d &pt);", - "name": "sprite_at", - "method_name": null, - "unique_global_name": "sprite_at", - "unique_method_name": null, + "signature": "int sprite_add_layer(sprite s,bitmap new_layer,const string &layer_name);", + "name": "sprite_add_layer", + "method_name": "add_layer", + "unique_global_name": "sprite_add_layer", + "unique_method_name": "sprite.add_layer", "suffix_name": null, - "description": "Determines if a sprite is at a given point.", + "description": "Adds a new layer to the sprite.", "brief": null, "return": { - "type": "bool", - "description": "True if the sprite is at the given point", + "type": "int", + "description": "The index of the new layer.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -64177,7 +64290,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to test", + "description": "The sprite to add the layer to.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -64188,9 +64301,22 @@ "is_vector": false, "type_parameter": null }, - "pt": { - "type": "point_2d", - "description": "The point to check (in world coordinates)", + "new_layer": { + "type": "bitmap", + "description": "The new layer's bitmap.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "layer_name": { + "type": "string", + "description": "The name of the new layer.", "is_pointer": false, "is_const": true, "is_reference": true, @@ -64203,33 +64329,36 @@ } }, "attributes": { + "class": "sprite", + "method": "add_layer", + "self": "s", "group": "sprites", "static": "sprite" }, "signatures": { "python": [ - "def sprite_at(s, pt):" + "def sprite_add_layer(s, new_layer, layer_name):" ], "pascal": [ - "function SpriteAt(s: Sprite; const pt: Point2D): Boolean" + "function SpriteAddLayer(s: Sprite; newLayer: Bitmap; const layerName: String): Integer" ], "csharp": [ - "public static bool Sprite.SpriteAt(Sprite s, Point2D pt);", - "public static bool SplashKit.SpriteAt(Sprite s, Point2D pt);" + "public int Sprite.SpriteAddLayer(Bitmap newLayer, string layerName);", + "public static int SplashKit.SpriteAddLayer(Sprite s, Bitmap newLayer, string layerName);" ], "cpp": [ - "bool sprite_at(sprite s, const point_2d &pt)" + "int sprite_add_layer(sprite s, bitmap new_layer, const string &layer_name)" ] } }, { - "signature": "void sprite_bring_layer_forward(sprite s,int visible_layer);", - "name": "sprite_bring_layer_forward", - "method_name": "send_layer_forward", - "unique_global_name": "sprite_bring_layer_forward", - "unique_method_name": "sprite.send_layer_forward", + "signature": "void sprite_add_to_velocity(sprite s,const vector_2d &value);", + "name": "sprite_add_to_velocity", + "method_name": "add_to_velocity", + "unique_global_name": "sprite_add_to_velocity", + "unique_method_name": "sprite.add_to_velocity", "suffix_name": null, - "description": "Sends the layer specified forward in the visible layer order.", + "description": "Alters the current velocity of the sprite, adding the passed in vector_2d to the current velocity.\nWhen the sprite is updated (see `update_sprite`)\nthis vector_2d is used to move the sprite.", "brief": null, "return": { "type": "void", @@ -64242,7 +64371,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change", + "description": "The sprite to change.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -64253,12 +64382,12 @@ "is_vector": false, "type_parameter": null }, - "visible_layer": { - "type": "int", - "description": "The visible layer to bring forward", + "value": { + "type": "vector_2d", + "description": "The amount to add to the sprite's velocity.", "is_pointer": false, - "is_const": false, - "is_reference": false, + "is_const": true, + "is_reference": true, "is_array": false, "array_dimension_sizes": [ @@ -64269,35 +64398,35 @@ }, "attributes": { "class": "sprite", - "method": "send_layer_forward", + "method": "add_to_velocity", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_bring_layer_forward(s, visible_layer):" + "def sprite_add_to_velocity(s, value):" ], "pascal": [ - "procedure SpriteBringLayerForward(s: Sprite; visibleLayer: Integer)" + "procedure SpriteAddToVelocity(s: Sprite; const value: Vector2D)" ], "csharp": [ - "public void Sprite.SpriteBringLayerForward(int visibleLayer);", - "public static void SplashKit.SpriteBringLayerForward(Sprite s, int visibleLayer);" + "public void Sprite.SpriteAddToVelocity(Vector2D value);", + "public static void SplashKit.SpriteAddToVelocity(Sprite s, Vector2D value);" ], "cpp": [ - "void sprite_bring_layer_forward(sprite s, int visible_layer)" + "void sprite_add_to_velocity(sprite s, const vector_2d &value)" ] } }, { - "signature": "void sprite_bring_layer_to_front(sprite s,int visible_layer);", - "name": "sprite_bring_layer_to_front", - "method_name": "Send_layer_toFront", - "unique_global_name": "sprite_bring_layer_to_front", - "unique_method_name": "sprite.Send_layer_toFront", + "signature": "void sprite_add_value(sprite s,const string &name);", + "name": "sprite_add_value", + "method_name": "add_value", + "unique_global_name": "sprite_add_value", + "unique_method_name": "sprite.add_value", "suffix_name": null, - "description": "Sends the layer specified to the front in the visible layer order.", + "description": "Adds a new kind of value to the sprite", "brief": null, "return": { "type": "void", @@ -64310,7 +64439,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change", + "description": "The sprite to change.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -64321,12 +64450,12 @@ "is_vector": false, "type_parameter": null }, - "visible_layer": { - "type": "int", - "description": "The visible layer to bring to the front", + "name": { + "type": "string", + "description": "The name of the new value to store in the sprite.", "is_pointer": false, - "is_const": false, - "is_reference": false, + "is_const": true, + "is_reference": true, "is_array": false, "array_dimension_sizes": [ @@ -64337,35 +64466,35 @@ }, "attributes": { "class": "sprite", - "method": "Send_layer_toFront", + "method": "add_value", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_bring_layer_to_front(s, visible_layer):" + "def sprite_add_value(s, name):" ], "pascal": [ - "procedure SpriteBringLayerToFront(s: Sprite; visibleLayer: Integer)" + "procedure SpriteAddValue(s: Sprite; const name: String)" ], "csharp": [ - "public void Sprite.SpriteBringLayerToFront(int visibleLayer);", - "public static void SplashKit.SpriteBringLayerToFront(Sprite s, int visibleLayer);" + "public void Sprite.SpriteAddValue(string name);", + "public static void SplashKit.SpriteAddValue(Sprite s, string name);" ], "cpp": [ - "void sprite_bring_layer_to_front(sprite s, int visible_layer)" + "void sprite_add_value(sprite s, const string &name)" ] } }, { - "signature": "void sprite_call_on_event(sprite s,sprite_event_handler *handler);", - "name": "sprite_call_on_event", - "method_name": "call_on_event", - "unique_global_name": "sprite_call_on_event", - "unique_method_name": "sprite.call_on_event", + "signature": "void sprite_add_value(sprite s,const string &name,float init_val);", + "name": "sprite_add_value", + "method_name": "add_value", + "unique_global_name": "sprite_add_value_with_default", + "unique_method_name": "sprite.add_value_with_default", "suffix_name": null, - "description": "Register a procedure to call when events occur on the sprite.", + "description": "Adds a new kind of value to the sprite, setting the initial value\nto the value passed in.", "brief": null, "return": { "type": "void", @@ -64378,7 +64507,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to add the handler to.", + "description": "The sprite to change.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -64389,10 +64518,23 @@ "is_vector": false, "type_parameter": null }, - "handler": { - "type": "sprite_event_handler", - "description": "The function to call when this sprite raises an event.", - "is_pointer": true, + "name": { + "type": "string", + "description": "The name of the new value to store in the sprite.", + "is_pointer": false, + "is_const": true, + "is_reference": true, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "init_val": { + "type": "float", + "description": "The initial value.", + "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, @@ -64405,39 +64547,40 @@ }, "attributes": { "class": "sprite", - "method": "call_on_event", - "self": "s", + "method": "add_value", + "suffix": "with_default", "group": "sprites", - "static": "sprite" + "static": "sprite", + "self": "s" }, "signatures": { "python": [ - "def sprite_call_on_event(s, handler):" + "def sprite_add_value_with_default(s, name, init_val):" ], "pascal": [ - "procedure SpriteCallOnEvent(s: Sprite; handler: SpriteEventHandler)" + "procedure SpriteAddValue(s: Sprite; const name: String; initVal: Single)" ], "csharp": [ - "public void Sprite.SpriteCallOnEvent(SpriteEventHandler handler);", - "public static void SplashKit.SpriteCallOnEvent(Sprite s, SpriteEventHandler handler);" + "public void Sprite.SpriteAddValue(string name, float initVal);", + "public static void SplashKit.SpriteAddValue(Sprite s, string name, float initVal);" ], "cpp": [ - "void sprite_call_on_event(sprite s, sprite_event_handler *handler)" + "void sprite_add_value(sprite s, const string &name, float init_val)" ] } }, { - "signature": "circle sprite_circle(sprite s);", - "name": "sprite_circle", - "method_name": "circle", - "unique_global_name": "sprite_circle", - "unique_method_name": "sprite.circle", + "signature": "point_2d sprite_anchor_point(sprite s);", + "name": "sprite_anchor_point", + "method_name": null, + "unique_global_name": "sprite_anchor_point", + "unique_method_name": null, "suffix_name": null, - "description": "Gets a circle in the bounds of the base layer of the indicated sprite.", + "description": "Returns the anchor point of the sprite. This is the point around which the\nsprite rotates. This is in sprite coordinates, so as if the sprite is drawn\nat 0,0.", "brief": null, "return": { - "type": "circle", - "description": "A bounding circle that surrounds the sprite", + "type": "point_2d", + "description": "The anchor point of the sprite.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -64460,39 +64603,39 @@ }, "attributes": { "class": "sprite", - "method": "circle", + "getter": "anchor_point", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_circle(s):" + "def sprite_anchor_point(s):" ], "pascal": [ - "function SpriteCircle(s: Sprite): Circle" + "function SpriteAnchorPoint(s: Sprite): Point2D" ], "csharp": [ - "public Circle Sprite.SpriteCircle();", - "public static Circle SplashKit.SpriteCircle(Sprite s);" + "public Point2D Sprite.AnchorPoint { get }", + "public static Point2D SplashKit.SpriteAnchorPoint(Sprite s);" ], "cpp": [ - "circle sprite_circle(sprite s)" + "point_2d sprite_anchor_point(sprite s)" ] } }, { - "signature": "bitmap sprite_collision_bitmap(sprite s);", - "name": "sprite_collision_bitmap", + "signature": "point_2d sprite_anchor_position(sprite s);", + "name": "sprite_anchor_position", "method_name": null, - "unique_global_name": "sprite_collision_bitmap", + "unique_global_name": "sprite_anchor_position", "unique_method_name": null, "suffix_name": null, - "description": "Returns the bitmap used by the sprite to determine if it has collided with\nother objects in the game.", + "description": "The sprite anchor position, is the location of the anchor point in world\ncoordinates, based upon the position of the sprite.", "brief": null, "return": { - "type": "bitmap", - "description": "The bitmap used for collisions with this sprite.", + "type": "point_2d", + "description": "The location of the sprite's anchor point positioned at the sprite's location", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -64501,7 +64644,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to find where the anchor is in world coordinates", "is_pointer": false, "is_const": false, "is_reference": false, @@ -64514,40 +64657,37 @@ } }, "attributes": { - "class": "sprite", - "getter": "collision_bitmap", "group": "sprites", - "static": "sprite", - "self": "s" + "static": "sprite" }, "signatures": { "python": [ - "def sprite_collision_bitmap(s):" + "def sprite_anchor_position(s):" ], "pascal": [ - "function SpriteCollisionBitmap(s: Sprite): Bitmap" + "function SpriteAnchorPosition(s: Sprite): Point2D" ], "csharp": [ - "public Bitmap Sprite.CollisionBitmap { get }", - "public static Bitmap SplashKit.SpriteCollisionBitmap(Sprite s);" + "public static Point2D Sprite.SpriteAnchorPosition(Sprite s);", + "public static Point2D SplashKit.SpriteAnchorPosition(Sprite s);" ], "cpp": [ - "bitmap sprite_collision_bitmap(sprite s)" + "point_2d sprite_anchor_position(sprite s)" ] } }, { - "signature": "circle sprite_collision_circle(sprite s);", - "name": "sprite_collision_circle", - "method_name": "collision_circle", - "unique_global_name": "sprite_collision_circle", - "unique_method_name": "sprite.collision_circle", + "signature": "bool sprite_animation_has_ended(sprite s);", + "name": "sprite_animation_has_ended", + "method_name": null, + "unique_global_name": "sprite_animation_has_ended", + "unique_method_name": null, "suffix_name": null, - "description": "Gets a circle in the bounds of the indicated sprite's collision rectangle.", + "description": "Indicates if the sprites animation has ended.", "brief": null, "return": { - "type": "circle", - "description": "A bounding circle that surrounds the sprite", + "type": "bool", + "description": "True if the sprite animation has ended.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -64570,39 +64710,39 @@ }, "attributes": { "class": "sprite", - "method": "collision_circle", + "getter": "animation_has_ended", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_collision_circle(s):" + "def sprite_animation_has_ended(s):" ], "pascal": [ - "function SpriteCollisionCircle(s: Sprite): Circle" + "function SpriteAnimationHasEnded(s: Sprite): Boolean" ], "csharp": [ - "public Circle Sprite.SpriteCollisionCircle();", - "public static Circle SplashKit.SpriteCollisionCircle(Sprite s);" + "public bool Sprite.AnimationHasEnded { get }", + "public static bool SplashKit.SpriteAnimationHasEnded(Sprite s);" ], "cpp": [ - "circle sprite_collision_circle(sprite s)" + "bool sprite_animation_has_ended(sprite s)" ] } }, { - "signature": "collision_test_kind sprite_collision_kind(sprite s);", - "name": "sprite_collision_kind", - "method_name": null, - "unique_global_name": "sprite_collision_kind", - "unique_method_name": null, + "signature": "string sprite_animation_name(sprite s);", + "name": "sprite_animation_name", + "method_name": "animation_name", + "unique_global_name": "sprite_animation_name", + "unique_method_name": "sprite.animation_name", "suffix_name": null, - "description": "Returns the kind of collision used with this sprite. This is used when\ndetermining if the sprite has collided with other objects in the game.", + "description": "Returns the name of the sprite's current animation.", "brief": null, "return": { - "type": "collision_test_kind", - "description": "The kind of collisions performed with this sprite.", + "type": "string", + "description": "The name of the current animation.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -64625,39 +64765,39 @@ }, "attributes": { "class": "sprite", - "getter": "collision_kind", + "method": "animation_name", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_collision_kind(s):" + "def sprite_animation_name(s):" ], "pascal": [ - "function SpriteCollisionKind(s: Sprite): CollisionTestKind" + "function SpriteAnimationName(s: Sprite): String" ], "csharp": [ - "public CollisionTestKind Sprite.CollisionKind { get }", - "public static CollisionTestKind SplashKit.SpriteCollisionKind(Sprite s);" + "public string Sprite.SpriteAnimationName();", + "public static string SplashKit.SpriteAnimationName(Sprite s);" ], "cpp": [ - "collision_test_kind sprite_collision_kind(sprite s)" + "string sprite_animation_name(sprite s)" ] } }, { - "signature": "rectangle sprite_collision_rectangle(sprite s);", - "name": "sprite_collision_rectangle", + "signature": "bool sprite_at(sprite s,const point_2d &pt);", + "name": "sprite_at", "method_name": null, - "unique_global_name": "sprite_collision_rectangle", + "unique_global_name": "sprite_at", "unique_method_name": null, "suffix_name": null, - "description": "Returns the collision rectangle for the specified sprite.", + "description": "Determines if a sprite is at a given point.", "brief": null, "return": { - "type": "rectangle", - "description": "A collision rectangle that surrounds the sprite.", + "type": "bool", + "description": "True if the sprite is at the given point", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -64666,53 +64806,63 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to test", "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, "array_dimension_sizes": [ + ], + "is_vector": false, + "type_parameter": null + }, + "pt": { + "type": "point_2d", + "description": "The point to check (in world coordinates)", + "is_pointer": false, + "is_const": true, + "is_reference": true, + "is_array": false, + "array_dimension_sizes": [ + ], "is_vector": false, "type_parameter": null } }, "attributes": { - "class": "sprite", - "getter": "collision_rectangle", "group": "sprites", - "static": "sprite", - "self": "s" + "static": "sprite" }, "signatures": { "python": [ - "def sprite_collision_rectangle(s):" + "def sprite_at(s, pt):" ], "pascal": [ - "function SpriteCollisionRectangle(s: Sprite): Rectangle" + "function SpriteAt(s: Sprite; const pt: Point2D): Boolean" ], "csharp": [ - "public Rectangle Sprite.CollisionRectangle { get }", - "public static Rectangle SplashKit.SpriteCollisionRectangle(Sprite s);" + "public static bool Sprite.SpriteAt(Sprite s, Point2D pt);", + "public static bool SplashKit.SpriteAt(Sprite s, Point2D pt);" ], "cpp": [ - "rectangle sprite_collision_rectangle(sprite s)" + "bool sprite_at(sprite s, const point_2d &pt)" ] } }, { - "signature": "int sprite_current_cell(sprite s);", - "name": "sprite_current_cell", - "method_name": null, - "unique_global_name": "sprite_current_cell", - "unique_method_name": null, + "signature": "void sprite_bring_layer_forward(sprite s,int visible_layer);", + "name": "sprite_bring_layer_forward", + "method_name": "send_layer_forward", + "unique_global_name": "sprite_bring_layer_forward", + "unique_method_name": "sprite.send_layer_forward", "suffix_name": null, - "description": "Returns the current animation cell for an animated sprite. The cell is\nupdated when the sprite's animation data is updated.", + "description": "Sends the layer specified forward in the visible layer order.", "brief": null, "return": { - "type": "int", - "description": "The current cell animation of the sprite.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -64721,7 +64871,20 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to change", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "visible_layer": { + "type": "int", + "description": "The visible layer to bring forward", "is_pointer": false, "is_const": false, "is_reference": false, @@ -64735,39 +64898,39 @@ }, "attributes": { "class": "sprite", - "getter": "current_cell", + "method": "send_layer_forward", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_current_cell(s):" + "def sprite_bring_layer_forward(s, visible_layer):" ], "pascal": [ - "function SpriteCurrentCell(s: Sprite): Integer" + "procedure SpriteBringLayerForward(s: Sprite; visibleLayer: Integer)" ], "csharp": [ - "public int Sprite.CurrentCell { get }", - "public static int SplashKit.SpriteCurrentCell(Sprite s);" + "public void Sprite.SpriteBringLayerForward(int visibleLayer);", + "public static void SplashKit.SpriteBringLayerForward(Sprite s, int visibleLayer);" ], "cpp": [ - "int sprite_current_cell(sprite s)" + "void sprite_bring_layer_forward(sprite s, int visible_layer)" ] } }, { - "signature": "rectangle sprite_current_cell_rectangle(sprite s);", - "name": "sprite_current_cell_rectangle", - "method_name": null, - "unique_global_name": "sprite_current_cell_rectangle", - "unique_method_name": null, + "signature": "void sprite_bring_layer_to_front(sprite s,int visible_layer);", + "name": "sprite_bring_layer_to_front", + "method_name": "Send_layer_toFront", + "unique_global_name": "sprite_bring_layer_to_front", + "unique_method_name": "sprite.Send_layer_toFront", "suffix_name": null, - "description": "Returns a rectangle of the current cell within the sprite's image. This is used\nto determine what part of the bitmap should be used when the sprite is drawn.", + "description": "Sends the layer specified to the front in the visible layer order.", "brief": null, "return": { - "type": "rectangle", - "description": "The current cell rectangle of the sprite.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -64776,7 +64939,20 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to change", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "visible_layer": { + "type": "int", + "description": "The visible layer to bring to the front", "is_pointer": false, "is_const": false, "is_reference": false, @@ -64790,39 +64966,39 @@ }, "attributes": { "class": "sprite", - "getter": "current_cell_rectangle", + "method": "Send_layer_toFront", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_current_cell_rectangle(s):" + "def sprite_bring_layer_to_front(s, visible_layer):" ], "pascal": [ - "function SpriteCurrentCellRectangle(s: Sprite): Rectangle" + "procedure SpriteBringLayerToFront(s: Sprite; visibleLayer: Integer)" ], "csharp": [ - "public Rectangle Sprite.CurrentCellRectangle { get }", - "public static Rectangle SplashKit.SpriteCurrentCellRectangle(Sprite s);" + "public void Sprite.SpriteBringLayerToFront(int visibleLayer);", + "public static void SplashKit.SpriteBringLayerToFront(Sprite s, int visibleLayer);" ], "cpp": [ - "rectangle sprite_current_cell_rectangle(sprite s)" + "void sprite_bring_layer_to_front(sprite s, int visible_layer)" ] } }, { - "signature": "float sprite_dx(sprite s);", - "name": "sprite_dx", - "method_name": null, - "unique_global_name": "sprite_dx", - "unique_method_name": null, - "suffix_name": null, - "description": "Returns the X value of the sprite's velocity.", - "brief": null, - "return": { - "type": "float", - "description": "The x component of the sprite's velocity.", + "signature": "void sprite_call_on_event(sprite s,sprite_event_handler *handler);", + "name": "sprite_call_on_event", + "method_name": "call_on_event", + "unique_global_name": "sprite_call_on_event", + "unique_method_name": "sprite.call_on_event", + "suffix_name": null, + "description": "Register a procedure to call when events occur on the sprite.", + "brief": null, + "return": { + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -64831,13 +65007,26 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to add the handler to.", "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, "array_dimension_sizes": [ + ], + "is_vector": false, + "type_parameter": null + }, + "handler": { + "type": "sprite_event_handler", + "description": "The function to call when this sprite raises an event.", + "is_pointer": true, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + ], "is_vector": false, "type_parameter": null @@ -64845,39 +65034,39 @@ }, "attributes": { "class": "sprite", - "getter": "dx", + "method": "call_on_event", + "self": "s", "group": "sprites", - "static": "sprite", - "self": "s" + "static": "sprite" }, "signatures": { "python": [ - "def sprite_dx(s):" + "def sprite_call_on_event(s, handler):" ], "pascal": [ - "function SpriteDx(s: Sprite): Single" + "procedure SpriteCallOnEvent(s: Sprite; handler: SpriteEventHandler)" ], "csharp": [ - "public float Sprite.Dx { get }", - "public static float SplashKit.SpriteDx(Sprite s);" + "public void Sprite.SpriteCallOnEvent(SpriteEventHandler handler);", + "public static void SplashKit.SpriteCallOnEvent(Sprite s, SpriteEventHandler handler);" ], "cpp": [ - "float sprite_dx(sprite s)" + "void sprite_call_on_event(sprite s, sprite_event_handler *handler)" ] } }, { - "signature": "float sprite_dy(sprite s);", - "name": "sprite_dy", - "method_name": null, - "unique_global_name": "sprite_dy", - "unique_method_name": null, + "signature": "circle sprite_circle(sprite s);", + "name": "sprite_circle", + "method_name": "circle", + "unique_global_name": "sprite_circle", + "unique_method_name": "sprite.circle", "suffix_name": null, - "description": "Returns the Y value of the sprite's velocity.", + "description": "Gets a circle in the bounds of the base layer of the indicated sprite.", "brief": null, "return": { - "type": "float", - "description": "The y component of the sprite's velocity.", + "type": "circle", + "description": "A bounding circle that surrounds the sprite", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -64900,39 +65089,39 @@ }, "attributes": { "class": "sprite", - "getter": "dy", + "method": "circle", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_dy(s):" + "def sprite_circle(s):" ], "pascal": [ - "function SpriteDy(s: Sprite): Single" + "function SpriteCircle(s: Sprite): Circle" ], "csharp": [ - "public float Sprite.Dy { get }", - "public static float SplashKit.SpriteDy(Sprite s);" + "public Circle Sprite.SpriteCircle();", + "public static Circle SplashKit.SpriteCircle(Sprite s);" ], "cpp": [ - "float sprite_dy(sprite s)" + "circle sprite_circle(sprite s)" ] } }, { - "signature": "bool sprite_has_value(sprite s,string name);", - "name": "sprite_has_value", + "signature": "bitmap sprite_collision_bitmap(sprite s);", + "name": "sprite_collision_bitmap", "method_name": null, - "unique_global_name": "sprite_has_value", + "unique_global_name": "sprite_collision_bitmap", "unique_method_name": null, "suffix_name": null, - "description": "Indicates if the sprite has a value with the given name.", + "description": "Returns the bitmap used by the sprite to determine if it has collided with\nother objects in the game.", "brief": null, "return": { - "type": "bool", - "description": "True if the sprite has a value with that name.", + "type": "bitmap", + "description": "The bitmap used for collisions with this sprite.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -64948,56 +65137,46 @@ "is_array": false, "array_dimension_sizes": [ - ], - "is_vector": false, - "type_parameter": null - }, - "name": { - "type": "string", - "description": "The name of the value to check.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - ], "is_vector": false, "type_parameter": null } }, "attributes": { + "class": "sprite", + "getter": "collision_bitmap", "group": "sprites", - "static": "sprite" + "static": "sprite", + "self": "s" }, "signatures": { "python": [ - "def sprite_has_value(s, name):" + "def sprite_collision_bitmap(s):" ], "pascal": [ - "function SpriteHasValue(s: Sprite; name: String): Boolean" + "function SpriteCollisionBitmap(s: Sprite): Bitmap" ], "csharp": [ - "public static bool Sprite.SpriteHasValue(Sprite s, string name);", - "public static bool SplashKit.SpriteHasValue(Sprite s, string name);" + "public Bitmap Sprite.CollisionBitmap { get }", + "public static Bitmap SplashKit.SpriteCollisionBitmap(Sprite s);" ], "cpp": [ - "bool sprite_has_value(sprite s, string name)" + "bitmap sprite_collision_bitmap(sprite s)" ] } }, { - "signature": "float sprite_heading(sprite s);", - "name": "sprite_heading", - "method_name": null, - "unique_global_name": "sprite_heading", - "unique_method_name": null, + "signature": "circle sprite_collision_circle(sprite s);", + "name": "sprite_collision_circle", + "method_name": "collision_circle", + "unique_global_name": "sprite_collision_circle", + "unique_method_name": "sprite.collision_circle", "suffix_name": null, - "description": "Returns the direction the sprite is heading in degrees.", + "description": "Gets a circle in the bounds of the indicated sprite's collision rectangle.", "brief": null, "return": { - "type": "float", - "description": "The angle of the sprite velocity.", + "type": "circle", + "description": "A bounding circle that surrounds the sprite", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -65020,39 +65199,39 @@ }, "attributes": { "class": "sprite", - "getter": "heading", + "method": "collision_circle", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_heading(s):" + "def sprite_collision_circle(s):" ], "pascal": [ - "function SpriteHeading(s: Sprite): Single" + "function SpriteCollisionCircle(s: Sprite): Circle" ], "csharp": [ - "public float Sprite.Heading { get }", - "public static float SplashKit.SpriteHeading(Sprite s);" + "public Circle Sprite.SpriteCollisionCircle();", + "public static Circle SplashKit.SpriteCollisionCircle(Sprite s);" ], "cpp": [ - "float sprite_heading(sprite s)" + "circle sprite_collision_circle(sprite s)" ] } }, { - "signature": "int sprite_height(sprite s);", - "name": "sprite_height", + "signature": "collision_test_kind sprite_collision_kind(sprite s);", + "name": "sprite_collision_kind", "method_name": null, - "unique_global_name": "sprite_height", + "unique_global_name": "sprite_collision_kind", "unique_method_name": null, "suffix_name": null, - "description": "The current height of the sprite (aligned to the Y axis).", + "description": "Returns the kind of collision used with this sprite. This is used when\ndetermining if the sprite has collided with other objects in the game.", "brief": null, "return": { - "type": "int", - "description": "The height of the sprite in pixels.", + "type": "collision_test_kind", + "description": "The kind of collisions performed with this sprite.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -65075,39 +65254,39 @@ }, "attributes": { "class": "sprite", - "getter": "Height", + "getter": "collision_kind", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_height(s):" + "def sprite_collision_kind(s):" ], "pascal": [ - "function SpriteHeight(s: Sprite): Integer" + "function SpriteCollisionKind(s: Sprite): CollisionTestKind" ], "csharp": [ - "public int Sprite.Height { get }", - "public static int SplashKit.SpriteHeight(Sprite s);" + "public CollisionTestKind Sprite.CollisionKind { get }", + "public static CollisionTestKind SplashKit.SpriteCollisionKind(Sprite s);" ], "cpp": [ - "int sprite_height(sprite s)" + "collision_test_kind sprite_collision_kind(sprite s)" ] } }, { - "signature": "void sprite_hide_layer(sprite s,const string &name);", - "name": "sprite_hide_layer", - "method_name": "hide_layer", - "unique_global_name": "sprite_hide_layer_named", - "unique_method_name": "sprite.hide_layer_named", + "signature": "rectangle sprite_collision_rectangle(sprite s);", + "name": "sprite_collision_rectangle", + "method_name": null, + "unique_global_name": "sprite_collision_rectangle", + "unique_method_name": null, "suffix_name": null, - "description": "Hide the specified layer of the sprite.", + "description": "Returns the collision rectangle for the specified sprite.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "rectangle", + "description": "A collision rectangle that surrounds the sprite.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -65116,26 +65295,13 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to hide the layer of.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, "array_dimension_sizes": [ - ], - "is_vector": false, - "type_parameter": null - }, - "name": { - "type": "string", - "description": "The name of the layer to hide.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - ], "is_vector": false, "type_parameter": null @@ -65143,40 +65309,39 @@ }, "attributes": { "class": "sprite", - "method": "hide_layer", - "suffix": "named", + "getter": "collision_rectangle", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_hide_layer_named(s, name):" + "def sprite_collision_rectangle(s):" ], "pascal": [ - "procedure SpriteHideLayer(s: Sprite; const name: String)" + "function SpriteCollisionRectangle(s: Sprite): Rectangle" ], "csharp": [ - "public void Sprite.SpriteHideLayer(string name);", - "public static void SplashKit.SpriteHideLayer(Sprite s, string name);" + "public Rectangle Sprite.CollisionRectangle { get }", + "public static Rectangle SplashKit.SpriteCollisionRectangle(Sprite s);" ], "cpp": [ - "void sprite_hide_layer(sprite s, const string &name)" + "rectangle sprite_collision_rectangle(sprite s)" ] } }, { - "signature": "void sprite_hide_layer(sprite s,int id);", - "name": "sprite_hide_layer", - "method_name": "Hide_layer", - "unique_global_name": "sprite_hide_layer", - "unique_method_name": "sprite.Hide_layer", + "signature": "int sprite_current_cell(sprite s);", + "name": "sprite_current_cell", + "method_name": null, + "unique_global_name": "sprite_current_cell", + "unique_method_name": null, "suffix_name": null, - "description": "Hide the specified layer of the sprite.", + "description": "Returns the current animation cell for an animated sprite. The cell is\nupdated when the sprite's animation data is updated.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "int", + "description": "The current cell animation of the sprite.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -65185,20 +65350,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to hide the layer of.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "id": { - "type": "int", - "description": "The index of the layer to hide.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -65212,39 +65364,39 @@ }, "attributes": { "class": "sprite", - "method": "Hide_layer", + "getter": "current_cell", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_hide_layer(s, id):" + "def sprite_current_cell(s):" ], "pascal": [ - "procedure SpriteHideLayer(s: Sprite; id: Integer)" + "function SpriteCurrentCell(s: Sprite): Integer" ], "csharp": [ - "public void Sprite.SpriteHideLayer(int id);", - "public static void SplashKit.SpriteHideLayer(Sprite s, int id);" + "public int Sprite.CurrentCell { get }", + "public static int SplashKit.SpriteCurrentCell(Sprite s);" ], "cpp": [ - "void sprite_hide_layer(sprite s, int id)" + "int sprite_current_cell(sprite s)" ] } }, { - "signature": "bitmap sprite_layer(sprite s,const string &name);", - "name": "sprite_layer", - "method_name": "layer", - "unique_global_name": "sprite_layer_named", - "unique_method_name": "sprite.layer_named", + "signature": "rectangle sprite_current_cell_rectangle(sprite s);", + "name": "sprite_current_cell_rectangle", + "method_name": null, + "unique_global_name": "sprite_current_cell_rectangle", + "unique_method_name": null, "suffix_name": null, - "description": "Returns the bitmap of the indicated layer of the sprite.", + "description": "Returns a rectangle of the current cell within the sprite's image. This is used\nto determine what part of the bitmap should be used when the sprite is drawn.", "brief": null, "return": { - "type": "bitmap", - "description": "The bitmap at the layer with the indicated name", + "type": "rectangle", + "description": "The current cell rectangle of the sprite.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -65253,26 +65405,13 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the layer from", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, "array_dimension_sizes": [ - ], - "is_vector": false, - "type_parameter": null - }, - "name": { - "type": "string", - "description": "The name of the layer to fetch", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - ], "is_vector": false, "type_parameter": null @@ -65280,40 +65419,39 @@ }, "attributes": { "class": "sprite", - "method": "layer", - "suffix": "named", + "getter": "current_cell_rectangle", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_layer_named(s, name):" + "def sprite_current_cell_rectangle(s):" ], "pascal": [ - "function SpriteLayer(s: Sprite; const name: String): Bitmap" + "function SpriteCurrentCellRectangle(s: Sprite): Rectangle" ], "csharp": [ - "public Bitmap Sprite.SpriteLayer(string name);", - "public static Bitmap SplashKit.SpriteLayer(Sprite s, string name);" + "public Rectangle Sprite.CurrentCellRectangle { get }", + "public static Rectangle SplashKit.SpriteCurrentCellRectangle(Sprite s);" ], "cpp": [ - "bitmap sprite_layer(sprite s, const string &name)" + "rectangle sprite_current_cell_rectangle(sprite s)" ] } }, { - "signature": "bitmap sprite_layer(sprite s,int idx);", - "name": "sprite_layer", - "method_name": "layer", - "unique_global_name": "sprite_layer_at_index", - "unique_method_name": "sprite.layer_at_index", + "signature": "float sprite_dx(sprite s);", + "name": "sprite_dx", + "method_name": null, + "unique_global_name": "sprite_dx", + "unique_method_name": null, "suffix_name": null, - "description": "Returns the bitmap of the indicated layer of the sprite.", + "description": "Returns the X value of the sprite's velocity.", "brief": null, "return": { - "type": "bitmap", - "description": "The bitmap of the sprite at that layer", + "type": "float", + "description": "The x component of the sprite's velocity.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -65322,20 +65460,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the layer from", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "idx": { - "type": "int", - "description": "The index of the layer", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -65349,40 +65474,39 @@ }, "attributes": { "class": "sprite", - "method": "layer", - "suffix": "at_index", + "getter": "dx", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_layer_at_index(s, idx):" + "def sprite_dx(s):" ], "pascal": [ - "function SpriteLayer(s: Sprite; idx: Integer): Bitmap" + "function SpriteDx(s: Sprite): Single" ], "csharp": [ - "public Bitmap Sprite.SpriteLayer(int idx);", - "public static Bitmap SplashKit.SpriteLayer(Sprite s, int idx);" + "public float Sprite.Dx { get }", + "public static float SplashKit.SpriteDx(Sprite s);" ], "cpp": [ - "bitmap sprite_layer(sprite s, int idx)" + "float sprite_dx(sprite s)" ] } }, { - "signature": "circle sprite_layer_circle(sprite s,const string &name);", - "name": "sprite_layer_circle", - "method_name": "layer_circle", - "unique_global_name": "sprite_layer_circle_named", - "unique_method_name": "sprite.layer_circle_named", + "signature": "float sprite_dy(sprite s);", + "name": "sprite_dy", + "method_name": null, + "unique_global_name": "sprite_dy", + "unique_method_name": null, "suffix_name": null, - "description": "Gets a circle in the bounds of the indicated layer.", + "description": "Returns the Y value of the sprite's velocity.", "brief": null, "return": { - "type": "circle", - "description": "A bounding circle that surrounds the sprite's layer", + "type": "float", + "description": "The y component of the sprite's velocity.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -65398,19 +65522,6 @@ "is_array": false, "array_dimension_sizes": [ - ], - "is_vector": false, - "type_parameter": null - }, - "name": { - "type": "string", - "description": "The name of the layer.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - ], "is_vector": false, "type_parameter": null @@ -65418,40 +65529,39 @@ }, "attributes": { "class": "sprite", - "method": "layer_circle", - "suffix": "named", + "getter": "dy", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_layer_circle_named(s, name):" + "def sprite_dy(s):" ], "pascal": [ - "function SpriteLayerCircle(s: Sprite; const name: String): Circle" + "function SpriteDy(s: Sprite): Single" ], "csharp": [ - "public Circle Sprite.SpriteLayerCircle(string name);", - "public static Circle SplashKit.SpriteLayerCircle(Sprite s, string name);" + "public float Sprite.Dy { get }", + "public static float SplashKit.SpriteDy(Sprite s);" ], "cpp": [ - "circle sprite_layer_circle(sprite s, const string &name)" + "float sprite_dy(sprite s)" ] } }, { - "signature": "circle sprite_layer_circle(sprite s,int idx);", - "name": "sprite_layer_circle", - "method_name": "layer_circle", - "unique_global_name": "sprite_layer_circle_at_index", - "unique_method_name": "sprite.layer_circle_at_index", + "signature": "bool sprite_has_value(sprite s,string name);", + "name": "sprite_has_value", + "method_name": null, + "unique_global_name": "sprite_has_value", + "unique_method_name": null, "suffix_name": null, - "description": "Gets a circle in the bounds of the indicated layer.", + "description": "Indicates if the sprite has a value with the given name.", "brief": null, "return": { - "type": "circle", - "description": "A bounding circle that surrounds the sprite's layer", + "type": "bool", + "description": "True if the sprite has a value with that name.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -65471,9 +65581,9 @@ "is_vector": false, "type_parameter": null }, - "idx": { - "type": "int", - "description": "The index of the layer.", + "name": { + "type": "string", + "description": "The name of the value to check.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -65486,41 +65596,37 @@ } }, "attributes": { - "class": "sprite", - "method": "layer_circle", - "suffix": "at_index", "group": "sprites", - "static": "sprite", - "self": "s" + "static": "sprite" }, "signatures": { "python": [ - "def sprite_layer_circle_at_index(s, idx):" + "def sprite_has_value(s, name):" ], "pascal": [ - "function SpriteLayerCircle(s: Sprite; idx: Integer): Circle" + "function SpriteHasValue(s: Sprite; name: String): Boolean" ], "csharp": [ - "public Circle Sprite.SpriteLayerCircle(int idx);", - "public static Circle SplashKit.SpriteLayerCircle(Sprite s, int idx);" + "public static bool Sprite.SpriteHasValue(Sprite s, string name);", + "public static bool SplashKit.SpriteHasValue(Sprite s, string name);" ], "cpp": [ - "circle sprite_layer_circle(sprite s, int idx)" + "bool sprite_has_value(sprite s, string name)" ] } }, { - "signature": "int sprite_layer_count(sprite s);", - "name": "sprite_layer_count", + "signature": "float sprite_heading(sprite s);", + "name": "sprite_heading", "method_name": null, - "unique_global_name": "sprite_layer_count", + "unique_global_name": "sprite_heading", "unique_method_name": null, "suffix_name": null, - "description": "Returns the number of layers within the sprite.", + "description": "Returns the direction the sprite is heading in degrees.", "brief": null, "return": { - "type": "int", - "description": "The number of image layers in the sprite.", + "type": "float", + "description": "The angle of the sprite velocity.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -65529,7 +65635,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the layer count from.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -65543,39 +65649,39 @@ }, "attributes": { "class": "sprite", - "getter": "layer_count", + "getter": "heading", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_layer_count(s):" + "def sprite_heading(s):" ], "pascal": [ - "function SpriteLayerCount(s: Sprite): Integer" + "function SpriteHeading(s: Sprite): Single" ], "csharp": [ - "public int Sprite.LayerCount { get }", - "public static int SplashKit.SpriteLayerCount(Sprite s);" + "public float Sprite.Heading { get }", + "public static float SplashKit.SpriteHeading(Sprite s);" ], "cpp": [ - "int sprite_layer_count(sprite s)" + "float sprite_heading(sprite s)" ] } }, { - "signature": "int sprite_layer_height(sprite s,const string &name);", - "name": "sprite_layer_height", - "method_name": "layer_height", - "unique_global_name": "sprite_layer_height_named", - "unique_method_name": "sprite.layer_height_named", + "signature": "int sprite_height(sprite s);", + "name": "sprite_height", + "method_name": null, + "unique_global_name": "sprite_height", + "unique_method_name": null, "suffix_name": null, - "description": "The height of a given layer of the sprite (aligned to the Y axis).", + "description": "The current height of the sprite (aligned to the Y axis).", "brief": null, "return": { "type": "int", - "description": "The height of the sprite's layer in pixels.", + "description": "The height of the sprite in pixels.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -65591,19 +65697,6 @@ "is_array": false, "array_dimension_sizes": [ - ], - "is_vector": false, - "type_parameter": null - }, - "name": { - "type": "string", - "description": "The name of the layer to get the details of.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - ], "is_vector": false, "type_parameter": null @@ -65611,40 +65704,39 @@ }, "attributes": { "class": "sprite", - "method": "layer_height", - "suffix": "named", + "getter": "Height", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_layer_height_named(s, name):" + "def sprite_height(s):" ], "pascal": [ - "function SpriteLayerHeight(s: Sprite; const name: String): Integer" + "function SpriteHeight(s: Sprite): Integer" ], "csharp": [ - "public int Sprite.SpriteLayerHeight(string name);", - "public static int SplashKit.SpriteLayerHeight(Sprite s, string name);" + "public int Sprite.Height { get }", + "public static int SplashKit.SpriteHeight(Sprite s);" ], "cpp": [ - "int sprite_layer_height(sprite s, const string &name)" + "int sprite_height(sprite s)" ] } }, { - "signature": "int sprite_layer_height(sprite s,int idx);", - "name": "sprite_layer_height", - "method_name": "layer_height", - "unique_global_name": "sprite_layer_height", - "unique_method_name": "sprite.layer_height", + "signature": "void sprite_hide_layer(sprite s,const string &name);", + "name": "sprite_hide_layer", + "method_name": "hide_layer", + "unique_global_name": "sprite_hide_layer_named", + "unique_method_name": "sprite.hide_layer_named", "suffix_name": null, - "description": "The height of a given layer of the sprite (aligned to the Y axis).", + "description": "Hide the specified layer of the sprite.", "brief": null, "return": { - "type": "int", - "description": "The height of the sprite's layer in pixels.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -65653,7 +65745,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to hide the layer of.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -65664,77 +65756,9 @@ "is_vector": false, "type_parameter": null }, - "idx": { - "type": "int", - "description": "The index of the layer to get the details of.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - } - }, - "attributes": { - "class": "sprite", - "method": "layer_height", - "group": "sprites", - "static": "sprite", - "self": "s" - }, - "signatures": { - "python": [ - "def sprite_layer_height(s, idx):" - ], - "pascal": [ - "function SpriteLayerHeight(s: Sprite; idx: Integer): Integer" - ], - "csharp": [ - "public int Sprite.SpriteLayerHeight(int idx);", - "public static int SplashKit.SpriteLayerHeight(Sprite s, int idx);" - ], - "cpp": [ - "int sprite_layer_height(sprite s, int idx)" - ] - } - }, - { - "signature": "int sprite_layer_index(sprite s,const string &name);", - "name": "sprite_layer_index", - "method_name": "Index_of_layer", - "unique_global_name": "sprite_layer_index", - "unique_method_name": "sprite.Index_of_layer", - "suffix_name": null, - "description": "Returns the index of the specified layer.", - "brief": null, - "return": { - "type": "int", - "description": "The index of the layer in the sprite", - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { - "s": { - "type": "sprite", - "description": "The sprite to get the layer from", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "name": { - "type": "string", - "description": "The name of the layer to get the index of", + "name": { + "type": "string", + "description": "The name of the layer to hide.", "is_pointer": false, "is_const": true, "is_reference": true, @@ -65748,39 +65772,40 @@ }, "attributes": { "class": "sprite", - "method": "Index_of_layer", + "method": "hide_layer", + "suffix": "named", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_layer_index(s, name):" + "def sprite_hide_layer_named(s, name):" ], "pascal": [ - "function SpriteLayerIndex(s: Sprite; const name: String): Integer" + "procedure SpriteHideLayer(s: Sprite; const name: String)" ], "csharp": [ - "public int Sprite.SpriteLayerIndex(string name);", - "public static int SplashKit.SpriteLayerIndex(Sprite s, string name);" + "public void Sprite.SpriteHideLayer(string name);", + "public static void SplashKit.SpriteHideLayer(Sprite s, string name);" ], "cpp": [ - "int sprite_layer_index(sprite s, const string &name)" + "void sprite_hide_layer(sprite s, const string &name)" ] } }, { - "signature": "string sprite_layer_name(sprite s,int idx);", - "name": "sprite_layer_name", - "method_name": "layer_name", - "unique_global_name": "sprite_layer_name", - "unique_method_name": "sprite.layer_name", + "signature": "void sprite_hide_layer(sprite s,int id);", + "name": "sprite_hide_layer", + "method_name": "Hide_layer", + "unique_global_name": "sprite_hide_layer", + "unique_method_name": "sprite.Hide_layer", "suffix_name": null, - "description": "Returns the name of the specified layer.", + "description": "Hide the specified layer of the sprite.", "brief": null, "return": { - "type": "string", - "description": "The name of the sprite's layer at that index", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -65789,7 +65814,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the layer name from", + "description": "The sprite to hide the layer of.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -65800,9 +65825,9 @@ "is_vector": false, "type_parameter": null }, - "idx": { + "id": { "type": "int", - "description": "The index of the layer you want the name of", + "description": "The index of the layer to hide.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -65816,39 +65841,39 @@ }, "attributes": { "class": "sprite", - "method": "layer_name", + "method": "Hide_layer", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_layer_name(s, idx):" + "def sprite_hide_layer(s, id):" ], "pascal": [ - "function SpriteLayerName(s: Sprite; idx: Integer): String" + "procedure SpriteHideLayer(s: Sprite; id: Integer)" ], "csharp": [ - "public string Sprite.SpriteLayerName(int idx);", - "public static string SplashKit.SpriteLayerName(Sprite s, int idx);" + "public void Sprite.SpriteHideLayer(int id);", + "public static void SplashKit.SpriteHideLayer(Sprite s, int id);" ], "cpp": [ - "string sprite_layer_name(sprite s, int idx)" + "void sprite_hide_layer(sprite s, int id)" ] } }, { - "signature": "vector_2d sprite_layer_offset(sprite s,const string &name);", - "name": "sprite_layer_offset", - "method_name": "layer_offset", - "unique_global_name": "sprite_layer_offset_named", - "unique_method_name": "sprite.layer_offset_named", + "signature": "bitmap sprite_layer(sprite s,const string &name);", + "name": "sprite_layer", + "method_name": "layer", + "unique_global_name": "sprite_layer_named", + "unique_method_name": "sprite.layer_named", "suffix_name": null, - "description": "Gets the offset of the specified layer.", + "description": "Returns the bitmap of the indicated layer of the sprite.", "brief": null, "return": { - "type": "vector_2d", - "description": "The offset of the named layer in the sprite.", + "type": "bitmap", + "description": "The bitmap at the layer with the indicated name", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -65857,7 +65882,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to get the layer from", "is_pointer": false, "is_const": false, "is_reference": false, @@ -65870,7 +65895,7 @@ }, "name": { "type": "string", - "description": "The name of the layer to get the offset of.", + "description": "The name of the layer to fetch", "is_pointer": false, "is_const": true, "is_reference": true, @@ -65884,7 +65909,7 @@ }, "attributes": { "class": "sprite", - "method": "layer_offset", + "method": "layer", "suffix": "named", "group": "sprites", "static": "sprite", @@ -65892,32 +65917,32 @@ }, "signatures": { "python": [ - "def sprite_layer_offset_named(s, name):" + "def sprite_layer_named(s, name):" ], "pascal": [ - "function SpriteLayerOffset(s: Sprite; const name: String): Vector2D" + "function SpriteLayer(s: Sprite; const name: String): Bitmap" ], "csharp": [ - "public Vector2D Sprite.SpriteLayerOffset(string name);", - "public static Vector2D SplashKit.SpriteLayerOffset(Sprite s, string name);" + "public Bitmap Sprite.SpriteLayer(string name);", + "public static Bitmap SplashKit.SpriteLayer(Sprite s, string name);" ], "cpp": [ - "vector_2d sprite_layer_offset(sprite s, const string &name)" + "bitmap sprite_layer(sprite s, const string &name)" ] } }, { - "signature": "vector_2d sprite_layer_offset(sprite s,int idx);", - "name": "sprite_layer_offset", - "method_name": "layer_offset", - "unique_global_name": "sprite_layer_offset", - "unique_method_name": "sprite.layer_offset", + "signature": "bitmap sprite_layer(sprite s,int idx);", + "name": "sprite_layer", + "method_name": "layer", + "unique_global_name": "sprite_layer_at_index", + "unique_method_name": "sprite.layer_at_index", "suffix_name": null, - "description": "Gets the offset of the specified layer.", + "description": "Returns the bitmap of the indicated layer of the sprite.", "brief": null, "return": { - "type": "vector_2d", - "description": "The offset of the layer in the sprite.", + "type": "bitmap", + "description": "The bitmap of the sprite at that layer", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -65926,7 +65951,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to get the layer from", "is_pointer": false, "is_const": false, "is_reference": false, @@ -65939,7 +65964,7 @@ }, "idx": { "type": "int", - "description": "The index of the layer to get the offset of.", + "description": "The index of the layer", "is_pointer": false, "is_const": false, "is_reference": false, @@ -65953,39 +65978,40 @@ }, "attributes": { "class": "sprite", - "method": "layer_offset", + "method": "layer", + "suffix": "at_index", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_layer_offset(s, idx):" + "def sprite_layer_at_index(s, idx):" ], "pascal": [ - "function SpriteLayerOffset(s: Sprite; idx: Integer): Vector2D" + "function SpriteLayer(s: Sprite; idx: Integer): Bitmap" ], "csharp": [ - "public Vector2D Sprite.SpriteLayerOffset(int idx);", - "public static Vector2D SplashKit.SpriteLayerOffset(Sprite s, int idx);" + "public Bitmap Sprite.SpriteLayer(int idx);", + "public static Bitmap SplashKit.SpriteLayer(Sprite s, int idx);" ], "cpp": [ - "vector_2d sprite_layer_offset(sprite s, int idx)" + "bitmap sprite_layer(sprite s, int idx)" ] } }, { - "signature": "rectangle sprite_layer_rectangle(sprite s,const string &name);", - "name": "sprite_layer_rectangle", - "method_name": "layer_rectangle", - "unique_global_name": "sprite_layer_rectangle_named", - "unique_method_name": "sprite.layer_rectangle_named", + "signature": "circle sprite_layer_circle(sprite s,const string &name);", + "name": "sprite_layer_circle", + "method_name": "layer_circle", + "unique_global_name": "sprite_layer_circle_named", + "unique_method_name": "sprite.layer_circle_named", "suffix_name": null, - "description": "Gets a rectangle that surrounds the indicated layer.", + "description": "Gets a circle in the bounds of the indicated layer.", "brief": null, "return": { - "type": "rectangle", - "description": "A bounding rectangle that surrounds the sprite's layer", + "type": "circle", + "description": "A bounding circle that surrounds the sprite's layer", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -66021,7 +66047,7 @@ }, "attributes": { "class": "sprite", - "method": "layer_rectangle", + "method": "layer_circle", "suffix": "named", "group": "sprites", "static": "sprite", @@ -66029,32 +66055,32 @@ }, "signatures": { "python": [ - "def sprite_layer_rectangle_named(s, name):" + "def sprite_layer_circle_named(s, name):" ], "pascal": [ - "function SpriteLayerRectangle(s: Sprite; const name: String): Rectangle" + "function SpriteLayerCircle(s: Sprite; const name: String): Circle" ], "csharp": [ - "public Rectangle Sprite.SpriteLayerRectangle(string name);", - "public static Rectangle SplashKit.SpriteLayerRectangle(Sprite s, string name);" + "public Circle Sprite.SpriteLayerCircle(string name);", + "public static Circle SplashKit.SpriteLayerCircle(Sprite s, string name);" ], "cpp": [ - "rectangle sprite_layer_rectangle(sprite s, const string &name)" + "circle sprite_layer_circle(sprite s, const string &name)" ] } }, { - "signature": "rectangle sprite_layer_rectangle(sprite s,int idx);", - "name": "sprite_layer_rectangle", - "method_name": "layer_rectangle", - "unique_global_name": "sprite_layer_rectangle_at_index", - "unique_method_name": "sprite.layer_rectangle_at_index", + "signature": "circle sprite_layer_circle(sprite s,int idx);", + "name": "sprite_layer_circle", + "method_name": "layer_circle", + "unique_global_name": "sprite_layer_circle_at_index", + "unique_method_name": "sprite.layer_circle_at_index", "suffix_name": null, - "description": "Gets a rectangle that surrounds the indicated layer.", + "description": "Gets a circle in the bounds of the indicated layer.", "brief": null, "return": { - "type": "rectangle", - "description": "A bounding rectangle that surrounds the sprite's layer", + "type": "circle", + "description": "A bounding circle that surrounds the sprite's layer", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -66090,7 +66116,7 @@ }, "attributes": { "class": "sprite", - "method": "layer_rectangle", + "method": "layer_circle", "suffix": "at_index", "group": "sprites", "static": "sprite", @@ -66098,32 +66124,32 @@ }, "signatures": { "python": [ - "def sprite_layer_rectangle_at_index(s, idx):" + "def sprite_layer_circle_at_index(s, idx):" ], "pascal": [ - "function SpriteLayerRectangle(s: Sprite; idx: Integer): Rectangle" + "function SpriteLayerCircle(s: Sprite; idx: Integer): Circle" ], "csharp": [ - "public Rectangle Sprite.SpriteLayerRectangle(int idx);", - "public static Rectangle SplashKit.SpriteLayerRectangle(Sprite s, int idx);" + "public Circle Sprite.SpriteLayerCircle(int idx);", + "public static Circle SplashKit.SpriteLayerCircle(Sprite s, int idx);" ], "cpp": [ - "rectangle sprite_layer_rectangle(sprite s, int idx)" + "circle sprite_layer_circle(sprite s, int idx)" ] } }, { - "signature": "int sprite_layer_width(sprite s,const string &name);", - "name": "sprite_layer_width", - "method_name": "layer_width", - "unique_global_name": "sprite_layer_width_named", - "unique_method_name": "sprite.layer_width_named", + "signature": "int sprite_layer_count(sprite s);", + "name": "sprite_layer_count", + "method_name": null, + "unique_global_name": "sprite_layer_count", + "unique_method_name": null, "suffix_name": null, - "description": "The width of a given layer of the sprite (aligned to the X axis).", + "description": "Returns the number of layers within the sprite.", "brief": null, "return": { "type": "int", - "description": "The width of the sprite's layer in pixels.", + "description": "The number of image layers in the sprite.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -66132,26 +66158,13 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to get the layer count from.", "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, "array_dimension_sizes": [ - ], - "is_vector": false, - "type_parameter": null - }, - "name": { - "type": "string", - "description": "The name of the layer to get the details of.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - ], "is_vector": false, "type_parameter": null @@ -66159,40 +66172,39 @@ }, "attributes": { "class": "sprite", - "method": "layer_width", - "suffix": "named", + "getter": "layer_count", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_layer_width_named(s, name):" + "def sprite_layer_count(s):" ], "pascal": [ - "function SpriteLayerWidth(s: Sprite; const name: String): Integer" + "function SpriteLayerCount(s: Sprite): Integer" ], "csharp": [ - "public int Sprite.SpriteLayerWidth(string name);", - "public static int SplashKit.SpriteLayerWidth(Sprite s, string name);" + "public int Sprite.LayerCount { get }", + "public static int SplashKit.SpriteLayerCount(Sprite s);" ], "cpp": [ - "int sprite_layer_width(sprite s, const string &name)" + "int sprite_layer_count(sprite s)" ] } }, { - "signature": "int sprite_layer_width(sprite s,int idx);", - "name": "sprite_layer_width", - "method_name": "layer_width", - "unique_global_name": "sprite_layer_width", - "unique_method_name": "sprite.layer_width", + "signature": "int sprite_layer_height(sprite s,const string &name);", + "name": "sprite_layer_height", + "method_name": "layer_height", + "unique_global_name": "sprite_layer_height_named", + "unique_method_name": "sprite.layer_height_named", "suffix_name": null, - "description": "The width of a given layer of the sprite (aligned to the X axis).", + "description": "The height of a given layer of the sprite (aligned to the Y axis).", "brief": null, "return": { "type": "int", - "description": "The width of the sprite's layer in pixels.", + "description": "The height of the sprite's layer in pixels.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -66212,12 +66224,12 @@ "is_vector": false, "type_parameter": null }, - "idx": { - "type": "int", - "description": "The index of the layer to get the details of.", + "name": { + "type": "string", + "description": "The name of the layer to get the details of.", "is_pointer": false, - "is_const": false, - "is_reference": false, + "is_const": true, + "is_reference": true, "is_array": false, "array_dimension_sizes": [ @@ -66228,39 +66240,40 @@ }, "attributes": { "class": "sprite", - "method": "layer_width", + "method": "layer_height", + "suffix": "named", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_layer_width(s, idx):" + "def sprite_layer_height_named(s, name):" ], "pascal": [ - "function SpriteLayerWidth(s: Sprite; idx: Integer): Integer" + "function SpriteLayerHeight(s: Sprite; const name: String): Integer" ], "csharp": [ - "public int Sprite.SpriteLayerWidth(int idx);", - "public static int SplashKit.SpriteLayerWidth(Sprite s, int idx);" + "public int Sprite.SpriteLayerHeight(string name);", + "public static int SplashKit.SpriteLayerHeight(Sprite s, string name);" ], "cpp": [ - "int sprite_layer_width(sprite s, int idx)" + "int sprite_layer_height(sprite s, const string &name)" ] } }, { - "signature": "matrix_2d sprite_location_matrix(sprite s);", - "name": "sprite_location_matrix", - "method_name": null, - "unique_global_name": "sprite_location_matrix", - "unique_method_name": null, + "signature": "int sprite_layer_height(sprite s,int idx);", + "name": "sprite_layer_height", + "method_name": "layer_height", + "unique_global_name": "sprite_layer_height", + "unique_method_name": "sprite.layer_height", "suffix_name": null, - "description": "Returns a matrix that can be used to transform points into the coordinate\nspace of the passed in sprite.", + "description": "The height of a given layer of the sprite (aligned to the Y axis).", "brief": null, "return": { - "type": "matrix_2d", - "description": "A matrix that transforms points into the sprites coordinate\nspace.", + "type": "int", + "description": "The height of the sprite's layer in pixels.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -66276,6 +66289,19 @@ "is_array": false, "array_dimension_sizes": [ + ], + "is_vector": false, + "type_parameter": null + }, + "idx": { + "type": "int", + "description": "The index of the layer to get the details of.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + ], "is_vector": false, "type_parameter": null @@ -66283,39 +66309,39 @@ }, "attributes": { "class": "sprite", - "getter": "location_matrix", + "method": "layer_height", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_location_matrix(s):" + "def sprite_layer_height(s, idx):" ], "pascal": [ - "function SpriteLocationMatrix(s: Sprite): Matrix2D" + "function SpriteLayerHeight(s: Sprite; idx: Integer): Integer" ], "csharp": [ - "public Matrix2D Sprite.LocationMatrix { get }", - "public static Matrix2D SplashKit.SpriteLocationMatrix(Sprite s);" + "public int Sprite.SpriteLayerHeight(int idx);", + "public static int SplashKit.SpriteLayerHeight(Sprite s, int idx);" ], "cpp": [ - "matrix_2d sprite_location_matrix(sprite s)" + "int sprite_layer_height(sprite s, int idx)" ] } }, { - "signature": "float sprite_mass(sprite s);", - "name": "sprite_mass", - "method_name": null, - "unique_global_name": "sprite_mass", - "unique_method_name": null, + "signature": "int sprite_layer_index(sprite s,const string &name);", + "name": "sprite_layer_index", + "method_name": "Index_of_layer", + "unique_global_name": "sprite_layer_index", + "unique_method_name": "sprite.Index_of_layer", "suffix_name": null, - "description": "This indicates the mass of the sprite for any of the collide methods from\nPhysics. The mass of two colliding sprites will determine the relative\nvelocitys after the collision.", + "description": "Returns the index of the specified layer.", "brief": null, "return": { - "type": "float", - "description": "The mass of the sprite.", + "type": "int", + "description": "The index of the layer in the sprite", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -66324,13 +66350,26 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to get the layer from", "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, "array_dimension_sizes": [ + ], + "is_vector": false, + "type_parameter": null + }, + "name": { + "type": "string", + "description": "The name of the layer to get the index of", + "is_pointer": false, + "is_const": true, + "is_reference": true, + "is_array": false, + "array_dimension_sizes": [ + ], "is_vector": false, "type_parameter": null @@ -66338,39 +66377,39 @@ }, "attributes": { "class": "sprite", - "getter": "mass", + "method": "Index_of_layer", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_mass(s):" + "def sprite_layer_index(s, name):" ], "pascal": [ - "function SpriteMass(s: Sprite): Single" + "function SpriteLayerIndex(s: Sprite; const name: String): Integer" ], "csharp": [ - "public float Sprite.Mass { get }", - "public static float SplashKit.SpriteMass(Sprite s);" + "public int Sprite.SpriteLayerIndex(string name);", + "public static int SplashKit.SpriteLayerIndex(Sprite s, string name);" ], "cpp": [ - "float sprite_mass(sprite s)" + "int sprite_layer_index(sprite s, const string &name)" ] } }, { - "signature": "bool sprite_move_from_anchor_point(sprite s);", - "name": "sprite_move_from_anchor_point", - "method_name": null, - "unique_global_name": "sprite_move_from_anchor_point", - "unique_method_name": null, + "signature": "string sprite_layer_name(sprite s,int idx);", + "name": "sprite_layer_name", + "method_name": "layer_name", + "unique_global_name": "sprite_layer_name", + "unique_method_name": "sprite.layer_name", "suffix_name": null, - "description": "Indicates if the sprite is moved from its anchor point, or from its top left.\nWhen this returns true the location of the sprite will indicate its anchor point.\nWhen this returns false the location of the sprite is its top left corner.", + "description": "Returns the name of the specified layer.", "brief": null, "return": { - "type": "bool", - "description": "True if the sprite moves from its anchor point.", + "type": "string", + "description": "The name of the sprite's layer at that index", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -66379,7 +66418,20 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details of.", + "description": "The sprite to get the layer name from", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "idx": { + "type": "int", + "description": "The index of the layer you want the name of", "is_pointer": false, "is_const": false, "is_reference": false, @@ -66393,39 +66445,39 @@ }, "attributes": { "class": "sprite", - "getter": "move_from_anchor_point", + "method": "layer_name", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_move_from_anchor_point(s):" + "def sprite_layer_name(s, idx):" ], "pascal": [ - "function SpriteMoveFromAnchorPoint(s: Sprite): Boolean" + "function SpriteLayerName(s: Sprite; idx: Integer): String" ], "csharp": [ - "public bool Sprite.MoveFromAnchorPoint { get }", - "public static bool SplashKit.SpriteMoveFromAnchorPoint(Sprite s);" + "public string Sprite.SpriteLayerName(int idx);", + "public static string SplashKit.SpriteLayerName(Sprite s, int idx);" ], "cpp": [ - "bool sprite_move_from_anchor_point(sprite s)" + "string sprite_layer_name(sprite s, int idx)" ] } }, { - "signature": "void sprite_move_to(sprite s,const point_2d &pt,float taking_seconds);", - "name": "sprite_move_to", - "method_name": "move_to", - "unique_global_name": "sprite_move_to_taking_seconds", - "unique_method_name": "sprite.move_to_taking_seconds", + "signature": "vector_2d sprite_layer_offset(sprite s,const string &name);", + "name": "sprite_layer_offset", + "method_name": "layer_offset", + "unique_global_name": "sprite_layer_offset_named", + "unique_method_name": "sprite.layer_offset_named", "suffix_name": null, - "description": "This void starts the sprite moving to the indicated\ndestination point, over a specified number of seconds. When the\nsprite arrives it will raise the sprite_arrived event.", + "description": "Gets the offset of the specified layer.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "vector_2d", + "description": "The offset of the named layer in the sprite.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -66434,7 +66486,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to move.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -66445,28 +66497,15 @@ "is_vector": false, "type_parameter": null }, - "pt": { - "type": "point_2d", - "description": "The sprite's destination.", + "name": { + "type": "string", + "description": "The name of the layer to get the offset of.", "is_pointer": false, "is_const": true, "is_reference": true, "is_array": false, "array_dimension_sizes": [ - ], - "is_vector": false, - "type_parameter": null - }, - "taking_seconds": { - "type": "float", - "description": "The time the sprite should take to get to pt.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - ], "is_vector": false, "type_parameter": null @@ -66474,40 +66513,40 @@ }, "attributes": { "class": "sprite", - "method": "move_to", - "suffix": "taking_seconds", + "method": "layer_offset", + "suffix": "named", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_move_to_taking_seconds(s, pt, taking_seconds):" + "def sprite_layer_offset_named(s, name):" ], "pascal": [ - "procedure SpriteMoveTo(s: Sprite; const pt: Point2D; takingSeconds: Single)" + "function SpriteLayerOffset(s: Sprite; const name: String): Vector2D" ], "csharp": [ - "public void Sprite.SpriteMoveTo(Point2D pt, float takingSeconds);", - "public static void SplashKit.SpriteMoveTo(Sprite s, Point2D pt, float takingSeconds);" + "public Vector2D Sprite.SpriteLayerOffset(string name);", + "public static Vector2D SplashKit.SpriteLayerOffset(Sprite s, string name);" ], "cpp": [ - "void sprite_move_to(sprite s, const point_2d &pt, float taking_seconds)" + "vector_2d sprite_layer_offset(sprite s, const string &name)" ] } }, { - "signature": "string sprite_name(sprite s);", - "name": "sprite_name", - "method_name": null, - "unique_global_name": "sprite_name", - "unique_method_name": null, + "signature": "vector_2d sprite_layer_offset(sprite s,int idx);", + "name": "sprite_layer_offset", + "method_name": "layer_offset", + "unique_global_name": "sprite_layer_offset", + "unique_method_name": "sprite.layer_offset", "suffix_name": null, - "description": "Returns the name of the sprite. This name is used for resource management\nand can be used to interact with the sprite in various routines.", + "description": "Gets the offset of the specified layer.", "brief": null, "return": { - "type": "string", - "description": "The name of the sprite.", + "type": "vector_2d", + "description": "The offset of the layer in the sprite.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -66526,52 +66565,78 @@ ], "is_vector": false, "type_parameter": null - } - }, - "attributes": { - "class": "sprite", - "getter": "name", - "group": "sprites", + }, + "idx": { + "type": "int", + "description": "The index of the layer to get the offset of.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } + }, + "attributes": { + "class": "sprite", + "method": "layer_offset", + "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_name(s):" + "def sprite_layer_offset(s, idx):" ], "pascal": [ - "function SpriteName(s: Sprite): String" + "function SpriteLayerOffset(s: Sprite; idx: Integer): Vector2D" ], "csharp": [ - "public string Sprite.Name { get }", - "public static string SplashKit.SpriteName(Sprite s);" + "public Vector2D Sprite.SpriteLayerOffset(int idx);", + "public static Vector2D SplashKit.SpriteLayerOffset(Sprite s, int idx);" ], "cpp": [ - "string sprite_name(sprite s)" + "vector_2d sprite_layer_offset(sprite s, int idx)" ] } }, { - "signature": "sprite sprite_named(const string &name);", - "name": "sprite_named", - "method_name": null, - "unique_global_name": "sprite_named", - "unique_method_name": null, + "signature": "rectangle sprite_layer_rectangle(sprite s,const string &name);", + "name": "sprite_layer_rectangle", + "method_name": "layer_rectangle", + "unique_global_name": "sprite_layer_rectangle_named", + "unique_method_name": "sprite.layer_rectangle_named", "suffix_name": null, - "description": "Returns the `sprite` with the specified name.", + "description": "Gets a rectangle that surrounds the indicated layer.", "brief": null, "return": { - "type": "sprite", - "description": "The sprite with that name.", + "type": "rectangle", + "description": "A bounding rectangle that surrounds the sprite's layer", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { + "s": { + "type": "sprite", + "description": "The sprite to get the details from.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, "name": { "type": "string", - "description": "The name of the sprite to locate.", + "description": "The name of the layer.", "is_pointer": false, "is_const": true, "is_reference": true, @@ -66584,37 +66649,41 @@ } }, "attributes": { + "class": "sprite", + "method": "layer_rectangle", + "suffix": "named", "group": "sprites", - "static": "sprite" + "static": "sprite", + "self": "s" }, "signatures": { "python": [ - "def sprite_named(name):" + "def sprite_layer_rectangle_named(s, name):" ], "pascal": [ - "function SpriteNamed(const name: String): Sprite" + "function SpriteLayerRectangle(s: Sprite; const name: String): Rectangle" ], "csharp": [ - "public static Sprite Sprite.SpriteNamed(string name);", - "public static Sprite SplashKit.SpriteNamed(string name);" + "public Rectangle Sprite.SpriteLayerRectangle(string name);", + "public static Rectangle SplashKit.SpriteLayerRectangle(Sprite s, string name);" ], "cpp": [ - "sprite sprite_named(const string &name)" + "rectangle sprite_layer_rectangle(sprite s, const string &name)" ] } }, { - "signature": "bool sprite_offscreen(sprite s);", - "name": "sprite_offscreen", - "method_name": "offscreen", - "unique_global_name": "sprite_offscreen", - "unique_method_name": "sprite.offscreen", + "signature": "rectangle sprite_layer_rectangle(sprite s,int idx);", + "name": "sprite_layer_rectangle", + "method_name": "layer_rectangle", + "unique_global_name": "sprite_layer_rectangle_at_index", + "unique_method_name": "sprite.layer_rectangle_at_index", "suffix_name": null, - "description": "Returns true if the sprite is entirely off the current screen.", + "description": "Gets a rectangle that surrounds the indicated layer.", "brief": null, "return": { - "type": "bool", - "description": "True if the sprite is entirely off the current window.", + "type": "rectangle", + "description": "A bounding rectangle that surrounds the sprite's layer", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -66623,7 +66692,20 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to test.", + "description": "The sprite to get the details from.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "idx": { + "type": "int", + "description": "The index of the layer.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -66637,39 +66719,40 @@ }, "attributes": { "class": "sprite", - "method": "offscreen", + "method": "layer_rectangle", + "suffix": "at_index", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_offscreen(s):" + "def sprite_layer_rectangle_at_index(s, idx):" ], "pascal": [ - "function SpriteOffscreen(s: Sprite): Boolean" + "function SpriteLayerRectangle(s: Sprite; idx: Integer): Rectangle" ], "csharp": [ - "public bool Sprite.SpriteOffscreen();", - "public static bool SplashKit.SpriteOffscreen(Sprite s);" + "public Rectangle Sprite.SpriteLayerRectangle(int idx);", + "public static Rectangle SplashKit.SpriteLayerRectangle(Sprite s, int idx);" ], "cpp": [ - "bool sprite_offscreen(sprite s)" + "rectangle sprite_layer_rectangle(sprite s, int idx)" ] } }, { - "signature": "bool sprite_on_screen_at(sprite s,const point_2d &pt);", - "name": "sprite_on_screen_at", - "method_name": "on_screen_at", - "unique_global_name": "sprite_on_screen_at_point", - "unique_method_name": "sprite.on_screen_at_point", + "signature": "int sprite_layer_width(sprite s,const string &name);", + "name": "sprite_layer_width", + "method_name": "layer_width", + "unique_global_name": "sprite_layer_width_named", + "unique_method_name": "sprite.layer_width_named", "suffix_name": null, - "description": "Returns true if a pixel of the `sprite` `s` is at the screen location\nspecified (`pt`), which is converted to a world location.", + "description": "The width of a given layer of the sprite (aligned to the X axis).", "brief": null, "return": { - "type": "bool", - "description": "True if the sprite would draw something at this coordinate on\nthe screen when drawn.", + "type": "int", + "description": "The width of the sprite's layer in pixels.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -66678,7 +66761,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to test.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -66689,9 +66772,9 @@ "is_vector": false, "type_parameter": null }, - "pt": { - "type": "point_2d", - "description": "The location in screen coordinates to check.", + "name": { + "type": "string", + "description": "The name of the layer to get the details of.", "is_pointer": false, "is_const": true, "is_reference": true, @@ -66705,40 +66788,40 @@ }, "attributes": { "class": "sprite", - "method": "on_screen_at", - "suffix": "point", + "method": "layer_width", + "suffix": "named", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_on_screen_at_point(s, pt):" + "def sprite_layer_width_named(s, name):" ], "pascal": [ - "function SpriteOnScreenAt(s: Sprite; const pt: Point2D): Boolean" + "function SpriteLayerWidth(s: Sprite; const name: String): Integer" ], "csharp": [ - "public bool Sprite.SpriteOnScreenAt(Point2D pt);", - "public static bool SplashKit.SpriteOnScreenAt(Sprite s, Point2D pt);" + "public int Sprite.SpriteLayerWidth(string name);", + "public static int SplashKit.SpriteLayerWidth(Sprite s, string name);" ], "cpp": [ - "bool sprite_on_screen_at(sprite s, const point_2d &pt)" + "int sprite_layer_width(sprite s, const string &name)" ] } }, { - "signature": "bool sprite_on_screen_at(sprite s,double x,double y);", - "name": "sprite_on_screen_at", - "method_name": "on_screen_at", - "unique_global_name": "sprite_on_screen_at", - "unique_method_name": "sprite.on_screen_at", + "signature": "int sprite_layer_width(sprite s,int idx);", + "name": "sprite_layer_width", + "method_name": "layer_width", + "unique_global_name": "sprite_layer_width", + "unique_method_name": "sprite.layer_width", "suffix_name": null, - "description": "Returns true if a pixel of the `sprite` `s` is at the screen location\nspecified.", + "description": "The width of a given layer of the sprite (aligned to the X axis).", "brief": null, "return": { - "type": "bool", - "description": "True if the sprite would draw something at this coordinate on\nthe screen when drawn.", + "type": "int", + "description": "The width of the sprite's layer in pixels.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -66747,20 +66830,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to test.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "x": { - "type": "double", - "description": "The x location in screen coordinates to check.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -66771,9 +66841,9 @@ "is_vector": false, "type_parameter": null }, - "y": { - "type": "double", - "description": "The y location in screen coordinates to check.", + "idx": { + "type": "int", + "description": "The index of the layer to get the details of.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -66787,39 +66857,39 @@ }, "attributes": { "class": "sprite", - "method": "on_screen_at", + "method": "layer_width", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_on_screen_at(s, x, y):" + "def sprite_layer_width(s, idx):" ], "pascal": [ - "function SpriteOnScreenAt(s: Sprite; x: Double; y: Double): Boolean" + "function SpriteLayerWidth(s: Sprite; idx: Integer): Integer" ], "csharp": [ - "public bool Sprite.SpriteOnScreenAt(double x, double y);", - "public static bool SplashKit.SpriteOnScreenAt(Sprite s, double x, double y);" + "public int Sprite.SpriteLayerWidth(int idx);", + "public static int SplashKit.SpriteLayerWidth(Sprite s, int idx);" ], "cpp": [ - "bool sprite_on_screen_at(sprite s, double x, double y)" + "int sprite_layer_width(sprite s, int idx)" ] } }, { - "signature": "point_2d sprite_position(sprite s);", - "name": "sprite_position", + "signature": "matrix_2d sprite_location_matrix(sprite s);", + "name": "sprite_location_matrix", "method_name": null, - "unique_global_name": "sprite_position", + "unique_global_name": "sprite_location_matrix", "unique_method_name": null, "suffix_name": null, - "description": "Returns the sprite's position.", + "description": "Returns a matrix that can be used to transform points into the coordinate\nspace of the passed in sprite.", "brief": null, "return": { - "type": "point_2d", - "description": "The location of the sprite.", + "type": "matrix_2d", + "description": "A matrix that transforms points into the sprites coordinate\nspace.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -66842,39 +66912,39 @@ }, "attributes": { "class": "sprite", - "getter": "Position", + "getter": "location_matrix", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_position(s):" + "def sprite_location_matrix(s):" ], "pascal": [ - "function SpritePosition(s: Sprite): Point2D" + "function SpriteLocationMatrix(s: Sprite): Matrix2D" ], "csharp": [ - "public Point2D Sprite.Position { get }", - "public static Point2D SplashKit.SpritePosition(Sprite s);" + "public Matrix2D Sprite.LocationMatrix { get }", + "public static Matrix2D SplashKit.SpriteLocationMatrix(Sprite s);" ], "cpp": [ - "point_2d sprite_position(sprite s)" + "matrix_2d sprite_location_matrix(sprite s)" ] } }, { - "signature": "void sprite_replay_animation(sprite s);", - "name": "sprite_replay_animation", - "method_name": "Replay_animation", - "unique_global_name": "sprite_replay_animation", - "unique_method_name": "sprite.Replay_animation", + "signature": "float sprite_mass(sprite s);", + "name": "sprite_mass", + "method_name": null, + "unique_global_name": "sprite_mass", + "unique_method_name": null, "suffix_name": null, - "description": "Restart the sprite's current animation, this will play a sound if the\nfirst cell of the animation is associated with a sound effect.", + "description": "This indicates the mass of the sprite for any of the collide methods from\nPhysics. The mass of two colliding sprites will determine the relative\nvelocitys after the collision.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "float", + "description": "The mass of the sprite.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -66883,7 +66953,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to replay the animation of.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -66897,39 +66967,39 @@ }, "attributes": { "class": "sprite", - "method": "Replay_animation", + "getter": "mass", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_replay_animation(s):" + "def sprite_mass(s):" ], "pascal": [ - "procedure SpriteReplayAnimation(s: Sprite)" + "function SpriteMass(s: Sprite): Single" ], "csharp": [ - "public void Sprite.SpriteReplayAnimation();", - "public static void SplashKit.SpriteReplayAnimation(Sprite s);" + "public float Sprite.Mass { get }", + "public static float SplashKit.SpriteMass(Sprite s);" ], "cpp": [ - "void sprite_replay_animation(sprite s)" + "float sprite_mass(sprite s)" ] } }, { - "signature": "void sprite_replay_animation(sprite s,bool with_sound);", - "name": "sprite_replay_animation", - "method_name": "replay_animation", - "unique_global_name": "sprite_replay_animation_with_sound", - "unique_method_name": "sprite.replay_animation_with_sound", + "signature": "bool sprite_move_from_anchor_point(sprite s);", + "name": "sprite_move_from_anchor_point", + "method_name": null, + "unique_global_name": "sprite_move_from_anchor_point", + "unique_method_name": null, "suffix_name": null, - "description": "Restart the sprite's current animation, this will play a sound if\nwith_sound is true and the first cell of the animation is associated\nwith a sound effect.", + "description": "Indicates if the sprite is moved from its anchor point, or from its top left.\nWhen this returns true the location of the sprite will indicate its anchor point.\nWhen this returns false the location of the sprite is its top left corner.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "bool", + "description": "True if the sprite moves from its anchor point.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -66938,20 +67008,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to replay the animation of.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "with_sound": { - "type": "bool", - "description": "If false, the animation will not play associated sound\neffects when restarted.", + "description": "The sprite to get the details of.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -66965,40 +67022,39 @@ }, "attributes": { "class": "sprite", - "method": "replay_animation", - "suffix": "with_sound", + "getter": "move_from_anchor_point", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_replay_animation_with_sound(s, with_sound):" + "def sprite_move_from_anchor_point(s):" ], "pascal": [ - "procedure SpriteReplayAnimation(s: Sprite; withSound: Boolean)" + "function SpriteMoveFromAnchorPoint(s: Sprite): Boolean" ], "csharp": [ - "public void Sprite.SpriteReplayAnimation(bool withSound);", - "public static void SplashKit.SpriteReplayAnimation(Sprite s, bool withSound);" + "public bool Sprite.MoveFromAnchorPoint { get }", + "public static bool SplashKit.SpriteMoveFromAnchorPoint(Sprite s);" ], "cpp": [ - "void sprite_replay_animation(sprite s, bool with_sound)" + "bool sprite_move_from_anchor_point(sprite s)" ] } }, { - "signature": "float sprite_rotation(sprite s);", - "name": "sprite_rotation", - "method_name": null, - "unique_global_name": "sprite_rotation", - "unique_method_name": null, + "signature": "void sprite_move_to(sprite s,const point_2d &pt,float taking_seconds);", + "name": "sprite_move_to", + "method_name": "move_to", + "unique_global_name": "sprite_move_to_taking_seconds", + "unique_method_name": "sprite.move_to_taking_seconds", "suffix_name": null, - "description": "This indicates the angle of rotation of the sprite. This will rotate any\nimages of the sprite before drawing, which can be very slow. avoid using\nthis method with bitmap based sprites where possible.", + "description": "This void starts the sprite moving to the indicated\ndestination point, over a specified number of seconds. When the\nsprite arrives it will raise the sprite_arrived event.", "brief": null, "return": { - "type": "float", - "description": "The angle of the sprite rotation.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -67007,7 +67063,33 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to move.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "pt": { + "type": "point_2d", + "description": "The sprite's destination.", + "is_pointer": false, + "is_const": true, + "is_reference": true, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "taking_seconds": { + "type": "float", + "description": "The time the sprite should take to get to pt.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -67021,39 +67103,40 @@ }, "attributes": { "class": "sprite", - "getter": "rotation", + "method": "move_to", + "suffix": "taking_seconds", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_rotation(s):" + "def sprite_move_to_taking_seconds(s, pt, taking_seconds):" ], "pascal": [ - "function SpriteRotation(s: Sprite): Single" + "procedure SpriteMoveTo(s: Sprite; const pt: Point2D; takingSeconds: Single)" ], "csharp": [ - "public float Sprite.Rotation { get }", - "public static float SplashKit.SpriteRotation(Sprite s);" + "public void Sprite.SpriteMoveTo(Point2D pt, float takingSeconds);", + "public static void SplashKit.SpriteMoveTo(Sprite s, Point2D pt, float takingSeconds);" ], "cpp": [ - "float sprite_rotation(sprite s)" + "void sprite_move_to(sprite s, const point_2d &pt, float taking_seconds)" ] } }, { - "signature": "float sprite_scale(sprite s);", - "name": "sprite_scale", + "signature": "string sprite_name(sprite s);", + "name": "sprite_name", "method_name": null, - "unique_global_name": "sprite_scale", + "unique_global_name": "sprite_name", "unique_method_name": null, "suffix_name": null, - "description": "This indicates the scale of the sprite. This will scale any\nimages of the sprite before drawing, which can be very slow. avoid using\nthis method with bitmap based sprites where possible.", + "description": "Returns the name of the sprite. This name is used for resource management\nand can be used to interact with the sprite in various routines.", "brief": null, "return": { - "type": "float", - "description": "The scale of the sprite.", + "type": "string", + "description": "The name of the sprite.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -67076,51 +67159,51 @@ }, "attributes": { "class": "sprite", - "getter": "scale", + "getter": "name", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_scale(s):" + "def sprite_name(s):" ], "pascal": [ - "function SpriteScale(s: Sprite): Single" + "function SpriteName(s: Sprite): String" ], "csharp": [ - "public float Sprite.Scale { get }", - "public static float SplashKit.SpriteScale(Sprite s);" + "public string Sprite.Name { get }", + "public static string SplashKit.SpriteName(Sprite s);" ], "cpp": [ - "float sprite_scale(sprite s)" + "string sprite_name(sprite s)" ] } }, { - "signature": "rectangle sprite_screen_rectangle(sprite s);", - "name": "sprite_screen_rectangle", + "signature": "sprite sprite_named(const string &name);", + "name": "sprite_named", "method_name": null, - "unique_global_name": "sprite_screen_rectangle", + "unique_global_name": "sprite_named", "unique_method_name": null, "suffix_name": null, - "description": "Returns the rectangle representing the location of the sprite on the\nscreen.", + "description": "Returns the `sprite` with the specified name.", "brief": null, "return": { - "type": "rectangle", - "description": "A rectangle indicating where the sprite is on the screen.", + "type": "sprite", + "description": "The sprite with that name.", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "s": { - "type": "sprite", - "description": "The sprite to get the details from.", + "name": { + "type": "string", + "description": "The name of the sprite to locate.", "is_pointer": false, - "is_const": false, - "is_reference": false, + "is_const": true, + "is_reference": true, "is_array": false, "array_dimension_sizes": [ @@ -67130,40 +67213,37 @@ } }, "attributes": { - "class": "sprite", - "getter": "screen_rectangle", "group": "sprites", - "static": "sprite", - "self": "s" + "static": "sprite" }, "signatures": { "python": [ - "def sprite_screen_rectangle(s):" + "def sprite_named(name):" ], "pascal": [ - "function SpriteScreenRectangle(s: Sprite): Rectangle" + "function SpriteNamed(const name: String): Sprite" ], "csharp": [ - "public Rectangle Sprite.ScreenRectangle { get }", - "public static Rectangle SplashKit.SpriteScreenRectangle(Sprite s);" + "public static Sprite Sprite.SpriteNamed(string name);", + "public static Sprite SplashKit.SpriteNamed(string name);" ], "cpp": [ - "rectangle sprite_screen_rectangle(sprite s)" + "sprite sprite_named(const string &name)" ] } }, { - "signature": "void sprite_send_layer_backward(sprite s,int visible_layer);", - "name": "sprite_send_layer_backward", - "method_name": "Send_layer_toBackward", - "unique_global_name": "sprite_send_layer_backward", - "unique_method_name": "sprite.Send_layer_toBackward", + "signature": "bool sprite_offscreen(sprite s);", + "name": "sprite_offscreen", + "method_name": "offscreen", + "unique_global_name": "sprite_offscreen", + "unique_method_name": "sprite.offscreen", "suffix_name": null, - "description": "Sends the layer specified backward in the visible layer order.", + "description": "Returns true if the sprite is entirely off the current screen.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "bool", + "description": "True if the sprite is entirely off the current window.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -67172,20 +67252,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "visible_layer": { - "type": "int", - "description": "The visible layer to send to backward", + "description": "The sprite to test.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -67199,39 +67266,39 @@ }, "attributes": { "class": "sprite", - "method": "Send_layer_toBackward", + "method": "offscreen", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_send_layer_backward(s, visible_layer):" + "def sprite_offscreen(s):" ], "pascal": [ - "procedure SpriteSendLayerBackward(s: Sprite; visibleLayer: Integer)" + "function SpriteOffscreen(s: Sprite): Boolean" ], "csharp": [ - "public void Sprite.SpriteSendLayerBackward(int visibleLayer);", - "public static void SplashKit.SpriteSendLayerBackward(Sprite s, int visibleLayer);" + "public bool Sprite.SpriteOffscreen();", + "public static bool SplashKit.SpriteOffscreen(Sprite s);" ], "cpp": [ - "void sprite_send_layer_backward(sprite s, int visible_layer)" + "bool sprite_offscreen(sprite s)" ] } }, { - "signature": "void sprite_send_layer_to_back(sprite s,int visible_layer);", - "name": "sprite_send_layer_to_back", - "method_name": "send_layer_to_back", - "unique_global_name": "sprite_send_layer_to_back", - "unique_method_name": "sprite.send_layer_to_back", + "signature": "bool sprite_on_screen_at(sprite s,const point_2d &pt);", + "name": "sprite_on_screen_at", + "method_name": "on_screen_at", + "unique_global_name": "sprite_on_screen_at_point", + "unique_method_name": "sprite.on_screen_at_point", "suffix_name": null, - "description": "Sends the layer specified to the back in the visible layer order.", + "description": "Returns true if a pixel of the `sprite` `s` is at the screen location\nspecified (`pt`), which is converted to a world location.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "bool", + "description": "True if the sprite would draw something at this coordinate on\nthe screen when drawn.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -67240,7 +67307,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change", + "description": "The sprite to test.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -67251,12 +67318,12 @@ "is_vector": false, "type_parameter": null }, - "visible_layer": { - "type": "int", - "description": "The visible layer to send to back", + "pt": { + "type": "point_2d", + "description": "The location in screen coordinates to check.", "is_pointer": false, - "is_const": false, - "is_reference": false, + "is_const": true, + "is_reference": true, "is_array": false, "array_dimension_sizes": [ @@ -67267,39 +67334,40 @@ }, "attributes": { "class": "sprite", - "method": "send_layer_to_back", + "method": "on_screen_at", + "suffix": "point", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_send_layer_to_back(s, visible_layer):" + "def sprite_on_screen_at_point(s, pt):" ], "pascal": [ - "procedure SpriteSendLayerToBack(s: Sprite; visibleLayer: Integer)" + "function SpriteOnScreenAt(s: Sprite; const pt: Point2D): Boolean" ], "csharp": [ - "public void Sprite.SpriteSendLayerToBack(int visibleLayer);", - "public static void SplashKit.SpriteSendLayerToBack(Sprite s, int visibleLayer);" + "public bool Sprite.SpriteOnScreenAt(Point2D pt);", + "public static bool SplashKit.SpriteOnScreenAt(Sprite s, Point2D pt);" ], "cpp": [ - "void sprite_send_layer_to_back(sprite s, int visible_layer)" + "bool sprite_on_screen_at(sprite s, const point_2d &pt)" ] } }, { - "signature": "void sprite_set_anchor_point(sprite s,const point_2d &pt);", - "name": "sprite_set_anchor_point", - "method_name": null, - "unique_global_name": "sprite_set_anchor_point", - "unique_method_name": null, + "signature": "bool sprite_on_screen_at(sprite s,double x,double y);", + "name": "sprite_on_screen_at", + "method_name": "on_screen_at", + "unique_global_name": "sprite_on_screen_at", + "unique_method_name": "sprite.on_screen_at", "suffix_name": null, - "description": "Allows you to set the anchor point for the sprite. This is the point around\nwhich the sprite rotates. This is in sprite coordinates, as if the sprite\nis drawn at 0,0.", + "description": "Returns true if a pixel of the `sprite` `s` is at the screen location\nspecified.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "bool", + "description": "True if the sprite would draw something at this coordinate on\nthe screen when drawn.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -67308,7 +67376,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change.", + "description": "The sprite to test.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -67319,12 +67387,25 @@ "is_vector": false, "type_parameter": null }, - "pt": { - "type": "point_2d", - "description": "The new anchor point in sprite coordinates.", + "x": { + "type": "double", + "description": "The x location in screen coordinates to check.", "is_pointer": false, - "is_const": true, - "is_reference": true, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "y": { + "type": "double", + "description": "The y location in screen coordinates to check.", + "is_pointer": false, + "is_const": false, + "is_reference": false, "is_array": false, "array_dimension_sizes": [ @@ -67335,39 +67416,39 @@ }, "attributes": { "class": "sprite", - "setter": "anchor_point", + "method": "on_screen_at", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_anchor_point(s, pt):" + "def sprite_on_screen_at(s, x, y):" ], "pascal": [ - "procedure SpriteSetAnchorPoint(s: Sprite; const pt: Point2D)" + "function SpriteOnScreenAt(s: Sprite; x: Double; y: Double): Boolean" ], "csharp": [ - "public void Sprite.AnchorPoint { set }", - "public static void SplashKit.SpriteSetAnchorPoint(Sprite s, Point2D pt);" + "public bool Sprite.SpriteOnScreenAt(double x, double y);", + "public static bool SplashKit.SpriteOnScreenAt(Sprite s, double x, double y);" ], "cpp": [ - "void sprite_set_anchor_point(sprite s, const point_2d &pt)" + "bool sprite_on_screen_at(sprite s, double x, double y)" ] } }, { - "signature": "void sprite_set_collision_bitmap(sprite s,bitmap bmp);", - "name": "sprite_set_collision_bitmap", + "signature": "point_2d sprite_position(sprite s);", + "name": "sprite_position", "method_name": null, - "unique_global_name": "sprite_set_collision_bitmap", + "unique_global_name": "sprite_position", "unique_method_name": null, "suffix_name": null, - "description": "Sets the bitmap used by the sprite to determine if it has collided with\nother objects in the game. By default the collision_bitmap is set to the\nbitmap from the sprite's first layer.", + "description": "Returns the sprite's position.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "point_2d", + "description": "The location of the sprite.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -67376,20 +67457,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "bmp": { - "type": "bitmap", - "description": "The new collision bitmap for the sprite.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -67403,35 +67471,35 @@ }, "attributes": { "class": "sprite", - "setter": "collision_bitmap", + "getter": "Position", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_collision_bitmap(s, bmp):" + "def sprite_position(s):" ], "pascal": [ - "procedure SpriteSetCollisionBitmap(s: Sprite; bmp: Bitmap)" + "function SpritePosition(s: Sprite): Point2D" ], "csharp": [ - "public void Sprite.CollisionBitmap { set }", - "public static void SplashKit.SpriteSetCollisionBitmap(Sprite s, Bitmap bmp);" + "public Point2D Sprite.Position { get }", + "public static Point2D SplashKit.SpritePosition(Sprite s);" ], "cpp": [ - "void sprite_set_collision_bitmap(sprite s, bitmap bmp)" + "point_2d sprite_position(sprite s)" ] } }, { - "signature": "void sprite_set_collision_kind(sprite s,collision_test_kind value);", - "name": "sprite_set_collision_kind", - "method_name": null, - "unique_global_name": "sprite_set_collision_kind", - "unique_method_name": null, + "signature": "void sprite_replay_animation(sprite s);", + "name": "sprite_replay_animation", + "method_name": "Replay_animation", + "unique_global_name": "sprite_replay_animation", + "unique_method_name": "sprite.Replay_animation", "suffix_name": null, - "description": "Sets the kind of collision used with this sprite. This is used when\ndetermining if the sprite has collided with other objects in the game.", + "description": "Restart the sprite's current animation, this will play a sound if the\nfirst cell of the animation is associated with a sound effect.", "brief": null, "return": { "type": "void", @@ -67444,20 +67512,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "value": { - "type": "collision_test_kind", - "description": "The new kind of collision test for this sprite.", + "description": "The sprite to replay the animation of.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -67471,35 +67526,35 @@ }, "attributes": { "class": "sprite", - "setter": "collision_kind", + "method": "Replay_animation", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_collision_kind(s, value):" + "def sprite_replay_animation(s):" ], "pascal": [ - "procedure SpriteSetCollisionKind(s: Sprite; value: CollisionTestKind)" + "procedure SpriteReplayAnimation(s: Sprite)" ], "csharp": [ - "public void Sprite.CollisionKind { set }", - "public static void SplashKit.SpriteSetCollisionKind(Sprite s, CollisionTestKind value);" + "public void Sprite.SpriteReplayAnimation();", + "public static void SplashKit.SpriteReplayAnimation(Sprite s);" ], "cpp": [ - "void sprite_set_collision_kind(sprite s, collision_test_kind value)" + "void sprite_replay_animation(sprite s)" ] } }, { - "signature": "void sprite_set_dx(sprite s,float value);", - "name": "sprite_set_dx", - "method_name": null, - "unique_global_name": "sprite_set_dx", - "unique_method_name": null, + "signature": "void sprite_replay_animation(sprite s,bool with_sound);", + "name": "sprite_replay_animation", + "method_name": "replay_animation", + "unique_global_name": "sprite_replay_animation_with_sound", + "unique_method_name": "sprite.replay_animation_with_sound", "suffix_name": null, - "description": "Sets the X value of the sprite's velocity.", + "description": "Restart the sprite's current animation, this will play a sound if\nwith_sound is true and the first cell of the animation is associated\nwith a sound effect.", "brief": null, "return": { "type": "void", @@ -67512,7 +67567,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change.", + "description": "The sprite to replay the animation of.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -67523,9 +67578,9 @@ "is_vector": false, "type_parameter": null }, - "value": { - "type": "float", - "description": "The new x component of the sprite's velocity.", + "with_sound": { + "type": "bool", + "description": "If false, the animation will not play associated sound\neffects when restarted.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -67539,39 +67594,40 @@ }, "attributes": { "class": "sprite", - "setter": "dx", + "method": "replay_animation", + "suffix": "with_sound", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_dx(s, value):" + "def sprite_replay_animation_with_sound(s, with_sound):" ], "pascal": [ - "procedure SpriteSetDx(s: Sprite; value: Single)" + "procedure SpriteReplayAnimation(s: Sprite; withSound: Boolean)" ], "csharp": [ - "public void Sprite.Dx { set }", - "public static void SplashKit.SpriteSetDx(Sprite s, float value);" + "public void Sprite.SpriteReplayAnimation(bool withSound);", + "public static void SplashKit.SpriteReplayAnimation(Sprite s, bool withSound);" ], "cpp": [ - "void sprite_set_dx(sprite s, float value)" + "void sprite_replay_animation(sprite s, bool with_sound)" ] } }, { - "signature": "void sprite_set_dy(sprite s,float value);", - "name": "sprite_set_dy", + "signature": "float sprite_rotation(sprite s);", + "name": "sprite_rotation", "method_name": null, - "unique_global_name": "sprite_set_dy", + "unique_global_name": "sprite_rotation", "unique_method_name": null, "suffix_name": null, - "description": "Sets the Y value of the sprite's velocity.", + "description": "This indicates the angle of rotation of the sprite. This will rotate any\nimages of the sprite before drawing, which can be very slow. avoid using\nthis method with bitmap based sprites where possible.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "float", + "description": "The angle of the sprite rotation.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -67580,20 +67636,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "value": { - "type": "float", - "description": "The new y component of the sprite's velocity.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -67607,39 +67650,39 @@ }, "attributes": { "class": "sprite", - "setter": "dy", + "getter": "rotation", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_dy(s, value):" + "def sprite_rotation(s):" ], "pascal": [ - "procedure SpriteSetDy(s: Sprite; value: Single)" + "function SpriteRotation(s: Sprite): Single" ], "csharp": [ - "public void Sprite.Dy { set }", - "public static void SplashKit.SpriteSetDy(Sprite s, float value);" + "public float Sprite.Rotation { get }", + "public static float SplashKit.SpriteRotation(Sprite s);" ], "cpp": [ - "void sprite_set_dy(sprite s, float value)" + "float sprite_rotation(sprite s)" ] } }, { - "signature": "void sprite_set_heading(sprite s,float value);", - "name": "sprite_set_heading", + "signature": "float sprite_scale(sprite s);", + "name": "sprite_scale", "method_name": null, - "unique_global_name": "sprite_set_heading", + "unique_global_name": "sprite_scale", "unique_method_name": null, "suffix_name": null, - "description": "Alters the direction the sprite is heading without changing the speed.", + "description": "This indicates the scale of the sprite. This will scale any\nimages of the sprite before drawing, which can be very slow. avoid using\nthis method with bitmap based sprites where possible.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "float", + "description": "The scale of the sprite.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -67648,20 +67691,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "value": { - "type": "float", - "description": "The new angle for the sprite's velocity -- distance remains the\nsame.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -67675,39 +67705,39 @@ }, "attributes": { "class": "sprite", - "setter": "heading", + "getter": "scale", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_heading(s, value):" + "def sprite_scale(s):" ], "pascal": [ - "procedure SpriteSetHeading(s: Sprite; value: Single)" + "function SpriteScale(s: Sprite): Single" ], "csharp": [ - "public void Sprite.Heading { set }", - "public static void SplashKit.SpriteSetHeading(Sprite s, float value);" + "public float Sprite.Scale { get }", + "public static float SplashKit.SpriteScale(Sprite s);" ], "cpp": [ - "void sprite_set_heading(sprite s, float value)" + "float sprite_scale(sprite s)" ] } }, { - "signature": "void sprite_set_layer_offset(sprite s,const string &name,const vector_2d &value);", - "name": "sprite_set_layer_offset", - "method_name": "set_layer_offset", - "unique_global_name": "sprite_set_layer_offset_named", - "unique_method_name": "sprite.set_layer_offset_named", + "signature": "rectangle sprite_screen_rectangle(sprite s);", + "name": "sprite_screen_rectangle", + "method_name": null, + "unique_global_name": "sprite_screen_rectangle", + "unique_method_name": null, "suffix_name": null, - "description": "Sets the offset of the specified layer. The offset is used when the layer\nis drawn in the sprite, and moves the image relative to the sprite.", + "description": "Returns the rectangle representing the location of the sprite on the\nscreen.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "rectangle", + "description": "A rectangle indicating where the sprite is on the screen.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -67716,39 +67746,13 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, "array_dimension_sizes": [ - ], - "is_vector": false, - "type_parameter": null - }, - "name": { - "type": "string", - "description": "The name of the layer to change.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "value": { - "type": "vector_2d", - "description": "The new offset.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - ], "is_vector": false, "type_parameter": null @@ -67756,36 +67760,35 @@ }, "attributes": { "class": "sprite", - "method": "set_layer_offset", - "suffix": "named", + "getter": "screen_rectangle", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_layer_offset_named(s, name, value):" + "def sprite_screen_rectangle(s):" ], "pascal": [ - "procedure SpriteSetLayerOffset(s: Sprite; const name: String; const value: Vector2D)" + "function SpriteScreenRectangle(s: Sprite): Rectangle" ], "csharp": [ - "public void Sprite.SpriteSetLayerOffset(string name, Vector2D value);", - "public static void SplashKit.SpriteSetLayerOffset(Sprite s, string name, Vector2D value);" + "public Rectangle Sprite.ScreenRectangle { get }", + "public static Rectangle SplashKit.SpriteScreenRectangle(Sprite s);" ], "cpp": [ - "void sprite_set_layer_offset(sprite s, const string &name, const vector_2d &value)" + "rectangle sprite_screen_rectangle(sprite s)" ] } }, { - "signature": "void sprite_set_layer_offset(sprite s,int idx,const vector_2d &value);", - "name": "sprite_set_layer_offset", - "method_name": "set_layer_offset", - "unique_global_name": "sprite_set_layer_offset_at_index", - "unique_method_name": "sprite.set_layer_offset_at_index", + "signature": "void sprite_send_layer_backward(sprite s,int visible_layer);", + "name": "sprite_send_layer_backward", + "method_name": "Send_layer_toBackward", + "unique_global_name": "sprite_send_layer_backward", + "unique_method_name": "sprite.Send_layer_toBackward", "suffix_name": null, - "description": "Sets the offset of the specified layer.", + "description": "Sends the layer specified backward in the visible layer order.", "brief": null, "return": { "type": "void", @@ -67798,7 +67801,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change.", + "description": "The sprite to change", "is_pointer": false, "is_const": false, "is_reference": false, @@ -67809,28 +67812,15 @@ "is_vector": false, "type_parameter": null }, - "idx": { + "visible_layer": { "type": "int", - "description": "The index of the layer to change.", + "description": "The visible layer to send to backward", "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, "array_dimension_sizes": [ - ], - "is_vector": false, - "type_parameter": null - }, - "value": { - "type": "vector_2d", - "description": "The new offset.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - ], "is_vector": false, "type_parameter": null @@ -67838,36 +67828,35 @@ }, "attributes": { "class": "sprite", - "method": "set_layer_offset", - "suffix": "at_index", + "method": "Send_layer_toBackward", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_layer_offset_at_index(s, idx, value):" + "def sprite_send_layer_backward(s, visible_layer):" ], "pascal": [ - "procedure SpriteSetLayerOffset(s: Sprite; idx: Integer; const value: Vector2D)" + "procedure SpriteSendLayerBackward(s: Sprite; visibleLayer: Integer)" ], "csharp": [ - "public void Sprite.SpriteSetLayerOffset(int idx, Vector2D value);", - "public static void SplashKit.SpriteSetLayerOffset(Sprite s, int idx, Vector2D value);" + "public void Sprite.SpriteSendLayerBackward(int visibleLayer);", + "public static void SplashKit.SpriteSendLayerBackward(Sprite s, int visibleLayer);" ], "cpp": [ - "void sprite_set_layer_offset(sprite s, int idx, const vector_2d &value)" + "void sprite_send_layer_backward(sprite s, int visible_layer)" ] } }, { - "signature": "void sprite_set_mass(sprite s,float value);", - "name": "sprite_set_mass", - "method_name": null, - "unique_global_name": "sprite_set_mass", - "unique_method_name": null, + "signature": "void sprite_send_layer_to_back(sprite s,int visible_layer);", + "name": "sprite_send_layer_to_back", + "method_name": "send_layer_to_back", + "unique_global_name": "sprite_send_layer_to_back", + "unique_method_name": "sprite.send_layer_to_back", "suffix_name": null, - "description": "Allows you to change the mass of a sprite.", + "description": "Sends the layer specified to the back in the visible layer order.", "brief": null, "return": { "type": "void", @@ -67880,7 +67869,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change.", + "description": "The sprite to change", "is_pointer": false, "is_const": false, "is_reference": false, @@ -67891,9 +67880,9 @@ "is_vector": false, "type_parameter": null }, - "value": { - "type": "float", - "description": "The new mass for the sprite.", + "visible_layer": { + "type": "int", + "description": "The visible layer to send to back", "is_pointer": false, "is_const": false, "is_reference": false, @@ -67907,35 +67896,35 @@ }, "attributes": { "class": "sprite", - "setter": "mass", + "method": "send_layer_to_back", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_mass(s, value):" + "def sprite_send_layer_to_back(s, visible_layer):" ], "pascal": [ - "procedure SpriteSetMass(s: Sprite; value: Single)" + "procedure SpriteSendLayerToBack(s: Sprite; visibleLayer: Integer)" ], "csharp": [ - "public void Sprite.Mass { set }", - "public static void SplashKit.SpriteSetMass(Sprite s, float value);" + "public void Sprite.SpriteSendLayerToBack(int visibleLayer);", + "public static void SplashKit.SpriteSendLayerToBack(Sprite s, int visibleLayer);" ], "cpp": [ - "void sprite_set_mass(sprite s, float value)" + "void sprite_send_layer_to_back(sprite s, int visible_layer)" ] } }, { - "signature": "void sprite_set_move_from_anchor_point(sprite s,bool value);", - "name": "sprite_set_move_from_anchor_point", + "signature": "void sprite_set_anchor_point(sprite s,const point_2d &pt);", + "name": "sprite_set_anchor_point", "method_name": null, - "unique_global_name": "sprite_set_move_from_anchor_point", + "unique_global_name": "sprite_set_anchor_point", "unique_method_name": null, "suffix_name": null, - "description": "Allows you to indicate if the sprite is moved from its anchor point, or from its\ntop left.\n\nWhen set to true the location of the sprite will be its anchor point.\nWhen set to false the location of the sprite is its top left corner.", + "description": "Allows you to set the anchor point for the sprite. This is the point around\nwhich the sprite rotates. This is in sprite coordinates, as if the sprite\nis drawn at 0,0.", "brief": null, "return": { "type": "void", @@ -67959,12 +67948,12 @@ "is_vector": false, "type_parameter": null }, - "value": { - "type": "bool", - "description": "The value to set this option.", + "pt": { + "type": "point_2d", + "description": "The new anchor point in sprite coordinates.", "is_pointer": false, - "is_const": false, - "is_reference": false, + "is_const": true, + "is_reference": true, "is_array": false, "array_dimension_sizes": [ @@ -67975,35 +67964,35 @@ }, "attributes": { "class": "sprite", - "setter": "move_from_anchor_point", + "setter": "anchor_point", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_move_from_anchor_point(s, value):" + "def sprite_set_anchor_point(s, pt):" ], "pascal": [ - "procedure SpriteSetMoveFromAnchorPoint(s: Sprite; value: Boolean)" + "procedure SpriteSetAnchorPoint(s: Sprite; const pt: Point2D)" ], "csharp": [ - "public void Sprite.MoveFromAnchorPoint { set }", - "public static void SplashKit.SpriteSetMoveFromAnchorPoint(Sprite s, bool value);" + "public void Sprite.AnchorPoint { set }", + "public static void SplashKit.SpriteSetAnchorPoint(Sprite s, Point2D pt);" ], "cpp": [ - "void sprite_set_move_from_anchor_point(sprite s, bool value)" + "void sprite_set_anchor_point(sprite s, const point_2d &pt)" ] } }, { - "signature": "void sprite_set_position(sprite s,const point_2d &value);", - "name": "sprite_set_position", + "signature": "void sprite_set_collision_bitmap(sprite s,bitmap bmp);", + "name": "sprite_set_collision_bitmap", "method_name": null, - "unique_global_name": "sprite_set_position", + "unique_global_name": "sprite_set_collision_bitmap", "unique_method_name": null, "suffix_name": null, - "description": "Sets the sprite's position.", + "description": "Sets the bitmap used by the sprite to determine if it has collided with\nother objects in the game. By default the collision_bitmap is set to the\nbitmap from the sprite's first layer.", "brief": null, "return": { "type": "void", @@ -68027,12 +68016,12 @@ "is_vector": false, "type_parameter": null }, - "value": { - "type": "point_2d", - "description": "The new location for the sprite.", + "bmp": { + "type": "bitmap", + "description": "The new collision bitmap for the sprite.", "is_pointer": false, - "is_const": true, - "is_reference": true, + "is_const": false, + "is_reference": false, "is_array": false, "array_dimension_sizes": [ @@ -68043,35 +68032,35 @@ }, "attributes": { "class": "sprite", - "setter": "Position", + "setter": "collision_bitmap", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_position(s, value):" + "def sprite_set_collision_bitmap(s, bmp):" ], "pascal": [ - "procedure SpriteSetPosition(s: Sprite; const value: Point2D)" + "procedure SpriteSetCollisionBitmap(s: Sprite; bmp: Bitmap)" ], "csharp": [ - "public void Sprite.Position { set }", - "public static void SplashKit.SpriteSetPosition(Sprite s, Point2D value);" + "public void Sprite.CollisionBitmap { set }", + "public static void SplashKit.SpriteSetCollisionBitmap(Sprite s, Bitmap bmp);" ], "cpp": [ - "void sprite_set_position(sprite s, const point_2d &value)" + "void sprite_set_collision_bitmap(sprite s, bitmap bmp)" ] } }, { - "signature": "void sprite_set_rotation(sprite s,float value);", - "name": "sprite_set_rotation", + "signature": "void sprite_set_collision_kind(sprite s,collision_test_kind value);", + "name": "sprite_set_collision_kind", "method_name": null, - "unique_global_name": "sprite_set_rotation", + "unique_global_name": "sprite_set_collision_kind", "unique_method_name": null, "suffix_name": null, - "description": "Allows you to change the rotation of a sprite.", + "description": "Sets the kind of collision used with this sprite. This is used when\ndetermining if the sprite has collided with other objects in the game.", "brief": null, "return": { "type": "void", @@ -68096,8 +68085,8 @@ "type_parameter": null }, "value": { - "type": "float", - "description": "The new rotation angle for the sprite", + "type": "collision_test_kind", + "description": "The new kind of collision test for this sprite.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -68111,35 +68100,35 @@ }, "attributes": { "class": "sprite", - "setter": "rotation", + "setter": "collision_kind", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_rotation(s, value):" + "def sprite_set_collision_kind(s, value):" ], "pascal": [ - "procedure SpriteSetRotation(s: Sprite; value: Single)" + "procedure SpriteSetCollisionKind(s: Sprite; value: CollisionTestKind)" ], "csharp": [ - "public void Sprite.Rotation { set }", - "public static void SplashKit.SpriteSetRotation(Sprite s, float value);" + "public void Sprite.CollisionKind { set }", + "public static void SplashKit.SpriteSetCollisionKind(Sprite s, CollisionTestKind value);" ], "cpp": [ - "void sprite_set_rotation(sprite s, float value)" + "void sprite_set_collision_kind(sprite s, collision_test_kind value)" ] } }, { - "signature": "void sprite_set_scale(sprite s,float value);", - "name": "sprite_set_scale", + "signature": "void sprite_set_dx(sprite s,float value);", + "name": "sprite_set_dx", "method_name": null, - "unique_global_name": "sprite_set_scale", + "unique_global_name": "sprite_set_dx", "unique_method_name": null, "suffix_name": null, - "description": "Allows you to change the scale of a sprite.", + "description": "Sets the X value of the sprite's velocity.", "brief": null, "return": { "type": "void", @@ -68165,7 +68154,7 @@ }, "value": { "type": "float", - "description": "The new scale for the sprite.", + "description": "The new x component of the sprite's velocity.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -68179,35 +68168,35 @@ }, "attributes": { "class": "sprite", - "setter": "scale", + "setter": "dx", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_scale(s, value):" + "def sprite_set_dx(s, value):" ], "pascal": [ - "procedure SpriteSetScale(s: Sprite; value: Single)" + "procedure SpriteSetDx(s: Sprite; value: Single)" ], "csharp": [ - "public void Sprite.Scale { set }", - "public static void SplashKit.SpriteSetScale(Sprite s, float value);" + "public void Sprite.Dx { set }", + "public static void SplashKit.SpriteSetDx(Sprite s, float value);" ], "cpp": [ - "void sprite_set_scale(sprite s, float value)" + "void sprite_set_dx(sprite s, float value)" ] } }, { - "signature": "void sprite_set_speed(sprite s,float value);", - "name": "sprite_set_speed", + "signature": "void sprite_set_dy(sprite s,float value);", + "name": "sprite_set_dy", "method_name": null, - "unique_global_name": "sprite_set_speed", + "unique_global_name": "sprite_set_dy", "unique_method_name": null, "suffix_name": null, - "description": "Alters the speed of the sprite without effecting the direction.", + "description": "Sets the Y value of the sprite's velocity.", "brief": null, "return": { "type": "void", @@ -68233,7 +68222,7 @@ }, "value": { "type": "float", - "description": "The new speed of the sprite -- direction will remain the same.", + "description": "The new y component of the sprite's velocity.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -68247,35 +68236,35 @@ }, "attributes": { "class": "sprite", - "setter": "speed", + "setter": "dy", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_speed(s, value):" + "def sprite_set_dy(s, value):" ], "pascal": [ - "procedure SpriteSetSpeed(s: Sprite; value: Single)" + "procedure SpriteSetDy(s: Sprite; value: Single)" ], "csharp": [ - "public void Sprite.Speed { set }", - "public static void SplashKit.SpriteSetSpeed(Sprite s, float value);" + "public void Sprite.Dy { set }", + "public static void SplashKit.SpriteSetDy(Sprite s, float value);" ], "cpp": [ - "void sprite_set_speed(sprite s, float value)" + "void sprite_set_dy(sprite s, float value)" ] } }, { - "signature": "void sprite_set_value(sprite s,const string &name,float val);", - "name": "sprite_set_value", - "method_name": "set_value", - "unique_global_name": "sprite_set_value_named", - "unique_method_name": "sprite.set_value_named", + "signature": "void sprite_set_heading(sprite s,float value);", + "name": "sprite_set_heading", + "method_name": null, + "unique_global_name": "sprite_set_heading", + "unique_method_name": null, "suffix_name": null, - "description": "Assigns a value to the sprite.", + "description": "Alters the direction the sprite is heading without changing the speed.", "brief": null, "return": { "type": "void", @@ -68299,22 +68288,9 @@ "is_vector": false, "type_parameter": null }, - "name": { - "type": "string", - "description": "The name of the value to change", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "val": { + "value": { "type": "float", - "description": "The new value.", + "description": "The new angle for the sprite's velocity -- distance remains the\nsame.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -68328,36 +68304,35 @@ }, "attributes": { "class": "sprite", - "method": "set_value", - "suffix": "named", + "setter": "heading", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_value_named(s, name, val):" + "def sprite_set_heading(s, value):" ], "pascal": [ - "procedure SpriteSetValue(s: Sprite; const name: String; val: Single)" + "procedure SpriteSetHeading(s: Sprite; value: Single)" ], "csharp": [ - "public void Sprite.SpriteSetValue(string name, float val);", - "public static void SplashKit.SpriteSetValue(Sprite s, string name, float val);" + "public void Sprite.Heading { set }", + "public static void SplashKit.SpriteSetHeading(Sprite s, float value);" ], "cpp": [ - "void sprite_set_value(sprite s, const string &name, float val)" + "void sprite_set_heading(sprite s, float value)" ] } }, { - "signature": "void sprite_set_velocity(sprite s,const vector_2d &value);", - "name": "sprite_set_velocity", - "method_name": null, - "unique_global_name": "sprite_set_velocity", - "unique_method_name": null, + "signature": "void sprite_set_layer_offset(sprite s,const string &name,const vector_2d &value);", + "name": "sprite_set_layer_offset", + "method_name": "set_layer_offset", + "unique_global_name": "sprite_set_layer_offset_named", + "unique_method_name": "sprite.set_layer_offset_named", "suffix_name": null, - "description": "Sets the current velocity of the sprite. When the sprite is updated\n(see `update_sprite`) this vector_2d is used to move the sprite.", + "description": "Sets the offset of the specified layer. The offset is used when the layer\nis drawn in the sprite, and moves the image relative to the sprite.", "brief": null, "return": { "type": "void", @@ -68381,9 +68356,22 @@ "is_vector": false, "type_parameter": null }, + "name": { + "type": "string", + "description": "The name of the layer to change.", + "is_pointer": false, + "is_const": true, + "is_reference": true, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, "value": { "type": "vector_2d", - "description": "The new sprite velocity.", + "description": "The new offset.", "is_pointer": false, "is_const": true, "is_reference": true, @@ -68397,35 +68385,36 @@ }, "attributes": { "class": "sprite", - "setter": "velocity", + "method": "set_layer_offset", + "suffix": "named", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_velocity(s, value):" + "def sprite_set_layer_offset_named(s, name, value):" ], "pascal": [ - "procedure SpriteSetVelocity(s: Sprite; const value: Vector2D)" + "procedure SpriteSetLayerOffset(s: Sprite; const name: String; const value: Vector2D)" ], "csharp": [ - "public void Sprite.Velocity { set }", - "public static void SplashKit.SpriteSetVelocity(Sprite s, Vector2D value);" + "public void Sprite.SpriteSetLayerOffset(string name, Vector2D value);", + "public static void SplashKit.SpriteSetLayerOffset(Sprite s, string name, Vector2D value);" ], "cpp": [ - "void sprite_set_velocity(sprite s, const vector_2d &value)" + "void sprite_set_layer_offset(sprite s, const string &name, const vector_2d &value)" ] } }, { - "signature": "void sprite_set_x(sprite s,float value);", - "name": "sprite_set_x", - "method_name": null, - "unique_global_name": "sprite_set_x", - "unique_method_name": null, + "signature": "void sprite_set_layer_offset(sprite s,int idx,const vector_2d &value);", + "name": "sprite_set_layer_offset", + "method_name": "set_layer_offset", + "unique_global_name": "sprite_set_layer_offset_at_index", + "unique_method_name": "sprite.set_layer_offset_at_index", "suffix_name": null, - "description": "Sets the X position of the sprite.", + "description": "Sets the offset of the specified layer.", "brief": null, "return": { "type": "void", @@ -68449,15 +68438,28 @@ "is_vector": false, "type_parameter": null }, - "value": { - "type": "float", - "description": "The new x location.", + "idx": { + "type": "int", + "description": "The index of the layer to change.", "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, "array_dimension_sizes": [ + ], + "is_vector": false, + "type_parameter": null + }, + "value": { + "type": "vector_2d", + "description": "The new offset.", + "is_pointer": false, + "is_const": true, + "is_reference": true, + "is_array": false, + "array_dimension_sizes": [ + ], "is_vector": false, "type_parameter": null @@ -68465,35 +68467,36 @@ }, "attributes": { "class": "sprite", - "setter": "x", + "method": "set_layer_offset", + "suffix": "at_index", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_x(s, value):" + "def sprite_set_layer_offset_at_index(s, idx, value):" ], "pascal": [ - "procedure SpriteSetX(s: Sprite; value: Single)" + "procedure SpriteSetLayerOffset(s: Sprite; idx: Integer; const value: Vector2D)" ], "csharp": [ - "public void Sprite.X { set }", - "public static void SplashKit.SpriteSetX(Sprite s, float value);" + "public void Sprite.SpriteSetLayerOffset(int idx, Vector2D value);", + "public static void SplashKit.SpriteSetLayerOffset(Sprite s, int idx, Vector2D value);" ], "cpp": [ - "void sprite_set_x(sprite s, float value)" + "void sprite_set_layer_offset(sprite s, int idx, const vector_2d &value)" ] } }, { - "signature": "void sprite_set_y(sprite s,float value);", - "name": "sprite_set_y", + "signature": "void sprite_set_mass(sprite s,float value);", + "name": "sprite_set_mass", "method_name": null, - "unique_global_name": "sprite_set_y", + "unique_global_name": "sprite_set_mass", "unique_method_name": null, "suffix_name": null, - "description": "Sets the Y position of the sprite.", + "description": "Allows you to change the mass of a sprite.", "brief": null, "return": { "type": "void", @@ -68519,7 +68522,7 @@ }, "value": { "type": "float", - "description": "The new sprite y.", + "description": "The new mass for the sprite.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -68533,39 +68536,39 @@ }, "attributes": { "class": "sprite", - "setter": "y", + "setter": "mass", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_set_y(s, value):" + "def sprite_set_mass(s, value):" ], "pascal": [ - "procedure SpriteSetY(s: Sprite; value: Single)" + "procedure SpriteSetMass(s: Sprite; value: Single)" ], "csharp": [ - "public void Sprite.Y { set }", - "public static void SplashKit.SpriteSetY(Sprite s, float value);" + "public void Sprite.Mass { set }", + "public static void SplashKit.SpriteSetMass(Sprite s, float value);" ], "cpp": [ - "void sprite_set_y(sprite s, float value)" + "void sprite_set_mass(sprite s, float value)" ] } }, { - "signature": "int sprite_show_layer(sprite s,const string &name);", - "name": "sprite_show_layer", - "method_name": "show_layer", - "unique_global_name": "sprite_show_layer_named", - "unique_method_name": "sprite.show_layer_named", + "signature": "void sprite_set_move_from_anchor_point(sprite s,bool value);", + "name": "sprite_set_move_from_anchor_point", + "method_name": null, + "unique_global_name": "sprite_set_move_from_anchor_point", + "unique_method_name": null, "suffix_name": null, - "description": "Show the specified layer of the sprite.", + "description": "Allows you to indicate if the sprite is moved from its anchor point, or from its\ntop left.\n\nWhen set to true the location of the sprite will be its anchor point.\nWhen set to false the location of the sprite is its top left corner.", "brief": null, "return": { - "type": "int", - "description": "The index of the layer shown, or -1 if no layer found.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -68574,7 +68577,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to show the layer of.", + "description": "The sprite to change.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -68585,12 +68588,12 @@ "is_vector": false, "type_parameter": null }, - "name": { - "type": "string", - "description": "The layer to show.", + "value": { + "type": "bool", + "description": "The value to set this option.", "is_pointer": false, - "is_const": true, - "is_reference": true, + "is_const": false, + "is_reference": false, "is_array": false, "array_dimension_sizes": [ @@ -68601,40 +68604,39 @@ }, "attributes": { "class": "sprite", - "method": "show_layer", - "suffix": "named", + "setter": "move_from_anchor_point", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_show_layer_named(s, name):" + "def sprite_set_move_from_anchor_point(s, value):" ], "pascal": [ - "function SpriteShowLayer(s: Sprite; const name: String): Integer" + "procedure SpriteSetMoveFromAnchorPoint(s: Sprite; value: Boolean)" ], "csharp": [ - "public int Sprite.SpriteShowLayer(string name);", - "public static int SplashKit.SpriteShowLayer(Sprite s, string name);" + "public void Sprite.MoveFromAnchorPoint { set }", + "public static void SplashKit.SpriteSetMoveFromAnchorPoint(Sprite s, bool value);" ], "cpp": [ - "int sprite_show_layer(sprite s, const string &name)" + "void sprite_set_move_from_anchor_point(sprite s, bool value)" ] } }, { - "signature": "int sprite_show_layer(sprite s,int id);", - "name": "sprite_show_layer", - "method_name": "show_layer", - "unique_global_name": "sprite_show_layer", - "unique_method_name": "sprite.show_layer", + "signature": "void sprite_set_position(sprite s,const point_2d &value);", + "name": "sprite_set_position", + "method_name": null, + "unique_global_name": "sprite_set_position", + "unique_method_name": null, "suffix_name": null, - "description": "Show the specified layer of the sprite.", + "description": "Sets the sprite's position.", "brief": null, "return": { - "type": "int", - "description": "The index of the layer shown, or -1 if no layer found.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -68643,7 +68645,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to show the layer of.", + "description": "The sprite to change.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -68654,12 +68656,12 @@ "is_vector": false, "type_parameter": null }, - "id": { - "type": "int", - "description": "The index to show.", + "value": { + "type": "point_2d", + "description": "The new location for the sprite.", "is_pointer": false, - "is_const": false, - "is_reference": false, + "is_const": true, + "is_reference": true, "is_array": false, "array_dimension_sizes": [ @@ -68670,39 +68672,39 @@ }, "attributes": { "class": "sprite", - "method": "show_layer", + "setter": "Position", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_show_layer(s, id):" + "def sprite_set_position(s, value):" ], "pascal": [ - "function SpriteShowLayer(s: Sprite; id: Integer): Integer" + "procedure SpriteSetPosition(s: Sprite; const value: Point2D)" ], "csharp": [ - "public int Sprite.SpriteShowLayer(int id);", - "public static int SplashKit.SpriteShowLayer(Sprite s, int id);" + "public void Sprite.Position { set }", + "public static void SplashKit.SpriteSetPosition(Sprite s, Point2D value);" ], "cpp": [ - "int sprite_show_layer(sprite s, int id)" + "void sprite_set_position(sprite s, const point_2d &value)" ] } }, { - "signature": "float sprite_speed(sprite s);", - "name": "sprite_speed", + "signature": "void sprite_set_rotation(sprite s,float value);", + "name": "sprite_set_rotation", "method_name": null, - "unique_global_name": "sprite_speed", + "unique_global_name": "sprite_set_rotation", "unique_method_name": null, "suffix_name": null, - "description": "Returns the current speed (distance travelled per update) of the sprite.", + "description": "Allows you to change the rotation of a sprite.", "brief": null, "return": { - "type": "float", - "description": "The speed of the sprite (pixels per update).", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -68711,7 +68713,20 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to change.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "value": { + "type": "float", + "description": "The new rotation angle for the sprite", "is_pointer": false, "is_const": false, "is_reference": false, @@ -68725,35 +68740,35 @@ }, "attributes": { "class": "sprite", - "getter": "speed", + "setter": "rotation", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_speed(s):" + "def sprite_set_rotation(s, value):" ], "pascal": [ - "function SpriteSpeed(s: Sprite): Single" + "procedure SpriteSetRotation(s: Sprite; value: Single)" ], "csharp": [ - "public float Sprite.Speed { get }", - "public static float SplashKit.SpriteSpeed(Sprite s);" + "public void Sprite.Rotation { set }", + "public static void SplashKit.SpriteSetRotation(Sprite s, float value);" ], "cpp": [ - "float sprite_speed(sprite s)" + "void sprite_set_rotation(sprite s, float value)" ] } }, { - "signature": "void sprite_start_animation(sprite s,const string &named);", - "name": "sprite_start_animation", - "method_name": "start_animation", - "unique_global_name": "sprite_start_animation_named", - "unique_method_name": "sprite.start_animation_named", + "signature": "void sprite_set_scale(sprite s,float value);", + "name": "sprite_set_scale", + "method_name": null, + "unique_global_name": "sprite_set_scale", + "unique_method_name": null, "suffix_name": null, - "description": "Start playing an animation from the sprite's animation template.\nThis will play a sound effect if the first cell of the animation\nhas a sound.", + "description": "Allows you to change the scale of a sprite.", "brief": null, "return": { "type": "void", @@ -68766,7 +68781,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to start the animation of.", + "description": "The sprite to change.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -68777,12 +68792,12 @@ "is_vector": false, "type_parameter": null }, - "named": { - "type": "string", - "description": "The name of the animation to start from the animation script.", + "value": { + "type": "float", + "description": "The new scale for the sprite.", "is_pointer": false, - "is_const": true, - "is_reference": true, + "is_const": false, + "is_reference": false, "is_array": false, "array_dimension_sizes": [ @@ -68793,36 +68808,35 @@ }, "attributes": { "class": "sprite", - "method": "start_animation", - "suffix": "named", + "setter": "scale", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_start_animation_named(s, named):" + "def sprite_set_scale(s, value):" ], "pascal": [ - "procedure SpriteStartAnimation(s: Sprite; const named: String)" + "procedure SpriteSetScale(s: Sprite; value: Single)" ], "csharp": [ - "public void Sprite.SpriteStartAnimation(string named);", - "public static void SplashKit.SpriteStartAnimation(Sprite s, string named);" + "public void Sprite.Scale { set }", + "public static void SplashKit.SpriteSetScale(Sprite s, float value);" ], "cpp": [ - "void sprite_start_animation(sprite s, const string &named)" + "void sprite_set_scale(sprite s, float value)" ] } }, { - "signature": "void sprite_start_animation(sprite s,const string &named,bool with_sound);", - "name": "sprite_start_animation", - "method_name": "start_animation", - "unique_global_name": "sprite_start_animation_named_with_sound", - "unique_method_name": "sprite.start_animation_named_with_sound", + "signature": "void sprite_set_speed(sprite s,float value);", + "name": "sprite_set_speed", + "method_name": null, + "unique_global_name": "sprite_set_speed", + "unique_method_name": null, "suffix_name": null, - "description": "Start playing an animation from the sprite's animation template.\nThe with_sound parameter determines whether to play a sound effect\nif the first cell of the animation has a sound.", + "description": "Alters the speed of the sprite without effecting the direction.", "brief": null, "return": { "type": "void", @@ -68835,7 +68849,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to start the animation of.", + "description": "The sprite to change.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -68846,22 +68860,9 @@ "is_vector": false, "type_parameter": null }, - "named": { - "type": "string", - "description": "The name of the animation to start from the animation script.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "with_sound": { - "type": "bool", - "description": "If false, the animation will not play associated sound\neffects when started.", + "value": { + "type": "float", + "description": "The new speed of the sprite -- direction will remain the same.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -68875,36 +68876,35 @@ }, "attributes": { "class": "sprite", - "method": "start_animation", - "suffix": "named_with_sound", + "setter": "speed", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_start_animation_named_with_sound(s, named, with_sound):" + "def sprite_set_speed(s, value):" ], "pascal": [ - "procedure SpriteStartAnimation(s: Sprite; const named: String; withSound: Boolean)" + "procedure SpriteSetSpeed(s: Sprite; value: Single)" ], "csharp": [ - "public void Sprite.SpriteStartAnimation(string named, bool withSound);", - "public static void SplashKit.SpriteStartAnimation(Sprite s, string named, bool withSound);" + "public void Sprite.Speed { set }", + "public static void SplashKit.SpriteSetSpeed(Sprite s, float value);" ], "cpp": [ - "void sprite_start_animation(sprite s, const string &named, bool with_sound)" + "void sprite_set_speed(sprite s, float value)" ] } }, { - "signature": "void sprite_start_animation(sprite s,int idx);", - "name": "sprite_start_animation", - "method_name": "start_animation", - "unique_global_name": "sprite_start_animation", - "unique_method_name": "sprite.start_animation", + "signature": "void sprite_set_value(sprite s,const string &name,float val);", + "name": "sprite_set_value", + "method_name": "set_value", + "unique_global_name": "sprite_set_value_named", + "unique_method_name": "sprite.set_value_named", "suffix_name": null, - "description": "Start playing an animation from the sprite's animation template.\nThis will play a sound effect if the first cell of the animation\nhas a sound.", + "description": "Assigns a value to the sprite.", "brief": null, "return": { "type": "void", @@ -68917,7 +68917,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to start the animation of.", + "description": "The sprite to change.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -68928,9 +68928,22 @@ "is_vector": false, "type_parameter": null }, - "idx": { - "type": "int", - "description": "The index of the animation to start from the animation script.", + "name": { + "type": "string", + "description": "The name of the value to change", + "is_pointer": false, + "is_const": true, + "is_reference": true, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "val": { + "type": "float", + "description": "The new value.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -68944,35 +68957,36 @@ }, "attributes": { "class": "sprite", - "method": "start_animation", + "method": "set_value", + "suffix": "named", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_start_animation(s, idx):" + "def sprite_set_value_named(s, name, val):" ], "pascal": [ - "procedure SpriteStartAnimation(s: Sprite; idx: Integer)" + "procedure SpriteSetValue(s: Sprite; const name: String; val: Single)" ], "csharp": [ - "public void Sprite.SpriteStartAnimation(int idx);", - "public static void SplashKit.SpriteStartAnimation(Sprite s, int idx);" + "public void Sprite.SpriteSetValue(string name, float val);", + "public static void SplashKit.SpriteSetValue(Sprite s, string name, float val);" ], "cpp": [ - "void sprite_start_animation(sprite s, int idx)" + "void sprite_set_value(sprite s, const string &name, float val)" ] } }, { - "signature": "void sprite_start_animation(sprite s,int idx,bool with_sound);", - "name": "sprite_start_animation", - "method_name": "start_animation", - "unique_global_name": "sprite_start_animation_with_sound", - "unique_method_name": "sprite.start_animation_with_sound", + "signature": "void sprite_set_velocity(sprite s,const vector_2d &value);", + "name": "sprite_set_velocity", + "method_name": null, + "unique_global_name": "sprite_set_velocity", + "unique_method_name": null, "suffix_name": null, - "description": "Start playing an animation from the sprite's animation template.\nThe with_sound parameter determines whether to play a sound effect\nif the first cell of the animation has a sound.", + "description": "Sets the current velocity of the sprite. When the sprite is updated\n(see `update_sprite`) this vector_2d is used to move the sprite.", "brief": null, "return": { "type": "void", @@ -68985,20 +68999,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to start the animation of.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "idx": { - "type": "int", - "description": "The index of the animation to start from the animation script.", + "description": "The sprite to change.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -69009,12 +69010,12 @@ "is_vector": false, "type_parameter": null }, - "with_sound": { - "type": "bool", - "description": "If false, the animation will not play associated sound\neffects when started.", + "value": { + "type": "vector_2d", + "description": "The new sprite velocity.", "is_pointer": false, - "is_const": false, - "is_reference": false, + "is_const": true, + "is_reference": true, "is_array": false, "array_dimension_sizes": [ @@ -69025,36 +69026,35 @@ }, "attributes": { "class": "sprite", - "method": "start_animation", - "suffix": "with_sound", + "setter": "velocity", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_start_animation_with_sound(s, idx, with_sound):" + "def sprite_set_velocity(s, value):" ], "pascal": [ - "procedure SpriteStartAnimation(s: Sprite; idx: Integer; withSound: Boolean)" + "procedure SpriteSetVelocity(s: Sprite; const value: Vector2D)" ], "csharp": [ - "public void Sprite.SpriteStartAnimation(int idx, bool withSound);", - "public static void SplashKit.SpriteStartAnimation(Sprite s, int idx, bool withSound);" + "public void Sprite.Velocity { set }", + "public static void SplashKit.SpriteSetVelocity(Sprite s, Vector2D value);" ], "cpp": [ - "void sprite_start_animation(sprite s, int idx, bool with_sound)" + "void sprite_set_velocity(sprite s, const vector_2d &value)" ] } }, { - "signature": "void sprite_stop_calling_on_event(sprite s,sprite_event_handler *handler);", - "name": "sprite_stop_calling_on_event", - "method_name": "stop_calling_on_event", - "unique_global_name": "sprite_stop_calling_on_event", - "unique_method_name": "sprite.stop_calling_on_event", + "signature": "void sprite_set_x(sprite s,float value);", + "name": "sprite_set_x", + "method_name": null, + "unique_global_name": "sprite_set_x", + "unique_method_name": null, "suffix_name": null, - "description": "Removes an event handler from the sprite, stopping events from this\nsprite calling the indicated method.", + "description": "Sets the X position of the sprite.", "brief": null, "return": { "type": "void", @@ -69067,7 +69067,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to remove the handler from", + "description": "The sprite to change.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -69078,10 +69078,10 @@ "is_vector": false, "type_parameter": null }, - "handler": { - "type": "sprite_event_handler", - "description": "The function to remove from this sprites handlers", - "is_pointer": true, + "value": { + "type": "float", + "description": "The new x location.", + "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, @@ -69094,35 +69094,35 @@ }, "attributes": { "class": "sprite", - "method": "stop_calling_on_event", - "self": "s", + "setter": "x", "group": "sprites", - "static": "sprite" + "static": "sprite", + "self": "s" }, "signatures": { "python": [ - "def sprite_stop_calling_on_event(s, handler):" + "def sprite_set_x(s, value):" ], "pascal": [ - "procedure SpriteStopCallingOnEvent(s: Sprite; handler: SpriteEventHandler)" + "procedure SpriteSetX(s: Sprite; value: Single)" ], "csharp": [ - "public void Sprite.SpriteStopCallingOnEvent(SpriteEventHandler handler);", - "public static void SplashKit.SpriteStopCallingOnEvent(Sprite s, SpriteEventHandler handler);" + "public void Sprite.X { set }", + "public static void SplashKit.SpriteSetX(Sprite s, float value);" ], "cpp": [ - "void sprite_stop_calling_on_event(sprite s, sprite_event_handler *handler)" + "void sprite_set_x(sprite s, float value)" ] } }, { - "signature": "void sprite_toggle_layer_visible(sprite s,const string &name);", - "name": "sprite_toggle_layer_visible", - "method_name": "toggle_layer_visible", - "unique_global_name": "sprite_toggle_layer_visible_named", - "unique_method_name": "sprite.toggle_layer_visible_named", + "signature": "void sprite_set_y(sprite s,float value);", + "name": "sprite_set_y", + "method_name": null, + "unique_global_name": "sprite_set_y", + "unique_method_name": null, "suffix_name": null, - "description": "Toggle the visibility of the specified layer of the sprite.", + "description": "Sets the Y position of the sprite.", "brief": null, "return": { "type": "void", @@ -69146,12 +69146,12 @@ "is_vector": false, "type_parameter": null }, - "name": { - "type": "string", - "description": "The name of the layer to toggle.", + "value": { + "type": "float", + "description": "The new sprite y.", "is_pointer": false, - "is_const": true, - "is_reference": true, + "is_const": false, + "is_reference": false, "is_array": false, "array_dimension_sizes": [ @@ -69162,40 +69162,39 @@ }, "attributes": { "class": "sprite", - "method": "toggle_layer_visible", - "suffix": "named", + "setter": "y", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_toggle_layer_visible_named(s, name):" + "def sprite_set_y(s, value):" ], "pascal": [ - "procedure SpriteToggleLayerVisible(s: Sprite; const name: String)" + "procedure SpriteSetY(s: Sprite; value: Single)" ], "csharp": [ - "public void Sprite.SpriteToggleLayerVisible(string name);", - "public static void SplashKit.SpriteToggleLayerVisible(Sprite s, string name);" + "public void Sprite.Y { set }", + "public static void SplashKit.SpriteSetY(Sprite s, float value);" ], "cpp": [ - "void sprite_toggle_layer_visible(sprite s, const string &name)" + "void sprite_set_y(sprite s, float value)" ] } }, { - "signature": "void sprite_toggle_layer_visible(sprite s,int id);", - "name": "sprite_toggle_layer_visible", - "method_name": "Toggle_layer_visible", - "unique_global_name": "sprite_toggle_layer_visible", - "unique_method_name": "sprite.Toggle_layer_visible", - "suffix_name": null, - "description": "Toggle the visibility of the specified layer of the sprite.", + "signature": "int sprite_show_layer(sprite s,const string &name);", + "name": "sprite_show_layer", + "method_name": "show_layer", + "unique_global_name": "sprite_show_layer_named", + "unique_method_name": "sprite.show_layer_named", + "suffix_name": null, + "description": "Show the specified layer of the sprite.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "int", + "description": "The index of the layer shown, or -1 if no layer found.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -69204,7 +69203,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to change.", + "description": "The sprite to show the layer of.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -69215,12 +69214,12 @@ "is_vector": false, "type_parameter": null }, - "id": { - "type": "int", - "description": "The index of the layer to toggle.", + "name": { + "type": "string", + "description": "The layer to show.", "is_pointer": false, - "is_const": false, - "is_reference": false, + "is_const": true, + "is_reference": true, "is_array": false, "array_dimension_sizes": [ @@ -69231,39 +69230,40 @@ }, "attributes": { "class": "sprite", - "method": "Toggle_layer_visible", + "method": "show_layer", + "suffix": "named", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_toggle_layer_visible(s, id):" + "def sprite_show_layer_named(s, name):" ], "pascal": [ - "procedure SpriteToggleLayerVisible(s: Sprite; id: Integer)" + "function SpriteShowLayer(s: Sprite; const name: String): Integer" ], "csharp": [ - "public void Sprite.SpriteToggleLayerVisible(int id);", - "public static void SplashKit.SpriteToggleLayerVisible(Sprite s, int id);" + "public int Sprite.SpriteShowLayer(string name);", + "public static int SplashKit.SpriteShowLayer(Sprite s, string name);" ], "cpp": [ - "void sprite_toggle_layer_visible(sprite s, int id)" + "int sprite_show_layer(sprite s, const string &name)" ] } }, { - "signature": "float sprite_value(sprite s,const string &name);", - "name": "sprite_value", - "method_name": "value", - "unique_global_name": "sprite_value", - "unique_method_name": "sprite.value", + "signature": "int sprite_show_layer(sprite s,int id);", + "name": "sprite_show_layer", + "method_name": "show_layer", + "unique_global_name": "sprite_show_layer", + "unique_method_name": "sprite.show_layer", "suffix_name": null, - "description": "Returns the indicated value of the sprite", + "description": "Show the specified layer of the sprite.", "brief": null, "return": { - "type": "float", - "description": "The value from the sprite's data store.", + "type": "int", + "description": "The index of the layer shown, or -1 if no layer found.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -69272,7 +69272,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to show the layer of.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -69283,12 +69283,12 @@ "is_vector": false, "type_parameter": null }, - "name": { - "type": "string", - "description": "The name of the value to fetch.", + "id": { + "type": "int", + "description": "The index to show.", "is_pointer": false, - "is_const": true, - "is_reference": true, + "is_const": false, + "is_reference": false, "is_array": false, "array_dimension_sizes": [ @@ -69299,39 +69299,39 @@ }, "attributes": { "class": "sprite", - "method": "value", + "method": "show_layer", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_value(s, name):" + "def sprite_show_layer(s, id):" ], "pascal": [ - "function SpriteValue(s: Sprite; const name: String): Single" + "function SpriteShowLayer(s: Sprite; id: Integer): Integer" ], "csharp": [ - "public float Sprite.SpriteValue(string name);", - "public static float SplashKit.SpriteValue(Sprite s, string name);" + "public int Sprite.SpriteShowLayer(int id);", + "public static int SplashKit.SpriteShowLayer(Sprite s, int id);" ], "cpp": [ - "float sprite_value(sprite s, const string &name)" + "int sprite_show_layer(sprite s, int id)" ] } }, { - "signature": "int sprite_value_count(sprite s);", - "name": "sprite_value_count", + "signature": "float sprite_speed(sprite s);", + "name": "sprite_speed", "method_name": null, - "unique_global_name": "sprite_value_count", + "unique_global_name": "sprite_speed", "unique_method_name": null, "suffix_name": null, - "description": "Returns the number of sprite's values.", + "description": "Returns the current speed (distance travelled per update) of the sprite.", "brief": null, "return": { - "type": "int", - "description": "The number of values stored in the sprite.", + "type": "float", + "description": "The speed of the sprite (pixels per update).", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -69354,39 +69354,39 @@ }, "attributes": { "class": "sprite", - "getter": "value_count", + "getter": "speed", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_value_count(s):" + "def sprite_speed(s):" ], "pascal": [ - "function SpriteValueCount(s: Sprite): Integer" + "function SpriteSpeed(s: Sprite): Single" ], "csharp": [ - "public int Sprite.ValueCount { get }", - "public static int SplashKit.SpriteValueCount(Sprite s);" + "public float Sprite.Speed { get }", + "public static float SplashKit.SpriteSpeed(Sprite s);" ], "cpp": [ - "int sprite_value_count(sprite s)" + "float sprite_speed(sprite s)" ] } }, { - "signature": "vector_2d sprite_velocity(sprite s);", - "name": "sprite_velocity", - "method_name": null, - "unique_global_name": "sprite_velocity", - "unique_method_name": null, + "signature": "void sprite_start_animation(sprite s,const string &named);", + "name": "sprite_start_animation", + "method_name": "start_animation", + "unique_global_name": "sprite_start_animation_named", + "unique_method_name": "sprite.start_animation_named", "suffix_name": null, - "description": "Returns the current velocity of the sprite. When the sprite is updated\n(see `update_sprite`) this vector_2d is used to move the sprite.", + "description": "Start playing an animation from the sprite's animation template.\nThis will play a sound effect if the first cell of the animation\nhas a sound.", "brief": null, "return": { - "type": "vector_2d", - "description": "The sprite's velocity.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -69395,13 +69395,26 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to start the animation of.", "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, "array_dimension_sizes": [ + ], + "is_vector": false, + "type_parameter": null + }, + "named": { + "type": "string", + "description": "The name of the animation to start from the animation script.", + "is_pointer": false, + "is_const": true, + "is_reference": true, + "is_array": false, + "array_dimension_sizes": [ + ], "is_vector": false, "type_parameter": null @@ -69409,39 +69422,40 @@ }, "attributes": { "class": "sprite", - "getter": "velocity", + "method": "start_animation", + "suffix": "named", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_velocity(s):" + "def sprite_start_animation_named(s, named):" ], "pascal": [ - "function SpriteVelocity(s: Sprite): Vector2D" + "procedure SpriteStartAnimation(s: Sprite; const named: String)" ], "csharp": [ - "public Vector2D Sprite.Velocity { get }", - "public static Vector2D SplashKit.SpriteVelocity(Sprite s);" + "public void Sprite.SpriteStartAnimation(string named);", + "public static void SplashKit.SpriteStartAnimation(Sprite s, string named);" ], "cpp": [ - "vector_2d sprite_velocity(sprite s)" + "void sprite_start_animation(sprite s, const string &named)" ] } }, { - "signature": "int sprite_visible_index_of_layer(sprite s,const string &name);", - "name": "sprite_visible_index_of_layer", - "method_name": "visible_index_of_layer", - "unique_global_name": "sprite_visible_index_of_layer_named", - "unique_method_name": "sprite.visible_index_of_layer_named", + "signature": "void sprite_start_animation(sprite s,const string &named,bool with_sound);", + "name": "sprite_start_animation", + "method_name": "start_animation", + "unique_global_name": "sprite_start_animation_named_with_sound", + "unique_method_name": "sprite.start_animation_named_with_sound", "suffix_name": null, - "description": "Returns the index (z-order) of the sprite's layer.", + "description": "Start playing an animation from the sprite's animation template.\nThe with_sound parameter determines whether to play a sound effect\nif the first cell of the animation has a sound.", "brief": null, "return": { - "type": "int", - "description": "The z index of the sprite's layer", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -69450,7 +69464,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to start the animation of.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -69461,15 +69475,28 @@ "is_vector": false, "type_parameter": null }, - "name": { + "named": { "type": "string", - "description": "The name of the layer to get the z index of.", + "description": "The name of the animation to start from the animation script.", "is_pointer": false, "is_const": true, "is_reference": true, "is_array": false, "array_dimension_sizes": [ + ], + "is_vector": false, + "type_parameter": null + }, + "with_sound": { + "type": "bool", + "description": "If false, the animation will not play associated sound\neffects when started.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + ], "is_vector": false, "type_parameter": null @@ -69477,40 +69504,40 @@ }, "attributes": { "class": "sprite", - "method": "visible_index_of_layer", - "suffix": "named", + "method": "start_animation", + "suffix": "named_with_sound", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_visible_index_of_layer_named(s, name):" + "def sprite_start_animation_named_with_sound(s, named, with_sound):" ], "pascal": [ - "function SpriteVisibleIndexOfLayer(s: Sprite; const name: String): Integer" + "procedure SpriteStartAnimation(s: Sprite; const named: String; withSound: Boolean)" ], "csharp": [ - "public int Sprite.SpriteVisibleIndexOfLayer(string name);", - "public static int SplashKit.SpriteVisibleIndexOfLayer(Sprite s, string name);" + "public void Sprite.SpriteStartAnimation(string named, bool withSound);", + "public static void SplashKit.SpriteStartAnimation(Sprite s, string named, bool withSound);" ], "cpp": [ - "int sprite_visible_index_of_layer(sprite s, const string &name)" + "void sprite_start_animation(sprite s, const string &named, bool with_sound)" ] } }, { - "signature": "int sprite_visible_index_of_layer(sprite s,int id);", - "name": "sprite_visible_index_of_layer", - "method_name": "visible_index_of_layer", - "unique_global_name": "sprite_visible_index_of_layer", - "unique_method_name": "sprite.visible_index_of_layer", + "signature": "void sprite_start_animation(sprite s,int idx);", + "name": "sprite_start_animation", + "method_name": "start_animation", + "unique_global_name": "sprite_start_animation", + "unique_method_name": "sprite.start_animation", "suffix_name": null, - "description": "Returns the index (z-order) of the sprite's layer.", + "description": "Start playing an animation from the sprite's animation template.\nThis will play a sound effect if the first cell of the animation\nhas a sound.", "brief": null, "return": { - "type": "int", - "description": "The z index of the sprite's layer", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -69519,7 +69546,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to start the animation of.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -69530,9 +69557,9 @@ "is_vector": false, "type_parameter": null }, - "id": { + "idx": { "type": "int", - "description": "The index of the layer to get the z index of.", + "description": "The index of the animation to start from the animation script.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -69546,39 +69573,39 @@ }, "attributes": { "class": "sprite", - "method": "visible_index_of_layer", + "method": "start_animation", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_visible_index_of_layer(s, id):" + "def sprite_start_animation(s, idx):" ], "pascal": [ - "function SpriteVisibleIndexOfLayer(s: Sprite; id: Integer): Integer" + "procedure SpriteStartAnimation(s: Sprite; idx: Integer)" ], "csharp": [ - "public int Sprite.SpriteVisibleIndexOfLayer(int id);", - "public static int SplashKit.SpriteVisibleIndexOfLayer(Sprite s, int id);" + "public void Sprite.SpriteStartAnimation(int idx);", + "public static void SplashKit.SpriteStartAnimation(Sprite s, int idx);" ], "cpp": [ - "int sprite_visible_index_of_layer(sprite s, int id)" + "void sprite_start_animation(sprite s, int idx)" ] } }, { - "signature": "int sprite_visible_layer(sprite s,int idx);", - "name": "sprite_visible_layer", - "method_name": "visible_layer", - "unique_global_name": "sprite_visible_layer", - "unique_method_name": "sprite.visible_layer", + "signature": "void sprite_start_animation(sprite s,int idx,bool with_sound);", + "name": "sprite_start_animation", + "method_name": "start_animation", + "unique_global_name": "sprite_start_animation_with_sound", + "unique_method_name": "sprite.start_animation_with_sound", "suffix_name": null, - "description": "Returns the index of the n'th (idx parameter) visible layer.", + "description": "Start playing an animation from the sprite's animation template.\nThe with_sound parameter determines whether to play a sound effect\nif the first cell of the animation has a sound.", "brief": null, "return": { - "type": "int", - "description": "The layer index of the selected visible layer.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -69587,7 +69614,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to start the animation of.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -69600,7 +69627,7 @@ }, "idx": { "type": "int", - "description": "The index of the visible layer to fetch.", + "description": "The index of the animation to start from the animation script.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -69610,43 +69637,57 @@ ], "is_vector": false, "type_parameter": null - } - }, - "attributes": { - "class": "sprite", - "method": "visible_layer", - "group": "sprites", - "static": "sprite", - "self": "s" + }, + "with_sound": { + "type": "bool", + "description": "If false, the animation will not play associated sound\neffects when started.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } + }, + "attributes": { + "class": "sprite", + "method": "start_animation", + "suffix": "with_sound", + "group": "sprites", + "static": "sprite", + "self": "s" }, "signatures": { "python": [ - "def sprite_visible_layer(s, idx):" + "def sprite_start_animation_with_sound(s, idx, with_sound):" ], "pascal": [ - "function SpriteVisibleLayer(s: Sprite; idx: Integer): Integer" + "procedure SpriteStartAnimation(s: Sprite; idx: Integer; withSound: Boolean)" ], "csharp": [ - "public int Sprite.SpriteVisibleLayer(int idx);", - "public static int SplashKit.SpriteVisibleLayer(Sprite s, int idx);" + "public void Sprite.SpriteStartAnimation(int idx, bool withSound);", + "public static void SplashKit.SpriteStartAnimation(Sprite s, int idx, bool withSound);" ], "cpp": [ - "int sprite_visible_layer(sprite s, int idx)" + "void sprite_start_animation(sprite s, int idx, bool with_sound)" ] } }, { - "signature": "int sprite_visible_layer_count(sprite s);", - "name": "sprite_visible_layer_count", - "method_name": null, - "unique_global_name": "sprite_visible_layer_count", - "unique_method_name": null, + "signature": "void sprite_stop_calling_on_event(sprite s,sprite_event_handler *handler);", + "name": "sprite_stop_calling_on_event", + "method_name": "stop_calling_on_event", + "unique_global_name": "sprite_stop_calling_on_event", + "unique_method_name": "sprite.stop_calling_on_event", "suffix_name": null, - "description": "Returns the number of layers that are currently visible for the sprite.", + "description": "Removes an event handler from the sprite, stopping events from this\nsprite calling the indicated method.", "brief": null, "return": { - "type": "int", - "description": "The number of visible layers for the sprite.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -69655,13 +69696,26 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to remove the handler from", "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, "array_dimension_sizes": [ + ], + "is_vector": false, + "type_parameter": null + }, + "handler": { + "type": "sprite_event_handler", + "description": "The function to remove from this sprites handlers", + "is_pointer": true, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + ], "is_vector": false, "type_parameter": null @@ -69669,39 +69723,39 @@ }, "attributes": { "class": "sprite", - "getter": "visible_layer_count", + "method": "stop_calling_on_event", + "self": "s", "group": "sprites", - "static": "sprite", - "self": "s" + "static": "sprite" }, "signatures": { "python": [ - "def sprite_visible_layer_count(s):" + "def sprite_stop_calling_on_event(s, handler):" ], "pascal": [ - "function SpriteVisibleLayerCount(s: Sprite): Integer" + "procedure SpriteStopCallingOnEvent(s: Sprite; handler: SpriteEventHandler)" ], "csharp": [ - "public int Sprite.VisibleLayerCount { get }", - "public static int SplashKit.SpriteVisibleLayerCount(Sprite s);" + "public void Sprite.SpriteStopCallingOnEvent(SpriteEventHandler handler);", + "public static void SplashKit.SpriteStopCallingOnEvent(Sprite s, SpriteEventHandler handler);" ], "cpp": [ - "int sprite_visible_layer_count(sprite s)" + "void sprite_stop_calling_on_event(sprite s, sprite_event_handler *handler)" ] } }, { - "signature": "int sprite_visible_layer_id(sprite s,int idx);", - "name": "sprite_visible_layer_id", - "method_name": "visible_layer_id_at", - "unique_global_name": "sprite_visible_layer_id", - "unique_method_name": "sprite.visible_layer_id_at", + "signature": "void sprite_toggle_layer_visible(sprite s,const string &name);", + "name": "sprite_toggle_layer_visible", + "method_name": "toggle_layer_visible", + "unique_global_name": "sprite_toggle_layer_visible_named", + "unique_method_name": "sprite.toggle_layer_visible_named", "suffix_name": null, - "description": "Returns the id of the layer at index `idx` that is currently visible.\nIndex 0 is the background, with larger indexes moving toward the foreground.\nThis returns -1 if there are no visible layers.", + "description": "Toggle the visibility of the specified layer of the sprite.", "brief": null, "return": { - "type": "int", - "description": "The layer index of the visible layer.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -69710,7 +69764,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to change.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -69721,12 +69775,12 @@ "is_vector": false, "type_parameter": null }, - "idx": { - "type": "int", - "description": "The index of the visible layer.", + "name": { + "type": "string", + "description": "The name of the layer to toggle.", "is_pointer": false, - "is_const": false, - "is_reference": false, + "is_const": true, + "is_reference": true, "is_array": false, "array_dimension_sizes": [ @@ -69737,39 +69791,40 @@ }, "attributes": { "class": "sprite", - "method": "visible_layer_id_at", + "method": "toggle_layer_visible", + "suffix": "named", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_visible_layer_id(s, idx):" + "def sprite_toggle_layer_visible_named(s, name):" ], "pascal": [ - "function SpriteVisibleLayerId(s: Sprite; idx: Integer): Integer" + "procedure SpriteToggleLayerVisible(s: Sprite; const name: String)" ], "csharp": [ - "public int Sprite.SpriteVisibleLayerId(int idx);", - "public static int SplashKit.SpriteVisibleLayerId(Sprite s, int idx);" + "public void Sprite.SpriteToggleLayerVisible(string name);", + "public static void SplashKit.SpriteToggleLayerVisible(Sprite s, string name);" ], "cpp": [ - "int sprite_visible_layer_id(sprite s, int idx)" + "void sprite_toggle_layer_visible(sprite s, const string &name)" ] } }, { - "signature": "int sprite_width(sprite s);", - "name": "sprite_width", - "method_name": null, - "unique_global_name": "sprite_width", - "unique_method_name": null, + "signature": "void sprite_toggle_layer_visible(sprite s,int id);", + "name": "sprite_toggle_layer_visible", + "method_name": "Toggle_layer_visible", + "unique_global_name": "sprite_toggle_layer_visible", + "unique_method_name": "sprite.Toggle_layer_visible", "suffix_name": null, - "description": "The current Width of the sprite (aligned to the X axis).", + "description": "Toggle the visibility of the specified layer of the sprite.", "brief": null, "return": { - "type": "int", - "description": "The width of the sprite's layer in pixels.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, @@ -69778,7 +69833,20 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to get the details from.", + "description": "The sprite to change.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "id": { + "type": "int", + "description": "The index of the layer to toggle.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -69792,39 +69860,39 @@ }, "attributes": { "class": "sprite", - "getter": "Width", + "method": "Toggle_layer_visible", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_width(s):" + "def sprite_toggle_layer_visible(s, id):" ], "pascal": [ - "function SpriteWidth(s: Sprite): Integer" + "procedure SpriteToggleLayerVisible(s: Sprite; id: Integer)" ], "csharp": [ - "public int Sprite.Width { get }", - "public static int SplashKit.SpriteWidth(Sprite s);" + "public void Sprite.SpriteToggleLayerVisible(int id);", + "public static void SplashKit.SpriteToggleLayerVisible(Sprite s, int id);" ], "cpp": [ - "int sprite_width(sprite s)" + "void sprite_toggle_layer_visible(sprite s, int id)" ] } }, { - "signature": "float sprite_x(sprite s);", - "name": "sprite_x", - "method_name": null, - "unique_global_name": "sprite_x", - "unique_method_name": null, + "signature": "float sprite_value(sprite s,const string &name);", + "name": "sprite_value", + "method_name": "value", + "unique_global_name": "sprite_value", + "unique_method_name": "sprite.value", "suffix_name": null, - "description": "Returns the X position of the sprite.", + "description": "Returns the indicated value of the sprite", "brief": null, "return": { "type": "float", - "description": "The x location of the sprite", + "description": "The value from the sprite's data store.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -69840,6 +69908,19 @@ "is_array": false, "array_dimension_sizes": [ + ], + "is_vector": false, + "type_parameter": null + }, + "name": { + "type": "string", + "description": "The name of the value to fetch.", + "is_pointer": false, + "is_const": true, + "is_reference": true, + "is_array": false, + "array_dimension_sizes": [ + ], "is_vector": false, "type_parameter": null @@ -69847,39 +69928,39 @@ }, "attributes": { "class": "sprite", - "getter": "x", + "method": "value", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_x(s):" + "def sprite_value(s, name):" ], "pascal": [ - "function SpriteX(s: Sprite): Single" + "function SpriteValue(s: Sprite; const name: String): Single" ], "csharp": [ - "public float Sprite.X { get }", - "public static float SplashKit.SpriteX(Sprite s);" + "public float Sprite.SpriteValue(string name);", + "public static float SplashKit.SpriteValue(Sprite s, string name);" ], "cpp": [ - "float sprite_x(sprite s)" + "float sprite_value(sprite s, const string &name)" ] } }, { - "signature": "float sprite_y(sprite s);", - "name": "sprite_y", + "signature": "int sprite_value_count(sprite s);", + "name": "sprite_value_count", "method_name": null, - "unique_global_name": "sprite_y", + "unique_global_name": "sprite_value_count", "unique_method_name": null, "suffix_name": null, - "description": "Returns the Y position of the sprite.", + "description": "Returns the number of sprite's values.", "brief": null, "return": { - "type": "float", - "description": "The sprite's y location.", + "type": "int", + "description": "The number of values stored in the sprite.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -69902,49 +69983,49 @@ }, "attributes": { "class": "sprite", - "getter": "y", + "getter": "value_count", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def sprite_y(s):" + "def sprite_value_count(s):" ], "pascal": [ - "function SpriteY(s: Sprite): Single" + "function SpriteValueCount(s: Sprite): Integer" ], "csharp": [ - "public float Sprite.Y { get }", - "public static float SplashKit.SpriteY(Sprite s);" + "public int Sprite.ValueCount { get }", + "public static int SplashKit.SpriteValueCount(Sprite s);" ], "cpp": [ - "float sprite_y(sprite s)" + "int sprite_value_count(sprite s)" ] } }, { - "signature": "void stop_calling_on_sprite_event(sprite_event_handler *handler);", - "name": "stop_calling_on_sprite_event", + "signature": "vector_2d sprite_velocity(sprite s);", + "name": "sprite_velocity", "method_name": null, - "unique_global_name": "stop_calling_on_sprite_event", + "unique_global_name": "sprite_velocity", "unique_method_name": null, "suffix_name": null, - "description": "Removes an global event handler, stopping events calling the indicated void.", + "description": "Returns the current velocity of the sprite. When the sprite is updated\n(see `update_sprite`) this vector_2d is used to move the sprite.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "vector_2d", + "description": "The sprite's velocity.", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "handler": { - "type": "sprite_event_handler", - "description": "The function to remove from the list of sprite event handlers.", - "is_pointer": true, + "s": { + "type": "sprite", + "description": "The sprite to get the details from.", + "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, @@ -69956,85 +70037,131 @@ } }, "attributes": { + "class": "sprite", + "getter": "velocity", "group": "sprites", - "static": "sprite" + "static": "sprite", + "self": "s" }, "signatures": { "python": [ - "def stop_calling_on_sprite_event(handler):" + "def sprite_velocity(s):" ], "pascal": [ - "procedure StopCallingOnSpriteEvent(handler: SpriteEventHandler)" + "function SpriteVelocity(s: Sprite): Vector2D" ], "csharp": [ - "public static void Sprite.StopCallingOnSpriteEvent(SpriteEventHandler handler);", - "public static void SplashKit.StopCallingOnSpriteEvent(SpriteEventHandler handler);" + "public Vector2D Sprite.Velocity { get }", + "public static Vector2D SplashKit.SpriteVelocity(Sprite s);" ], "cpp": [ - "void stop_calling_on_sprite_event(sprite_event_handler *handler)" + "vector_2d sprite_velocity(sprite s)" ] } }, { - "signature": "void update_all_sprites();", - "name": "update_all_sprites", - "method_name": null, - "unique_global_name": "update_all_sprites", - "unique_method_name": null, + "signature": "int sprite_visible_index_of_layer(sprite s,const string &name);", + "name": "sprite_visible_index_of_layer", + "method_name": "visible_index_of_layer", + "unique_global_name": "sprite_visible_index_of_layer_named", + "unique_method_name": "sprite.visible_index_of_layer_named", "suffix_name": null, - "description": "Update all of the sprites in the current sprite pack.", + "description": "Returns the index (z-order) of the sprite's layer.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "int", + "description": "The z index of the sprite's layer", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { + "s": { + "type": "sprite", + "description": "The sprite to get the details from.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "name": { + "type": "string", + "description": "The name of the layer to get the z index of.", + "is_pointer": false, + "is_const": true, + "is_reference": true, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } }, "attributes": { + "class": "sprite", + "method": "visible_index_of_layer", + "suffix": "named", "group": "sprites", - "static": "sprite" + "static": "sprite", + "self": "s" }, "signatures": { "python": [ - "def update_all_sprites():" + "def sprite_visible_index_of_layer_named(s, name):" ], "pascal": [ - "procedure UpdateAllSprites()" + "function SpriteVisibleIndexOfLayer(s: Sprite; const name: String): Integer" ], "csharp": [ - "public static void Sprite.UpdateAllSprites();", - "public static void SplashKit.UpdateAllSprites();" + "public int Sprite.SpriteVisibleIndexOfLayer(string name);", + "public static int SplashKit.SpriteVisibleIndexOfLayer(Sprite s, string name);" ], "cpp": [ - "void update_all_sprites()" + "int sprite_visible_index_of_layer(sprite s, const string &name)" ] } }, { - "signature": "void update_all_sprites(float pct);", - "name": "update_all_sprites", - "method_name": null, - "unique_global_name": "update_all_sprites_percent", - "unique_method_name": null, + "signature": "int sprite_visible_index_of_layer(sprite s,int id);", + "name": "sprite_visible_index_of_layer", + "method_name": "visible_index_of_layer", + "unique_global_name": "sprite_visible_index_of_layer", + "unique_method_name": "sprite.visible_index_of_layer", "suffix_name": null, - "description": "Update all of the sprites in the current sprite pack, passing in a\npercentage value to indicate the percentage to update.", + "description": "Returns the index (z-order) of the sprite's layer.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "int", + "description": "The z index of the sprite's layer", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "pct": { - "type": "float", - "description": "The percentage of the update to apply.", + "s": { + "type": "sprite", + "description": "The sprite to get the details from.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "id": { + "type": "int", + "description": "The index of the layer to get the z index of.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -70047,38 +70174,40 @@ } }, "attributes": { - "suffix": "percent", + "class": "sprite", + "method": "visible_index_of_layer", "group": "sprites", - "static": "sprite" + "static": "sprite", + "self": "s" }, "signatures": { "python": [ - "def update_all_sprites_percent(pct):" + "def sprite_visible_index_of_layer(s, id):" ], "pascal": [ - "procedure UpdateAllSprites(pct: Single)" + "function SpriteVisibleIndexOfLayer(s: Sprite; id: Integer): Integer" ], "csharp": [ - "public static void Sprite.UpdateAllSprites(float pct);", - "public static void SplashKit.UpdateAllSprites(float pct);" + "public int Sprite.SpriteVisibleIndexOfLayer(int id);", + "public static int SplashKit.SpriteVisibleIndexOfLayer(Sprite s, int id);" ], "cpp": [ - "void update_all_sprites(float pct)" + "int sprite_visible_index_of_layer(sprite s, int id)" ] } }, { - "signature": "void update_sprite(sprite s);", - "name": "update_sprite", - "method_name": "update", - "unique_global_name": "update_sprite", - "unique_method_name": "sprite.update", + "signature": "int sprite_visible_layer(sprite s,int idx);", + "name": "sprite_visible_layer", + "method_name": "visible_layer", + "unique_global_name": "sprite_visible_layer", + "unique_method_name": "sprite.visible_layer", "suffix_name": null, - "description": "Update the position and animation details of the sprite.\nThis will play a sound effect if the new cell of the animation\nhas a sound.", + "description": "Returns the index of the n'th (idx parameter) visible layer.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "int", + "description": "The layer index of the selected visible layer.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -70087,7 +70216,20 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to update.", + "description": "The sprite to get the details from.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "idx": { + "type": "int", + "description": "The index of the visible layer to fetch.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -70101,39 +70243,39 @@ }, "attributes": { "class": "sprite", - "method": "update", + "method": "visible_layer", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def update_sprite(s):" + "def sprite_visible_layer(s, idx):" ], "pascal": [ - "procedure UpdateSprite(s: Sprite)" + "function SpriteVisibleLayer(s: Sprite; idx: Integer): Integer" ], "csharp": [ - "public void Sprite.UpdateSprite();", - "public static void SplashKit.UpdateSprite(Sprite s);" + "public int Sprite.SpriteVisibleLayer(int idx);", + "public static int SplashKit.SpriteVisibleLayer(Sprite s, int idx);" ], "cpp": [ - "void update_sprite(sprite s)" + "int sprite_visible_layer(sprite s, int idx)" ] } }, { - "signature": "void update_sprite(sprite s,bool with_sound);", - "name": "update_sprite", - "method_name": "update", - "unique_global_name": "update_sprite_with_sound", - "unique_method_name": "sprite.update_with_sound", + "signature": "int sprite_visible_layer_count(sprite s);", + "name": "sprite_visible_layer_count", + "method_name": null, + "unique_global_name": "sprite_visible_layer_count", + "unique_method_name": null, "suffix_name": null, - "description": "Update the position and animation details of the sprite.\nThis will play a sound effect if the new cell of the animation\nhas a sound and with_sound is true.", + "description": "Returns the number of layers that are currently visible for the sprite.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "int", + "description": "The number of visible layers for the sprite.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -70142,20 +70284,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to update", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "with_sound": { - "type": "bool", - "description": "If false, animations will not play associated sound\neffects when updated.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -70169,40 +70298,39 @@ }, "attributes": { "class": "sprite", - "method": "update", - "suffix": "with_sound", + "getter": "visible_layer_count", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def update_sprite_with_sound(s, with_sound):" + "def sprite_visible_layer_count(s):" ], "pascal": [ - "procedure UpdateSprite(s: Sprite; withSound: Boolean)" + "function SpriteVisibleLayerCount(s: Sprite): Integer" ], "csharp": [ - "public void Sprite.UpdateSprite(bool withSound);", - "public static void SplashKit.UpdateSprite(Sprite s, bool withSound);" + "public int Sprite.VisibleLayerCount { get }", + "public static int SplashKit.SpriteVisibleLayerCount(Sprite s);" ], "cpp": [ - "void update_sprite(sprite s, bool with_sound)" + "int sprite_visible_layer_count(sprite s)" ] } }, { - "signature": "void update_sprite(sprite s,float pct);", - "name": "update_sprite", - "method_name": "update", - "unique_global_name": "update_sprite_percent", - "unique_method_name": "sprite.update_percent", + "signature": "int sprite_visible_layer_id(sprite s,int idx);", + "name": "sprite_visible_layer_id", + "method_name": "visible_layer_id_at", + "unique_global_name": "sprite_visible_layer_id", + "unique_method_name": "sprite.visible_layer_id_at", "suffix_name": null, - "description": "Update the position and animation details of the sprite by a\ngiven percentage of a single unit of movement/animation.\nThis will play a sound effect if the new cell of the animation\nhas a sound.", + "description": "Returns the id of the layer at index `idx` that is currently visible.\nIndex 0 is the background, with larger indexes moving toward the foreground.\nThis returns -1 if there are no visible layers.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "int", + "description": "The layer index of the visible layer.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -70211,7 +70339,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to update.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -70222,9 +70350,9 @@ "is_vector": false, "type_parameter": null }, - "pct": { - "type": "float", - "description": "The percent to update.", + "idx": { + "type": "int", + "description": "The index of the visible layer.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -70238,40 +70366,39 @@ }, "attributes": { "class": "sprite", - "method": "update", - "suffix": "percent", + "method": "visible_layer_id_at", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def update_sprite_percent(s, pct):" + "def sprite_visible_layer_id(s, idx):" ], "pascal": [ - "procedure UpdateSprite(s: Sprite; pct: Single)" + "function SpriteVisibleLayerId(s: Sprite; idx: Integer): Integer" ], "csharp": [ - "public void Sprite.UpdateSprite(float pct);", - "public static void SplashKit.UpdateSprite(Sprite s, float pct);" + "public int Sprite.SpriteVisibleLayerId(int idx);", + "public static int SplashKit.SpriteVisibleLayerId(Sprite s, int idx);" ], "cpp": [ - "void update_sprite(sprite s, float pct)" + "int sprite_visible_layer_id(sprite s, int idx)" ] } }, { - "signature": "void update_sprite(sprite s,float pct,bool with_sound);", - "name": "update_sprite", - "method_name": "update", - "unique_global_name": "update_sprite_percent_with_sound", - "unique_method_name": "sprite.update_percent_with_sound", + "signature": "int sprite_width(sprite s);", + "name": "sprite_width", + "method_name": null, + "unique_global_name": "sprite_width", + "unique_method_name": null, "suffix_name": null, - "description": "Update the position and animation details of the sprite by a\ngiven percentage of a single unit of movement/animation.\nThis will play a sound effect if the new cell of the animation\nhas a sound and with_sound is true.", + "description": "The current Width of the sprite (aligned to the X axis).", "brief": null, "return": { - "type": "void", - "description": null, + "type": "int", + "description": "The width of the sprite's layer in pixels.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -70280,33 +70407,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to update.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "pct": { - "type": "float", - "description": "The percent to update.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "with_sound": { - "type": "bool", - "description": "If false, animations will not play associated sound\neffects when updated.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -70320,40 +70421,39 @@ }, "attributes": { "class": "sprite", - "method": "update", - "suffix": "percent_with_sound", + "getter": "Width", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def update_sprite_percent_with_sound(s, pct, with_sound):" + "def sprite_width(s):" ], "pascal": [ - "procedure UpdateSprite(s: Sprite; pct: Single; withSound: Boolean)" + "function SpriteWidth(s: Sprite): Integer" ], "csharp": [ - "public void Sprite.UpdateSprite(float pct, bool withSound);", - "public static void SplashKit.UpdateSprite(Sprite s, float pct, bool withSound);" + "public int Sprite.Width { get }", + "public static int SplashKit.SpriteWidth(Sprite s);" ], "cpp": [ - "void update_sprite(sprite s, float pct, bool with_sound)" + "int sprite_width(sprite s)" ] } }, { - "signature": "void update_sprite_animation(sprite s);", - "name": "update_sprite_animation", - "method_name": "update_animation", - "unique_global_name": "update_sprite_animation", - "unique_method_name": "sprite.update_animation", + "signature": "float sprite_x(sprite s);", + "name": "sprite_x", + "method_name": null, + "unique_global_name": "sprite_x", + "unique_method_name": null, "suffix_name": null, - "description": "Updates the animation details of the sprite.\nThis will play a sound effect if the new cell of the animation\nhas a sound.", + "description": "Returns the X position of the sprite.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "float", + "description": "The x location of the sprite", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -70362,7 +70462,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to update.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -70376,39 +70476,39 @@ }, "attributes": { "class": "sprite", - "method": "update_animation", + "getter": "x", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def update_sprite_animation(s):" + "def sprite_x(s):" ], "pascal": [ - "procedure UpdateSpriteAnimation(s: Sprite)" + "function SpriteX(s: Sprite): Single" ], "csharp": [ - "public void Sprite.UpdateSpriteAnimation();", - "public static void SplashKit.UpdateSpriteAnimation(Sprite s);" + "public float Sprite.X { get }", + "public static float SplashKit.SpriteX(Sprite s);" ], "cpp": [ - "void update_sprite_animation(sprite s)" + "float sprite_x(sprite s)" ] } }, { - "signature": "void update_sprite_animation(sprite s,bool with_sound);", - "name": "update_sprite_animation", - "method_name": "update_animation", - "unique_global_name": "update_sprite_animation_with_sound", - "unique_method_name": "sprite.update_animation_with_sound", + "signature": "float sprite_y(sprite s);", + "name": "sprite_y", + "method_name": null, + "unique_global_name": "sprite_y", + "unique_method_name": null, "suffix_name": null, - "description": "Update the animation details of the sprite.\nThis will play a sound effect if the new cell of the animation\nhas a sound and with_sound is true.", + "description": "Returns the Y position of the sprite.", "brief": null, "return": { - "type": "void", - "description": null, + "type": "float", + "description": "The sprite's y location.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -70417,20 +70517,7 @@ "parameters": { "s": { "type": "sprite", - "description": "The sprite to update.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "with_sound": { - "type": "bool", - "description": "If false, animations will not play associated sound\neffects when updated.", + "description": "The sprite to get the details from.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -70444,36 +70531,35 @@ }, "attributes": { "class": "sprite", - "method": "update_animation", - "suffix": "with_sound", + "getter": "y", "group": "sprites", "static": "sprite", "self": "s" }, "signatures": { "python": [ - "def update_sprite_animation_with_sound(s, with_sound):" + "def sprite_y(s):" ], "pascal": [ - "procedure UpdateSpriteAnimation(s: Sprite; withSound: Boolean)" + "function SpriteY(s: Sprite): Single" ], "csharp": [ - "public void Sprite.UpdateSpriteAnimation(bool withSound);", - "public static void SplashKit.UpdateSpriteAnimation(Sprite s, bool withSound);" + "public float Sprite.Y { get }", + "public static float SplashKit.SpriteY(Sprite s);" ], "cpp": [ - "void update_sprite_animation(sprite s, bool with_sound)" + "float sprite_y(sprite s)" ] } }, { - "signature": "void update_sprite_animation(sprite s,float pct);", - "name": "update_sprite_animation", - "method_name": "update_animation", - "unique_global_name": "update_sprite_animation_percent", - "unique_method_name": "sprite.update_animation_percent", + "signature": "void stop_calling_on_sprite_event(sprite_event_handler *handler);", + "name": "stop_calling_on_sprite_event", + "method_name": null, + "unique_global_name": "stop_calling_on_sprite_event", + "unique_method_name": null, "suffix_name": null, - "description": "Update the animation details of the sprite by a\ngiven percentage of a single unit of movement/animation.\nThis will play a sound effect if the new cell of the animation\nhas a sound.", + "description": "Removes an global event handler, stopping events calling the indicated void.", "brief": null, "return": { "type": "void", @@ -70484,23 +70570,10 @@ "type_parameter": null }, "parameters": { - "s": { - "type": "sprite", - "description": "The sprite to update.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "pct": { - "type": "float", - "description": "The percent to update.", - "is_pointer": false, + "handler": { + "type": "sprite_event_handler", + "description": "The function to remove from the list of sprite event handlers.", + "is_pointer": true, "is_const": false, "is_reference": false, "is_array": false, @@ -70512,37 +70585,33 @@ } }, "attributes": { - "class": "sprite", - "method": "update_animation", - "suffix": "percent", "group": "sprites", - "static": "sprite", - "self": "s" + "static": "sprite" }, "signatures": { "python": [ - "def update_sprite_animation_percent(s, pct):" + "def stop_calling_on_sprite_event(handler):" ], "pascal": [ - "procedure UpdateSpriteAnimation(s: Sprite; pct: Single)" + "procedure StopCallingOnSpriteEvent(handler: SpriteEventHandler)" ], "csharp": [ - "public void Sprite.UpdateSpriteAnimation(float pct);", - "public static void SplashKit.UpdateSpriteAnimation(Sprite s, float pct);" + "public static void Sprite.StopCallingOnSpriteEvent(SpriteEventHandler handler);", + "public static void SplashKit.StopCallingOnSpriteEvent(SpriteEventHandler handler);" ], "cpp": [ - "void update_sprite_animation(sprite s, float pct)" + "void stop_calling_on_sprite_event(sprite_event_handler *handler)" ] } }, { - "signature": "void update_sprite_animation(sprite s,float pct,bool with_sound);", - "name": "update_sprite_animation", - "method_name": "update_animation", - "unique_global_name": "update_sprite_animation_percent_with_sound", - "unique_method_name": "sprite.update_animation_percent_with_sound", + "signature": "void update_all_sprites();", + "name": "update_all_sprites", + "method_name": null, + "unique_global_name": "update_all_sprites", + "unique_method_name": null, "suffix_name": null, - "description": "Update the position and animation details of the sprite by a\ngiven percentage of a single unit of movement/animation.\nThis will play a sound effect if the new cell of the animation\nhas a sound and with_sound is true.", + "description": "Update all of the sprites in the current sprite pack.", "brief": null, "return": { "type": "void", @@ -70553,173 +70622,101 @@ "type_parameter": null }, "parameters": { - "s": { - "type": "sprite", - "description": "The sprite to update.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "pct": { - "type": "float", - "description": "The percent to update.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "with_sound": { - "type": "bool", - "description": "If false, animations will not play associated sound\neffects when updated.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - } }, "attributes": { - "class": "sprite", - "method": "update_animation", - "suffix": "percent_with_sound", "group": "sprites", - "static": "sprite", - "self": "s" + "static": "sprite" }, "signatures": { "python": [ - "def update_sprite_animation_percent_with_sound(s, pct, with_sound):" + "def update_all_sprites():" ], "pascal": [ - "procedure UpdateSpriteAnimation(s: Sprite; pct: Single; withSound: Boolean)" + "procedure UpdateAllSprites()" ], "csharp": [ - "public void Sprite.UpdateSpriteAnimation(float pct, bool withSound);", - "public static void SplashKit.UpdateSpriteAnimation(Sprite s, float pct, bool withSound);" + "public static void Sprite.UpdateAllSprites();", + "public static void SplashKit.UpdateAllSprites();" ], "cpp": [ - "void update_sprite_animation(sprite s, float pct, bool with_sound)" + "void update_all_sprites()" ] } }, { - "signature": "vector_2d vector_from_center_sprite_to_point(sprite s,const point_2d &pt);", - "name": "vector_from_center_sprite_to_point", - "method_name": "vector_to", - "unique_global_name": "vector_from_center_sprite_to_point_point", - "unique_method_name": "sprite.vector_to_point", + "signature": "void update_all_sprites(float pct);", + "name": "update_all_sprites", + "method_name": null, + "unique_global_name": "update_all_sprites_percent", + "unique_method_name": null, "suffix_name": null, - "description": "Returns a `vector_2d` that is the difference in location from the center of\nthe sprite `s` to the point `pt`.", + "description": "Update all of the sprites in the current sprite pack, passing in a\npercentage value to indicate the percentage to update.", "brief": null, "return": { - "type": "vector_2d", - "description": "A vector pointing from the sprite to the point.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "s": { - "type": "sprite", - "description": "The sprite that is at the start of the vector.", + "pct": { + "type": "float", + "description": "The percentage of the update to apply.", "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, "array_dimension_sizes": [ - ], - "is_vector": false, - "type_parameter": null - }, - "pt": { - "type": "point_2d", - "description": "The point that is at the end of the vector.", - "is_pointer": false, - "is_const": true, - "is_reference": true, - "is_array": false, - "array_dimension_sizes": [ - ], "is_vector": false, "type_parameter": null } }, "attributes": { - "class": "sprite", - "method": "vector_to", - "suffix": "point", + "suffix": "percent", "group": "sprites", - "static": "sprite", - "self": "s" + "static": "sprite" }, "signatures": { "python": [ - "def vector_from_center_sprite_to_point_point(s, pt):" + "def update_all_sprites_percent(pct):" ], "pascal": [ - "function VectorFromCenterSpriteToPoint(s: Sprite; const pt: Point2D): Vector2D" + "procedure UpdateAllSprites(pct: Single)" ], "csharp": [ - "public Vector2D Sprite.VectorFromCenterSpriteToPoint(Point2D pt);", - "public static Vector2D SplashKit.VectorFromCenterSpriteToPoint(Sprite s, Point2D pt);" + "public static void Sprite.UpdateAllSprites(float pct);", + "public static void SplashKit.UpdateAllSprites(float pct);" ], "cpp": [ - "vector_2d vector_from_center_sprite_to_point(sprite s, const point_2d &pt)" + "void update_all_sprites(float pct)" ] } }, { - "signature": "vector_2d vector_from_to(sprite s1,sprite s2);", - "name": "vector_from_to", - "method_name": "vector_to", - "unique_global_name": "vector_from_to", - "unique_method_name": "sprite.vector_to", + "signature": "void update_sprite(sprite s);", + "name": "update_sprite", + "method_name": "update", + "unique_global_name": "update_sprite", + "unique_method_name": "sprite.update", "suffix_name": null, - "description": "Returns a `vector_2d` that is the difference in the position of two sprites\n(`s1` and `s2`).", + "description": "Update the position and animation details of the sprite.\nThis will play a sound effect if the new cell of the animation\nhas a sound.", "brief": null, "return": { - "type": "vector_2d", - "description": "A vector that points from s1 to s2.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { - "s1": { - "type": "sprite", - "description": "The sprite that is at the start of the vector.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "s2": { + "s": { "type": "sprite", - "description": "The sprite that is at the end of the vector.", + "description": "The sprite to update.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -70733,55 +70730,36 @@ }, "attributes": { "class": "sprite", - "method": "vector_to", + "method": "update", "group": "sprites", "static": "sprite", - "self": "s1" + "self": "s" }, "signatures": { "python": [ - "def vector_from_to(s1, s2):" + "def update_sprite(s):" ], "pascal": [ - "function VectorFromTo(s1: Sprite; s2: Sprite): Vector2D" + "procedure UpdateSprite(s: Sprite)" ], "csharp": [ - "public Vector2D Sprite.VectorFromTo(Sprite s2);", - "public static Vector2D SplashKit.VectorFromTo(Sprite s1, Sprite s2);" + "public void Sprite.UpdateSprite();", + "public static void SplashKit.UpdateSprite(Sprite s);" ], "cpp": [ - "vector_2d vector_from_to(sprite s1, sprite s2)" + "void update_sprite(sprite s)" ] } - } - ], - "typedefs": [ - { - "signature": "typedef struct _sprite_data *sprite;", - "name": "sprite", - "description": "Sprites combine an image, with position and animation details. You can\ncreate a sprite using `create_sprite`, draw it with `draw_sprite`, move it\nusing the `sprite_velocity` with `update_sprite`, and animate it using an\n`animation_script`.", - "brief": null, - "attributes": { - "class": "sprite", - "group": "sprites", - "static": "sprite" - }, - "is_function_pointer": false, - "aliased_type": null, - "aliased_identifier": null, - "is_pointer": false, - "new_identifier": null }, { - "signature": "typedef void (sprite_event_handler) (void *s,int evt);", - "name": "sprite_event_handler", - "description": "The sprite_event_handler function pointer is used when you want to register\nto receive events from a Sprite.", + "signature": "void update_sprite(sprite s,bool with_sound);", + "name": "update_sprite", + "method_name": "update", + "unique_global_name": "update_sprite_with_sound", + "unique_method_name": "sprite.update_with_sound", + "suffix_name": null, + "description": "Update the position and animation details of the sprite.\nThis will play a sound effect if the new cell of the animation\nhas a sound and with_sound is true.", "brief": null, - "attributes": { - "group": "sprites", - "static": "sprite" - }, - "is_function_pointer": true, "return": { "type": "void", "description": null, @@ -70792,9 +70770,9 @@ }, "parameters": { "s": { - "type": "void", - "description": "The `sprite` raising the event.", - "is_pointer": true, + "type": "sprite", + "description": "The sprite to update", + "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, @@ -70804,9 +70782,9 @@ "is_vector": false, "type_parameter": null }, - "evt": { - "type": "int", - "description": "The `sprite_event_kind` being raised.", + "with_sound": { + "type": "bool", + "description": "If false, animations will not play associated sound\neffects when updated.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -70817,65 +70795,40 @@ "is_vector": false, "type_parameter": null } - } - }, - { - "signature": "typedef void (sprite_float_function)(void *s,float f);", - "name": "sprite_float_function", - "description": "The sprite single function is used with sprite packs to provide a\nprocedure to be called for each of the Sprites in the sprite pack,\nwhere a float value is required.", - "brief": null, + }, "attributes": { + "class": "sprite", + "method": "update", + "suffix": "with_sound", "group": "sprites", - "static": "sprite" - }, - "is_function_pointer": true, - "return": { - "type": "void", - "description": null, - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null + "static": "sprite", + "self": "s" }, - "parameters": { - "s": { - "type": "void", - "description": "The `sprite` being passed to the sprite function.", - "is_pointer": true, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "f": { - "type": "float", - "description": "The value to be passed to the function.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - } + "signatures": { + "python": [ + "def update_sprite_with_sound(s, with_sound):" + ], + "pascal": [ + "procedure UpdateSprite(s: Sprite; withSound: Boolean)" + ], + "csharp": [ + "public void Sprite.UpdateSprite(bool withSound);", + "public static void SplashKit.UpdateSprite(Sprite s, bool withSound);" + ], + "cpp": [ + "void update_sprite(sprite s, bool with_sound)" + ] } }, { - "signature": "typedef void (sprite_function)(void *s);", - "name": "sprite_function", - "description": "sprite_function is used with SpritePacks to provide a procedure to be\ncalled for each of the Sprites in the SpritePack.", + "signature": "void update_sprite(sprite s,float pct);", + "name": "update_sprite", + "method_name": "update", + "unique_global_name": "update_sprite_percent", + "unique_method_name": "sprite.update_percent", + "suffix_name": null, + "description": "Update the position and animation details of the sprite by a\ngiven percentage of a single unit of movement/animation.\nThis will play a sound effect if the new cell of the animation\nhas a sound.", "brief": null, - "attributes": { - "group": "sprites", - "static": "sprite" - }, - "is_function_pointer": true, "return": { "type": "void", "description": null, @@ -70886,9 +70839,9 @@ }, "parameters": { "s": { - "type": "void", - "description": "The `sprite` being passed to the sprite function.", - "is_pointer": true, + "type": "sprite", + "description": "The sprite to update.", + "is_pointer": false, "is_const": false, "is_reference": false, "is_array": false, @@ -70897,151 +70850,135 @@ ], "is_vector": false, "type_parameter": null - } - } - } - ], - "structs": [ - - ], - "enums": [ - { - "signature": "enum collision_test_kind {PIXEL_COLLISIONS,AABB_COLLISIONS};", - "name": "collision_test_kind", - "description": "This enumeration can be used to set the kind of collisions a sprite will check for.", - "brief": null, - "constants": { - "PIXEL_COLLISIONS": { - "description": "The sprite will check for collisions with its collision bitmap." - }, - "AABB_COLLISIONS": { - "description": "The sprite will check for collisions with a bounding box around the sprite." - } - }, - "attributes": { - "group": "sprites", - "static": "sprite" - } - }, - { - "signature": "enum sprite_event_kind {SPRITE_ARRIVED_EVENT,SPRITE_ANIMATION_ENDED_EVENT,SPRITE_TOUCHED_EVENT,SPRITE_CLICKED_EVENT};", - "name": "sprite_event_kind", - "description": "This enumeration contains a list of all of the different kinds of\nevents that a Sprite can raise. When the event is raised the assocated\nsprite_event_kind value passed to the event handler to indicate the\nkind of event that has occurred.", - "brief": null, - "constants": { - "SPRITE_ARRIVED_EVENT": { - "description": "The sprite has arrived at the end of a move" - }, - "SPRITE_ANIMATION_ENDED_EVENT": { - "description": "The Sprite's animation has ended." - }, - "SPRITE_TOUCHED_EVENT": { - "description": "The Sprite was touched" }, - "SPRITE_CLICKED_EVENT": { - "description": "The Sprite was touched" - } - }, - "attributes": { - "group": "sprites", - "static": "sprite" - } - } - ], - "defines": [ - - ] - }, - "terminal": { - "brief": "SplashKit Terminal allows you to read and write values to the\nterminal in a consistent manner.", - "description": "", - "functions": [ - { - "signature": "void activate_advanced_terminal();", - "name": "activate_advanced_terminal", - "method_name": null, - "unique_global_name": "activate_advanced_terminal", - "unique_method_name": null, - "suffix_name": null, - "description": "Start using the advanced terminal. Once you call this you will need\nto make sure you call `refresh_terminal` to show anything you have\nwritten. This will allow use of colors, bold, positioning, and other\nadvanced options.", - "brief": null, - "return": { - "type": "void", - "description": null, - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { + "pct": { + "type": "float", + "description": "The percent to update.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } }, "attributes": { - "group": "terminal", - "static": "terminal" + "class": "sprite", + "method": "update", + "suffix": "percent", + "group": "sprites", + "static": "sprite", + "self": "s" }, "signatures": { "python": [ - "def activate_advanced_terminal():" + "def update_sprite_percent(s, pct):" ], "pascal": [ - "procedure ActivateAdvancedTerminal()" + "procedure UpdateSprite(s: Sprite; pct: Single)" ], "csharp": [ - "public static void Terminal.ActivateAdvancedTerminal();", - "public static void SplashKit.ActivateAdvancedTerminal();" + "public void Sprite.UpdateSprite(float pct);", + "public static void SplashKit.UpdateSprite(Sprite s, float pct);" ], "cpp": [ - "void activate_advanced_terminal()" + "void update_sprite(sprite s, float pct)" ] } }, { - "signature": "bool advanced_terminal_active();", - "name": "advanced_terminal_active", - "method_name": null, - "unique_global_name": "advanced_terminal_active", - "unique_method_name": null, + "signature": "void update_sprite(sprite s,float pct,bool with_sound);", + "name": "update_sprite", + "method_name": "update", + "unique_global_name": "update_sprite_percent_with_sound", + "unique_method_name": "sprite.update_percent_with_sound", "suffix_name": null, - "description": "Is the terminal currently in advanced mode?", + "description": "Update the position and animation details of the sprite by a\ngiven percentage of a single unit of movement/animation.\nThis will play a sound effect if the new cell of the animation\nhas a sound and with_sound is true.", "brief": null, "return": { - "type": "bool", - "description": "True if the terminal is in advanced mode.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { + "s": { + "type": "sprite", + "description": "The sprite to update.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "pct": { + "type": "float", + "description": "The percent to update.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "with_sound": { + "type": "bool", + "description": "If false, animations will not play associated sound\neffects when updated.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } }, "attributes": { - "group": "terminal", - "static": "terminal" + "class": "sprite", + "method": "update", + "suffix": "percent_with_sound", + "group": "sprites", + "static": "sprite", + "self": "s" }, "signatures": { "python": [ - "def advanced_terminal_active():" + "def update_sprite_percent_with_sound(s, pct, with_sound):" ], "pascal": [ - "function AdvancedTerminalActive(): Boolean" + "procedure UpdateSprite(s: Sprite; pct: Single; withSound: Boolean)" ], "csharp": [ - "public static bool Terminal.AdvancedTerminalActive();", - "public static bool SplashKit.AdvancedTerminalActive();" + "public void Sprite.UpdateSprite(float pct, bool withSound);", + "public static void SplashKit.UpdateSprite(Sprite s, float pct, bool withSound);" ], "cpp": [ - "bool advanced_terminal_active()" + "void update_sprite(sprite s, float pct, bool with_sound)" ] } }, { - "signature": "void clear_terminal();", - "name": "clear_terminal", - "method_name": null, - "unique_global_name": "clear_terminal", - "unique_method_name": null, + "signature": "void update_sprite_animation(sprite s);", + "name": "update_sprite_animation", + "method_name": "update_animation", + "unique_global_name": "update_sprite_animation", + "unique_method_name": "sprite.update_animation", "suffix_name": null, - "description": "In advanced mode, this will clear the terminal to the background color\nyou set in `set_terminal_color`.", + "description": "Updates the animation details of the sprite.\nThis will play a sound effect if the new cell of the animation\nhas a sound.", "brief": null, "return": { "type": "void", @@ -71052,35 +70989,51 @@ "type_parameter": null }, "parameters": { + "s": { + "type": "sprite", + "description": "The sprite to update.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } }, "attributes": { - "group": "terminal", - "static": "terminal" + "class": "sprite", + "method": "update_animation", + "group": "sprites", + "static": "sprite", + "self": "s" }, "signatures": { "python": [ - "def clear_terminal():" + "def update_sprite_animation(s):" ], "pascal": [ - "procedure ClearTerminal()" + "procedure UpdateSpriteAnimation(s: Sprite)" ], "csharp": [ - "public static void Terminal.ClearTerminal();", - "public static void SplashKit.ClearTerminal();" + "public void Sprite.UpdateSpriteAnimation();", + "public static void SplashKit.UpdateSpriteAnimation(Sprite s);" ], "cpp": [ - "void clear_terminal()" + "void update_sprite_animation(sprite s)" ] } }, { - "signature": "void end_advanced_terminal();", - "name": "end_advanced_terminal", - "method_name": null, - "unique_global_name": "end_advanced_terminal", - "unique_method_name": null, + "signature": "void update_sprite_animation(sprite s,bool with_sound);", + "name": "update_sprite_animation", + "method_name": "update_animation", + "unique_global_name": "update_sprite_animation_with_sound", + "unique_method_name": "sprite.update_animation_with_sound", "suffix_name": null, - "description": "Finish using advanced mode. The existing terminal display will be lost\nand the user will see what was in the terminal before you called\n`activate_advanced_terminal`.", + "description": "Update the animation details of the sprite.\nThis will play a sound effect if the new cell of the animation\nhas a sound and with_sound is true.", "brief": null, "return": { "type": "void", @@ -71091,35 +71044,65 @@ "type_parameter": null }, "parameters": { + "s": { + "type": "sprite", + "description": "The sprite to update.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "with_sound": { + "type": "bool", + "description": "If false, animations will not play associated sound\neffects when updated.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } }, "attributes": { - "group": "terminal", - "static": "terminal" + "class": "sprite", + "method": "update_animation", + "suffix": "with_sound", + "group": "sprites", + "static": "sprite", + "self": "s" }, "signatures": { "python": [ - "def end_advanced_terminal():" + "def update_sprite_animation_with_sound(s, with_sound):" ], "pascal": [ - "procedure EndAdvancedTerminal()" + "procedure UpdateSpriteAnimation(s: Sprite; withSound: Boolean)" ], "csharp": [ - "public static void Terminal.EndAdvancedTerminal();", - "public static void SplashKit.EndAdvancedTerminal();" + "public void Sprite.UpdateSpriteAnimation(bool withSound);", + "public static void SplashKit.UpdateSpriteAnimation(Sprite s, bool withSound);" ], "cpp": [ - "void end_advanced_terminal()" + "void update_sprite_animation(sprite s, bool with_sound)" ] } }, { - "signature": "void move_cursor_to(int x,int y);", - "name": "move_cursor_to", - "method_name": null, - "unique_global_name": "move_cursor_to", - "unique_method_name": null, + "signature": "void update_sprite_animation(sprite s,float pct);", + "name": "update_sprite_animation", + "method_name": "update_animation", + "unique_global_name": "update_sprite_animation_percent", + "unique_method_name": "sprite.update_animation_percent", "suffix_name": null, - "description": "In advanced mode, this will move the cursor to a given col, row of the\nterminal. You can check the terminal size using `terminal_width` and\n`terminal_height`. If you try to move outside this bounds then then move\nwill not occur.", + "description": "Update the animation details of the sprite by a\ngiven percentage of a single unit of movement/animation.\nThis will play a sound effect if the new cell of the animation\nhas a sound.", "brief": null, "return": { "type": "void", @@ -71130,9 +71113,9 @@ "type_parameter": null }, "parameters": { - "x": { - "type": "int", - "description": "The column to move to, must be between 0 and `terminal_width`", + "s": { + "type": "sprite", + "description": "The sprite to update.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -71143,9 +71126,9 @@ "is_vector": false, "type_parameter": null }, - "y": { - "type": "int", - "description": "The row to move to, must be between 0 and `terminal_height`", + "pct": { + "type": "float", + "description": "The percent to update.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -71158,151 +71141,276 @@ } }, "attributes": { - "group": "terminal", - "static": "terminal" + "class": "sprite", + "method": "update_animation", + "suffix": "percent", + "group": "sprites", + "static": "sprite", + "self": "s" }, "signatures": { "python": [ - "def move_cursor_to(x, y):" + "def update_sprite_animation_percent(s, pct):" ], "pascal": [ - "procedure MoveCursorTo(x: Integer; y: Integer)" + "procedure UpdateSpriteAnimation(s: Sprite; pct: Single)" ], "csharp": [ - "public static void Terminal.MoveCursorTo(int x, int y);", - "public static void SplashKit.MoveCursorTo(int x, int y);" + "public void Sprite.UpdateSpriteAnimation(float pct);", + "public static void SplashKit.UpdateSpriteAnimation(Sprite s, float pct);" ], "cpp": [ - "void move_cursor_to(int x, int y)" + "void update_sprite_animation(sprite s, float pct)" ] } }, { - "signature": "char read_char();", - "name": "read_char", - "method_name": null, - "unique_global_name": "read_char", - "unique_method_name": null, + "signature": "void update_sprite_animation(sprite s,float pct,bool with_sound);", + "name": "update_sprite_animation", + "method_name": "update_animation", + "unique_global_name": "update_sprite_animation_percent_with_sound", + "unique_method_name": "sprite.update_animation_percent_with_sound", "suffix_name": null, - "description": "Get a single character input by the user. This works in both standard and\nadvanced modes. In advanced mode, you can set if the character should\nalso be echoed to the terminal using `set_terminal_echo_input`.", + "description": "Update the position and animation details of the sprite by a\ngiven percentage of a single unit of movement/animation.\nThis will play a sound effect if the new cell of the animation\nhas a sound and with_sound is true.", "brief": null, "return": { - "type": "char", - "description": "The character typed by the user.", + "type": "void", + "description": null, "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { + "s": { + "type": "sprite", + "description": "The sprite to update.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "pct": { + "type": "float", + "description": "The percent to update.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "with_sound": { + "type": "bool", + "description": "If false, animations will not play associated sound\neffects when updated.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } }, - "attributes": { - "group": "terminal", - "static": "terminal" + "attributes": { + "class": "sprite", + "method": "update_animation", + "suffix": "percent_with_sound", + "group": "sprites", + "static": "sprite", + "self": "s" }, "signatures": { "python": [ - "def read_char():" + "def update_sprite_animation_percent_with_sound(s, pct, with_sound):" ], "pascal": [ - "function ReadChar(): Char" + "procedure UpdateSpriteAnimation(s: Sprite; pct: Single; withSound: Boolean)" ], "csharp": [ - "public static char Terminal.ReadChar();", - "public static char SplashKit.ReadChar();" + "public void Sprite.UpdateSpriteAnimation(float pct, bool withSound);", + "public static void SplashKit.UpdateSpriteAnimation(Sprite s, float pct, bool withSound);" ], "cpp": [ - "char read_char()" + "void update_sprite_animation(sprite s, float pct, bool with_sound)" ] } }, { - "signature": "string read_line();", - "name": "read_line", - "method_name": null, - "unique_global_name": "read_line", - "unique_method_name": null, + "signature": "vector_2d vector_from_center_sprite_to_point(sprite s,const point_2d &pt);", + "name": "vector_from_center_sprite_to_point", + "method_name": "vector_to", + "unique_global_name": "vector_from_center_sprite_to_point_point", + "unique_method_name": "sprite.vector_to_point", "suffix_name": null, - "description": "Read a line of text from the terminal. The user will see the text as\nthey type it.", + "description": "Returns a `vector_2d` that is the difference in location from the center of\nthe sprite `s` to the point `pt`.", "brief": null, "return": { - "type": "string", - "description": "The text entered by the user.", + "type": "vector_2d", + "description": "A vector pointing from the sprite to the point.", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { + "s": { + "type": "sprite", + "description": "The sprite that is at the start of the vector.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "pt": { + "type": "point_2d", + "description": "The point that is at the end of the vector.", + "is_pointer": false, + "is_const": true, + "is_reference": true, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } }, "attributes": { - "group": "terminal", - "static": "terminal" + "class": "sprite", + "method": "vector_to", + "suffix": "point", + "group": "sprites", + "static": "sprite", + "self": "s" }, "signatures": { "python": [ - "def read_line():" + "def vector_from_center_sprite_to_point_point(s, pt):" ], "pascal": [ - "function ReadLine(): String" + "function VectorFromCenterSpriteToPoint(s: Sprite; const pt: Point2D): Vector2D" ], "csharp": [ - "public static string Terminal.ReadLine();", - "public static string SplashKit.ReadLine();" + "public Vector2D Sprite.VectorFromCenterSpriteToPoint(Point2D pt);", + "public static Vector2D SplashKit.VectorFromCenterSpriteToPoint(Sprite s, Point2D pt);" ], "cpp": [ - "string read_line()" + "vector_2d vector_from_center_sprite_to_point(sprite s, const point_2d &pt)" ] } }, { - "signature": "void refresh_terminal();", - "name": "refresh_terminal", - "method_name": null, - "unique_global_name": "refresh_terminal", - "unique_method_name": null, + "signature": "vector_2d vector_from_to(sprite s1,sprite s2);", + "name": "vector_from_to", + "method_name": "vector_to", + "unique_global_name": "vector_from_to", + "unique_method_name": "sprite.vector_to", "suffix_name": null, - "description": "In advanced mode, this will display what has been written to the\nterminal. You need to call this for anything to be shown in advanced\nmode.", + "description": "Returns a `vector_2d` that is the difference in the position of two sprites\n(`s1` and `s2`).", "brief": null, "return": { - "type": "void", - "description": null, + "type": "vector_2d", + "description": "A vector that points from s1 to s2.", "is_pointer": false, "is_reference": false, "is_vector": false, "type_parameter": null }, "parameters": { + "s1": { + "type": "sprite", + "description": "The sprite that is at the start of the vector.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "s2": { + "type": "sprite", + "description": "The sprite that is at the end of the vector.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } }, "attributes": { - "group": "terminal", - "static": "terminal" + "class": "sprite", + "method": "vector_to", + "group": "sprites", + "static": "sprite", + "self": "s1" }, "signatures": { "python": [ - "def refresh_terminal():" + "def vector_from_to(s1, s2):" ], "pascal": [ - "procedure RefreshTerminal()" + "function VectorFromTo(s1: Sprite; s2: Sprite): Vector2D" ], "csharp": [ - "public static void Terminal.RefreshTerminal();", - "public static void SplashKit.RefreshTerminal();" + "public Vector2D Sprite.VectorFromTo(Sprite s2);", + "public static Vector2D SplashKit.VectorFromTo(Sprite s1, Sprite s2);" ], "cpp": [ - "void refresh_terminal()" + "vector_2d vector_from_to(sprite s1, sprite s2)" ] } + } + ], + "typedefs": [ + { + "signature": "typedef struct _sprite_data *sprite;", + "name": "sprite", + "description": "Sprites combine an image, with position and animation details. You can\ncreate a sprite using `create_sprite`, draw it with `draw_sprite`, move it\nusing the `sprite_velocity` with `update_sprite`, and animate it using an\n`animation_script`.", + "brief": null, + "attributes": { + "class": "sprite", + "group": "sprites", + "static": "sprite" + }, + "is_function_pointer": false, + "aliased_type": null, + "aliased_identifier": null, + "is_pointer": false, + "new_identifier": null }, { - "signature": "void set_terminal_bold(bool value);", - "name": "set_terminal_bold", - "method_name": null, - "unique_global_name": "set_terminal_bold", - "unique_method_name": null, - "suffix_name": null, - "description": "In advanced mode, this allows you to set if the text should draw as bold.", + "signature": "typedef void (sprite_event_handler) (void *s,int evt);", + "name": "sprite_event_handler", + "description": "The sprite_event_handler function pointer is used when you want to register\nto receive events from a Sprite.", "brief": null, + "attributes": { + "group": "sprites", + "static": "sprite" + }, + "is_function_pointer": true, "return": { "type": "void", "description": null, @@ -71312,9 +71420,22 @@ "type_parameter": null }, "parameters": { - "value": { - "type": "bool", - "description": "Pass true to have the terminal write in bold", + "s": { + "type": "void", + "description": "The `sprite` raising the event.", + "is_pointer": true, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "evt": { + "type": "int", + "description": "The `sprite_event_kind` being raised.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -71325,36 +71446,18 @@ "is_vector": false, "type_parameter": null } - }, - "attributes": { - "group": "terminal", - "static": "terminal" - }, - "signatures": { - "python": [ - "def set_terminal_bold(value):" - ], - "pascal": [ - "procedure SetTerminalBold(value: Boolean)" - ], - "csharp": [ - "public static void Terminal.SetTerminalBold(bool value);", - "public static void SplashKit.SetTerminalBold(bool value);" - ], - "cpp": [ - "void set_terminal_bold(bool value)" - ] } }, { - "signature": "void set_terminal_colors(color foreground,color background);", - "name": "set_terminal_colors", - "method_name": null, - "unique_global_name": "set_terminal_colors", - "unique_method_name": null, - "suffix_name": null, - "description": "In advanced mode this allows you to set the color of the foreground and\nthe background. The foreground is the color of the text.\n\n\nNote that only the following colors are guaranteed to work on all\nTerminals (others may work):\n\n\n- `color_black`\n\n\n- `color_dark_gray`\n\n\n- `color_gray`\n\n\n- `color_white`\n\n\n- `color_red`\n\n\n- `color_dark_red`\n\n\n- `color_green`\n\n\n- `color_dark_green`\n\n\n- `color_blue`\n\n\n- `color_dark_blue`\n\n\n- `color_cyan`\n\n\n- `color_dark_cyan`\n\n\n- `color_light_yellow`\n\n\n- `color_yellow`\n\n\n- `color_magenta`\n\n\n- `color_dark_magenta`", + "signature": "typedef void (sprite_float_function)(void *s,float f);", + "name": "sprite_float_function", + "description": "The sprite single function is used with sprite packs to provide a\nprocedure to be called for each of the Sprites in the sprite pack,\nwhere a float value is required.", "brief": null, + "attributes": { + "group": "sprites", + "static": "sprite" + }, + "is_function_pointer": true, "return": { "type": "void", "description": null, @@ -71364,10 +71467,10 @@ "type_parameter": null }, "parameters": { - "foreground": { - "type": "color", - "description": "The color of text that is drawn.", - "is_pointer": false, + "s": { + "type": "void", + "description": "The `sprite` being passed to the sprite function.", + "is_pointer": true, "is_const": false, "is_reference": false, "is_array": false, @@ -71377,9 +71480,9 @@ "is_vector": false, "type_parameter": null }, - "background": { - "type": "color", - "description": "The color of the background behind drawn text.", + "f": { + "type": "float", + "description": "The value to be passed to the function.", "is_pointer": false, "is_const": false, "is_reference": false, @@ -71390,36 +71493,18 @@ "is_vector": false, "type_parameter": null } - }, - "attributes": { - "group": "terminal", - "static": "terminal" - }, - "signatures": { - "python": [ - "def set_terminal_colors(foreground, background):" - ], - "pascal": [ - "procedure SetTerminalColors(foreground: Color; background: Color)" - ], - "csharp": [ - "public static void Terminal.SetTerminalColors(Color foreground, Color background);", - "public static void SplashKit.SetTerminalColors(Color foreground, Color background);" - ], - "cpp": [ - "void set_terminal_colors(color foreground, color background)" - ] } }, { - "signature": "void set_terminal_echo_input(bool value);", - "name": "set_terminal_echo_input", - "method_name": null, - "unique_global_name": "set_terminal_echo_input", - "unique_method_name": null, - "suffix_name": null, - "description": "In advanced mode, this allows you to stop text read with `read_char`\nappearing on the terminal. You can use this for reading passwords, or to\ncontrol what is written.", + "signature": "typedef void (sprite_function)(void *s);", + "name": "sprite_function", + "description": "sprite_function is used with SpritePacks to provide a procedure to be\ncalled for each of the Sprites in the SpritePack.", "brief": null, + "attributes": { + "group": "sprites", + "static": "sprite" + }, + "is_function_pointer": true, "return": { "type": "void", "description": null, @@ -71429,10 +71514,10 @@ "type_parameter": null }, "parameters": { - "value": { - "type": "bool", - "description": "Pass true if you want characters to appear as typed.", - "is_pointer": false, + "s": { + "type": "void", + "description": "The `sprite` being passed to the sprite function.", + "is_pointer": true, "is_const": false, "is_reference": false, "is_array": false, @@ -71442,39 +71527,76 @@ "is_vector": false, "type_parameter": null } + } + } + ], + "structs": [ + + ], + "enums": [ + { + "signature": "enum collision_test_kind {PIXEL_COLLISIONS,AABB_COLLISIONS};", + "name": "collision_test_kind", + "description": "This enumeration can be used to set the kind of collisions a sprite will check for.", + "brief": null, + "constants": { + "PIXEL_COLLISIONS": { + "description": "The sprite will check for collisions with its collision bitmap." + }, + "AABB_COLLISIONS": { + "description": "The sprite will check for collisions with a bounding box around the sprite." + } }, "attributes": { - "group": "terminal", - "static": "terminal" - }, - "signatures": { - "python": [ - "def set_terminal_echo_input(value):" - ], - "pascal": [ - "procedure SetTerminalEchoInput(value: Boolean)" - ], - "csharp": [ - "public static void Terminal.SetTerminalEchoInput(bool value);", - "public static void SplashKit.SetTerminalEchoInput(bool value);" - ], - "cpp": [ - "void set_terminal_echo_input(bool value)" - ] + "group": "sprites", + "static": "sprite" } }, { - "signature": "int terminal_height();", - "name": "terminal_height", + "signature": "enum sprite_event_kind {SPRITE_ARRIVED_EVENT,SPRITE_ANIMATION_ENDED_EVENT,SPRITE_TOUCHED_EVENT,SPRITE_CLICKED_EVENT};", + "name": "sprite_event_kind", + "description": "This enumeration contains a list of all of the different kinds of\nevents that a Sprite can raise. When the event is raised the assocated\nsprite_event_kind value passed to the event handler to indicate the\nkind of event that has occurred.", + "brief": null, + "constants": { + "SPRITE_ARRIVED_EVENT": { + "description": "The sprite has arrived at the end of a move" + }, + "SPRITE_ANIMATION_ENDED_EVENT": { + "description": "The Sprite's animation has ended." + }, + "SPRITE_TOUCHED_EVENT": { + "description": "The Sprite was touched" + }, + "SPRITE_CLICKED_EVENT": { + "description": "The Sprite was touched" + } + }, + "attributes": { + "group": "sprites", + "static": "sprite" + } + } + ], + "defines": [ + + ] + }, + "terminal": { + "brief": "SplashKit Terminal allows you to read and write values to the\nterminal in a consistent manner.", + "description": "", + "functions": [ + { + "signature": "char read_char();", + "name": "read_char", "method_name": null, - "unique_global_name": "terminal_height", + "unique_global_name": "read_char", "unique_method_name": null, "suffix_name": null, - "description": "In advanced mode, this gives you the number of rows in the terminal.", + "description": "Get a single character input by the user.", "brief": null, "return": { - "type": "int", - "description": "The number of rows in the terminal", + "type": "char", + "description": "The character typed by the user.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -71488,32 +71610,32 @@ }, "signatures": { "python": [ - "def terminal_height():" + "def read_char():" ], "pascal": [ - "function TerminalHeight(): Integer" + "function ReadChar(): Char" ], "csharp": [ - "public static int Terminal.TerminalHeight();", - "public static int SplashKit.TerminalHeight();" + "public static char Terminal.ReadChar();", + "public static char SplashKit.ReadChar();" ], "cpp": [ - "int terminal_height()" + "char read_char()" ] } }, { - "signature": "int terminal_width();", - "name": "terminal_width", + "signature": "string read_line();", + "name": "read_line", "method_name": null, - "unique_global_name": "terminal_width", + "unique_global_name": "read_line", "unique_method_name": null, "suffix_name": null, - "description": "In advanced mode, this gives you the number of columns in the terminal.", + "description": "Read a line of text from the terminal. The user will see the text as\nthey type it.", "brief": null, "return": { - "type": "int", - "description": "The number of columns in the terminal", + "type": "string", + "description": "The text entered by the user.", "is_pointer": false, "is_reference": false, "is_vector": false, @@ -71527,17 +71649,17 @@ }, "signatures": { "python": [ - "def terminal_width():" + "def read_line():" ], "pascal": [ - "function TerminalWidth(): Integer" + "function ReadLine(): String" ], "csharp": [ - "public static int Terminal.TerminalWidth();", - "public static int SplashKit.TerminalWidth();" + "public static string Terminal.ReadLine();", + "public static string SplashKit.ReadLine();" ], "cpp": [ - "int terminal_width()" + "string read_line()" ] } }, @@ -71752,84 +71874,6 @@ ] } }, - { - "signature": "void write_at(string text,int x,int y);", - "name": "write_at", - "method_name": null, - "unique_global_name": "write_at", - "unique_method_name": null, - "suffix_name": null, - "description": "In advanced mode, this will write the supplied text at the indicated\ncolumn and row.", - "brief": null, - "return": { - "type": "void", - "description": null, - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { - "text": { - "type": "string", - "description": "The text to write", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "x": { - "type": "int", - "description": "The row to position the text at", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "y": { - "type": "int", - "description": "The column to position the text at", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - } - }, - "attributes": { - "group": "terminal", - "static": "terminal" - }, - "signatures": { - "python": [ - "def write_at(text, x, y):" - ], - "pascal": [ - "procedure WriteAt(text: String; x: Integer; y: Integer)" - ], - "csharp": [ - "public static void Terminal.WriteAt(string text, int x, int y);", - "public static void SplashKit.WriteAt(string text, int x, int y);" - ], - "cpp": [ - "void write_at(string text, int x, int y)" - ] - } - }, { "signature": "void write_line(char data);", "name": "write_line", @@ -81162,6 +81206,270 @@ "attributes": { "group": "types" } + }, + { + "signature": "enum pin_modes {GPIO_INPUT = 0,GPIO_OUTPUT = 1,GPIO_ALT0 = 4,GPIO_ALT1 = 5,GPIO_ALT2 = 6,GPIO_ALT3 = 7,GPIO_ALT4 = 3,GPIO_ALT5 = 2,GPIO_DEFAULT_MODE = -1,};", + "name": "pin_modes", + "description": "GPIO Pin Modes:", + "brief": null, + "constants": { + "GPIO_INPUT": { + "description": "Input mode.", + "number": 0 + }, + "GPIO_OUTPUT": { + "description": "Output mode.", + "number": 1 + }, + "GPIO_ALT0": { + "description": "Alternate function mode 0.", + "number": 4 + }, + "GPIO_ALT1": { + "description": "Alternate function mode 1.", + "number": 5 + }, + "GPIO_ALT2": { + "description": "Alternate function mode 2.", + "number": 6 + }, + "GPIO_ALT3": { + "description": "Alternate function mode 3.", + "number": 7 + }, + "GPIO_ALT4": { + "description": "Alternate function mode 4.", + "number": 3 + }, + "GPIO_ALT5": { + "description": "Alternate function mode 5.", + "number": 2 + }, + "GPIO_DEFAULT_MODE": { + "description": "Default mode.", + "number": 1 + } + }, + "attributes": { + "group": "types" + } + }, + { + "signature": "enum pin_values {GPIO_LOW = 0,GPIO_HIGH = 1,GPIO_DEFAULT_VALUE = -1};", + "name": "pin_values", + "description": "GPIO Pin Values:", + "brief": null, + "constants": { + "GPIO_LOW": { + "description": "Logic low (0).", + "number": 0 + }, + "GPIO_HIGH": { + "description": "Logic high (1).", + "number": 1 + }, + "GPIO_DEFAULT_VALUE": { + "description": "Default value.", + "number": 1 + } + }, + "attributes": { + "group": "types" + } + }, + { + "signature": "enum pins {PIN_1 = 1,PIN_2 = 2,PIN_3 = 3,PIN_4 = 4,PIN_5 = 5,PIN_6 = 6,PIN_7 = 7,PIN_8 = 8,PIN_9 = 9,PIN_10 = 10,PIN_11 = 11,PIN_12 = 12,PIN_13 = 13,PIN_14 = 14,PIN_15 = 15,PIN_16 = 16,PIN_17 = 17,PIN_18 = 18,PIN_19 = 19,PIN_20 = 20,PIN_21 = 21,PIN_22 = 22,PIN_23 = 23,PIN_24 = 24,PIN_25 = 25,PIN_26 = 26,PIN_27 = 27,PIN_28 = 28,PIN_29 = 29,PIN_30 = 30,PIN_31 = 31,PIN_32 = 32,PIN_33 = 33,PIN_34 = 34,PIN_35 = 35,PIN_36 = 36,PIN_37 = 37,PIN_38 = 38,PIN_39 = 39,PIN_40 = 40,};", + "name": "pins", + "description": "Raspberry Pi GPIO Board Pin Descriptions:", + "brief": null, + "constants": { + "PIN_1": { + "description": "3.3V Power Supply", + "number": 1 + }, + "PIN_2": { + "description": "5V Power Supply", + "number": 2 + }, + "PIN_3": { + "description": "GPIO2 / SDA (I2C)", + "number": 3 + }, + "PIN_4": { + "description": "5V Power Supply", + "number": 4 + }, + "PIN_5": { + "description": "GPIO3 / SCL (I2C)", + "number": 5 + }, + "PIN_6": { + "description": "Ground", + "number": 6 + }, + "PIN_7": { + "description": "GPIO4", + "number": 7 + }, + "PIN_8": { + "description": "GPIO14 / TXD (UART)", + "number": 8 + }, + "PIN_9": { + "description": "Ground", + "number": 9 + }, + "PIN_10": { + "description": "GPIO15 / RXD (UART)", + "number": 10 + }, + "PIN_11": { + "description": "GPIO17", + "number": 11 + }, + "PIN_12": { + "description": "GPIO18 / PCM_CLK", + "number": 12 + }, + "PIN_13": { + "description": "GPIO27", + "number": 13 + }, + "PIN_14": { + "description": "Ground", + "number": 14 + }, + "PIN_15": { + "description": "GPIO22", + "number": 15 + }, + "PIN_16": { + "description": "GPIO23", + "number": 16 + }, + "PIN_17": { + "description": "3.3V Power Supply", + "number": 17 + }, + "PIN_18": { + "description": "GPIO24", + "number": 18 + }, + "PIN_19": { + "description": "GPIO10 / MOSI (SPI)", + "number": 19 + }, + "PIN_20": { + "description": "Ground", + "number": 20 + }, + "PIN_21": { + "description": "GPIO9 / MISO (SPI)", + "number": 21 + }, + "PIN_22": { + "description": "GPIO25", + "number": 22 + }, + "PIN_23": { + "description": "GPIO11 / SCLK (SPI)", + "number": 23 + }, + "PIN_24": { + "description": "GPIO8 / CE0 (SPI)", + "number": 24 + }, + "PIN_25": { + "description": "Ground", + "number": 25 + }, + "PIN_26": { + "description": "GPIO7 / CE1 (SPI)", + "number": 26 + }, + "PIN_27": { + "description": "ID_SD (I2C ID EEPROM)", + "number": 27 + }, + "PIN_28": { + "description": "ID_SC (I2C ID EEPROM)", + "number": 28 + }, + "PIN_29": { + "description": "GPIO5", + "number": 29 + }, + "PIN_30": { + "description": "Ground", + "number": 30 + }, + "PIN_31": { + "description": "GPIO6", + "number": 31 + }, + "PIN_32": { + "description": "GPIO12", + "number": 32 + }, + "PIN_33": { + "description": "GPIO13", + "number": 33 + }, + "PIN_34": { + "description": "Ground", + "number": 34 + }, + "PIN_35": { + "description": "GPIO19 / MISO (PCM)", + "number": 35 + }, + "PIN_36": { + "description": "GPIO16 / CE0 (PCM)", + "number": 36 + }, + "PIN_37": { + "description": "GPIO26", + "number": 37 + }, + "PIN_38": { + "description": "GPIO20 / MOSI (PCM)", + "number": 38 + }, + "PIN_39": { + "description": "Ground", + "number": 39 + }, + "PIN_40": { + "description": "GPIO21 / SCLK (PCM)", + "number": 40 + } + }, + "attributes": { + "group": "types" + } + }, + { + "signature": "enum pull_up_down {PUD_OFF = 0,PUD_DOWN = 1,PUD_UP = 2};", + "name": "pull_up_down", + "description": "GPIO Pull-up/Pull-down Configurations:", + "brief": null, + "constants": { + "PUD_OFF": { + "description": "No pull-up or pull-down resistor.", + "number": 0 + }, + "PUD_DOWN": { + "description": "Enable pull-down resistor.", + "number": 1 + }, + "PUD_UP": { + "description": "Enable pull-up resistor.", + "number": 2 + } + }, + "attributes": { + "group": "types" + } } ], "defines": [ diff --git a/generated/pascal/splashkit.pas b/generated/pascal/splashkit.pas index d33af015..4d7210a4 100644 --- a/generated/pascal/splashkit.pas +++ b/generated/pascal/splashkit.pas @@ -245,6 +245,69 @@ type __sklib_window__record_type = record end; HTTP_STATUS_NOT_IMPLEMENTED = 501, HTTP_STATUS_SERVICE_UNAVAILABLE = 503 ); +type PinModes = ( + GPIO_INPUT = 0, + GPIO_OUTPUT = 1, + GPIO_ALT0 = 4, + GPIO_ALT1 = 5, + GPIO_ALT2 = 6, + GPIO_ALT3 = 7, + GPIO_ALT4 = 3, + GPIO_ALT5 = 2, + GPIO_DEFAULT_MODE = 1 +); +type PinValues = ( + GPIO_LOW = 0, + GPIO_HIGH = 1, + GPIO_DEFAULT_VALUE = 1 +); +type Pins = ( + PIN_1 = 1, + PIN_2 = 2, + PIN_3 = 3, + PIN_4 = 4, + PIN_5 = 5, + PIN_6 = 6, + PIN_7 = 7, + PIN_8 = 8, + PIN_9 = 9, + PIN_10 = 10, + PIN_11 = 11, + PIN_12 = 12, + PIN_13 = 13, + PIN_14 = 14, + PIN_15 = 15, + PIN_16 = 16, + PIN_17 = 17, + PIN_18 = 18, + PIN_19 = 19, + PIN_20 = 20, + PIN_21 = 21, + PIN_22 = 22, + PIN_23 = 23, + PIN_24 = 24, + PIN_25 = 25, + PIN_26 = 26, + PIN_27 = 27, + PIN_28 = 28, + PIN_29 = 29, + PIN_30 = 30, + PIN_31 = 31, + PIN_32 = 32, + PIN_33 = 33, + PIN_34 = 34, + PIN_35 = 35, + PIN_36 = 36, + PIN_37 = 37, + PIN_38 = 38, + PIN_39 = 39, + PIN_40 = 40 +); +type PullUpDown = ( + PUD_OFF = 0, + PUD_DOWN = 1, + PUD_UP = 2 +); type HttpMethod = ( HTTP_GET_METHOD, HTTP_POST_METHOD, @@ -1017,6 +1080,17 @@ function TrianglesFrom(const q: Quad): ArrayOfTriangle; function Rnd(min: Integer; max: Integer): Integer; function Rnd(): Single; function Rnd(ubound: Integer): Integer; +function HasGpio(): Boolean; +procedure RaspiCleanup(); +function RaspiGetMode(pin: Pins): PinModes; +procedure RaspiInit(); +function RaspiRead(pin: Pins): PinValues; +procedure RaspiSetMode(pin: Pins; mode: PinModes); +procedure RaspiSetPullUpDown(pin: Pins; pud: PullUpDown); +procedure RaspiSetPwmDutycycle(pin: Pins; dutycycle: Integer); +procedure RaspiSetPwmFrequency(pin: Pins; frequency: Integer); +procedure RaspiSetPwmRange(pin: Pins; range: Integer); +procedure RaspiWrite(pin: Pins; value: PinValues); procedure DrawQuad(clr: Color; const q: Quad); procedure DrawQuad(clr: Color; const q: Quad; const opts: DrawingOptions); procedure DrawQuadOnBitmap(destination: Bitmap; clr: Color; const q: Quad); @@ -1234,24 +1308,12 @@ procedure UpdateSpriteAnimation(s: Sprite; pct: Single); procedure UpdateSpriteAnimation(s: Sprite; pct: Single; withSound: Boolean); function VectorFromCenterSpriteToPoint(s: Sprite; const pt: Point2D): Vector2D; function VectorFromTo(s1: Sprite; s2: Sprite): Vector2D; -procedure ActivateAdvancedTerminal(); -function AdvancedTerminalActive(): Boolean; -procedure ClearTerminal(); -procedure EndAdvancedTerminal(); -procedure MoveCursorTo(x: Integer; y: Integer); function ReadChar(): Char; function ReadLine(): String; -procedure RefreshTerminal(); -procedure SetTerminalBold(value: Boolean); -procedure SetTerminalColors(foreground: Color; background: Color); -procedure SetTerminalEchoInput(value: Boolean); -function TerminalHeight(): Integer; -function TerminalWidth(): Integer; procedure Write(data: Char); procedure Write(data: Double); procedure Write(data: Integer); procedure Write(text: String); -procedure WriteAt(text: String; x: Integer; y: Integer); procedure WriteLine(data: Char); procedure WriteLine(); procedure WriteLine(data: Double); @@ -1748,6 +1810,38 @@ function __skadapter__to_sklib_http_status_code(v: HttpStatusCode): LongInt; begin result := Integer(v); end; +function __skadapter__to_pin_modes(v: LongInt): PinModes; +begin + result := PinModes(v); +end; +function __skadapter__to_sklib_pin_modes(v: PinModes): LongInt; +begin + result := Integer(v); +end; +function __skadapter__to_pin_values(v: LongInt): PinValues; +begin + result := PinValues(v); +end; +function __skadapter__to_sklib_pin_values(v: PinValues): LongInt; +begin + result := Integer(v); +end; +function __skadapter__to_pins(v: LongInt): Pins; +begin + result := Pins(v); +end; +function __skadapter__to_sklib_pins(v: Pins): LongInt; +begin + result := Integer(v); +end; +function __skadapter__to_pull_up_down(v: LongInt): PullUpDown; +begin + result := PullUpDown(v); +end; +function __skadapter__to_sklib_pull_up_down(v: PullUpDown): LongInt; +begin + result := Integer(v); +end; function __skadapter__to_http_method(v: LongInt): HttpMethod; begin result := HttpMethod(v); @@ -3103,6 +3197,17 @@ function __sklib__triangles_from__quad_ref(const q: __sklib_quad): __sklib_vecto function __sklib__rnd__int__int(min: Integer; max: Integer): Integer; cdecl; external; function __sklib__rnd(): Single; cdecl; external; function __sklib__rnd__int(ubound: Integer): Integer; cdecl; external; +function __sklib__has_gpio(): LongInt; cdecl; external; +procedure __sklib__raspi_cleanup(); cdecl; external; +function __sklib__raspi_get_mode__pins(pin: LongInt): LongInt; cdecl; external; +procedure __sklib__raspi_init(); cdecl; external; +function __sklib__raspi_read__pins(pin: LongInt): LongInt; cdecl; external; +procedure __sklib__raspi_set_mode__pins__pin_modes(pin: LongInt; mode: LongInt); cdecl; external; +procedure __sklib__raspi_set_pull_up_down__pins__pull_up_down(pin: LongInt; pud: LongInt); cdecl; external; +procedure __sklib__raspi_set_pwm_dutycycle__pins__int(pin: LongInt; dutycycle: Integer); cdecl; external; +procedure __sklib__raspi_set_pwm_frequency__pins__int(pin: LongInt; frequency: Integer); cdecl; external; +procedure __sklib__raspi_set_pwm_range__pins__int(pin: LongInt; range: Integer); cdecl; external; +procedure __sklib__raspi_write__pins__pin_values(pin: LongInt; value: LongInt); cdecl; external; procedure __sklib__draw_quad__color__quad_ref(clr: __sklib_color; const q: __sklib_quad); cdecl; external; procedure __sklib__draw_quad__color__quad_ref__drawing_options_ref(clr: __sklib_color; const q: __sklib_quad; const opts: __sklib_drawing_options); cdecl; external; procedure __sklib__draw_quad_on_bitmap__bitmap__color__quad_ref(destination: __sklib_ptr; clr: __sklib_color; const q: __sklib_quad); cdecl; external; @@ -3320,24 +3425,12 @@ procedure __sklib__update_sprite_animation__sprite__float(s: __sklib_ptr; pct: S procedure __sklib__update_sprite_animation__sprite__float__bool(s: __sklib_ptr; pct: Single; withSound: LongInt); cdecl; external; function __sklib__vector_from_center_sprite_to_point__sprite__point_2d_ref(s: __sklib_ptr; const pt: __sklib_point_2d): __sklib_vector_2d; cdecl; external; function __sklib__vector_from_to__sprite__sprite(s1: __sklib_ptr; s2: __sklib_ptr): __sklib_vector_2d; cdecl; external; -procedure __sklib__activate_advanced_terminal(); cdecl; external; -function __sklib__advanced_terminal_active(): LongInt; cdecl; external; -procedure __sklib__clear_terminal(); cdecl; external; -procedure __sklib__end_advanced_terminal(); cdecl; external; -procedure __sklib__move_cursor_to__int__int(x: Integer; y: Integer); cdecl; external; function __sklib__read_char(): Char; cdecl; external; function __sklib__read_line(): __sklib_string; cdecl; external; -procedure __sklib__refresh_terminal(); cdecl; external; -procedure __sklib__set_terminal_bold__bool(value: LongInt); cdecl; external; -procedure __sklib__set_terminal_colors__color__color(foreground: __sklib_color; background: __sklib_color); cdecl; external; -procedure __sklib__set_terminal_echo_input__bool(value: LongInt); cdecl; external; -function __sklib__terminal_height(): Integer; cdecl; external; -function __sklib__terminal_width(): Integer; cdecl; external; procedure __sklib__write__char(data: Char); cdecl; external; procedure __sklib__write__double(data: Double); cdecl; external; procedure __sklib__write__int(data: Integer); cdecl; external; procedure __sklib__write__string(text: __sklib_string); cdecl; external; -procedure __sklib__write_at__string__int__int(text: __sklib_string; x: Integer; y: Integer); cdecl; external; procedure __sklib__write_line__char(data: Char); cdecl; external; procedure __sklib__write_line(); cdecl; external; procedure __sklib__write_line__double(data: Double); cdecl; external; @@ -10270,6 +10363,93 @@ function Rnd(ubound: Integer): Integer; __skreturn := __sklib__rnd__int(__skparam__ubound); result := __skadapter__to_int(__skreturn); end; +function HasGpio(): Boolean; +var + __skreturn: LongInt; +begin + __skreturn := __sklib__has_gpio(); + result := __skadapter__to_bool(__skreturn); +end; +procedure RaspiCleanup(); +begin + __sklib__raspi_cleanup(); +end; +function RaspiGetMode(pin: Pins): PinModes; +var + __skparam__pin: LongInt; + __skreturn: LongInt; +begin + __skparam__pin := __skadapter__to_sklib_pins(pin); + __skreturn := __sklib__raspi_get_mode__pins(__skparam__pin); + result := __skadapter__to_pin_modes(__skreturn); +end; +procedure RaspiInit(); +begin + __sklib__raspi_init(); +end; +function RaspiRead(pin: Pins): PinValues; +var + __skparam__pin: LongInt; + __skreturn: LongInt; +begin + __skparam__pin := __skadapter__to_sklib_pins(pin); + __skreturn := __sklib__raspi_read__pins(__skparam__pin); + result := __skadapter__to_pin_values(__skreturn); +end; +procedure RaspiSetMode(pin: Pins; mode: PinModes); +var + __skparam__pin: LongInt; + __skparam__mode: LongInt; +begin + __skparam__pin := __skadapter__to_sklib_pins(pin); + __skparam__mode := __skadapter__to_sklib_pin_modes(mode); + __sklib__raspi_set_mode__pins__pin_modes(__skparam__pin, __skparam__mode); +end; +procedure RaspiSetPullUpDown(pin: Pins; pud: PullUpDown); +var + __skparam__pin: LongInt; + __skparam__pud: LongInt; +begin + __skparam__pin := __skadapter__to_sklib_pins(pin); + __skparam__pud := __skadapter__to_sklib_pull_up_down(pud); + __sklib__raspi_set_pull_up_down__pins__pull_up_down(__skparam__pin, __skparam__pud); +end; +procedure RaspiSetPwmDutycycle(pin: Pins; dutycycle: Integer); +var + __skparam__pin: LongInt; + __skparam__dutycycle: Integer; +begin + __skparam__pin := __skadapter__to_sklib_pins(pin); + __skparam__dutycycle := __skadapter__to_sklib_int(dutycycle); + __sklib__raspi_set_pwm_dutycycle__pins__int(__skparam__pin, __skparam__dutycycle); +end; +procedure RaspiSetPwmFrequency(pin: Pins; frequency: Integer); +var + __skparam__pin: LongInt; + __skparam__frequency: Integer; +begin + __skparam__pin := __skadapter__to_sklib_pins(pin); + __skparam__frequency := __skadapter__to_sklib_int(frequency); + __sklib__raspi_set_pwm_frequency__pins__int(__skparam__pin, __skparam__frequency); +end; +procedure RaspiSetPwmRange(pin: Pins; range: Integer); +var + __skparam__pin: LongInt; + __skparam__range: Integer; +begin + __skparam__pin := __skadapter__to_sklib_pins(pin); + __skparam__range := __skadapter__to_sklib_int(range); + __sklib__raspi_set_pwm_range__pins__int(__skparam__pin, __skparam__range); +end; +procedure RaspiWrite(pin: Pins; value: PinValues); +var + __skparam__pin: LongInt; + __skparam__value: LongInt; +begin + __skparam__pin := __skadapter__to_sklib_pins(pin); + __skparam__value := __skadapter__to_sklib_pin_values(value); + __sklib__raspi_write__pins__pin_values(__skparam__pin, __skparam__value); +end; procedure DrawQuad(clr: Color; const q: Quad); var __skparam__clr: __sklib_color; @@ -12433,34 +12613,6 @@ function VectorFromTo(s1: Sprite; s2: Sprite): Vector2D; __skreturn := __sklib__vector_from_to__sprite__sprite(__skparam__s1, __skparam__s2); result := __skadapter__to_vector_2d(__skreturn); end; -procedure ActivateAdvancedTerminal(); -begin - __sklib__activate_advanced_terminal(); -end; -function AdvancedTerminalActive(): Boolean; -var - __skreturn: LongInt; -begin - __skreturn := __sklib__advanced_terminal_active(); - result := __skadapter__to_bool(__skreturn); -end; -procedure ClearTerminal(); -begin - __sklib__clear_terminal(); -end; -procedure EndAdvancedTerminal(); -begin - __sklib__end_advanced_terminal(); -end; -procedure MoveCursorTo(x: Integer; y: Integer); -var - __skparam__x: Integer; - __skparam__y: Integer; -begin - __skparam__x := __skadapter__to_sklib_int(x); - __skparam__y := __skadapter__to_sklib_int(y); - __sklib__move_cursor_to__int__int(__skparam__x, __skparam__y); -end; function ReadChar(): Char; var __skreturn: Char; @@ -12475,47 +12627,6 @@ function ReadLine(): String; __skreturn := __sklib__read_line(); result := __skadapter__to_string(__skreturn); end; -procedure RefreshTerminal(); -begin - __sklib__refresh_terminal(); -end; -procedure SetTerminalBold(value: Boolean); -var - __skparam__value: LongInt; -begin - __skparam__value := __skadapter__to_sklib_bool(value); - __sklib__set_terminal_bold__bool(__skparam__value); -end; -procedure SetTerminalColors(foreground: Color; background: Color); -var - __skparam__foreground: __sklib_color; - __skparam__background: __sklib_color; -begin - __skparam__foreground := __skadapter__to_sklib_color(foreground); - __skparam__background := __skadapter__to_sklib_color(background); - __sklib__set_terminal_colors__color__color(__skparam__foreground, __skparam__background); -end; -procedure SetTerminalEchoInput(value: Boolean); -var - __skparam__value: LongInt; -begin - __skparam__value := __skadapter__to_sklib_bool(value); - __sklib__set_terminal_echo_input__bool(__skparam__value); -end; -function TerminalHeight(): Integer; -var - __skreturn: Integer; -begin - __skreturn := __sklib__terminal_height(); - result := __skadapter__to_int(__skreturn); -end; -function TerminalWidth(): Integer; -var - __skreturn: Integer; -begin - __skreturn := __sklib__terminal_width(); - result := __skadapter__to_int(__skreturn); -end; procedure Write(data: Char); var __skparam__data: Char; @@ -12544,17 +12655,6 @@ procedure Write(text: String); __skparam__text := __skadapter__to_sklib_string(text); __sklib__write__string(__skparam__text); end; -procedure WriteAt(text: String; x: Integer; y: Integer); -var - __skparam__text: __sklib_string; - __skparam__x: Integer; - __skparam__y: Integer; -begin - __skparam__text := __skadapter__to_sklib_string(text); - __skparam__x := __skadapter__to_sklib_int(x); - __skparam__y := __skadapter__to_sklib_int(y); - __sklib__write_at__string__int__int(__skparam__text, __skparam__x, __skparam__y); -end; procedure WriteLine(data: Char); var __skparam__data: Char; diff --git a/generated/python/splashkit.py b/generated/python/splashkit.py index 1a107e34..fa52c48e 100644 --- a/generated/python/splashkit.py +++ b/generated/python/splashkit.py @@ -225,6 +225,65 @@ class HttpStatusCode(Enum): http_status_internal_server_error = 500 http_status_not_implemented = 501 http_status_service_unavailable = 503 +class PinModes(Enum): + gpio_input = 0 + gpio_output = 1 + gpio_alt0 = 4 + gpio_alt1 = 5 + gpio_alt2 = 6 + gpio_alt3 = 7 + gpio_alt4 = 3 + gpio_alt5 = 2 + gpio_default_mode = 1 +class PinValues(Enum): + gpio_low = 0 + gpio_high = 1 + gpio_default_value = 1 +class Pins(Enum): + pin_1 = 1 + pin_2 = 2 + pin_3 = 3 + pin_4 = 4 + pin_5 = 5 + pin_6 = 6 + pin_7 = 7 + pin_8 = 8 + pin_9 = 9 + pin_10 = 10 + pin_11 = 11 + pin_12 = 12 + pin_13 = 13 + pin_14 = 14 + pin_15 = 15 + pin_16 = 16 + pin_17 = 17 + pin_18 = 18 + pin_19 = 19 + pin_20 = 20 + pin_21 = 21 + pin_22 = 22 + pin_23 = 23 + pin_24 = 24 + pin_25 = 25 + pin_26 = 26 + pin_27 = 27 + pin_28 = 28 + pin_29 = 29 + pin_30 = 30 + pin_31 = 31 + pin_32 = 32 + pin_33 = 33 + pin_34 = 34 + pin_35 = 35 + pin_36 = 36 + pin_37 = 37 + pin_38 = 38 + pin_39 = 39 + pin_40 = 40 +class PullUpDown(Enum): + pud_off = 0 + pud_down = 1 + pud_up = 2 class HttpMethod(Enum): http_get_method = 0 http_post_method = 1 @@ -638,6 +697,38 @@ def __skadapter__to_http_status_code(v): def __skadapter__to_sklib_http_status_code(v): return c_int(v.value) +def __skadapter__to_pin_modes(v): + if isinstance(v, PinModes): + return v + return PinModes(v) + +def __skadapter__to_sklib_pin_modes(v): + return c_int(v.value) + +def __skadapter__to_pin_values(v): + if isinstance(v, PinValues): + return v + return PinValues(v) + +def __skadapter__to_sklib_pin_values(v): + return c_int(v.value) + +def __skadapter__to_pins(v): + if isinstance(v, Pins): + return v + return Pins(v) + +def __skadapter__to_sklib_pins(v): + return c_int(v.value) + +def __skadapter__to_pull_up_down(v): + if isinstance(v, PullUpDown): + return v + return PullUpDown(v) + +def __skadapter__to_sklib_pull_up_down(v): + return c_int(v.value) + def __skadapter__to_http_method(v): if isinstance(v, HttpMethod): return v @@ -2674,6 +2765,28 @@ def __skadapter__to_sklib_window(v): sklib.__sklib__rnd.restype = c_float sklib.__sklib__rnd__int.argtypes = [ c_int ] sklib.__sklib__rnd__int.restype = c_int +sklib.__sklib__has_gpio.argtypes = [ ] +sklib.__sklib__has_gpio.restype = c_bool +sklib.__sklib__raspi_cleanup.argtypes = [ ] +sklib.__sklib__raspi_cleanup.restype = None +sklib.__sklib__raspi_get_mode__pins.argtypes = [ c_int ] +sklib.__sklib__raspi_get_mode__pins.restype = c_int +sklib.__sklib__raspi_init.argtypes = [ ] +sklib.__sklib__raspi_init.restype = None +sklib.__sklib__raspi_read__pins.argtypes = [ c_int ] +sklib.__sklib__raspi_read__pins.restype = c_int +sklib.__sklib__raspi_set_mode__pins__pin_modes.argtypes = [ c_int, c_int ] +sklib.__sklib__raspi_set_mode__pins__pin_modes.restype = None +sklib.__sklib__raspi_set_pull_up_down__pins__pull_up_down.argtypes = [ c_int, c_int ] +sklib.__sklib__raspi_set_pull_up_down__pins__pull_up_down.restype = None +sklib.__sklib__raspi_set_pwm_dutycycle__pins__int.argtypes = [ c_int, c_int ] +sklib.__sklib__raspi_set_pwm_dutycycle__pins__int.restype = None +sklib.__sklib__raspi_set_pwm_frequency__pins__int.argtypes = [ c_int, c_int ] +sklib.__sklib__raspi_set_pwm_frequency__pins__int.restype = None +sklib.__sklib__raspi_set_pwm_range__pins__int.argtypes = [ c_int, c_int ] +sklib.__sklib__raspi_set_pwm_range__pins__int.restype = None +sklib.__sklib__raspi_write__pins__pin_values.argtypes = [ c_int, c_int ] +sklib.__sklib__raspi_write__pins__pin_values.restype = None sklib.__sklib__draw_quad__color__quad_ref.argtypes = [ _sklib_color, _sklib_quad ] sklib.__sklib__draw_quad__color__quad_ref.restype = None sklib.__sklib__draw_quad__color__quad_ref__drawing_options_ref.argtypes = [ _sklib_color, _sklib_quad, _sklib_drawing_options ] @@ -3108,32 +3221,10 @@ def __skadapter__to_sklib_window(v): sklib.__sklib__vector_from_center_sprite_to_point__sprite__point_2d_ref.restype = _sklib_vector_2d sklib.__sklib__vector_from_to__sprite__sprite.argtypes = [ c_void_p, c_void_p ] sklib.__sklib__vector_from_to__sprite__sprite.restype = _sklib_vector_2d -sklib.__sklib__activate_advanced_terminal.argtypes = [ ] -sklib.__sklib__activate_advanced_terminal.restype = None -sklib.__sklib__advanced_terminal_active.argtypes = [ ] -sklib.__sklib__advanced_terminal_active.restype = c_bool -sklib.__sklib__clear_terminal.argtypes = [ ] -sklib.__sklib__clear_terminal.restype = None -sklib.__sklib__end_advanced_terminal.argtypes = [ ] -sklib.__sklib__end_advanced_terminal.restype = None -sklib.__sklib__move_cursor_to__int__int.argtypes = [ c_int, c_int ] -sklib.__sklib__move_cursor_to__int__int.restype = None sklib.__sklib__read_char.argtypes = [ ] sklib.__sklib__read_char.restype = c_char sklib.__sklib__read_line.argtypes = [ ] sklib.__sklib__read_line.restype = _sklib_string -sklib.__sklib__refresh_terminal.argtypes = [ ] -sklib.__sklib__refresh_terminal.restype = None -sklib.__sklib__set_terminal_bold__bool.argtypes = [ c_bool ] -sklib.__sklib__set_terminal_bold__bool.restype = None -sklib.__sklib__set_terminal_colors__color__color.argtypes = [ _sklib_color, _sklib_color ] -sklib.__sklib__set_terminal_colors__color__color.restype = None -sklib.__sklib__set_terminal_echo_input__bool.argtypes = [ c_bool ] -sklib.__sklib__set_terminal_echo_input__bool.restype = None -sklib.__sklib__terminal_height.argtypes = [ ] -sklib.__sklib__terminal_height.restype = c_int -sklib.__sklib__terminal_width.argtypes = [ ] -sklib.__sklib__terminal_width.restype = c_int sklib.__sklib__write__char.argtypes = [ c_char ] sklib.__sklib__write__char.restype = None sklib.__sklib__write__double.argtypes = [ c_double ] @@ -3142,8 +3233,6 @@ def __skadapter__to_sklib_window(v): sklib.__sklib__write__int.restype = None sklib.__sklib__write__string.argtypes = [ _sklib_string ] sklib.__sklib__write__string.restype = None -sklib.__sklib__write_at__string__int__int.argtypes = [ _sklib_string, c_int, c_int ] -sklib.__sklib__write_at__string__int__int.restype = None sklib.__sklib__write_line__char.argtypes = [ c_char ] sklib.__sklib__write_line__char.restype = None sklib.__sklib__write_line.argtypes = [ ] @@ -6628,6 +6717,45 @@ def rnd_int ( ubound ): __skparam__ubound = __skadapter__to_sklib_int(ubound) __skreturn = sklib.__sklib__rnd__int(__skparam__ubound) return __skadapter__to_int(__skreturn) +def has_gpio ( ): + __skreturn = sklib.__sklib__has_gpio() + return __skadapter__to_bool(__skreturn) +def raspi_cleanup ( ): + sklib.__sklib__raspi_cleanup() +def raspi_get_mode ( pin ): + __skparam__pin = __skadapter__to_sklib_pins(pin) + __skreturn = sklib.__sklib__raspi_get_mode__pins(__skparam__pin) + return __skadapter__to_pin_modes(__skreturn) +def raspi_init ( ): + sklib.__sklib__raspi_init() +def raspi_read ( pin ): + __skparam__pin = __skadapter__to_sklib_pins(pin) + __skreturn = sklib.__sklib__raspi_read__pins(__skparam__pin) + return __skadapter__to_pin_values(__skreturn) +def raspi_set_mode ( pin, mode ): + __skparam__pin = __skadapter__to_sklib_pins(pin) + __skparam__mode = __skadapter__to_sklib_pin_modes(mode) + sklib.__sklib__raspi_set_mode__pins__pin_modes(__skparam__pin, __skparam__mode) +def raspi_set_pull_up_down ( pin, pud ): + __skparam__pin = __skadapter__to_sklib_pins(pin) + __skparam__pud = __skadapter__to_sklib_pull_up_down(pud) + sklib.__sklib__raspi_set_pull_up_down__pins__pull_up_down(__skparam__pin, __skparam__pud) +def raspi_set_pwm_dutycycle ( pin, dutycycle ): + __skparam__pin = __skadapter__to_sklib_pins(pin) + __skparam__dutycycle = __skadapter__to_sklib_int(dutycycle) + sklib.__sklib__raspi_set_pwm_dutycycle__pins__int(__skparam__pin, __skparam__dutycycle) +def raspi_set_pwm_frequency ( pin, frequency ): + __skparam__pin = __skadapter__to_sklib_pins(pin) + __skparam__frequency = __skadapter__to_sklib_int(frequency) + sklib.__sklib__raspi_set_pwm_frequency__pins__int(__skparam__pin, __skparam__frequency) +def raspi_set_pwm_range ( pin, range ): + __skparam__pin = __skadapter__to_sklib_pins(pin) + __skparam__range = __skadapter__to_sklib_int(range) + sklib.__sklib__raspi_set_pwm_range__pins__int(__skparam__pin, __skparam__range) +def raspi_write ( pin, value ): + __skparam__pin = __skadapter__to_sklib_pins(pin) + __skparam__value = __skadapter__to_sklib_pin_values(value) + sklib.__sklib__raspi_write__pins__pin_values(__skparam__pin, __skparam__value) def draw_quad ( clr, q ): __skparam__clr = __skadapter__to_sklib_color(clr) __skparam__q = __skadapter__to_sklib_quad(q) @@ -7603,43 +7731,12 @@ def vector_from_to ( s1, s2 ): __skparam__s2 = __skadapter__to_sklib_sprite(s2) __skreturn = sklib.__sklib__vector_from_to__sprite__sprite(__skparam__s1, __skparam__s2) return __skadapter__to_vector_2d(__skreturn) -def activate_advanced_terminal ( ): - sklib.__sklib__activate_advanced_terminal() -def advanced_terminal_active ( ): - __skreturn = sklib.__sklib__advanced_terminal_active() - return __skadapter__to_bool(__skreturn) -def clear_terminal ( ): - sklib.__sklib__clear_terminal() -def end_advanced_terminal ( ): - sklib.__sklib__end_advanced_terminal() -def move_cursor_to ( x, y ): - __skparam__x = __skadapter__to_sklib_int(x) - __skparam__y = __skadapter__to_sklib_int(y) - sklib.__sklib__move_cursor_to__int__int(__skparam__x, __skparam__y) def read_char ( ): __skreturn = sklib.__sklib__read_char() return __skadapter__to_char(__skreturn) def read_line ( ): __skreturn = sklib.__sklib__read_line() return __skadapter__to_string(__skreturn) -def refresh_terminal ( ): - sklib.__sklib__refresh_terminal() -def set_terminal_bold ( value ): - __skparam__value = __skadapter__to_sklib_bool(value) - sklib.__sklib__set_terminal_bold__bool(__skparam__value) -def set_terminal_colors ( foreground, background ): - __skparam__foreground = __skadapter__to_sklib_color(foreground) - __skparam__background = __skadapter__to_sklib_color(background) - sklib.__sklib__set_terminal_colors__color__color(__skparam__foreground, __skparam__background) -def set_terminal_echo_input ( value ): - __skparam__value = __skadapter__to_sklib_bool(value) - sklib.__sklib__set_terminal_echo_input__bool(__skparam__value) -def terminal_height ( ): - __skreturn = sklib.__sklib__terminal_height() - return __skadapter__to_int(__skreturn) -def terminal_width ( ): - __skreturn = sklib.__sklib__terminal_width() - return __skadapter__to_int(__skreturn) def write_char ( data ): __skparam__data = __skadapter__to_sklib_char(data) sklib.__sklib__write__char(__skparam__data) @@ -7652,11 +7749,6 @@ def write_int ( data ): def write ( text ): __skparam__text = __skadapter__to_sklib_string(text) sklib.__sklib__write__string(__skparam__text) -def write_at ( text, x, y ): - __skparam__text = __skadapter__to_sklib_string(text) - __skparam__x = __skadapter__to_sklib_int(x) - __skparam__y = __skadapter__to_sklib_int(y) - sklib.__sklib__write_at__string__int__int(__skparam__text, __skparam__x, __skparam__y) def write_line_char ( data ): __skparam__data = __skadapter__to_sklib_char(data) sklib.__sklib__write_line__char(__skparam__data) diff --git a/generated/translator_cache.json b/generated/translator_cache.json index 9c5f6985..afde75f5 100644 --- a/generated/translator_cache.json +++ b/generated/translator_cache.json @@ -3,7 +3,7 @@ "group": "animations", "brief": "Animations in SplashKit can be used to move between cells in\nbitmaps and sprites. Each animation generates a number sequence\nthat can then be used when drawing bitmaps.", "description": null, - "parsed_at": 1703651012, + "parsed_at": 1706101739, "path": "coresdk/src/coresdk/animations.h", "functions": [ { @@ -1951,7 +1951,7 @@ "group": "audio", "brief": "SplashKit Audio allows you to load and play music and sound effects.", "description": "SplashKit's audio library allows you to easily load and play music and\nsound effects within your programs. To get started with audio the first\nthing you need to do is load a sound effect or music file. You can do this\nby calling the `load_sound_effect(string name)` function to the\n`load_music(string name)` function.", - "parsed_at": 1703651012, + "parsed_at": 1706101739, "path": "coresdk/src/coresdk/audio.h", "functions": [ { @@ -2045,7 +2045,7 @@ "group": "utilities", "brief": "SplashKit provides some basic data manipulation functions to\nhelp make it easy to get some basic tasks performed.", "description": null, - "parsed_at": 1703651014, + "parsed_at": 1706101739, "path": "coresdk/src/coresdk/basics.h", "functions": [ { @@ -2362,7 +2362,7 @@ "group": "resource_bundles", "brief": "SplashKit resource bundles allow you to quickly and easily load a\nnumber of resources in the `Resources` folder.", "description": "Supports the loading and freeing of game resource bundles. Resource types\ninclude images, sounds, music and animation files to name a few. Resource\nfiles must be saved in specific locations of a `Resources` folder for\nyour game.", - "parsed_at": 1703651014, + "parsed_at": 1706101740, "path": "coresdk/src/coresdk/bundles.h", "functions": [ { @@ -2507,7 +2507,7 @@ "group": "camera", "brief": "SplashKit camera functionality allows you to move a virtual camera\naround in your world.", "description": "Splashkit camera functionality allows you to move a virtual camera around in\nyour world. This camera projects to the users window, allowing you to\ndraw things to the screen in your world coordinates.", - "parsed_at": 1703651018, + "parsed_at": 1706101741, "path": "coresdk/src/coresdk/camera.h", "functions": [ { @@ -3574,7 +3574,7 @@ "group": "graphics", "brief": null, "description": null, - "parsed_at": 1703651022, + "parsed_at": 1706101742, "path": "coresdk/src/coresdk/circle_drawing.h", "functions": [ { @@ -4945,7 +4945,7 @@ "group": "geometry", "brief": null, "description": null, - "parsed_at": 1703651025, + "parsed_at": 1706101742, "path": "coresdk/src/coresdk/circle_geometry.h", "functions": [ { @@ -5872,7 +5872,7 @@ "group": "graphics", "brief": null, "description": null, - "parsed_at": 1703651028, + "parsed_at": 1706101743, "path": "coresdk/src/coresdk/clipping.h", "functions": [ { @@ -6456,7 +6456,7 @@ "group": "physics", "brief": "SplashKit Collisions library allow you to perform tests between\nbitmaps, sprites and shapes to determin if a collision has occured.", "description": null, - "parsed_at": 1703651034, + "parsed_at": 1706101744, "path": "coresdk/src/coresdk/collisions.h", "functions": [ { @@ -8707,7 +8707,7 @@ "group": "color", "brief": "SplashKit simplifies color manipulation in graphical applications for developers, ensuring ease of use and efficiency.", "description": null, - "parsed_at": 1703651059, + "parsed_at": 1706101749, "path": "coresdk/src/coresdk/color.h", "functions": [ { @@ -13907,7 +13907,7 @@ "group": "graphics", "brief": null, "description": null, - "parsed_at": 1703651064, + "parsed_at": 1706101750, "path": "coresdk/src/coresdk/drawing_options.h", "functions": [ { @@ -15271,7 +15271,7 @@ "group": "graphics", "brief": null, "description": null, - "parsed_at": 1703651071, + "parsed_at": 1706101752, "path": "coresdk/src/coresdk/ellipse_drawing.h", "functions": [ { @@ -17366,7 +17366,7 @@ "group": "geometry", "brief": "SplashKit's geometry functions assist with geometry-related computations.", "description": null, - "parsed_at": 1703651071, + "parsed_at": 1706101752, "path": "coresdk/src/coresdk/geometry.h", "functions": [ { @@ -17498,7 +17498,7 @@ "group": "graphics", "brief": null, "description": null, - "parsed_at": 1703651074, + "parsed_at": 1706101752, "path": "coresdk/src/coresdk/graphics.h", "functions": [ { @@ -18074,7 +18074,7 @@ "group": "graphics", "brief": "SplashKit Images allow drawing of bitmaps and sprites to graphic windows.", "description": null, - "parsed_at": 1703651082, + "parsed_at": 1706101754, "path": "coresdk/src/coresdk/images.h", "functions": [ { @@ -20562,7 +20562,7 @@ "group": "input", "brief": "Input handles user interaction and events such as keypresses.", "description": null, - "parsed_at": 1703651082, + "parsed_at": 1706101754, "path": "coresdk/src/coresdk/input.h", "functions": [ { @@ -20655,7 +20655,7 @@ "group": "json", "brief": "SplashKit Json allows you to create and read JSON objects.", "description": "Splashkit's JSON library allows you to easily create or read JSON objects and\nmanipulate them to/from a JSON string or from a file containing a JSON\nstring. Create a new JSON object with a call to `create_json()` and\nread or write data to it by calling methods like\n`json_add_string(json j, string key, string value)` and\n`json_read_string(json j, string key)`.", - "parsed_at": 1703651088, + "parsed_at": 1706101755, "path": "coresdk/src/coresdk/json.h", "functions": [ { @@ -22407,7 +22407,7 @@ "group": "input", "brief": null, "description": null, - "parsed_at": 1703651095, + "parsed_at": 1706101757, "path": "coresdk/src/coresdk/keyboard_input.h", "functions": [ { @@ -23405,7 +23405,7 @@ "group": "graphics", "brief": null, "description": null, - "parsed_at": 1703651100, + "parsed_at": 1706101758, "path": "coresdk/src/coresdk/line_drawing.h", "functions": [ { @@ -24944,7 +24944,7 @@ "group": "geometry", "brief": null, "description": null, - "parsed_at": 1703651104, + "parsed_at": 1706101759, "path": "coresdk/src/coresdk/line_geometry.h", "functions": [ { @@ -25818,7 +25818,7 @@ "group": "logging", "brief": "SplashKit Logging facilitates streamlined logging with customizable severity levels and modes.", "description": "SplashKit Logging module, allows users to initialize a custom logger with specified log levels and modes (console, file, or both). \nThe module provides functions to log messages at different severity levels (INFO, DEBUG, WARNING, ERROR, FATAL) with timestamped entries. \nUsers can close the logging process as needed, and the module handles customization for console and file output.", - "parsed_at": 1703651105, + "parsed_at": 1706101759, "path": "coresdk/src/coresdk/logging.h", "functions": [ { @@ -26067,7 +26067,7 @@ "group": "physics", "brief": "Provides matrix functions to work on 2d coordinates.", "description": null, - "parsed_at": 1703651108, + "parsed_at": 1706101760, "path": "coresdk/src/coresdk/matrix_2d.h", "functions": [ { @@ -26805,7 +26805,7 @@ "group": "input", "brief": null, "description": null, - "parsed_at": 1703651110, + "parsed_at": 1706101761, "path": "coresdk/src/coresdk/mouse_input.h", "functions": [ { @@ -27292,7 +27292,7 @@ "group": "audio", "brief": null, "description": null, - "parsed_at": 1703651113, + "parsed_at": 1706101762, "path": "coresdk/src/coresdk/music.h", "functions": [ { @@ -28285,7 +28285,7 @@ "group": "networking", "brief": "SplashKit's network-related functions allow you to communicate data\nacross networks.", "description": null, - "parsed_at": 1703651124, + "parsed_at": 1706101764, "path": "coresdk/src/coresdk/networking.h", "functions": [ { @@ -31429,7 +31429,7 @@ "group": "physics", "brief": null, "description": null, - "parsed_at": 1703651124, + "parsed_at": 1706101764, "path": "coresdk/src/coresdk/physics.h", "functions": [ @@ -31451,7 +31451,7 @@ "group": "graphics", "brief": null, "description": null, - "parsed_at": 1703651128, + "parsed_at": 1706101765, "path": "coresdk/src/coresdk/point_drawing.h", "functions": [ { @@ -32771,7 +32771,7 @@ "group": "geometry", "brief": null, "description": null, - "parsed_at": 1703651132, + "parsed_at": 1706101766, "path": "coresdk/src/coresdk/point_geometry.h", "functions": [ { @@ -33795,7 +33795,7 @@ "group": "geometry", "brief": null, "description": null, - "parsed_at": 1703651134, + "parsed_at": 1706101766, "path": "coresdk/src/coresdk/quad_geometry.h", "functions": [ { @@ -34260,7 +34260,7 @@ "group": "utilities", "brief": "SplashKit random provides a simple implementation of random.", "description": "The SplashKit`s random library provides two rnd methods, a `rnd()` which generates\na random number between 0 and 1, and `rnd(int ubound)` which\ngenerates a random number between 0 and the value scpeficied in `ubound`.", - "parsed_at": 1703651135, + "parsed_at": 1706101766, "path": "coresdk/src/coresdk/random.h", "functions": [ { @@ -34390,11 +34390,478 @@ ] }, + "raspi_gpio": { + "group": "raspberry", + "brief": "Splashkit allows you to read and write to the GPIO pins on the Raspberry Pi.", + "description": null, + "parsed_at": 1706101767, + "path": "coresdk/src/coresdk/raspi_gpio.h", + "functions": [ + { + "signature": "bool has_gpio();", + "name": "has_gpio", + "method_name": null, + "unique_global_name": "has_gpio", + "unique_method_name": null, + "suffix_name": null, + "description": "Checks if the system has GPIO capabilities.", + "brief": null, + "return": { + "type": "bool", + "description": "true if the system has GPIO capabilities, false otherwise.", + "is_pointer": false, + "is_reference": false, + "is_vector": false, + "type_parameter": null + }, + "parameters": { + }, + "attributes": { + "group": "raspberry", + "static": "raspberry" + } + }, + { + "signature": "void raspi_cleanup();", + "name": "raspi_cleanup", + "method_name": null, + "unique_global_name": "raspi_cleanup", + "unique_method_name": null, + "suffix_name": null, + "description": "This function should be called when you are finished using the GPIO library. It sets all pin modes to INPUT and values to LOW.", + "brief": "Cleans up and releases any resources used by the GPIO library.", + "return": { + "type": "void", + "description": null, + "is_pointer": false, + "is_reference": false, + "is_vector": false, + "type_parameter": null + }, + "parameters": { + }, + "attributes": { + "group": "raspberry", + "static": "raspberry" + } + }, + { + "signature": "pin_modes raspi_get_mode(pins pin);", + "name": "raspi_get_mode", + "method_name": null, + "unique_global_name": "raspi_get_mode", + "unique_method_name": null, + "suffix_name": null, + "description": "This function retrieves the mode of the specified pin.", + "brief": "Gets the mode of the specified pin.", + "return": { + "type": "pin_modes", + "description": "The mode of the pin.", + "is_pointer": false, + "is_reference": false, + "is_vector": false, + "type_parameter": null + }, + "parameters": { + "pin": { + "type": "pins", + "description": "The pin to get the mode for.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } + }, + "attributes": { + "group": "raspberry", + "static": "raspberry" + } + }, + { + "signature": "void raspi_init();", + "name": "raspi_init", + "method_name": null, + "unique_global_name": "raspi_init", + "unique_method_name": null, + "suffix_name": null, + "description": "This function initializes the GPIO library for use. It should be called before any other GPIO functions.", + "brief": "Initializes the GPIO library.", + "return": { + "type": "void", + "description": null, + "is_pointer": false, + "is_reference": false, + "is_vector": false, + "type_parameter": null + }, + "parameters": { + }, + "attributes": { + "group": "raspberry", + "static": "raspberry" + } + }, + { + "signature": "pin_values raspi_read(pins pin);", + "name": "raspi_read", + "method_name": null, + "unique_global_name": "raspi_read", + "unique_method_name": null, + "suffix_name": null, + "description": "This function reads the value from the specified pin.", + "brief": "Reads the value from the specified pin.", + "return": { + "type": "pin_values", + "description": "The value read from the pin.", + "is_pointer": false, + "is_reference": false, + "is_vector": false, + "type_parameter": null + }, + "parameters": { + "pin": { + "type": "pins", + "description": "The pin to read the value from.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } + }, + "attributes": { + "group": "raspberry", + "static": "raspberry" + } + }, + { + "signature": "void raspi_set_mode(pins pin,pin_modes mode);", + "name": "raspi_set_mode", + "method_name": null, + "unique_global_name": "raspi_set_mode", + "unique_method_name": null, + "suffix_name": null, + "description": "This function sets the mode of the specified pin to the specified mode.", + "brief": "Sets the mode of the specified pin.", + "return": { + "type": "void", + "description": null, + "is_pointer": false, + "is_reference": false, + "is_vector": false, + "type_parameter": null + }, + "parameters": { + "pin": { + "type": "pins", + "description": "The pin to set the mode for.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "mode": { + "type": "pin_modes", + "description": "The mode to set for the pin.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } + }, + "attributes": { + "group": "raspberry", + "static": "raspberry" + } + }, + { + "signature": "void raspi_set_pull_up_down(pins pin,pull_up_down pud);", + "name": "raspi_set_pull_up_down", + "method_name": null, + "unique_global_name": "raspi_set_pull_up_down", + "unique_method_name": null, + "suffix_name": null, + "description": "This function sets the pull-up/down mode for the specified pin.", + "brief": "Sets the pull up/down mode for the specified pin.", + "return": { + "type": "void", + "description": null, + "is_pointer": false, + "is_reference": false, + "is_vector": false, + "type_parameter": null + }, + "parameters": { + "pin": { + "type": "pins", + "description": "The pin to set the pull up/down mode for.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "pud": { + "type": "pull_up_down", + "description": "The pull up/down mode to set for the pin.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } + }, + "attributes": { + "group": "raspberry", + "static": "raspberry" + } + }, + { + "signature": "void raspi_set_pwm_dutycycle(pins pin,int dutycycle);", + "name": "raspi_set_pwm_dutycycle", + "method_name": null, + "unique_global_name": "raspi_set_pwm_dutycycle", + "unique_method_name": null, + "suffix_name": null, + "description": "This function sets the PWM duty cycle for the specified pin.", + "brief": "Sets the PWM duty cycle for the specified pin.", + "return": { + "type": "void", + "description": null, + "is_pointer": false, + "is_reference": false, + "is_vector": false, + "type_parameter": null + }, + "parameters": { + "pin": { + "type": "pins", + "description": "The pin to set the PWM duty cycle for.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "dutycycle": { + "type": "int", + "description": "The PWM duty cycle to set for the pin.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } + }, + "attributes": { + "group": "raspberry", + "static": "raspberry" + } + }, + { + "signature": "void raspi_set_pwm_frequency(pins pin,int frequency);", + "name": "raspi_set_pwm_frequency", + "method_name": null, + "unique_global_name": "raspi_set_pwm_frequency", + "unique_method_name": null, + "suffix_name": null, + "description": "This function sets the PWM frequency for the specified pin.", + "brief": "Sets the PWM frequency for the specified pin.", + "return": { + "type": "void", + "description": null, + "is_pointer": false, + "is_reference": false, + "is_vector": false, + "type_parameter": null + }, + "parameters": { + "pin": { + "type": "pins", + "description": "The pin to set the PWM frequency for.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "frequency": { + "type": "int", + "description": "The PWM frequency to set for the pin.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } + }, + "attributes": { + "group": "raspberry", + "static": "raspberry" + } + }, + { + "signature": "void raspi_set_pwm_range(pins pin,int range);", + "name": "raspi_set_pwm_range", + "method_name": null, + "unique_global_name": "raspi_set_pwm_range", + "unique_method_name": null, + "suffix_name": null, + "description": "This function sets the PWM range for the specified pin.", + "brief": "Sets the PWM range for the specified pin.", + "return": { + "type": "void", + "description": null, + "is_pointer": false, + "is_reference": false, + "is_vector": false, + "type_parameter": null + }, + "parameters": { + "pin": { + "type": "pins", + "description": "The pin to set the PWM range for.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "range": { + "type": "int", + "description": "The PWM range to set for the pin.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } + }, + "attributes": { + "group": "raspberry", + "static": "raspberry" + } + }, + { + "signature": "void raspi_write(pins pin,pin_values value);", + "name": "raspi_write", + "method_name": null, + "unique_global_name": "raspi_write", + "unique_method_name": null, + "suffix_name": null, + "description": "This function writes the specified value to the specified pin.", + "brief": "Writes a value to the specified pin.", + "return": { + "type": "void", + "description": null, + "is_pointer": false, + "is_reference": false, + "is_vector": false, + "type_parameter": null + }, + "parameters": { + "pin": { + "type": "pins", + "description": "The pin to write the value to.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + }, + "value": { + "type": "pin_values", + "description": "The value to write to the pin.", + "is_pointer": false, + "is_const": false, + "is_reference": false, + "is_array": false, + "array_dimension_sizes": [ + + ], + "is_vector": false, + "type_parameter": null + } + }, + "attributes": { + "group": "raspberry", + "static": "raspberry" + } + } + ], + "typedefs": [ + + ], + "structs": [ + + ], + "enums": [ + + ], + "defines": [ + + ] + }, "rectangle_drawing": { "group": "graphics", "brief": null, "description": null, - "parsed_at": 1703651144, + "parsed_at": 1706101769, "path": "coresdk/src/coresdk/rectangle_drawing.h", "functions": [ { @@ -37287,7 +37754,7 @@ "group": "geometry", "brief": null, "description": null, - "parsed_at": 1703651147, + "parsed_at": 1706101769, "path": "coresdk/src/coresdk/rectangle_geometry.h", "functions": [ { @@ -38073,7 +38540,7 @@ "group": "resources", "brief": "SplashKit resource functions allow you to locate resources in a\nproject's `Resources` folder.", "description": null, - "parsed_at": 1703651148, + "parsed_at": 1706101770, "path": "coresdk/src/coresdk/resources.h", "functions": [ { @@ -38391,7 +38858,7 @@ "group": "audio", "brief": null, "description": null, - "parsed_at": 1703651152, + "parsed_at": 1706101771, "path": "coresdk/src/coresdk/sound.h", "functions": [ { @@ -39363,7 +39830,7 @@ "group": "sprites", "brief": "SplashKit Sprites allows you to create images you can easily\nmove and animate.", "description": "SplashKit sprites are game elements that can be moved, and animated. Sprites\nare located at a position in the game, have a velocity, and an animation.\nThe sprite can also have arbitary data associated with it for game specific\npurposes.", - "parsed_at": 1703651173, + "parsed_at": 1706101775, "path": "coresdk/src/coresdk/sprites.h", "functions": [ { @@ -46239,155 +46706,9 @@ "group": "terminal", "brief": "SplashKit Terminal allows you to read and write values to the\nterminal in a consistent manner.", "description": null, - "parsed_at": 1703651176, + "parsed_at": 1706101776, "path": "coresdk/src/coresdk/terminal.h", "functions": [ - { - "signature": "void activate_advanced_terminal();", - "name": "activate_advanced_terminal", - "method_name": null, - "unique_global_name": "activate_advanced_terminal", - "unique_method_name": null, - "suffix_name": null, - "description": "Start using the advanced terminal. Once you call this you will need\nto make sure you call `refresh_terminal` to show anything you have\nwritten. This will allow use of colors, bold, positioning, and other\nadvanced options.", - "brief": null, - "return": { - "type": "void", - "description": null, - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { - }, - "attributes": { - "group": "terminal", - "static": "terminal" - } - }, - { - "signature": "bool advanced_terminal_active();", - "name": "advanced_terminal_active", - "method_name": null, - "unique_global_name": "advanced_terminal_active", - "unique_method_name": null, - "suffix_name": null, - "description": "Is the terminal currently in advanced mode?", - "brief": null, - "return": { - "type": "bool", - "description": "True if the terminal is in advanced mode.", - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { - }, - "attributes": { - "group": "terminal", - "static": "terminal" - } - }, - { - "signature": "void clear_terminal();", - "name": "clear_terminal", - "method_name": null, - "unique_global_name": "clear_terminal", - "unique_method_name": null, - "suffix_name": null, - "description": "In advanced mode, this will clear the terminal to the background color\nyou set in `set_terminal_color`.", - "brief": null, - "return": { - "type": "void", - "description": null, - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { - }, - "attributes": { - "group": "terminal", - "static": "terminal" - } - }, - { - "signature": "void end_advanced_terminal();", - "name": "end_advanced_terminal", - "method_name": null, - "unique_global_name": "end_advanced_terminal", - "unique_method_name": null, - "suffix_name": null, - "description": "Finish using advanced mode. The existing terminal display will be lost\nand the user will see what was in the terminal before you called\n`activate_advanced_terminal`.", - "brief": null, - "return": { - "type": "void", - "description": null, - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { - }, - "attributes": { - "group": "terminal", - "static": "terminal" - } - }, - { - "signature": "void move_cursor_to(int x,int y);", - "name": "move_cursor_to", - "method_name": null, - "unique_global_name": "move_cursor_to", - "unique_method_name": null, - "suffix_name": null, - "description": "In advanced mode, this will move the cursor to a given col, row of the\nterminal. You can check the terminal size using `terminal_width` and\n`terminal_height`. If you try to move outside this bounds then then move\nwill not occur.", - "brief": null, - "return": { - "type": "void", - "description": null, - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { - "x": { - "type": "int", - "description": "The column to move to, must be between 0 and `terminal_width`", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "y": { - "type": "int", - "description": "The row to move to, must be between 0 and `terminal_height`", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - } - }, - "attributes": { - "group": "terminal", - "static": "terminal" - } - }, { "signature": "char read_char();", "name": "read_char", @@ -46395,7 +46716,7 @@ "unique_global_name": "read_char", "unique_method_name": null, "suffix_name": null, - "description": "Get a single character input by the user. This works in both standard and\nadvanced modes. In advanced mode, you can set if the character should\nalso be echoed to the terminal using `set_terminal_echo_input`.", + "description": "Get a single character input by the user.", "brief": null, "return": { "type": "char", @@ -46436,202 +46757,6 @@ "static": "terminal" } }, - { - "signature": "void refresh_terminal();", - "name": "refresh_terminal", - "method_name": null, - "unique_global_name": "refresh_terminal", - "unique_method_name": null, - "suffix_name": null, - "description": "In advanced mode, this will display what has been written to the\nterminal. You need to call this for anything to be shown in advanced\nmode.", - "brief": null, - "return": { - "type": "void", - "description": null, - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { - }, - "attributes": { - "group": "terminal", - "static": "terminal" - } - }, - { - "signature": "void set_terminal_bold(bool value);", - "name": "set_terminal_bold", - "method_name": null, - "unique_global_name": "set_terminal_bold", - "unique_method_name": null, - "suffix_name": null, - "description": "In advanced mode, this allows you to set if the text should draw as bold.", - "brief": null, - "return": { - "type": "void", - "description": null, - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { - "value": { - "type": "bool", - "description": "Pass true to have the terminal write in bold", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - } - }, - "attributes": { - "group": "terminal", - "static": "terminal" - } - }, - { - "signature": "void set_terminal_colors(color foreground,color background);", - "name": "set_terminal_colors", - "method_name": null, - "unique_global_name": "set_terminal_colors", - "unique_method_name": null, - "suffix_name": null, - "description": "In advanced mode this allows you to set the color of the foreground and\nthe background. The foreground is the color of the text.\n\n\nNote that only the following colors are guaranteed to work on all\nTerminals (others may work):\n\n\n- `color_black`\n\n\n- `color_dark_gray`\n\n\n- `color_gray`\n\n\n- `color_white`\n\n\n- `color_red`\n\n\n- `color_dark_red`\n\n\n- `color_green`\n\n\n- `color_dark_green`\n\n\n- `color_blue`\n\n\n- `color_dark_blue`\n\n\n- `color_cyan`\n\n\n- `color_dark_cyan`\n\n\n- `color_light_yellow`\n\n\n- `color_yellow`\n\n\n- `color_magenta`\n\n\n- `color_dark_magenta`", - "brief": null, - "return": { - "type": "void", - "description": null, - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { - "foreground": { - "type": "color", - "description": "The color of text that is drawn.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "background": { - "type": "color", - "description": "The color of the background behind drawn text.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - } - }, - "attributes": { - "group": "terminal", - "static": "terminal" - } - }, - { - "signature": "void set_terminal_echo_input(bool value);", - "name": "set_terminal_echo_input", - "method_name": null, - "unique_global_name": "set_terminal_echo_input", - "unique_method_name": null, - "suffix_name": null, - "description": "In advanced mode, this allows you to stop text read with `read_char`\nappearing on the terminal. You can use this for reading passwords, or to\ncontrol what is written.", - "brief": null, - "return": { - "type": "void", - "description": null, - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { - "value": { - "type": "bool", - "description": "Pass true if you want characters to appear as typed.", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - } - }, - "attributes": { - "group": "terminal", - "static": "terminal" - } - }, - { - "signature": "int terminal_height();", - "name": "terminal_height", - "method_name": null, - "unique_global_name": "terminal_height", - "unique_method_name": null, - "suffix_name": null, - "description": "In advanced mode, this gives you the number of rows in the terminal.", - "brief": null, - "return": { - "type": "int", - "description": "The number of rows in the terminal", - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { - }, - "attributes": { - "group": "terminal", - "static": "terminal" - } - }, - { - "signature": "int terminal_width();", - "name": "terminal_width", - "method_name": null, - "unique_global_name": "terminal_width", - "unique_method_name": null, - "suffix_name": null, - "description": "In advanced mode, this gives you the number of columns in the terminal.", - "brief": null, - "return": { - "type": "int", - "description": "The number of columns in the terminal", - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { - }, - "attributes": { - "group": "terminal", - "static": "terminal" - } - }, { "signature": "void write(char data);", "name": "write", @@ -46783,69 +46908,6 @@ "static": "terminal" } }, - { - "signature": "void write_at(string text,int x,int y);", - "name": "write_at", - "method_name": null, - "unique_global_name": "write_at", - "unique_method_name": null, - "suffix_name": null, - "description": "In advanced mode, this will write the supplied text at the indicated\ncolumn and row.", - "brief": null, - "return": { - "type": "void", - "description": null, - "is_pointer": false, - "is_reference": false, - "is_vector": false, - "type_parameter": null - }, - "parameters": { - "text": { - "type": "string", - "description": "The text to write", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "x": { - "type": "int", - "description": "The row to position the text at", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - }, - "y": { - "type": "int", - "description": "The column to position the text at", - "is_pointer": false, - "is_const": false, - "is_reference": false, - "is_array": false, - "array_dimension_sizes": [ - - ], - "is_vector": false, - "type_parameter": null - } - }, - "attributes": { - "group": "terminal", - "static": "terminal" - } - }, { "signature": "void write_line(char data);", "name": "write_line", @@ -47040,7 +47102,7 @@ "group": "graphics", "brief": "SplashKit Text allows for drawing text in a variety of ways to\ngraphic windows.", "description": null, - "parsed_at": 1703651185, + "parsed_at": 1706101778, "path": "coresdk/src/coresdk/text.h", "functions": [ { @@ -49943,7 +50005,7 @@ "group": "input", "brief": null, "description": null, - "parsed_at": 1703651188, + "parsed_at": 1706101778, "path": "coresdk/src/coresdk/text_input.h", "functions": [ { @@ -50478,7 +50540,7 @@ "group": "timers", "brief": "Timers in SplashKit can be used to track the passing of time.", "description": null, - "parsed_at": 1703651190, + "parsed_at": 1706101779, "path": "coresdk/src/coresdk/timers.h", "functions": [ { @@ -51316,7 +51378,7 @@ "group": "graphics", "brief": null, "description": null, - "parsed_at": 1703651198, + "parsed_at": 1706101781, "path": "coresdk/src/coresdk/triangle_drawing.h", "functions": [ { @@ -53723,7 +53785,7 @@ "group": "geometry", "brief": null, "description": null, - "parsed_at": 1703651200, + "parsed_at": 1706101781, "path": "coresdk/src/coresdk/triangle_geometry.h", "functions": [ { @@ -54084,7 +54146,7 @@ "group": "types", "brief": "SplashKit Types simplifies data type creation and management for streamlined programming.", "description": null, - "parsed_at": 1703651204, + "parsed_at": 1706101783, "path": "coresdk/src/coresdk/types.h", "functions": [ @@ -54806,6 +54868,270 @@ "attributes": { "group": "types" } + }, + { + "signature": "enum pin_modes {GPIO_INPUT = 0,GPIO_OUTPUT = 1,GPIO_ALT0 = 4,GPIO_ALT1 = 5,GPIO_ALT2 = 6,GPIO_ALT3 = 7,GPIO_ALT4 = 3,GPIO_ALT5 = 2,GPIO_DEFAULT_MODE = -1,};", + "name": "pin_modes", + "description": "GPIO Pin Modes:", + "brief": null, + "constants": { + "GPIO_INPUT": { + "description": "Input mode.", + "number": 0 + }, + "GPIO_OUTPUT": { + "description": "Output mode.", + "number": 1 + }, + "GPIO_ALT0": { + "description": "Alternate function mode 0.", + "number": 4 + }, + "GPIO_ALT1": { + "description": "Alternate function mode 1.", + "number": 5 + }, + "GPIO_ALT2": { + "description": "Alternate function mode 2.", + "number": 6 + }, + "GPIO_ALT3": { + "description": "Alternate function mode 3.", + "number": 7 + }, + "GPIO_ALT4": { + "description": "Alternate function mode 4.", + "number": 3 + }, + "GPIO_ALT5": { + "description": "Alternate function mode 5.", + "number": 2 + }, + "GPIO_DEFAULT_MODE": { + "description": "Default mode.", + "number": 1 + } + }, + "attributes": { + "group": "types" + } + }, + { + "signature": "enum pin_values {GPIO_LOW = 0,GPIO_HIGH = 1,GPIO_DEFAULT_VALUE = -1};", + "name": "pin_values", + "description": "GPIO Pin Values:", + "brief": null, + "constants": { + "GPIO_LOW": { + "description": "Logic low (0).", + "number": 0 + }, + "GPIO_HIGH": { + "description": "Logic high (1).", + "number": 1 + }, + "GPIO_DEFAULT_VALUE": { + "description": "Default value.", + "number": 1 + } + }, + "attributes": { + "group": "types" + } + }, + { + "signature": "enum pins {PIN_1 = 1,PIN_2 = 2,PIN_3 = 3,PIN_4 = 4,PIN_5 = 5,PIN_6 = 6,PIN_7 = 7,PIN_8 = 8,PIN_9 = 9,PIN_10 = 10,PIN_11 = 11,PIN_12 = 12,PIN_13 = 13,PIN_14 = 14,PIN_15 = 15,PIN_16 = 16,PIN_17 = 17,PIN_18 = 18,PIN_19 = 19,PIN_20 = 20,PIN_21 = 21,PIN_22 = 22,PIN_23 = 23,PIN_24 = 24,PIN_25 = 25,PIN_26 = 26,PIN_27 = 27,PIN_28 = 28,PIN_29 = 29,PIN_30 = 30,PIN_31 = 31,PIN_32 = 32,PIN_33 = 33,PIN_34 = 34,PIN_35 = 35,PIN_36 = 36,PIN_37 = 37,PIN_38 = 38,PIN_39 = 39,PIN_40 = 40,};", + "name": "pins", + "description": "Raspberry Pi GPIO Board Pin Descriptions:", + "brief": null, + "constants": { + "PIN_1": { + "description": "3.3V Power Supply", + "number": 1 + }, + "PIN_2": { + "description": "5V Power Supply", + "number": 2 + }, + "PIN_3": { + "description": "GPIO2 / SDA (I2C)", + "number": 3 + }, + "PIN_4": { + "description": "5V Power Supply", + "number": 4 + }, + "PIN_5": { + "description": "GPIO3 / SCL (I2C)", + "number": 5 + }, + "PIN_6": { + "description": "Ground", + "number": 6 + }, + "PIN_7": { + "description": "GPIO4", + "number": 7 + }, + "PIN_8": { + "description": "GPIO14 / TXD (UART)", + "number": 8 + }, + "PIN_9": { + "description": "Ground", + "number": 9 + }, + "PIN_10": { + "description": "GPIO15 / RXD (UART)", + "number": 10 + }, + "PIN_11": { + "description": "GPIO17", + "number": 11 + }, + "PIN_12": { + "description": "GPIO18 / PCM_CLK", + "number": 12 + }, + "PIN_13": { + "description": "GPIO27", + "number": 13 + }, + "PIN_14": { + "description": "Ground", + "number": 14 + }, + "PIN_15": { + "description": "GPIO22", + "number": 15 + }, + "PIN_16": { + "description": "GPIO23", + "number": 16 + }, + "PIN_17": { + "description": "3.3V Power Supply", + "number": 17 + }, + "PIN_18": { + "description": "GPIO24", + "number": 18 + }, + "PIN_19": { + "description": "GPIO10 / MOSI (SPI)", + "number": 19 + }, + "PIN_20": { + "description": "Ground", + "number": 20 + }, + "PIN_21": { + "description": "GPIO9 / MISO (SPI)", + "number": 21 + }, + "PIN_22": { + "description": "GPIO25", + "number": 22 + }, + "PIN_23": { + "description": "GPIO11 / SCLK (SPI)", + "number": 23 + }, + "PIN_24": { + "description": "GPIO8 / CE0 (SPI)", + "number": 24 + }, + "PIN_25": { + "description": "Ground", + "number": 25 + }, + "PIN_26": { + "description": "GPIO7 / CE1 (SPI)", + "number": 26 + }, + "PIN_27": { + "description": "ID_SD (I2C ID EEPROM)", + "number": 27 + }, + "PIN_28": { + "description": "ID_SC (I2C ID EEPROM)", + "number": 28 + }, + "PIN_29": { + "description": "GPIO5", + "number": 29 + }, + "PIN_30": { + "description": "Ground", + "number": 30 + }, + "PIN_31": { + "description": "GPIO6", + "number": 31 + }, + "PIN_32": { + "description": "GPIO12", + "number": 32 + }, + "PIN_33": { + "description": "GPIO13", + "number": 33 + }, + "PIN_34": { + "description": "Ground", + "number": 34 + }, + "PIN_35": { + "description": "GPIO19 / MISO (PCM)", + "number": 35 + }, + "PIN_36": { + "description": "GPIO16 / CE0 (PCM)", + "number": 36 + }, + "PIN_37": { + "description": "GPIO26", + "number": 37 + }, + "PIN_38": { + "description": "GPIO20 / MOSI (PCM)", + "number": 38 + }, + "PIN_39": { + "description": "Ground", + "number": 39 + }, + "PIN_40": { + "description": "GPIO21 / SCLK (PCM)", + "number": 40 + } + }, + "attributes": { + "group": "types" + } + }, + { + "signature": "enum pull_up_down {PUD_OFF = 0,PUD_DOWN = 1,PUD_UP = 2};", + "name": "pull_up_down", + "description": "GPIO Pull-up/Pull-down Configurations:", + "brief": null, + "constants": { + "PUD_OFF": { + "description": "No pull-up or pull-down resistor.", + "number": 0 + }, + "PUD_DOWN": { + "description": "Enable pull-down resistor.", + "number": 1 + }, + "PUD_UP": { + "description": "Enable pull-up resistor.", + "number": 2 + } + }, + "attributes": { + "group": "types" + } } ], "defines": [ @@ -54816,7 +55142,7 @@ "group": "utilities", "brief": "SplashKit provides miscellaneous utilities for unclassified functionality.", "description": null, - "parsed_at": 1703651205, + "parsed_at": 1706101783, "path": "coresdk/src/coresdk/utils.h", "functions": [ { @@ -55024,7 +55350,7 @@ "group": "physics", "brief": "Provides vector functions to work on vectors.", "description": null, - "parsed_at": 1703651210, + "parsed_at": 1706101784, "path": "coresdk/src/coresdk/vector_2d.h", "functions": [ { @@ -56457,7 +56783,7 @@ "group": "networking", "brief": null, "description": null, - "parsed_at": 1703651212, + "parsed_at": 1706101785, "path": "coresdk/src/coresdk/web_client.h", "functions": [ { @@ -57052,7 +57378,7 @@ "group": "networking", "brief": null, "description": null, - "parsed_at": 1703651217, + "parsed_at": 1706101786, "path": "coresdk/src/coresdk/web_server.h", "functions": [ { @@ -58771,7 +59097,7 @@ "group": "windows", "brief": "Window Manager in SplashKit can be used create, and manipulate\ngraphics windows", "description": null, - "parsed_at": 1703651224, + "parsed_at": 1706101788, "path": "coresdk/src/coresdk/window_manager.h", "functions": [ { diff --git a/projects/Xcode/splashkit.xcodeproj/project.pbxproj b/projects/Xcode/splashkit.xcodeproj/project.pbxproj index 7a43a24f..058a2b13 100644 --- a/projects/Xcode/splashkit.xcodeproj/project.pbxproj +++ b/projects/Xcode/splashkit.xcodeproj/project.pbxproj @@ -2232,7 +2232,7 @@ ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "-static", - "-lncurses", + ); PRODUCT_NAME = "$(TARGET_NAME)"; WARNING_CFLAGS = "-Wall"; @@ -2277,7 +2277,7 @@ ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ( "-static", - "-lncurses", + ); PRODUCT_NAME = "$(TARGET_NAME)"; WARNING_CFLAGS = "-Wall"; @@ -2297,7 +2297,6 @@ ); OTHER_LDFLAGS = ( "-lcurl", - "-lncurses", ); PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -2316,7 +2315,6 @@ ); OTHER_LDFLAGS = ( "-lcurl", - "-lncurses", ); PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -2532,7 +2530,6 @@ "-ferror-limit=9999", ); OTHER_LDFLAGS = ( - "-lncurses", "-lcurl", ); PRODUCT_NAME = "$(TARGET_NAME)"; @@ -2564,7 +2561,6 @@ "-ferror-limit=9999", ); OTHER_LDFLAGS = ( - "-lncurses", "-lcurl", ); PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/projects/cmake/CMakeLists.txt b/projects/cmake/CMakeLists.txt index a80ecdaa..85a1cc26 100644 --- a/projects/cmake/CMakeLists.txt +++ b/projects/cmake/CMakeLists.txt @@ -17,6 +17,9 @@ if (WIN32 OR MSYS OR MINGW) add_definitions(-DWINDOWS) endif() +# Check for Raspberry Pi +include(CheckIncludeFile) +find_path(BCM_HOST_INCLUDE_DIR bcm_host.h PATHS "/opt/vc/include") #### SETUP #### if (APPLE) # MAC OS PROJECT FLAGS @@ -97,6 +100,60 @@ else() -lstdc++fs") endif() +if (BCM_HOST_INCLUDE_DIR) + message("Raspberry Pi detected") + + find_path(pigpio_INCLUDE_DIR NAMES pigpio.h pigpiod_if.h pigpiod_if2.h HINTS /usr/include) + + # Find the pigpio libraries. + find_library(pigpio_LIBRARY NAMES libpigpio.so HINTS /usr/lib) + + find_library(pigpiod_if_LIBRARY NAMES libpigpiod_if.so HINTS /usr/lib) + find_library(pigpiod_if2_LIBRARY NAMES libpigpiod_if2.so HINTS /usr/lib) + if(pigpiod_if2_LIBRARY) + set(pigpiod_if_LIBRARY ${pigpiod_if2_LIBRARY}) + # target_link_libraries(SplashKitBackend ${LIB_FLAGS} pigpiod_if2) + endif() + + + + # Add necessary directories for Raspberry Pi + include_directories(/usr/include) + # target_link_libraries(/usr/lib) + # target_link_libraries(SplashKitBackend ${LIB_FLAGS} pigpio) + link_directories(/user/lib) + # include_directories("/opt/vc/include") + + # link_directories("/opt/vc/lib") + set(LIB_FLAGS "-lSDL2 \ + -lSDL2_mixer \ + -lSDL2_ttf \ + -lSDL2_gfx \ + -lSDL2_image \ + -lSDL2_net \ + -lpthread \ + -lbz2 \ + -lFLAC \ + -lvorbis \ + -lz \ + -lpng16 \ + -lvorbisfile \ + -logg \ + -lwebp \ + -lfreetype \ + -lcurl \ + -ldl \ + -lstdc++fs\ + -lpigpiod_if2") +# Add -Wall and -pthread options +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") + # Define RASPBERRY_PI + add_definitions(-DRASPBERRY_PI) +else() + message("Raspberry Pi not detected") +endif() + + # FLAGS set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") diff --git a/tools/scripts/deploy-website.sh b/tools/scripts/deploy-website.sh index e42fe805..1959ab9f 100644 --- a/tools/scripts/deploy-website.sh +++ b/tools/scripts/deploy-website.sh @@ -2,7 +2,15 @@ # Website Redeployment Script # Purpose: Automate the redeployment of the website after api.json is regenerated. + # Configuration +## If you face any issues with the script, like $'\r': command not found +## try running the following command in your terminal: +## sudo apt-get install dos2unix +## dos2unix deploy-website.sh +## chmod +x deploy-website.sh +## ./deploy-website.sh + USER="splashkit" SK_ROOT="$(cd ../../ && pwd)" SK_GENERATED="$SK_ROOT/generated"