Add documentation for dancing dragon extensions
This commit is contained in:
parent
1856e677a3
commit
8fa94c0390
|
@ -0,0 +1,64 @@
|
|||
SDL = {
|
||||
:UNKNOWN => 0x00,
|
||||
:A => 0x04, :B => 0x05, :C => 0x06, :D => 0x07,
|
||||
:E => 0x08, :F => 0x09, :G => 0x0A, :H => 0x0B,
|
||||
:I => 0x0C, :J => 0x0D, :K => 0x0E, :L => 0x0F,
|
||||
:M => 0x10, :N => 0x11, :O => 0x12, :P => 0x13,
|
||||
:Q => 0x14, :R => 0x15, :S => 0x16, :T => 0x17,
|
||||
:U => 0x18, :V => 0x19, :W => 0x1A, :X => 0x1B,
|
||||
:Y => 0x1C, :Z => 0x1D, :N1 => 0x1E, :N2 => 0x1F,
|
||||
:N3 => 0x20, :N4 => 0x21, :N5 => 0x22, :N6 => 0x23,
|
||||
:N7 => 0x24, :N8 => 0x25, :N9 => 0x26, :N0 => 0x27,
|
||||
:RETURN => 0x28, :ESCAPE => 0x29, :BACKSPACE => 0x2A, :TAB => 0x2B,
|
||||
:SPACE => 0x2C, :MINUS => 0x2D, :EQUALS => 0x2E, :LEFTBRACKET => 0x2F,
|
||||
:RIGHTBRACKET => 0x30, :BACKSLASH => 0x31, :NONUSHASH => 0x32, :SEMICOLON => 0x33,
|
||||
:APOSTROPHE => 0x34, :GRAVE => 0x35, :COMMA => 0x36, :PERIOD => 0x37,
|
||||
:SLASH => 0x38, :CAPSLOCK => 0x39, :F1 => 0x3A, :F2 => 0x3B,
|
||||
:F3 => 0x3C, :F4 => 0x3D, :F5 => 0x3E, :F6 => 0x3F,
|
||||
:F7 => 0x40, :F8 => 0x41, :F9 => 0x42, :F10 => 0x43,
|
||||
:F11 => 0x44, :F12 => 0x45, :PRINTSCREEN => 0x46, :SCROLLLOCK => 0x47,
|
||||
:PAUSE => 0x48, :INSERT => 0x49, :HOME => 0x4A, :PAGEUP => 0x4B,
|
||||
:DELETE => 0x4C, :END => 0x4D, :PAGEDOWN => 0x4E, :RIGHT => 0x4F,
|
||||
:LEFT => 0x50, :DOWN => 0x51, :UP => 0x52, :NUMLOCKCLEAR => 0x53,
|
||||
:KP_DIVIDE => 0x54, :KP_MULTIPLY => 0x55, :KP_MINUS => 0x56, :KP_PLUS => 0x57,
|
||||
:KP_ENTER => 0x58, :KP_1 => 0x59, :KP_2 => 0x5A, :KP_3 => 0x5B,
|
||||
:KP_4 => 0x5C, :KP_5 => 0x5D, :KP_6 => 0x5E, :KP_7 => 0x5F,
|
||||
:KP_8 => 0x60, :KP_9 => 0x61, :KP_0 => 0x62, :KP_PERIOD => 0x63,
|
||||
:NONUSBACKSLASH => 0x64, :APPLICATION => 0x65, :POWER => 0x66, :KP_EQUALS => 0x67,
|
||||
:F13 => 0x68, :F14 => 0x69, :F15 => 0x6A, :F16 => 0x6B,
|
||||
:F17 => 0x6C, :F18 => 0x6D, :F19 => 0x6E, :F20 => 0x6F,
|
||||
:F21 => 0x70, :F22 => 0x71, :F23 => 0x72, :F24 => 0x73,
|
||||
:EXECUTE => 0x74, :HELP => 0x75, :MENU => 0x76, :SELECT => 0x77,
|
||||
:STOP => 0x78, :AGAIN => 0x79, :UNDO => 0x7A, :CUT => 0x7B,
|
||||
:COPY => 0x7C, :PASTE => 0x7D, :FIND => 0x7E, :MUTE => 0x7F,
|
||||
:VOLUMEUP => 0x80, :VOLUMEDOWN => 0x81, :LOCKINGCAPSLOCK => 0x82, :LOCKINGNUMLOCK => 0x83,
|
||||
:LOCKINGSCROLLLOCK => 0x84, :KP_COMMA => 0x85, :KP_EQUALSAS400 => 0x86, :INTERNATIONAL1 => 0x87,
|
||||
:INTERNATIONAL2 => 0x88, :INTERNATIONAL3 => 0x89, :INTERNATIONAL4 => 0x8A, :INTERNATIONAL5 => 0x8B,
|
||||
:INTERNATIONAL6 => 0x8C, :INTERNATIONAL7 => 0x8D, :INTERNATIONAL8 => 0x8E, :INTERNATIONAL9 => 0x8F,
|
||||
:LANG1 => 0x90, :LANG2 => 0x91, :LANG3 => 0x92, :LANG4 => 0x93,
|
||||
:LANG5 => 0x94, :LANG6 => 0x95, :LANG7 => 0x96, :LANG8 => 0x97,
|
||||
:LANG9 => 0x98, :ALTERASE => 0x99, :SYSREQ => 0x9A, :CANCEL => 0x9B,
|
||||
:CLEAR => 0x9C, :PRIOR => 0x9D, :RETURN2 => 0x9E, :SEPARATOR => 0x9F,
|
||||
:OUT => 0xA0, :OPER => 0xA1, :CLEARAGAIN => 0xA2, :CRSEL => 0xA3,
|
||||
:EXSEL => 0xA4, :KP_00 => 0xB0, :KP_000 => 0xB1, :THOUSANDSSEPARATOR => 0xB2,
|
||||
:DECIMALSEPARATOR => 0xB3, :CURRENCYUNIT => 0xB4, :CURRENCYSUBUNIT => 0xB5, :KP_LEFTPAREN => 0xB6,
|
||||
:KP_RIGHTPAREN => 0xB7, :KP_LEFTBRACE => 0xB8, :KP_RIGHTBRACE => 0xB9, :KP_TAB => 0xBA,
|
||||
:KP_BACKSPACE => 0xBB, :KP_A => 0xBC, :KP_B => 0xBD, :KP_C => 0xBE,
|
||||
:KP_D => 0xBF, :KP_E => 0xC0, :KP_F => 0xC1, :KP_XOR => 0xC2,
|
||||
:KP_POWER => 0xC3, :KP_PERCENT => 0xC4, :KP_LESS => 0xC5, :KP_GREATER => 0xC6,
|
||||
:KP_AMPERSAND => 0xC7, :KP_DBLAMPERSAND => 0xC8, :KP_VERTICALBAR => 0xC9, :KP_DBLVERTICALBAR => 0xCA,
|
||||
:KP_COLON => 0xCB, :KP_HASH => 0xCC, :KP_SPACE => 0xCD, :KP_AT => 0xCE,
|
||||
:KP_EXCLAM => 0xCF, :KP_MEMSTORE => 0xD0, :KP_MEMRECALL => 0xD1, :KP_MEMCLEAR => 0xD2,
|
||||
:KP_MEMADD => 0xD3, :KP_MEMSUBTRACT => 0xD4, :KP_MEMMULTIPLY => 0xD5, :KP_MEMDIVIDE => 0xD6,
|
||||
:KP_PLUSMINUS => 0xD7, :KP_CLEAR => 0xD8, :KP_CLEARENTRY => 0xD9, :KP_BINARY => 0xDA,
|
||||
:KP_OCTAL => 0xDB, :KP_DECIMAL => 0xDC, :KP_HEXADECIMAL => 0xDD, :LCTRL => 0xE0,
|
||||
:LSHIFT => 0xE1, :LALT => 0xE2, :LGUI => 0xE3, :RCTRL => 0xE4,
|
||||
:RSHIFT => 0xE5, :RALT => 0xE6, :RGUI => 0xE7, :MODE => 0x101,
|
||||
:AUDIONEXT => 0x102, :AUDIOPREV => 0x103, :AUDIOSTOP => 0x104, :AUDIOPLAY => 0x105,
|
||||
:AUDIOMUTE => 0x106, :MEDIASELECT => 0x107, :WWW => 0x108, :MAIL => 0x109,
|
||||
:CALCULATOR => 0x10A, :COMPUTER => 0x10B, :AC_SEARCH => 0x10C, :AC_HOME => 0x10D,
|
||||
:AC_BACK => 0x10E, :AC_FORWARD => 0x10F, :AC_STOP => 0x110, :AC_REFRESH => 0x111,
|
||||
:AC_BOOKMARKS => 0x112, :BRIGHTNESSDOWN => 0x113, :BRIGHTNESSUP => 0x114, :DISPLAYSWITCH => 0x115,
|
||||
:KBDILLUMTOGGLE => 0x116, :KBDILLUMDOWN => 0x117, :KBDILLUMUP => 0x118, :EJECT => 0x119,
|
||||
:SLEEP => 0x11A, :APP1 => 0x11B, :APP2 => 0x11C,
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
# mkxp extenions for Dancing Dragon Games / Symphony of War
|
||||
|
||||
## Graphics.resize_window(width, height, recenter)
|
||||
width: Integer
|
||||
height: Integer
|
||||
recenter: Boolean, false by default
|
||||
returns: nil
|
||||
|
||||
Resizes the game window to width x height. If `recenter` is **true**, also center the window on the current screen.
|
||||
|
||||
## Bitmap.write_to_png(filename)
|
||||
filename: String
|
||||
returns: self
|
||||
|
||||
Writes the contents of the bitmap to `filename`, in PNG format.
|
||||
|
||||
## Input.scroll_v()
|
||||
returns: Integer
|
||||
|
||||
Returns the cumulative amount of scroll events (negative if down, positive if up) inbetween the current and last `Input.update` call.
|
||||
|
||||
## Arbitrary key states
|
||||
Use `MKXP.raw_key_states` to get the current byte array of keystates, then call `#getbyte(scancode)` with `scancode` being one of the constants defined in `SDL_scancode_map.rb`. **0** means the key is released, **1** that it is pressed.
|
Loading…
Reference in New Issue