This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from re import findall, sub | |
CPP_TYPE_SPECIFIERS = ("unsigned", "signed") | |
CPP_DATA_TYPES = ("bool", "char", "short", "int", "long") | |
CPP_TYPE_QUALIFIERS = ("const", "volatile") | |
def format_parameters(parameters: str) -> dict[str, str]: | |
"""Formats a functions's parameters. | |
TODO: maybe, just maybe, dont use regex? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cocos2d.h> | |
#include <gd.h> | |
class Layer : public gd::FLAlertLayer | |
{ | |
public: | |
CCMenu* m_pMenu{}; | |
void onEnter() override | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Python-like range function | |
* | |
* @param start {Number} Start value, inclusive, if end isn't provided, start is end | |
* @param end {Number|null} End value, exclusive, defaults to null | |
* @param step {Number} Step value, default to 1 | |
* @returns {Array} [start, start+step, start+step*2, ..., end - 1] | |
*/ | |
const range = (start, end=null, step=1) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Taken from https://gist.github.com/Sainan/e290bef8b482005a01f3444d3341ac5f | |
// and https://web.archive.org/web/20211024160434/https://pastebin.com/Kj9t38KF. | |
std::vector<std::string> radio_stations{ | |
"RADIO_11_TALK_02", // Blaine County Radio | |
"RADIO_12_REGGAE", // The Blue Ark | |
"RADIO_13_JAZZ", // Worldwide FM | |
"RADIO_14_DANCE_02", // FlyLo FM | |
"RADIO_15_MOTOWN", // The Lowdown 9.11 | |
"RADIO_20_THELAB", // The Lab |