Resources for SmileBASIC
Category: Code Snippets
Perfectly Filled Circles
A lightweight function to fill a circle regardless of its position.
In 3.3, ACLS accepts 3 arguments, which disable some things when not 0
ACLS skipGraphics, skipSp...
Array insert and remove functions
These will work on any type of 1D array.
DEF INSERT ARRAY,POS%,VALUE
Drawing Ellipses on SmileBASIC
DEF ELLIPSE X,Y,SX,SY
FOR I=0TO 360:R2=R
Even More Perfectly Filled Circles
Pick this one lol
Simple Trigonometric Hue
Some hue algorithms can appear overly choppy when dealing with color blending.
Text-Only Loading Bar
A progress/loading bar, made from only text.
It's accurate to the nearest pixel
DEF TEXTBAR LENG...
Detect sleep mode or home menu
MILLISEC is a millisecond (1/1000) timer. It uses the 3DS's internal clock, which runs constantl...
faster FOR loop
Often people use something like FOR I=0 TO LEN(ARRAY)-1 to loop through an array, but this isn't...
Limit Variable to Range
variable=MIN(MAX(variable, minimum), maximum)[/b]
EPICYCLOID OriginX, OriginY, CentralRadius, TangentialRadius, ScaleFactor, ColorDEF EPICYCLOID X...
IBLUR (Instant Blur!)
Instantly blur graphics!
Deterministic Pseudorandom Number Generator
The same random number, every time.
Simple Menu Function
Function to allow the user to select an item from a list
ISINSTR (String Searching)
DEF block that produces a list of locations a substring appears in a string.
Auto Print Text On Screen
This is how to make a function that prints text out on the screen one character at a time.
Getting MML DATA
MML DATA is usually formatted like:
DATA "more MML"
Alternate uses for (R)SORT
If you pass multiple arrays to SORT, it will sort the first array, then sort the others in the s...
Saving and Loading String Arrays
You can't easily save string arrays into a DAT file, but here's a way to convert a string array...
Color to Black and White Converter
color to black and white