diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e3b1e4c --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +.vs/ +*/#backups/* +*/Configs/*/* +*/options/*/* +*/extensions/*/*.cpp +*/extensions/*/*.dll +*/Debug/ +*/Release/ +Debug/ +Release/ +export/*.gmez +export/*.yymp +export/*.yymps +export/*.png +export/*.gmz +*.sdf +help.rtf +/Kinect/__gmxgen.h diff --git a/Kinect.gmx/Configs/Default.config.gmx b/Kinect.gmx/Configs/Default.config.gmx new file mode 100644 index 0000000..9b02364 --- /dev/null +++ b/Kinect.gmx/Configs/Default.config.gmx @@ -0,0 +1,659 @@ + + + + False + 0 + 0 + false + + MoPub + 0 + 0 + 0 + True + True + True + false + false + True + 23.0.1 + 0 + 0 + 23 + Kinect + + + 0 + 0 + 0 + false + 0 + 0 + 0 + + + -1 + Configs\Default\android\icons\icon_hdpi.png + Configs\Default\android\icons\icon_ldpi.png + Configs\Default\android\icons\icon_mdpi.png + Configs\Default\android\icons\icon_xhdpi.png + Configs\Default\android\icons\icon_xxhdpi.png + Configs\Default\android\icons\icon_xxxhdpi.png + auto + -1 + 0 + + -1 + 1 + 9 + 0 + 0 + 0 + 0 + True + True + True + True + 2 + Configs\Default\android\icons\ouyaIcon.png + companyname + com + Kinect + 8 + Configs\Default\android\portrait_splash.png + 0 + + -1 + + 4 + Configs\Default\android\splash.png + 0 + 23.1.1 + 23 + 1024 + false + 0 + false + false + + MoPub + 0 + true + true + false + false + false + True + True + True + false + false + True + Configs\Default\amazonfire\icons\background.png + Configs\Default\amazonfire\icons\banner.png + 23.0.1 + 0 + 0 + 23 + Kinect + + + false + false + 0 + 0 + + false + Configs\Default\amazonfire\icons\icon_hdpi.png + Configs\Default\amazonfire\icons\icon_ldpi.png + Configs\Default\amazonfire\icons\icon_mdpi.png + Configs\Default\amazonfire\icons\icon_xhdpi.png + Configs\Default\amazonfire\icons\icon_xxhdpi.png + Configs\Default\amazonfire\icons\icon_xxxhdpi.png + auto + true + true + Configs\Default\amazonfire\icons\large_icon.png + false + + 0 + 1 + 9 + 0 + 0 + True + True + True + True + companyname + com + Kinect + 8 + Configs\Default\amazonfire\portrait_splash.png + 0 + + -1 + + Configs\Default\amazonfire\icons\small_icon.png + Configs\Default\amazonfire\splash.png + 0 + 23.1.1 + 23 + 1024 + false + 0 + false + false + + MoPub + 0 + true + true + false + false + 0 + True + True + True + false + false + True + Configs\Default\androidtv\icons\background.png + Configs\Default\androidtv\icons\banner.png + 23.0.1 + 0 + 0 + 23 + Kinect + + + 0 + false + 0 + 0 + + false + Configs\Default\androidtv\icons\icon_hdpi.png + Configs\Default\androidtv\icons\icon_ldpi.png + Configs\Default\androidtv\icons\icon_mdpi.png + Configs\Default\androidtv\icons\icon_xhdpi.png + Configs\Default\androidtv\icons\icon_xxhdpi.png + Configs\Default\androidtv\icons\icon_xxxhdpi.png + auto + true + -1 + Configs\Default\androidtv\icons\large_icon.png + 0 + + -1 + 1 + 0 + 0 + companyname + com + Kinect + 8 + 0 + + -1 + + Configs\Default\androidtv\icons\small_icon.png + Configs\Default\androidtv\splash.png + 23.1.1 + 1024 + false + True + 1 + + nil + False + false + false + true + 0 + Kinect by YellowAfterlife + True + 0 + + + false + False + false + 0 + nil + False + {6BEA397A-78FF-418A-B312-927A750F1EFD} + 855788849 + false + true + true + 2 + 0 + + Supersonic Ads + True + False + Kinect by YellowAfterlife + False + + + 0 + 0 + + html5game + 0 + 0 + + Configs\Default\html5\fav.ico + -1 + -1 + + -1 + True + True + index.html + -1 + True + Configs\Default\html5\splash.png + 2048 + 0 + True + False + nil + 0 + + True + false + false + + iAds + + 0 + < Press refresh to fetch certificate list from Mac> + 3 + Kinect + + + 0 + false + + false + + + 0 + Configs\Default\ios\icons\icon114.png + Configs\Default\ios\icons\icon120.png + Configs\Default\ios\icons\icon144.png + Configs\Default\ios\icons\icon152.png + Configs\Default\ios\icons\icon167.png + Configs\Default\ios\icons\icon57.png + Configs\Default\ios\icons\icon72.png + Configs\Default\ios\icons\icon76.png + -1 + Configs\Default\ios\iPadRetinasplash.png + Configs\Default\ios\iPadRetinasplashPortrait.png + Configs\Default\ios\iPadsplash.png + Configs\Default\ios\iPadsplashPortrait.png + Configs\Default\ios\iPhone5splash.png + Configs\Default\ios\iPhone5splashPortrait.png + Configs\Default\ios\iPhone6splash.png + Configs\Default\ios\iPhone6splashPortrait.png + Configs\Default\ios\iPhone6Plussplash.png + Configs\Default\ios\iPhone6PlussplashPortrait.png + Configs\Default\ios\IphoneRetinasplash.png + Configs\Default\ios\IphoneRetinasplashPortrait.png + Configs\Default\ios\iPhonesplash.png + Configs\Default\ios\iPhonesplashPortrait.png + 1 + 0 + -1 + -1 + -1 + -1 + + 0 + -1 + + Configs\Default\ios\splash.png + 0 + + 1024 + false + + Kinect + 0 + 0 + http://www.Kinect.com + Configs\Default\linux\icon64.png + -1 + Kinect + + -1 + -1 + Kinect + 0 + Configs\Default\linux\splash.png + 0 + 0 + 2048 + 0 + 1 + 0 + 255 + nil + false + + + 0 + 0 + 0 + (c)2016 CompanyName Ltd... + 0 + Kinect + 0 + 0 + 0 + Configs\Default\mac\icon512.png + -1 + 1 + 0 + 0 + ~/GameMaker-Studio/Kinect + -1 + -1 + -1 + Developer ID Application: + 0 + Configs\Default\mac\splash.png + 0 + 0 + + 2048 + false + false + true + 0 + 0 + -1 + + + + IV0002-NPXS00020_00-GAMEMAKERGAME001 + 0xc0a3b3641c2ad1ef23153a48a3e12fe7 + -1 + 2048 + 01.00 + 0 + 0 + -1 + 1 + 0 + + + IV0002-NPXS29129_00-APP0990000000022 + GvE6xCpZxd96scOUGuLPbuLp8O800B0s + 0 + -1 + 2048 + 0 + 0 + -1 + 1 + 0 + + + + EP9000-NPXB01693_00-GMSTUDIORUNNER00 + 5MHZUpPpbQLKAkttvpJzA6EaWgsiWv1w + 0 + 0 + -1 + 2048 + true + 0 + true + -1 + true + 0 + + True + true + True + True + 1 + False + false + 0 + 2 + 0 + <none> + 0 + 9223372036854775807 + 1 + Default + http://yourdomain/Kinect + 0 + Kinect + 0 + + 0 + + + Configs\Default\tizen\icon117.png + -1 + 1 + 0 + + 0 + 0 + 0 + Configs\Default\tizen\splash.png + 1024 + False + + 0 + < Press refresh to fetch certificate list from Mac> + Kinect + Configs\Default\tvos\icons\icon1280.png + Configs\Default\tvos\icons\icon400.png + -1 + 1 + 0 + -1 + Configs\Default\tvos\splash.png + 0 + 2048 + False + True + False + 100 + 0 + + YellowAfterlife + + 1 + 0 + Kinect + 0 + + 0 + + 0 + + 0 + + 0 + Windows8_TemporaryKey.pfx + Kinect + 0 + -1 + -1 + -1 + Configs\Default\Windows8\logos\logo150.png + #000000 + light + 1 + 0 + 0 + Win8NativeRunner_TemporaryKey.pfx + x86 + YourPackageDisplayName + YourPackageName + -1 + -1 + YourPublisherName + CN=YoyoGames + 0 + false + 0 + Configs\Default\Windows8\logos\logo30.png + #000000 + Configs\Default\Windows8\splashscreen.png + Configs\Default\Windows8\logos\logo50.png + 1024 + Configs\Default\Windows8\logos\logo310.png + 0 + 0 + WinUWPRunner_TemporaryKey.pfx + Kinect + 0 + 0 + -1 + -1 + -1 + Configs\Default\WindowsUAP\logos\LargeLogo.scale-100.png + Configs\Default\WindowsUAP\logos\Logo.scale-100.png + #000000 + light + 1 + 0 + 0 + x86 + YourPackageDisplayName + YourPackageName + -1 + -1 + YourPublisherName + CN=Sandbox + 0 + false + 0 + Configs\Default\WindowsUAP\logos\SmallLogo.scale-100.png + Configs\Default\WindowsUAP\logos\SmallishLogo.scale-100.png + #000000 + Configs\Default\WindowsUAP\SplashScreen.scale-100.png + Configs\Default\WindowsUAP\logos\StoreLogo.scale-100.png + 1024 + Configs\Default\WindowsUAP\logos\WideLogo.scale-100.png + clBlack + False + 0 + + YellowAfterlife + False + + 0 + Configs\Default\windows\runner_icon.ico + Configs\Default\windows\License.txt + 0 + 1 + Configs\Default\windows\RunnerInstaller.nsi + Kinect + 0 + Configs\Default\windows\Runner_finish.bmp + Configs\Default\windows\Runner_header.bmp + 0 + 1 + #000000 + Configs\Default\windows\splash.png + 0 + 2048 + 0 + 1 + Configs\Default\WinPhone\SplashScreenImage480.jpg + Configs\Default\WinPhone\SplashScreenImage720.jpg + Configs\Default\WinPhone\SplashScreenImage.jpg + + 0 + + 0 + + You + 0 + Configs\Default\WinPhone\CycleSmall.png + Configs\Default\WinPhone\CycleWide1.png + Configs\Default\WinPhone\CycleWide2.png + Configs\Default\WinPhone\CycleWide3.png + Configs\Default\WinPhone\CycleWide4.png + Configs\Default\WinPhone\CycleWide5.png + Configs\Default\WinPhone\CycleWide6.png + Configs\Default\WinPhone\CycleWide7.png + Configs\Default\WinPhone\CycleWide8.png + Configs\Default\WinPhone\CycleWide9.png + YourDescription + Kinect + + + Configs\Default\WinPhone\FlipMedBack.png + Configs\Default\WinPhone\FlipMedFront.png + FlipSmallBack.png + Configs\Default\WinPhone\FlipSmallFront.png + Configs\Default\WinPhone\FlipWideBack.png + Configs\Default\WinPhone\FlipWideFront.png + 0 + + 1 + 0 + + Configs\Default\WinPhone\ApplicationIcon.png + #000000 + + Configs\Default\WinPhone\IconicSmall.png + + + + Configs\Default\WinPhone\IconicWide.png + -1 + -1 + -1 + 1 + 0 + -1 + YourPublisherName + f47823f0-220d-459a-bf68-b6ea984b24a8 + -1 + 0 + -1 + -1 + -1 + -1 + 1024 + 0 + False + #464646 + 0 + Your Description + Kinect + -1 + light + -1 + "<!-- Add languages you support here -->","<!-- os_get_language will only return languages listed -->","<!-- ""en"" is supported by default -->","<!-- See ""NLS APIs and Localization"" white paper -->","<!-- from developer.xboxlive.com for info -->" + 1 + 0 + + + Company Name + Company Display Name + "<mx:Ratings Category=""game"">","<!-- Insert your title ratings here -->","<!-- See ""Title Ratings for Xbox One"" white paper -->","<!-- from developer.xboxlive.com for details -->",</mx:Ratings> + False + False + True + 0 + -1 + 1234ABCD-1234-1234-1234-123456789ABC + #464646 + 1024 + 1234ABCD + + + diff --git a/Kinect.gmx/Kinect.project.gmx b/Kinect.gmx/Kinect.project.gmx new file mode 100644 index 0000000..591eabe --- /dev/null +++ b/Kinect.gmx/Kinect.project.gmx @@ -0,0 +1,34 @@ + + + + Configs\Default + + + + extensions\Kinect + + + + + + + + + + fonts\fnt_test + + + objects\obj_test + + + rooms\rm_test + + + help.rtf + + + 0 + + 0 + + diff --git a/Kinect.gmx/extensions/Kinect.extension.gmx b/Kinect.gmx/extensions/Kinect.extension.gmx new file mode 100644 index 0000000..782801e --- /dev/null +++ b/Kinect.gmx/extensions/Kinect.extension.gmx @@ -0,0 +1,441 @@ + + + Kinect + 1.0.0 + + + 18/02/17 + Proprietary + + + + + + + + + + + + + + + + + + + + 113497714299118 + + + + + + + Kinect.dll + extensions\Kinect.dll + + + 1 + 0 + + + 9223372036854775807 + + + + + + kinect_init_raw + kinect_init_raw + 1 + kinect_init_raw() + 2 + 0 + + + + kinect_open + kinect_open + 1 + kinect_open() + 2 + 0 + + + + kinect_close + kinect_close + 1 + kinect_close() + 2 + 0 + + + + kinect_get_frame_description_raw + kinect_get_frame_description_raw + 11 + + 2 + 2 + + 1 + 2 + + + + kinect_reader_open + kinect_reader_open + 1 + kinect_reader_open(_source_types) + 2 + 1 + + 2 + + + + kinect_reader_close + kinect_reader_close + 1 + kinect_reader_close() + 2 + 0 + + + + kinect_reader_acquire_frame + kinect_reader_acquire_frame + 1 + kinect_reader_acquire_frame() + 2 + 0 + + + + kinect_reader_release_frame + kinect_reader_release_frame + 1 + kinect_reader_release_frame() + 2 + 0 + + + + kinect_reader_copy_raw_color_data_ + kinect_reader_copy_raw_color_data_ + 11 + + 2 + 2 + + 1 + 2 + + + + kinect_reader_get_raw_color_data_format + kinect_reader_get_raw_color_data_format + 1 + kinect_reader_get_raw_color_data_format() + 2 + 0 + + + + kinect_reader_copy_converted_color_data_ + kinect_reader_copy_converted_color_data_ + 11 + + 2 + 3 + + 1 + 2 + 2 + + + + kinect_reader_copy_raw_depth_data_ + kinect_reader_copy_raw_depth_data_ + 11 + + 2 + 2 + + 1 + 2 + + + + kinect_reader_copy_converted_depth_data_ + kinect_reader_copy_converted_depth_data_ + 11 + + 2 + 3 + + 1 + 2 + 1 + + + + kinect_reader_copy_raw_infrared_data_ + kinect_reader_copy_raw_infrared_data_ + 11 + + 2 + 2 + + 1 + 2 + + + + kinect_reader_copy_converted_infrared_data_ + kinect_reader_copy_converted_infrared_data_ + 11 + + 2 + 3 + + 1 + 2 + 1 + + + + + + kinect_source_color + 1 + 0 + + + kinect_source_infrared + 2 + 0 + + + kinect_source_infrared_long_exposure + 4 + 0 + + + kinect_source_depth + 8 + 0 + + + kinect_color_image_format_none + 0 + 0 + + + kinect_color_image_format_rgba + 1 + 0 + + + kinect_color_image_format_yuv + 2 + 0 + + + kinect_color_image_format_bgra + 3 + 0 + + + kinect_color_image_format_bayer + 4 + 0 + + + kinect_color_image_format_yuy2 + 5 + 0 + + + + + kinect_core.gml + extensions\gml.gml + + + 2 + 0 + + + 9223372036854775807 + + + + + + kinect_init + kinect_init + 11 + + 2 + 0 + + + + kinect_struct_create + kinect_struct_create + 11 + + 2 + -1 + + + + kinect_struct_read + kinect_struct_read + 11 + + 2 + 2 + + 2 + 2 + + + + kinect_get_frame_description + kinect_get_frame_description + 2 + kinect_get_frame_description(kind)->kinect_frame_description + 2 + 1 + + 2 + + + + kinect_reader_copy_raw_color_data + kinect_reader_copy_raw_color_data + 2 + kinect_reader_copy_raw_color_data(out:buffer) + 2 + 1 + + 2 + + + + kinect_reader_copy_converted_color_data + kinect_reader_copy_converted_color_data + 2 + kinect_reader_copy_converted_color_data(out:buffer, format) + 2 + 2 + + 2 + 2 + + + + kinect_reader_copy_converted_depth_data + kinect_reader_copy_converted_depth_data + 2 + kinect_reader_copy_converted_depth_data(out:buffer, min:number, max:number, col:number) + 2 + 4 + + 2 + 2 + 2 + 2 + + + + kinect_reader_copy_converted_infrared_data + kinect_reader_copy_converted_infrared_data + 2 + kinect_reader_copy_converted_infrared_data(out:buffer, min:number, max:number, col:number) + 2 + 4 + + 2 + 2 + 2 + 2 + + + + + + kinect_struct_ptr + buffer_get_address(kinect_struct_buf) + -1 + + + + + kinect_structs.gml + extensions\Kinect_structs.gml + + + 2 + 0 + + + 9223372036854775807 + + + + + + kinect_init_structs + kinect_init_structs + 11 + + 2 + 0 + + + + + + kinect_frame_description_width + 0 + 0 + + + kinect_frame_description_height + 1 + 0 + + + kinect_frame_description_horizontalFieldOfView + 2 + 0 + + + kinect_frame_description_verticalFieldOfView + 3 + 0 + + + kinect_frame_description_diagonalFieldOfView + 4 + 0 + + + kinect_frame_description_lengthInPixels + 5 + 0 + + + kinect_frame_description_bytesPerPixel + 6 + 0 + + + + + diff --git a/Kinect.gmx/extensions/Kinect/kinect_core.gml b/Kinect.gmx/extensions/Kinect/kinect_core.gml new file mode 100644 index 0000000..407e19b --- /dev/null +++ b/Kinect.gmx/extensions/Kinect/kinect_core.gml @@ -0,0 +1,89 @@ +#define kinect_init +//#macro kinect_struct_ptr buffer_get_address(kinect_struct_buf)~ +if (!kinect_init_raw()) show_debug_message("Failed to load Kinect dll"); +kinect_init_structs(); +globalvar kinect_struct_buf; kinect_struct_buf = buffer_create(1024, buffer_grow, 1); + +#define kinect_struct_create +/// (...pairs)~ +var _argc = argument_count; +var _size = _argc div 2; +var _types = array_create(_size); +var k = 0; +/* GMS >= 2.3: +var _names = array_create(_size); +var _out = { names: _names, types: _types }; +for (var i = 0; i < argument_count; i += 2) { + _names[@k] = argument[i]; + _types[@k] = argument[i + 1]; + k += 1; +} +return _out; +/*/ +for (var i = 0; i < argument_count; i += 2) { + _types[k] = argument[i + 1]; + k += 1; +} +return _types; +//*/ + +#define kinect_struct_read +/// (status, struct_t)~ +var _status = argument0, _proto = argument1; +if (_status <= 0) return undefined; +var _buf = kinect_struct_buf; +buffer_seek(_buf, buffer_seek_start, 0); +/* GMS >= 2.3: +var _types = _proto.types; +var _names = _proto.names; +var _size = array_length(_types); +var _obj = {}; +for (var i = 0; i < _size; i++) { + variable_struct_set(_obj, _names[i], buffer_read(_buf, _types[i])); +} +return _obj; +/*/ +var _size = array_length_1d(_proto); +var _arr = array_create(_size); +for (var i = 0; i < _size; i++) { + _arr[i] = buffer_read(_buf, _proto[i]); +} +return _arr; +//*/ + +#define kinect_get_frame_description +/// (kind)->kinect_frame_description +return kinect_struct_read( + kinect_get_frame_description_raw(kinect_struct_ptr, argument0), + global.__kinect_frame_description +); + +#define kinect_reader_copy_raw_color_data +/// (out:buffer) +var _buf = argument0; +return kinect_reader_copy_raw_color_data_(buffer_get_address(_buf), buffer_get_size(_buf)); + +#define kinect_reader_copy_converted_color_data +/// (out:buffer, format) +var _buf = argument0, _format = argument1; +return kinect_reader_copy_converted_color_data_(buffer_get_address(_buf), buffer_get_size(_buf), _format); + +#define kinect_reader_copy_converted_depth_data +/// (out:buffer, min:number, max:number, col:number) +var _out = argument0, _min = argument1, _max = argument2, _col = argument3; +var b = kinect_struct_buf; +buffer_seek(b, buffer_seek_start, 0); +buffer_write(b, buffer_f64, _min); +buffer_write(b, buffer_f64, _max); +buffer_write(b, buffer_u32, _col); +return kinect_reader_copy_converted_depth_data_(buffer_get_address(_out), buffer_get_size(_out), buffer_get_address(b)); + +#define kinect_reader_copy_converted_infrared_data +/// (out:buffer, min:number, max:number, col:number) +var _out = argument0, _min = argument1, _max = argument2, _col = argument3; +var b = kinect_struct_buf; +buffer_seek(b, buffer_seek_start, 0); +buffer_write(b, buffer_f64, _min); +buffer_write(b, buffer_f64, _max); +buffer_write(b, buffer_u32, _col); +return kinect_reader_copy_converted_infrared_data_(buffer_get_address(_out), buffer_get_size(_out), buffer_get_address(b)); diff --git a/Kinect.gmx/extensions/Kinect/kinect_structs.gml b/Kinect.gmx/extensions/Kinect/kinect_structs.gml new file mode 100644 index 0000000..49c916a --- /dev/null +++ b/Kinect.gmx/extensions/Kinect/kinect_structs.gml @@ -0,0 +1,19 @@ +#define kinect_init_structs +// NB! Much of this file is updated by GmxGen based on structs in C++ code +/// @hint {int} kinect_frame_description:width +/// @hint {int} kinect_frame_description:height +/// @hint {number} kinect_frame_description:horizontalFieldOfView +/// @hint {number} kinect_frame_description:verticalFieldOfView +/// @hint {number} kinect_frame_description:diagonalFieldOfView +/// @hint {int} kinect_frame_description:lengthInPixels +/// @hint {int} kinect_frame_description:bytesPerPixel +// GMS < 2.3: +//#macro kinect_frame_description_width 0 +//#macro kinect_frame_description_height 1 +//#macro kinect_frame_description_horizontalFieldOfView 2 +//#macro kinect_frame_description_verticalFieldOfView 3 +//#macro kinect_frame_description_diagonalFieldOfView 4 +//#macro kinect_frame_description_lengthInPixels 5 +//#macro kinect_frame_description_bytesPerPixel 6 +//*/ +global.__kinect_frame_description = kinect_struct_create("width", buffer_s32, "height", buffer_s32, "horizontalFieldOfView", buffer_f32, "verticalFieldOfView", buffer_f32, "diagonalFieldOfView", buffer_f32, "lengthInPixels", buffer_u32, "bytesPerPixel", buffer_u32); diff --git a/Kinect.gmx/fonts/fnt_test.font.gmx b/Kinect.gmx/fonts/fnt_test.font.gmx new file mode 100644 index 0000000..da8bc6e --- /dev/null +++ b/Kinect.gmx/fonts/fnt_test.font.gmx @@ -0,0 +1,117 @@ + + + Ubuntu Condensed SemiItalic + 24 + 0 + 0 + 0 + 1 + 0 + 0 + + + 0 + + + 32,126 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fnt_test.png + diff --git a/Kinect.gmx/fonts/fnt_test.png b/Kinect.gmx/fonts/fnt_test.png new file mode 100644 index 0000000..f7e73fc Binary files /dev/null and b/Kinect.gmx/fonts/fnt_test.png differ diff --git a/Kinect.gmx/objects/obj_test.object.gmx b/Kinect.gmx/objects/obj_test.object.gmx new file mode 100644 index 0000000..156e2c8 --- /dev/null +++ b/Kinect.gmx/objects/obj_test.object.gmx @@ -0,0 +1,92 @@ + + + <undefined> + 0 + -1 + 0 + 0 + <undefined> + <undefined> + + + + 1 + 603 + 7 + 0 + 0 + -1 + 2 + + + self + 0 + 0 + + + 1 + + + + + + + + 1 + 603 + 7 + 0 + 0 + -1 + 2 + + + self + 0 + 0 + + + 1 + + + + + + + + 1 + 603 + 7 + 0 + 0 + -1 + 2 + + + self + 0 + 0 + + + 1 + draw_set_font(fnt_test); +draw_set_color(c_white); + + + + + + + 0 + 0 + 0 + 0.5 + 0.100000001490116 + 0 + 0.100000001490116 + 0.100000001490116 + 0.200000002980232 + -1 + 0 + + diff --git a/Kinect.gmx/rooms/rm_test.room.gmx b/Kinect.gmx/rooms/rm_test.room.gmx new file mode 100644 index 0000000..905bda4 --- /dev/null +++ b/Kinect.gmx/rooms/rm_test.room.gmx @@ -0,0 +1,65 @@ + + + + 480 + 272 + 32 + 32 + 0 + 30 + 0 + 12951176 + -1 + + 0 + -1 + -1 + + -1 + 1024 + 600 + -1 + -1 + -1 + -1 + -1 + 0 + 0 + -1 + 4 + 0 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + 1024 + 768 + 0 + 10 + 0.100000001490116 + diff --git a/Kinect.gmx/scripts/trace.gml b/Kinect.gmx/scripts/trace.gml new file mode 100644 index 0000000..8317ec0 --- /dev/null +++ b/Kinect.gmx/scripts/trace.gml @@ -0,0 +1,6 @@ +/// trace(...) +var r = string(argument[0]); +for (var i = 1; i < argument_count; i++) { + r += " " + string(argument[i]); +} +show_debug_message(r); diff --git a/Kinect.sln b/Kinect.sln new file mode 100644 index 0000000..b308403 --- /dev/null +++ b/Kinect.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29424.173 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Kinect", "Kinect\Kinect.vcxproj", "{EA16C6EF-C7F3-42BC-A4AC-EBEE2E84C450}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EA16C6EF-C7F3-42BC-A4AC-EBEE2E84C450}.Debug|x64.ActiveCfg = Debug|x64 + {EA16C6EF-C7F3-42BC-A4AC-EBEE2E84C450}.Debug|x64.Build.0 = Debug|x64 + {EA16C6EF-C7F3-42BC-A4AC-EBEE2E84C450}.Debug|x86.ActiveCfg = Debug|Win32 + {EA16C6EF-C7F3-42BC-A4AC-EBEE2E84C450}.Debug|x86.Build.0 = Debug|Win32 + {EA16C6EF-C7F3-42BC-A4AC-EBEE2E84C450}.Release|x64.ActiveCfg = Release|x64 + {EA16C6EF-C7F3-42BC-A4AC-EBEE2E84C450}.Release|x64.Build.0 = Release|x64 + {EA16C6EF-C7F3-42BC-A4AC-EBEE2E84C450}.Release|x86.ActiveCfg = Release|Win32 + {EA16C6EF-C7F3-42BC-A4AC-EBEE2E84C450}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8FCBDF72-1C64-42B3-B970-F6A254875BD6} + EndGlobalSection +EndGlobal diff --git a/Kinect/Kinect.APS b/Kinect/Kinect.APS new file mode 100644 index 0000000..9b02677 Binary files /dev/null and b/Kinect/Kinect.APS differ diff --git a/Kinect/Kinect.rc b/Kinect/Kinect.rc new file mode 100644 index 0000000..950337d Binary files /dev/null and b/Kinect/Kinect.rc differ diff --git a/Kinect/Kinect.vcxproj b/Kinect/Kinect.vcxproj new file mode 100644 index 0000000..7b7107b --- /dev/null +++ b/Kinect/Kinect.vcxproj @@ -0,0 +1,222 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {EA16C6EF-C7F3-42BC-A4AC-EBEE2E84C450} + Win32Proj + Kinect + 10.0 + + + + DynamicLibrary + true + v142 + Unicode + + + DynamicLibrary + false + v142 + true + Unicode + + + DynamicLibrary + true + v142 + Unicode + + + DynamicLibrary + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + $(KINECTSDK20_DIR)\inc;$(IncludePath) + $(KINECTSDK20_DIR)\lib\x86;$(LibraryPath) + + + true + $(KINECTSDK20_DIR)\lib\x64;$(LibraryPath) + $(KINECTSDK20_DIR)\inc;$(IncludePath) + + + false + $(KINECTSDK20_DIR)\inc;$(IncludePath) + $(KINECTSDK20_DIR)\lib\x86;$(LibraryPath) + + + false + $(KINECTSDK20_DIR)\inc;$(IncludePath) + $(KINECTSDK20_DIR)\lib\x64;$(LibraryPath) + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;Kinect_EXPORTS;%(PreprocessorDefinitions) + stdcpp17 + + + Windows + true + + + type "$(ProjectDir)kinect_*.h" "$(ProjectDir)kinect_*.cpp" > "$(ProjectDir)__gmxgen.h" + +cmd /C gmxgen "$(SolutionDir)$(AssemblyName)_23\extensions\$(AssemblyName)\$(AssemblyName).yy" $( +) --copy "$(TargetPath)" "$(AssemblyName).dll:$(PlatformTarget)" $( +) --copy "$(ProjectDir)__gmxgen.h" "$(AssemblyName).cpp" + +cmd /C gmxgen "$(SolutionDir)$(AssemblyName)_yy\extensions\$(AssemblyName)\$(AssemblyName).yy" $( +) --copy "$(SolutionDir)$(AssemblyName)_23\extensions\$(AssemblyName)\kinect_*.gml" "kinect_*.gml" $( +) --copy "$(TargetPath)" "$(AssemblyName).dll:$(PlatformTarget)" $( +) --copy "$(ProjectDir)__gmxgen.h" "$(AssemblyName).cpp" + +cmd /C gmxgen "$(SolutionDir)$(AssemblyName).gmx\extensions\$(AssemblyName).extension.gmx" $( +) --copy "$(SolutionDir)$(AssemblyName)_23\extensions\$(AssemblyName)\kinect_*.gml" "kinect_*.gml" $( +) --copy "$(TargetPath)" "$(AssemblyName).dll:$(PlatformTarget)" $( +) --copy "$(ProjectDir)__gmxgen.h" "$(AssemblyName).cpp" + + + + + + + Level3 + Disabled + _DEBUG;_WINDOWS;_USRDLL;Kinect_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;Kinect_EXPORTS;%(PreprocessorDefinitions) + MultiThreaded + None + stdcpp17 + + + Windows + true + true + No + + + type "$(ProjectDir)kinect_*.h" "$(ProjectDir)kinect_*.cpp" > "$(ProjectDir)__gmxgen.h" + +cmd /C gmxgen "$(SolutionDir)$(AssemblyName)_23\extensions\$(AssemblyName)\$(AssemblyName).yy" $( +) --copy "$(TargetPath)" "$(AssemblyName).dll:$(PlatformTarget)" $( +) --copy "$(ProjectDir)__gmxgen.h" "$(AssemblyName).cpp" + +cmd /C gmxgen "$(SolutionDir)$(AssemblyName)_yy\extensions\$(AssemblyName)\$(AssemblyName).yy" $( +) --copy "$(SolutionDir)$(AssemblyName)_23\extensions\$(AssemblyName)\kinect_*.gml" "kinect_*.gml" $( +) --copy "$(TargetPath)" "$(AssemblyName).dll:$(PlatformTarget)" $( +) --copy "$(ProjectDir)__gmxgen.h" "$(AssemblyName).cpp" + +cmd /C gmxgen "$(SolutionDir)$(AssemblyName).gmx\extensions\$(AssemblyName).extension.gmx" $( +) --copy "$(SolutionDir)$(AssemblyName)_23\extensions\$(AssemblyName)\kinect_*.gml" "kinect_*.gml" $( +) --copy "$(TargetPath)" "$(AssemblyName).dll:$(PlatformTarget)" $( +) --copy "$(ProjectDir)__gmxgen.h" "$(AssemblyName).cpp" + + + + + Level3 + + + MaxSpeed + true + true + NDEBUG;_WINDOWS;_USRDLL;Kinect_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + + + + + + + + + false + + + false + + + false + + + false + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Kinect/Kinect.vcxproj.filters b/Kinect/Kinect.vcxproj.filters new file mode 100644 index 0000000..e3ce82c --- /dev/null +++ b/Kinect/Kinect.vcxproj.filters @@ -0,0 +1,53 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Source Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Resource Files + + + \ No newline at end of file diff --git a/Kinect/Kinect.vcxproj.user b/Kinect/Kinect.vcxproj.user new file mode 100644 index 0000000..9c3baca --- /dev/null +++ b/Kinect/Kinect.vcxproj.user @@ -0,0 +1,6 @@ + + + + Default + + \ No newline at end of file diff --git a/Kinect/dllmain.cpp b/Kinect/dllmain.cpp new file mode 100644 index 0000000..69b5891 --- /dev/null +++ b/Kinect/dllmain.cpp @@ -0,0 +1,19 @@ +// dllmain.cpp : Defines the entry point for the DLL application. +#include "stdafx.h" + +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + diff --git a/Kinect/kinect_core.cpp b/Kinect/kinect_core.cpp new file mode 100644 index 0000000..346c6fd --- /dev/null +++ b/Kinect/kinect_core.cpp @@ -0,0 +1,29 @@ +/// @author YellowAfterlife +/// @autostruct Kinect_structs.gml +#include "stdafx.h" +#include + +IKinectSensor* knSensor = nullptr; + +void __hrx2(HRESULT hr, const char* context, const char* file, int line) { + _com_error err(hr); + printf("[%s:%d] %s failed - HRESULT of %x - ", file, line, context, hr); + wprintf(L"%s", err.ErrorMessage()); + printf("\n"); + fflush(stdout); +} + +/// +dllx double kinect_init_raw() { + return hrx(GetDefaultKinectSensor(&knSensor)); +} + +/// +dllx double kinect_open() { + return hrx(knSensor->Open()); +} + +/// +dllx double kinect_close() { + return hrx(knSensor->Close()); +} diff --git a/Kinect/kinect_core.h b/Kinect/kinect_core.h new file mode 100644 index 0000000..f868f43 --- /dev/null +++ b/Kinect/kinect_core.h @@ -0,0 +1,52 @@ +#pragma once +#include +#include + +#if defined(WIN32) +#define dllx extern "C" __declspec(dllexport) +#elif defined(GNUC) +#define dllx extern "C" __attribute__ ((visibility("default"))) +#else +#define dllx extern "C" +#endif + +#define trace(...) { printf("[%s:%d] ", __FILE__, __LINE__); printf(__VA_ARGS__); printf("\n"); fflush(stdout); } + +template +inline bool SafeRelease(Interface*& pInterfaceToRelease) { + if (pInterfaceToRelease != NULL) { + pInterfaceToRelease->Release(); + pInterfaceToRelease = NULL; + return true; + } else return false; +} + +extern void __hrx2(HRESULT hr, const char* context, const char* file, int line); +inline bool __hrx(HRESULT hr, const char* context, const char* file, int line) { + if (FAILED(hr)) { + __hrx2(hr, context, file, line); + return false; + } else return true; +} +#define hrx(expr) __hrx(expr, #expr, __FILE__, __LINE__) + +extern IKinectSensor* knSensor; + +inline bool __kinect_invalid() { + if (knSensor != nullptr) { + BOOLEAN b; + return FAILED(knSensor->get_IsOpen(&b)) || b == FALSE; + } else return false; +} +#define kinect_invalid __kinect_invalid() + +/// NB! These match up with FrameSourceTypes +enum class kinect_source : int { + color = 1, + infrared = 2, + infrared_long_exposure = 4, + depth = 8, + //body_index = 16, + //body = 32, + //audio = 64, +}; \ No newline at end of file diff --git a/Kinect/kinect_frame_description.cpp b/Kinect/kinect_frame_description.cpp new file mode 100644 index 0000000..cdd5611 --- /dev/null +++ b/Kinect/kinect_frame_description.cpp @@ -0,0 +1,58 @@ +#include "stdafx.h" + +/// +struct kinect_frame_description { + int width; + int height; + float horizontalFieldOfView; + float verticalFieldOfView; + float diagonalFieldOfView; + unsigned int lengthInPixels; + unsigned int bytesPerPixel; +}; +void kinect_get_frame_description_1(IFrameDescription* fd, kinect_frame_description* out) { + fd->get_Width(&out->width); + fd->get_Height(&out->height); + fd->get_HorizontalFieldOfView(&out->horizontalFieldOfView); + fd->get_VerticalFieldOfView(&out->verticalFieldOfView); + fd->get_DiagonalFieldOfView(&out->diagonalFieldOfView); + fd->get_LengthInPixels(&out->lengthInPixels); + fd->get_BytesPerPixel(&out->bytesPerPixel); +} +dllx double kinect_get_frame_description_raw(kinect_frame_description* out, double _kind) { + if (kinect_invalid) return -1; + auto kind = (kinect_source)_kind; + IFrameDescription* fd; + bool ok = true; + switch (kind) { + case kinect_source::color: { + IColorFrameSource* cfs = nullptr; + if (!hrx(knSensor->get_ColorFrameSource(&cfs)) || !cfs) break; + if (ok = hrx(cfs->get_FrameDescription(&fd))) kinect_get_frame_description_1(fd, out); + SafeRelease(cfs); + return ok; + }; + case kinect_source::depth: { + IDepthFrameSource* src = nullptr; + if (!hrx(knSensor->get_DepthFrameSource(&src)) || !src) break; + if (ok = hrx(src->get_FrameDescription(&fd))) kinect_get_frame_description_1(fd, out); + SafeRelease(src); + return ok; + }; + case kinect_source::infrared: { + IInfraredFrameSource* src = nullptr; + if (!hrx(knSensor->get_InfraredFrameSource(&src)) || !src) break; + if (ok = hrx(src->get_FrameDescription(&fd))) kinect_get_frame_description_1(fd, out); + SafeRelease(src); + return ok; + }; + case kinect_source::infrared_long_exposure: { + ILongExposureInfraredFrameSource* src = nullptr; + if (!hrx(knSensor->get_LongExposureInfraredFrameSource(&src)) || !src) break; + if (ok = hrx(src->get_FrameDescription(&fd))) kinect_get_frame_description_1(fd, out); + SafeRelease(src); + return ok; + }; + } + return false; +} \ No newline at end of file diff --git a/Kinect/kinect_frame_reader.cpp b/Kinect/kinect_frame_reader.cpp new file mode 100644 index 0000000..8b6f54f --- /dev/null +++ b/Kinect/kinect_frame_reader.cpp @@ -0,0 +1,167 @@ +#include "stdafx.h" +#include +#include + +static IMultiSourceFrameReader* knReader = nullptr; + +static IMultiSourceFrame* kinectMultiFrame = nullptr; +static IColorFrameReference* knColorFrameRef = nullptr; +static IColorFrame* knColorFrame = nullptr; +static IDepthFrameReference* knDepthFrameRef = nullptr; +static IDepthFrame* knDepthFrame = nullptr; +static IInfraredFrameReference* knInfraredFrameRef = nullptr; +static IInfraredFrame* knInfraredFrame = nullptr; + +bool kinect_reader_release_frame_impl() { + SafeRelease(knColorFrameRef); + SafeRelease(knColorFrame); + SafeRelease(knDepthFrameRef); + SafeRelease(knDepthFrame); + SafeRelease(knInfraredFrameRef); + SafeRelease(knInfraredFrame); + return SafeRelease(kinectMultiFrame); +} + +/// +dllx double kinect_reader_open(double _source_types) { + if (kinect_invalid) return -1; + return hrx(knSensor->OpenMultiSourceFrameReader((DWORD)_source_types, &knReader)); +} + +/// +dllx double kinect_reader_close() { + kinect_reader_release_frame_impl(); + return SafeRelease(knReader); +} + +/// +dllx double kinect_reader_acquire_frame() { + if (kinect_invalid || !knReader) return -1; + kinect_reader_release_frame_impl(); + return SUCCEEDED(knReader->AcquireLatestFrame(&kinectMultiFrame)); +} + +/// +dllx double kinect_reader_release_frame() { + if (kinect_invalid || !knReader) return -1; + return kinect_reader_release_frame_impl(); +} + +#pragma region color +bool kinect_reader_ensure_color() { + if (knColorFrame) return true; + if (kinect_invalid || !kinectMultiFrame) return false; + if (!hrx(kinectMultiFrame->get_ColorFrameReference(&knColorFrameRef))) return false; + return hrx(knColorFrameRef->AcquireFrame(&knColorFrame)); +} + +dllx double kinect_reader_copy_raw_color_data_(byte* out, double _out_size) { + if (!kinect_reader_ensure_color()) return -1; + auto out_size = (UINT)_out_size; + #if 0 + UINT n = 0; BYTE* b = nullptr; + if (hrx(knColorFrame->AccessRawUnderlyingBuffer(&n, &b))) { + //trace("%d <-> %d", n, out_size); + if (out_size >= n) memcpy(out, b, n); + return true; + } else return false; + #else + return hrx(knColorFrame->CopyRawFrameDataToArray((UINT)out_size, out)); + #endif +} + +/// +dllx double kinect_reader_get_raw_color_data_format() { + if (!kinect_reader_ensure_color()) return -1; + ColorImageFormat fmt = ColorImageFormat_None; + return hrx(knColorFrame->get_RawColorImageFormat(&fmt)) ? fmt : -1; +} + +/// +enum class kinect_color_image_format { + none = 0, + rgba = 1, + yuv = 2, + bgra = 3, + bayer = 4, + yuy2 = 5 +}; + +dllx double kinect_reader_copy_converted_color_data_(byte* out, double _out_size, double _format) { + if (!kinect_reader_ensure_color()) return -1; + auto out_size = (UINT)_out_size; + return hrx(knColorFrame->CopyConvertedFrameDataToArray((UINT)out_size, out, (ColorImageFormat)_format)); +} +#pragma endregion + +#pragma region depth +bool kinect_reader_ensure_depth() { + if (knDepthFrame) return true; + if (kinect_invalid || !kinectMultiFrame) return false; + if (!hrx(kinectMultiFrame->get_DepthFrameReference(&knDepthFrameRef))) return false; + return hrx(knDepthFrameRef->AcquireFrame(&knDepthFrame)); +} + +dllx double kinect_reader_copy_raw_depth_data_(UINT16* out, double _out_size) { + if (!kinect_reader_ensure_depth()) return -1; + return hrx(knDepthFrame->CopyFrameDataToArray((UINT)_out_size, out)); +} +struct kinect_reader_get_converted_depth_data_t { + double min, max; + int color; +}; +dllx double kinect_reader_copy_converted_depth_data_(UINT32* out, double _out_size, kinect_reader_get_converted_depth_data_t* args) { + if (!kinect_reader_ensure_depth()) return -1; + auto out_size = (UINT)_out_size; + auto min = args->min; + auto max = args->max; + auto col = args->color; + auto mul = 255.0 / (max - min); + UINT len; UINT16* data; + if (hrx(knDepthFrame->AccessUnderlyingBuffer(&len, &data))) { + if (out_size < len * 2) return -1; + std::transform(std::execution::par_unseq, data, data + len, out, [min, mul, col](UINT16 d) -> UINT { + auto a = (UINT)(((double)d / 65535.0 - min) * mul); + if (a < 0) a = 0; else if (a > 255) a = 255; + return col | (a << 24); + }); + return true; + } else return false; +} +#pragma endregion + +#pragma region infrared +bool kinect_reader_ensure_infrared() { + if (knInfraredFrame) return true; + if (kinect_invalid || !kinectMultiFrame) return false; + if (!hrx(kinectMultiFrame->get_InfraredFrameReference(&knInfraredFrameRef))) return false; + return hrx(knInfraredFrameRef->AcquireFrame(&knInfraredFrame)); +} + +dllx double kinect_reader_copy_raw_infrared_data_(UINT16* out, double _out_size) { + if (!kinect_reader_ensure_infrared()) return -1; + return hrx(knInfraredFrame->CopyFrameDataToArray((UINT)_out_size, out)); +} +struct kinect_reader_get_converted_infrared_data_t { + double min, max; + int color; +}; +dllx double kinect_reader_copy_converted_infrared_data_(UINT32* out, double _out_size, kinect_reader_get_converted_infrared_data_t* args) { + if (!kinect_reader_ensure_infrared()) return -1; + auto out_size = (UINT)_out_size; + auto min = args->min; + auto max = args->max; + auto col = args->color; + auto mul = 255.0 / (max - min); + UINT len; UINT16* data; + if (hrx(knInfraredFrame->AccessUnderlyingBuffer(&len, &data))) { + if (out_size < len * 2) return -1; + std::transform(std::execution::par_unseq, data, data + len, out, [min, mul, col](UINT16 d) -> UINT { + auto a = (UINT)(((double)d / 65535.0 - min) * mul); + if (a < 0) a = 0; else if (a > 255) a = 255; + return col | (a << 24); + }); + return true; + } else return false; +} +#pragma endregion \ No newline at end of file diff --git a/Kinect/resource1.h b/Kinect/resource1.h new file mode 100644 index 0000000..61c7298 --- /dev/null +++ b/Kinect/resource1.h @@ -0,0 +1,14 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Kinect.rc + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/Kinect/stdafx.cpp b/Kinect/stdafx.cpp new file mode 100644 index 0000000..989250c --- /dev/null +++ b/Kinect/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// Kinect.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/Kinect/stdafx.h b/Kinect/stdafx.h new file mode 100644 index 0000000..a56447d --- /dev/null +++ b/Kinect/stdafx.h @@ -0,0 +1,18 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" +#include + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files: +#include +#include "kinect_core.h" + +#pragma comment(lib, "kinect20.lib") + +// TODO: reference additional headers your program requires here diff --git a/Kinect/targetver.h b/Kinect/targetver.h new file mode 100644 index 0000000..87c0086 --- /dev/null +++ b/Kinect/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/Kinect_23/Kinect_23.yyp b/Kinect_23/Kinect_23.yyp new file mode 100644 index 0000000..9312c1b --- /dev/null +++ b/Kinect_23/Kinect_23.yyp @@ -0,0 +1,61 @@ +{ + "resources": [ + {"id":{"name":"trace","path":"scripts/trace/trace.yy",},"order":1,}, + {"id":{"name":"fnt_test","path":"fonts/fnt_test/fnt_test.yy",},"order":1,}, + {"id":{"name":"obj_test","path":"objects/obj_test/obj_test.yy",},"order":1,}, + {"id":{"name":"rm_test","path":"rooms/rm_test/rm_test.yy",},"order":1,}, + {"id":{"name":"Kinect","path":"extensions/Kinect/Kinect.yy",},"order":1,}, + {"id":{"name":"KinectSource","path":"scripts/KinectSource/KinectSource.yy",},"order":1,}, + ], + "Options": [ + {"name":"tvOS","path":"options/tvos/options_tvos.yy",}, + {"name":"HTML5","path":"options/html5/options_html5.yy",}, + {"name":"Linux","path":"options/linux/options_linux.yy",}, + {"name":"Windows","path":"options/windows/options_windows.yy",}, + {"name":"Android","path":"options/android/options_android.yy",}, + {"name":"macOS","path":"options/mac/options_mac.yy",}, + {"name":"iOS","path":"options/ios/options_ios.yy",}, + {"name":"Main","path":"options/main/options_main.yy",}, + {"name":"Amazon Fire","path":"options/amazonfire/options_amazonfire.yy",}, + ], + "isDnDProject": false, + "isEcma": false, + "tutorialPath": "", + "configs": { + "name": "Default", + "children": [], + }, + "RoomOrderNodes": [ + {"roomId":{"name":"rm_test","path":"rooms/rm_test/rm_test.yy",},}, + ], + "Folders": [ + {"folderPath":"folders/Sprites.yy","order":1,"resourceVersion":"1.0","name":"Sprites","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Tile Sets.yy","order":3,"resourceVersion":"1.0","name":"Tile Sets","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Sounds.yy","order":5,"resourceVersion":"1.0","name":"Sounds","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Paths.yy","order":7,"resourceVersion":"1.0","name":"Paths","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Scripts.yy","order":9,"resourceVersion":"1.0","name":"Scripts","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Shaders.yy","order":11,"resourceVersion":"1.0","name":"Shaders","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Fonts.yy","order":13,"resourceVersion":"1.0","name":"Fonts","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Timelines.yy","order":15,"resourceVersion":"1.0","name":"Timelines","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Objects.yy","order":17,"resourceVersion":"1.0","name":"Objects","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Rooms.yy","order":19,"resourceVersion":"1.0","name":"Rooms","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Notes.yy","order":21,"resourceVersion":"1.0","name":"Notes","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Extensions.yy","order":23,"resourceVersion":"1.0","name":"Extensions","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Sequences.yy","order":1,"resourceVersion":"1.0","name":"Sequences","tags":[],"resourceType":"GMFolder",}, + {"folderPath":"folders/Animation Curves.yy","order":1,"resourceVersion":"1.0","name":"Animation Curves","tags":[],"resourceType":"GMFolder",}, + ], + "AudioGroups": [ + {"targets":-1,"resourceVersion":"1.3","name":"audiogroup_default","resourceType":"GMAudioGroup",}, + ], + "TextureGroups": [ + {"isScaled":true,"autocrop":true,"border":2,"mipsToGenerate":0,"groupParent":null,"targets":-1,"resourceVersion":"1.3","name":"Default","resourceType":"GMTextureGroup",}, + ], + "IncludedFiles": [], + "MetaData": { + "IDEVersion": "2.3.1.542", + }, + "resourceVersion": "1.4", + "name": "Kinect_23", + "tags": [], + "resourceType": "GMProject", +} \ No newline at end of file diff --git a/Kinect_23/extensions/Kinect/Kinect.gml b/Kinect_23/extensions/Kinect/Kinect.gml new file mode 100644 index 0000000..c2faa53 --- /dev/null +++ b/Kinect_23/extensions/Kinect/Kinect.gml @@ -0,0 +1,11 @@ +#define kinect_init +kinect_init_structs(); +if (!kinect_init_raw()) show_debug_message("Kinect init failed"); + +#define kinect_struct_create +/// (...fields)~ +/// GMS >= 2.3: +var +/*/ + +//*/ \ No newline at end of file diff --git a/Kinect_23/extensions/Kinect/Kinect.yy b/Kinect_23/extensions/Kinect/Kinect.yy new file mode 100644 index 0000000..db42a47 --- /dev/null +++ b/Kinect_23/extensions/Kinect/Kinect.yy @@ -0,0 +1,181 @@ +{ + "optionsFile": "options.json", + "options": [], + "exportToGame": true, + "supportedTargets": 113497714299118, + "extensionVersion": "1.0.0", + "packageId": "", + "productId": "", + "author": "", + "date": "2019-12-12T01:34:29", + "license": "Proprietary", + "description": "", + "helpfile": "", + "iosProps": true, + "tvosProps": false, + "androidProps": true, + "installdir": "", + "files": [ + {"filename":"Kinect.dll","origname":"extensions\\Kinect.dll","init":"","final":"","kind":1,"uncompress":false,"functions":[ + {"externalName":"kinect_init_raw","kind":1,"help":"kinect_init_raw()","hidden":false,"returnType":2,"argCount":0,"args":[],"resourceVersion":"1.0","name":"kinect_init_raw","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_open","kind":1,"help":"kinect_open()","hidden":false,"returnType":2,"argCount":0,"args":[],"resourceVersion":"1.0","name":"kinect_open","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_close","kind":1,"help":"kinect_close()","hidden":false,"returnType":2,"argCount":0,"args":[],"resourceVersion":"1.0","name":"kinect_close","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_get_frame_description_raw","kind":11,"help":"","hidden":true,"returnType":2,"argCount":2,"args":[ + 1, + 2, + ],"resourceVersion":"1.0","name":"kinect_get_frame_description_raw","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_reader_open","kind":1,"help":"kinect_reader_open(_source_types)","hidden":false,"returnType":2,"argCount":1,"args":[ + 2, + ],"resourceVersion":"1.0","name":"kinect_reader_open","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_reader_close","kind":1,"help":"kinect_reader_close()","hidden":false,"returnType":2,"argCount":0,"args":[],"resourceVersion":"1.0","name":"kinect_reader_close","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_reader_acquire_frame","kind":1,"help":"kinect_reader_acquire_frame()","hidden":false,"returnType":2,"argCount":0,"args":[],"resourceVersion":"1.0","name":"kinect_reader_acquire_frame","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_reader_release_frame","kind":1,"help":"kinect_reader_release_frame()","hidden":false,"returnType":2,"argCount":0,"args":[],"resourceVersion":"1.0","name":"kinect_reader_release_frame","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_reader_copy_raw_color_data_","kind":11,"help":"","hidden":true,"returnType":2,"argCount":2,"args":[ + 1, + 2, + ],"resourceVersion":"1.0","name":"kinect_reader_copy_raw_color_data_","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_reader_get_raw_color_data_format","kind":1,"help":"kinect_reader_get_raw_color_data_format()","hidden":false,"returnType":2,"argCount":0,"args":[],"resourceVersion":"1.0","name":"kinect_reader_get_raw_color_data_format","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_reader_copy_converted_color_data_","kind":11,"help":"","hidden":true,"returnType":2,"argCount":3,"args":[ + 1, + 2, + 2, + ],"resourceVersion":"1.0","name":"kinect_reader_copy_converted_color_data_","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_reader_copy_raw_depth_data_","kind":11,"help":"","hidden":true,"returnType":2,"argCount":2,"args":[ + 1, + 2, + ],"resourceVersion":"1.0","name":"kinect_reader_copy_raw_depth_data_","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_reader_copy_converted_depth_data_","kind":11,"help":"","hidden":true,"returnType":2,"argCount":3,"args":[ + 1, + 2, + 1, + ],"resourceVersion":"1.0","name":"kinect_reader_copy_converted_depth_data_","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_reader_copy_raw_infrared_data_","kind":11,"help":"","hidden":true,"returnType":2,"argCount":2,"args":[ + 1, + 2, + ],"resourceVersion":"1.0","name":"kinect_reader_copy_raw_infrared_data_","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_reader_copy_converted_infrared_data_","kind":11,"help":"","hidden":true,"returnType":2,"argCount":3,"args":[ + 1, + 2, + 1, + ],"resourceVersion":"1.0","name":"kinect_reader_copy_converted_infrared_data_","tags":[],"resourceType":"GMExtensionFunction",}, + ],"constants":[ + {"value":"1","hidden":false,"resourceVersion":"1.0","name":"kinect_source_color","tags":[],"resourceType":"GMExtensionConstant",}, + {"value":"2","hidden":false,"resourceVersion":"1.0","name":"kinect_source_infrared","tags":[],"resourceType":"GMExtensionConstant",}, + {"value":"4","hidden":false,"resourceVersion":"1.0","name":"kinect_source_infrared_long_exposure","tags":[],"resourceType":"GMExtensionConstant",}, + {"value":"8","hidden":false,"resourceVersion":"1.0","name":"kinect_source_depth","tags":[],"resourceType":"GMExtensionConstant",}, + {"value":"0","hidden":false,"resourceVersion":"1.0","name":"kinect_color_image_format_none","tags":[],"resourceType":"GMExtensionConstant",}, + {"value":"1","hidden":false,"resourceVersion":"1.0","name":"kinect_color_image_format_rgba","tags":[],"resourceType":"GMExtensionConstant",}, + {"value":"2","hidden":false,"resourceVersion":"1.0","name":"kinect_color_image_format_yuv","tags":[],"resourceType":"GMExtensionConstant",}, + {"value":"3","hidden":false,"resourceVersion":"1.0","name":"kinect_color_image_format_bgra","tags":[],"resourceType":"GMExtensionConstant",}, + {"value":"4","hidden":false,"resourceVersion":"1.0","name":"kinect_color_image_format_bayer","tags":[],"resourceType":"GMExtensionConstant",}, + {"value":"5","hidden":false,"resourceVersion":"1.0","name":"kinect_color_image_format_yuy2","tags":[],"resourceType":"GMExtensionConstant",}, + ],"ProxyFiles":[],"copyToTargets":9223372036854775807,"order":[ + {"name":"kinect_init_raw","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_open","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_close","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_get_frame_description_raw","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_reader_open","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_reader_close","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_reader_acquire_frame","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_reader_release_frame","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_reader_copy_raw_color_data_","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_reader_get_raw_color_data_format","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_reader_copy_converted_color_data_","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_reader_copy_raw_depth_data_","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_reader_copy_converted_depth_data_","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_reader_copy_raw_infrared_data_","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_reader_copy_converted_infrared_data_","path":"extensions/Kinect/Kinect.yy",}, + ],"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMExtensionFile",}, + {"filename":"kinect_core.gml","origname":"extensions\\gml.gml","init":"","final":"","kind":2,"uncompress":false,"functions":[ + {"externalName":"kinect_init","kind":11,"help":"","hidden":true,"returnType":2,"argCount":0,"args":[],"resourceVersion":"1.0","name":"kinect_init","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_struct_create","kind":11,"help":"","hidden":true,"returnType":2,"argCount":-1,"args":[],"resourceVersion":"1.0","name":"kinect_struct_create","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_struct_read","kind":11,"help":"","hidden":true,"returnType":2,"argCount":2,"args":[ + 2, + 2, + ],"resourceVersion":"1.0","name":"kinect_struct_read","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_get_frame_description","kind":2,"help":"kinect_get_frame_description(kind)->kinect_frame_description","hidden":false,"returnType":2,"argCount":1,"args":[ + 2, + ],"resourceVersion":"1.0","name":"kinect_get_frame_description","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_reader_copy_raw_color_data","kind":2,"help":"kinect_reader_copy_raw_color_data(out:buffer)","hidden":false,"returnType":2,"argCount":1,"args":[ + 2, + ],"resourceVersion":"1.0","name":"kinect_reader_copy_raw_color_data","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_reader_copy_converted_color_data","kind":2,"help":"kinect_reader_copy_converted_color_data(out:buffer, format)","hidden":false,"returnType":2,"argCount":2,"args":[ + 2, + 2, + ],"resourceVersion":"1.0","name":"kinect_reader_copy_converted_color_data","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_reader_copy_converted_depth_data","kind":2,"help":"kinect_reader_copy_converted_depth_data(out:buffer, min:number, max:number, col:number)","hidden":false,"returnType":2,"argCount":4,"args":[ + 2, + 2, + 2, + 2, + ],"resourceVersion":"1.0","name":"kinect_reader_copy_converted_depth_data","tags":[],"resourceType":"GMExtensionFunction",}, + {"externalName":"kinect_reader_copy_converted_infrared_data","kind":2,"help":"kinect_reader_copy_converted_infrared_data(out:buffer, min:number, max:number, col:number)","hidden":false,"returnType":2,"argCount":4,"args":[ + 2, + 2, + 2, + 2, + ],"resourceVersion":"1.0","name":"kinect_reader_copy_converted_infrared_data","tags":[],"resourceType":"GMExtensionFunction",}, + ],"constants":[ + {"value":"buffer_get_address(kinect_struct_buf)","hidden":true,"resourceVersion":"1.0","name":"kinect_struct_ptr","tags":[],"resourceType":"GMExtensionConstant",}, + ],"ProxyFiles":[],"copyToTargets":9223372036854775807,"order":[ + {"name":"kinect_init","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_struct_create","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_struct_read","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_get_frame_description","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_reader_copy_raw_color_data","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_reader_copy_converted_color_data","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_reader_copy_converted_depth_data","path":"extensions/Kinect/Kinect.yy",}, + {"name":"kinect_reader_copy_converted_infrared_data","path":"extensions/Kinect/Kinect.yy",}, + ],"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMExtensionFile",}, + {"filename":"kinect_structs.gml","origname":"","init":"","final":"","kind":2,"uncompress":false,"functions":[ + {"externalName":"kinect_init_structs","kind":11,"help":"","hidden":true,"returnType":2,"argCount":0,"args":[],"resourceVersion":"1.0","name":"kinect_init_structs","tags":[],"resourceType":"GMExtensionFunction",}, + ],"constants":[ + {"value":"0","hidden":false,"resourceVersion":"1.0","name":"kinect_frame_description_width","tags":[],"resourceType":"GMExtensionConstant",}, + {"value":"1","hidden":false,"resourceVersion":"1.0","name":"kinect_frame_description_height","tags":[],"resourceType":"GMExtensionConstant",}, + {"value":"2","hidden":false,"resourceVersion":"1.0","name":"kinect_frame_description_horizontalFieldOfView","tags":[],"resourceType":"GMExtensionConstant",}, + {"value":"3","hidden":false,"resourceVersion":"1.0","name":"kinect_frame_description_verticalFieldOfView","tags":[],"resourceType":"GMExtensionConstant",}, + {"value":"4","hidden":false,"resourceVersion":"1.0","name":"kinect_frame_description_diagonalFieldOfView","tags":[],"resourceType":"GMExtensionConstant",}, + {"value":"5","hidden":false,"resourceVersion":"1.0","name":"kinect_frame_description_lengthInPixels","tags":[],"resourceType":"GMExtensionConstant",}, + {"value":"6","hidden":false,"resourceVersion":"1.0","name":"kinect_frame_description_bytesPerPixel","tags":[],"resourceType":"GMExtensionConstant",}, + ],"ProxyFiles":[],"copyToTargets":-1,"order":[ + {"name":"kinect_init_structs","path":"extensions/Kinect/Kinect.yy",}, + ],"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMExtensionFile",}, + ], + "classname": "", + "tvosclassname": "", + "tvosdelegatename": "", + "iosdelegatename": "", + "androidclassname": "", + "sourcedir": "", + "androidsourcedir": "", + "macsourcedir": "", + "maccompilerflags": "", + "tvosmaccompilerflags": "", + "maclinkerflags": "", + "tvosmaclinkerflags": "", + "iosplistinject": "", + "tvosplistinject": "", + "androidinject": "", + "androidmanifestinject": "", + "androidactivityinject": "", + "gradleinject": "", + "iosSystemFrameworkEntries": [], + "tvosSystemFrameworkEntries": [], + "iosThirdPartyFrameworkEntries": [], + "tvosThirdPartyFrameworkEntries": [], + "IncludedResources": [], + "androidPermissions": [], + "copyToTargets": 113497714299118, + "iosCocoaPods": "", + "tvosCocoaPods": "", + "iosCocoaPodDependencies": "", + "tvosCocoaPodDependencies": "", + "parent": { + "name": "Extensions", + "path": "folders/Extensions.yy", + }, + "resourceVersion": "1.2", + "name": "Kinect", + "tags": [], + "resourceType": "GMExtension", +} \ No newline at end of file diff --git a/Kinect_23/extensions/Kinect/kinect_core.gml b/Kinect_23/extensions/Kinect/kinect_core.gml new file mode 100644 index 0000000..656e368 --- /dev/null +++ b/Kinect_23/extensions/Kinect/kinect_core.gml @@ -0,0 +1,89 @@ +#define kinect_init +//#macro kinect_struct_ptr buffer_get_address(kinect_struct_buf)~ +if (!kinect_init_raw()) show_debug_message("Failed to load Kinect dll"); +kinect_init_structs(); +globalvar kinect_struct_buf; kinect_struct_buf = buffer_create(1024, buffer_grow, 1); + +#define kinect_struct_create +/// (...pairs)~ +var _argc = argument_count; +var _size = _argc div 2; +var _types = array_create(_size); +var k = 0; +// GMS >= 2.3: +var _names = array_create(_size); +var _out = { names: _names, types: _types }; +for (var i = 0; i < argument_count; i += 2) { + _names[@k] = argument[i]; + _types[@k] = argument[i + 1]; + k += 1; +} +return _out; +/*/ +for (var i = 0; i < argument_count; i += 2) { + _types[k] = argument[i + 1]; + k += 1; +} +return _types; +//*/ + +#define kinect_struct_read +/// (status, struct_t)~ +var _status = argument0, _proto = argument1; +if (_status <= 0) return undefined; +var _buf = kinect_struct_buf; +buffer_seek(_buf, buffer_seek_start, 0); +// GMS >= 2.3: +var _types = _proto.types; +var _names = _proto.names; +var _size = array_length(_types); +var _obj = {}; +for (var i = 0; i < _size; i++) { + variable_struct_set(_obj, _names[i], buffer_read(_buf, _types[i])); +} +return _obj; +/*/ +var _size = array_length_1d(_proto); +var _arr = array_create(_size); +for (var i = 0; i < _size; i++) { + _arr[i] = buffer_read(_buf, _proto[i]); +} +return _arr; +//*/ + +#define kinect_get_frame_description +/// (kind)->kinect_frame_description +return kinect_struct_read( + kinect_get_frame_description_raw(kinect_struct_ptr, argument0), + global.__kinect_frame_description +); + +#define kinect_reader_copy_raw_color_data +/// (out:buffer) +var _buf = argument0; +return kinect_reader_copy_raw_color_data_(buffer_get_address(_buf), buffer_get_size(_buf)); + +#define kinect_reader_copy_converted_color_data +/// (out:buffer, format) +var _buf = argument0, _format = argument1; +return kinect_reader_copy_converted_color_data_(buffer_get_address(_buf), buffer_get_size(_buf), _format); + +#define kinect_reader_copy_converted_depth_data +/// (out:buffer, min:number, max:number, col:number) +var _out = argument0, _min = argument1, _max = argument2, _col = argument3; +var b = kinect_struct_buf; +buffer_seek(b, buffer_seek_start, 0); +buffer_write(b, buffer_f64, _min); +buffer_write(b, buffer_f64, _max); +buffer_write(b, buffer_u32, _col); +return kinect_reader_copy_converted_depth_data_(buffer_get_address(_out), buffer_get_size(_out), buffer_get_address(b)); + +#define kinect_reader_copy_converted_infrared_data +/// (out:buffer, min:number, max:number, col:number) +var _out = argument0, _min = argument1, _max = argument2, _col = argument3; +var b = kinect_struct_buf; +buffer_seek(b, buffer_seek_start, 0); +buffer_write(b, buffer_f64, _min); +buffer_write(b, buffer_f64, _max); +buffer_write(b, buffer_u32, _col); +return kinect_reader_copy_converted_infrared_data_(buffer_get_address(_out), buffer_get_size(_out), buffer_get_address(b)); diff --git a/Kinect_23/extensions/Kinect/kinect_structs.gml b/Kinect_23/extensions/Kinect/kinect_structs.gml new file mode 100644 index 0000000..c7f6c56 --- /dev/null +++ b/Kinect_23/extensions/Kinect/kinect_structs.gml @@ -0,0 +1,19 @@ +#define kinect_init_structs +// NB! Much of this file is updated by GmxGen based on structs in C++ code +/// @hint {int} kinect_frame_description:width +/// @hint {int} kinect_frame_description:height +/// @hint {number} kinect_frame_description:horizontalFieldOfView +/// @hint {number} kinect_frame_description:verticalFieldOfView +/// @hint {number} kinect_frame_description:diagonalFieldOfView +/// @hint {int} kinect_frame_description:lengthInPixels +/// @hint {int} kinect_frame_description:bytesPerPixel +/* GMS < 2.3: +//#macro kinect_frame_description_width 0 +//#macro kinect_frame_description_height 1 +//#macro kinect_frame_description_horizontalFieldOfView 2 +//#macro kinect_frame_description_verticalFieldOfView 3 +//#macro kinect_frame_description_diagonalFieldOfView 4 +//#macro kinect_frame_description_lengthInPixels 5 +//#macro kinect_frame_description_bytesPerPixel 6 +//*/ +global.__kinect_frame_description = kinect_struct_create("width", buffer_s32, "height", buffer_s32, "horizontalFieldOfView", buffer_f32, "verticalFieldOfView", buffer_f32, "diagonalFieldOfView", buffer_f32, "lengthInPixels", buffer_u32, "bytesPerPixel", buffer_u32); diff --git a/Kinect_23/fonts/fnt_test/fnt_test.png b/Kinect_23/fonts/fnt_test/fnt_test.png new file mode 100644 index 0000000..f7e73fc Binary files /dev/null and b/Kinect_23/fonts/fnt_test/fnt_test.png differ diff --git a/Kinect_23/fonts/fnt_test/fnt_test.yy b/Kinect_23/fonts/fnt_test/fnt_test.yy new file mode 100644 index 0000000..275f052 --- /dev/null +++ b/Kinect_23/fonts/fnt_test/fnt_test.yy @@ -0,0 +1,135 @@ +{ + "hinting": 0, + "glyphOperations": 0, + "interpreter": 0, + "pointRounding": 0, + "fontName": "Ubuntu Condensed SemiItalic", + "styleName": "Regular", + "size": 24.0, + "bold": false, + "italic": false, + "charset": 1, + "AntiAlias": 0, + "first": 0, + "last": 0, + "sampleText": "abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)", + "includeTTF": false, + "TTFName": "", + "textureGroupId": { + "name": "Default", + "path": "texturegroups/Default", + }, + "ascenderOffset": 0, + "glyphs": { + "32": {"x":226,"y":75,"w":4,"h":24,"character":32,"shift":4,"offset":0,}, + "33": {"x":174,"y":75,"w":6,"h":24,"character":33,"shift":6,"offset":0,}, + "34": {"x":87,"y":50,"w":9,"h":24,"character":34,"shift":9,"offset":0,}, + "35": {"x":83,"y":0,"w":13,"h":24,"character":35,"shift":13,"offset":0,}, + "36": {"x":97,"y":50,"w":9,"h":24,"character":36,"shift":9,"offset":0,}, + "37": {"x":68,"y":0,"w":14,"h":24,"character":37,"shift":14,"offset":0,}, + "38": {"x":228,"y":0,"w":11,"h":24,"character":38,"shift":11,"offset":0,}, + "39": {"x":160,"y":75,"w":6,"h":24,"character":39,"shift":6,"offset":0,}, + "40": {"x":247,"y":50,"w":8,"h":24,"character":40,"shift":8,"offset":0,}, + "41": {"x":120,"y":75,"w":7,"h":24,"character":41,"shift":7,"offset":0,}, + "42": {"x":77,"y":50,"w":9,"h":24,"character":42,"shift":9,"offset":0,}, + "43": {"x":96,"y":25,"w":10,"h":24,"character":43,"shift":10,"offset":0,}, + "44": {"x":250,"y":25,"w":5,"h":24,"character":44,"shift":5,"offset":0,}, + "45": {"x":167,"y":75,"w":6,"h":24,"character":45,"shift":6,"offset":0,}, + "46": {"x":202,"y":75,"w":5,"h":24,"character":46,"shift":5,"offset":0,}, + "47": {"x":217,"y":25,"w":10,"h":24,"character":47,"shift":10,"offset":0,}, + "48": {"x":177,"y":50,"w":9,"h":24,"character":48,"shift":9,"offset":0,}, + "49": {"x":187,"y":50,"w":9,"h":24,"character":49,"shift":9,"offset":0,}, + "50": {"x":137,"y":50,"w":9,"h":24,"character":50,"shift":9,"offset":0,}, + "51": {"x":207,"y":50,"w":9,"h":24,"character":51,"shift":9,"offset":0,}, + "52": {"x":22,"y":50,"w":10,"h":24,"character":52,"shift":10,"offset":0,}, + "53": {"x":147,"y":50,"w":9,"h":24,"character":53,"shift":9,"offset":0,}, + "54": {"x":20,"y":75,"w":9,"h":24,"character":54,"shift":9,"offset":0,}, + "55": {"x":33,"y":50,"w":10,"h":24,"character":55,"shift":10,"offset":0,}, + "56": {"x":44,"y":50,"w":10,"h":24,"character":56,"shift":10,"offset":0,}, + "57": {"x":217,"y":50,"w":9,"h":24,"character":57,"shift":9,"offset":0,}, + "58": {"x":220,"y":75,"w":5,"h":24,"character":58,"shift":5,"offset":0,}, + "59": {"x":214,"y":75,"w":5,"h":24,"character":59,"shift":5,"offset":0,}, + "60": {"x":197,"y":50,"w":9,"h":24,"character":60,"shift":9,"offset":0,}, + "61": {"x":55,"y":50,"w":10,"h":24,"character":61,"shift":10,"offset":0,}, + "62": {"x":167,"y":50,"w":9,"h":24,"character":62,"shift":9,"offset":0,}, + "63": {"x":157,"y":50,"w":9,"h":24,"character":63,"shift":9,"offset":0,}, + "64": {"x":18,"y":0,"w":17,"h":24,"character":64,"shift":17,"offset":0,}, + "65": {"x":0,"y":25,"w":11,"h":24,"character":65,"shift":11,"offset":0,}, + "66": {"x":12,"y":25,"w":11,"h":24,"character":66,"shift":11,"offset":0,}, + "67": {"x":24,"y":25,"w":11,"h":24,"character":67,"shift":11,"offset":0,}, + "68": {"x":152,"y":0,"w":12,"h":24,"character":68,"shift":12,"offset":0,}, + "69": {"x":36,"y":25,"w":11,"h":24,"character":69,"shift":11,"offset":0,}, + "70": {"x":66,"y":50,"w":10,"h":24,"character":70,"shift":10,"offset":0,}, + "71": {"x":48,"y":25,"w":11,"h":24,"character":71,"shift":11,"offset":0,}, + "72": {"x":178,"y":0,"w":12,"h":24,"character":72,"shift":12,"offset":0,}, + "73": {"x":208,"y":75,"w":5,"h":24,"character":73,"shift":5,"offset":0,}, + "74": {"x":30,"y":75,"w":8,"h":24,"character":74,"shift":8,"offset":0,}, + "75": {"x":191,"y":0,"w":12,"h":24,"character":75,"shift":12,"offset":0,}, + "76": {"x":227,"y":50,"w":9,"h":24,"character":76,"shift":9,"offset":0,}, + "77": {"x":36,"y":0,"w":15,"h":24,"character":77,"shift":15,"offset":0,}, + "78": {"x":165,"y":0,"w":12,"h":24,"character":78,"shift":12,"offset":0,}, + "79": {"x":97,"y":0,"w":13,"h":24,"character":79,"shift":13,"offset":0,}, + "80": {"x":72,"y":25,"w":11,"h":24,"character":80,"shift":11,"offset":0,}, + "81": {"x":111,"y":0,"w":13,"h":24,"character":81,"shift":13,"offset":0,}, + "82": {"x":60,"y":25,"w":11,"h":24,"character":82,"shift":11,"offset":0,}, + "83": {"x":117,"y":50,"w":9,"h":24,"character":83,"shift":9,"offset":0,}, + "84": {"x":240,"y":0,"w":11,"h":24,"character":84,"shift":11,"offset":0,}, + "85": {"x":139,"y":0,"w":12,"h":24,"character":85,"shift":12,"offset":0,}, + "86": {"x":216,"y":0,"w":11,"h":24,"character":86,"shift":11,"offset":0,}, + "87": {"x":0,"y":0,"w":17,"h":24,"character":87,"shift":17,"offset":0,}, + "88": {"x":204,"y":0,"w":11,"h":24,"character":88,"shift":11,"offset":0,}, + "89": {"x":84,"y":25,"w":11,"h":24,"character":89,"shift":11,"offset":0,}, + "90": {"x":118,"y":25,"w":10,"h":24,"character":90,"shift":10,"offset":0,}, + "91": {"x":75,"y":75,"w":8,"h":24,"character":91,"shift":8,"offset":0,}, + "92": {"x":144,"y":75,"w":7,"h":24,"character":92,"shift":7,"offset":0,}, + "93": {"x":128,"y":75,"w":7,"h":24,"character":93,"shift":7,"offset":0,}, + "94": {"x":129,"y":25,"w":10,"h":24,"character":94,"shift":10,"offset":0,}, + "95": {"x":237,"y":50,"w":9,"h":24,"character":95,"shift":9,"offset":0,}, + "96": {"x":136,"y":75,"w":7,"h":24,"character":96,"shift":7,"offset":0,}, + "97": {"x":10,"y":75,"w":9,"h":24,"character":97,"shift":9,"offset":0,}, + "98": {"x":140,"y":25,"w":10,"h":24,"character":98,"shift":10,"offset":0,}, + "99": {"x":39,"y":75,"w":8,"h":24,"character":99,"shift":8,"offset":0,}, + "100": {"x":151,"y":25,"w":10,"h":24,"character":100,"shift":10,"offset":0,}, + "101": {"x":127,"y":50,"w":9,"h":24,"character":101,"shift":9,"offset":0,}, + "102": {"x":48,"y":75,"w":8,"h":24,"character":102,"shift":8,"offset":0,}, + "103": {"x":162,"y":25,"w":10,"h":24,"character":103,"shift":10,"offset":0,}, + "104": {"x":173,"y":25,"w":10,"h":24,"character":104,"shift":10,"offset":0,}, + "105": {"x":181,"y":75,"w":6,"h":24,"character":105,"shift":6,"offset":0,}, + "106": {"x":57,"y":75,"w":8,"h":24,"character":106,"shift":8,"offset":0,}, + "107": {"x":184,"y":25,"w":10,"h":24,"character":107,"shift":10,"offset":0,}, + "108": {"x":188,"y":75,"w":6,"h":24,"character":108,"shift":6,"offset":0,}, + "109": {"x":52,"y":0,"w":15,"h":24,"character":109,"shift":15,"offset":0,}, + "110": {"x":195,"y":25,"w":10,"h":24,"character":110,"shift":10,"offset":0,}, + "111": {"x":206,"y":25,"w":10,"h":24,"character":111,"shift":10,"offset":0,}, + "112": {"x":228,"y":25,"w":10,"h":24,"character":112,"shift":10,"offset":0,}, + "113": {"x":239,"y":25,"w":10,"h":24,"character":113,"shift":10,"offset":0,}, + "114": {"x":84,"y":75,"w":8,"h":24,"character":114,"shift":8,"offset":0,}, + "115": {"x":111,"y":75,"w":8,"h":24,"character":115,"shift":8,"offset":0,}, + "116": {"x":66,"y":75,"w":8,"h":24,"character":116,"shift":8,"offset":0,}, + "117": {"x":0,"y":50,"w":10,"h":24,"character":117,"shift":10,"offset":0,}, + "118": {"x":107,"y":50,"w":9,"h":24,"character":118,"shift":9,"offset":0,}, + "119": {"x":125,"y":0,"w":13,"h":24,"character":119,"shift":13,"offset":0,}, + "120": {"x":0,"y":75,"w":9,"h":24,"character":120,"shift":9,"offset":0,}, + "121": {"x":11,"y":50,"w":10,"h":24,"character":121,"shift":10,"offset":0,}, + "122": {"x":93,"y":75,"w":8,"h":24,"character":122,"shift":8,"offset":0,}, + "123": {"x":102,"y":75,"w":8,"h":24,"character":123,"shift":8,"offset":0,}, + "124": {"x":195,"y":75,"w":6,"h":24,"character":124,"shift":6,"offset":0,}, + "125": {"x":152,"y":75,"w":7,"h":24,"character":125,"shift":7,"offset":0,}, + "126": {"x":107,"y":25,"w":10,"h":24,"character":126,"shift":10,"offset":0,}, + }, + "kerningPairs": [], + "ranges": [ + {"lower":32,"upper":126,}, + ], + "regenerateBitmap": false, + "canGenerateBitmap": true, + "maintainGms1Font": true, + "parent": { + "name": "Fonts", + "path": "folders/Fonts.yy", + }, + "resourceVersion": "1.0", + "name": "fnt_test", + "tags": [], + "resourceType": "GMFont", +} \ No newline at end of file diff --git a/Kinect_23/objects/obj_test/Create_0.gml b/Kinect_23/objects/obj_test/Create_0.gml new file mode 100644 index 0000000..32bb8a0 --- /dev/null +++ b/Kinect_23/objects/obj_test/Create_0.gml @@ -0,0 +1,16 @@ +kinect_init(); +trace("open?", kinect_open()); +//show_message("!"); +kColor = new KinectSource(kinect_get_frame_description(kinect_source_color), function() { + return kinect_reader_copy_converted_color_data(buffer, kinect_color_image_format_rgba); +}); +kDepth = new KinectSource(kinect_get_frame_description(kinect_source_depth), function() { + return kinect_reader_copy_converted_depth_data(buffer, 0, 0.1, 0xFFFFFF); +}); +kInfrared = new KinectSource(kinect_get_frame_description(kinect_source_infrared), function() { + return kinect_reader_copy_converted_infrared_data(buffer, 0, 0.03, 0xFFFFFF); +}); +kArray = [kColor, kDepth, kInfrared]; +kCurr = kArray[0]; /// @is {KinectSource} +color = kinect_get_frame_description(kinect_source_color); +trace("open reader?", kinect_reader_open(kinect_source_depth | kinect_source_color | kinect_source_infrared)); \ No newline at end of file diff --git a/Kinect_23/objects/obj_test/Draw_0.gml b/Kinect_23/objects/obj_test/Draw_0.gml new file mode 100644 index 0000000..36a6fd2 --- /dev/null +++ b/Kinect_23/objects/obj_test/Draw_0.gml @@ -0,0 +1,4 @@ +draw_set_font(fnt_test); +draw_set_color(c_white); +kCurr.draw(); +//draw_text(5, 5, string(fps)); \ No newline at end of file diff --git a/Kinect_23/objects/obj_test/Step_0.gml b/Kinect_23/objects/obj_test/Step_0.gml new file mode 100644 index 0000000..4f6d5f4 --- /dev/null +++ b/Kinect_23/objects/obj_test/Step_0.gml @@ -0,0 +1,8 @@ +for (var i = 0; i < array_length(kArray); i++) { + if (keyboard_check_pressed(ord("1") + i)) kCurr = kArray[i]; +} +if (kinect_reader_acquire_frame()) { + //trace("frame", kinect_reader_get_raw_color_data_format()) + kCurr.update(); + kinect_reader_release_frame(); +} diff --git a/Kinect_23/objects/obj_test/obj_test.yy b/Kinect_23/objects/obj_test/obj_test.yy new file mode 100644 index 0000000..ab118ce --- /dev/null +++ b/Kinect_23/objects/obj_test/obj_test.yy @@ -0,0 +1,35 @@ +{ + "spriteId": null, + "solid": false, + "visible": true, + "spriteMaskId": null, + "persistent": false, + "parentObjectId": null, + "physicsObject": false, + "physicsSensor": false, + "physicsShape": 0, + "physicsGroup": 0, + "physicsDensity": 0.5, + "physicsRestitution": 0.1, + "physicsLinearDamping": 0.1, + "physicsAngularDamping": 0.1, + "physicsFriction": 0.2, + "physicsStartAwake": true, + "physicsKinematic": false, + "physicsShapePoints": [], + "eventList": [ + {"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"parent":{"name":"obj_test","path":"objects/obj_test/obj_test.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + {"isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,"parent":{"name":"obj_test","path":"objects/obj_test/obj_test.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + {"isDnD":false,"eventNum":0,"eventType":8,"collisionObjectId":null,"parent":{"name":"obj_test","path":"objects/obj_test/obj_test.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + ], + "properties": [], + "overriddenProperties": [], + "parent": { + "name": "Objects", + "path": "folders/Objects.yy", + }, + "resourceVersion": "1.0", + "name": "obj_test", + "tags": [], + "resourceType": "GMObject", +} \ No newline at end of file diff --git a/Kinect_23/rooms/rm_test/rm_test.yy b/Kinect_23/rooms/rm_test/rm_test.yy new file mode 100644 index 0000000..9df11fe --- /dev/null +++ b/Kinect_23/rooms/rm_test/rm_test.yy @@ -0,0 +1,56 @@ +{ + "isDnd": false, + "volume": 1.0, + "parentRoom": null, + "views": [ + {"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1024,"hview":768,"xport":0,"yport":0,"wport":1024,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,}, + {"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1024,"hview":768,"xport":0,"yport":0,"wport":1024,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,}, + {"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1024,"hview":768,"xport":0,"yport":0,"wport":1024,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,}, + {"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1024,"hview":768,"xport":0,"yport":0,"wport":1024,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,}, + {"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1024,"hview":768,"xport":0,"yport":0,"wport":1024,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,}, + {"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1024,"hview":768,"xport":0,"yport":0,"wport":1024,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,}, + {"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1024,"hview":768,"xport":0,"yport":0,"wport":1024,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,}, + {"inherit":false,"visible":false,"xview":0,"yview":0,"wview":1024,"hview":768,"xport":0,"yport":0,"wport":1024,"hport":768,"hborder":32,"vborder":32,"hspeed":-1,"vspeed":-1,"objectId":null,}, + ], + "layers": [ + {"instances":[ + {"properties":[],"isDnd":false,"objectId":{"name":"obj_test","path":"objects/obj_test/obj_test.yy",},"inheritCode":false,"hasCreationCode":false,"colour":4294967295,"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"imageIndex":0,"imageSpeed":1.0,"inheritedItemId":null,"frozen":false,"ignore":false,"inheritItemSettings":false,"x":0.0,"y":0.0,"resourceVersion":"1.0","name":"inst_F55A924E","tags":[],"resourceType":"GMRInstance",}, + ],"visible":true,"depth":0,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Instances_Depth_0","tags":[],"resourceType":"GMRInstanceLayer",}, + {"spriteId":null,"colour":4291141256,"x":0,"y":0,"htiled":false,"vtiled":false,"hspeed":0.0,"vspeed":0.0,"stretch":false,"animationFPS":15.0,"animationSpeedType":0,"userdefinedAnimFPS":false,"visible":true,"depth":2147483600,"userdefinedDepth":true,"inheritLayerDepth":false,"inheritLayerSettings":false,"gridX":32,"gridY":32,"layers":[],"hierarchyFrozen":false,"resourceVersion":"1.0","name":"Compatibility_Colour","tags":[],"resourceType":"GMRBackgroundLayer",}, + ], + "inheritLayers": false, + "creationCodeFile": "", + "inheritCode": false, + "instanceCreationOrder": [ + {"name":"inst_F55A924E","path":"rooms/rm_test/rm_test.yy",}, + ], + "inheritCreationOrder": false, + "sequenceId": null, + "roomSettings": { + "inheritRoomSettings": false, + "Width": 1280, + "Height": 720, + "persistent": false, + }, + "viewSettings": { + "inheritViewSettings": false, + "enableViews": false, + "clearViewBackground": true, + "clearDisplayBuffer": true, + }, + "physicsSettings": { + "inheritPhysicsSettings": false, + "PhysicsWorld": false, + "PhysicsWorldGravityX": 0.0, + "PhysicsWorldGravityY": 10.0, + "PhysicsWorldPixToMetres": 0.1, + }, + "parent": { + "name": "Rooms", + "path": "folders/Rooms.yy", + }, + "resourceVersion": "1.0", + "name": "rm_test", + "tags": [], + "resourceType": "GMRoom", +} \ No newline at end of file diff --git a/Kinect_23/scripts/KinectSource/KinectSource.gml b/Kinect_23/scripts/KinectSource/KinectSource.gml new file mode 100644 index 0000000..a197b26 --- /dev/null +++ b/Kinect_23/scripts/KinectSource/KinectSource.gml @@ -0,0 +1,26 @@ +function KinectSource(_desc/*:kinect_frame_description*/, _update/*:function*/) constructor { + desc = _desc; /// @is {kinect_frame_description} + width = _desc.width; + height = _desc.height; + buffer = buffer_create(width * height * 4, buffer_fixed, 1); + updateInner = method(self, _update); + surf = noone; /// @is {surface} + timeTotal = 0; + timeCount = 0; + time = 0; + static update = function() { + var t = get_timer(); + updateInner(); + timeTotal += (get_timer() - t); + time = timeTotal / ++timeCount; + if (!surface_exists(surf)) surf = surface_create(width, height); + buffer_set_surface(buffer, surf, 0); + } + static draw = function() { + if (surface_exists(surf)) draw_surface(surf, 0, 0); + draw_text(5, 5, string(fps) + + "\n" + string(time/1000) + "ms avg" + + "\n" + string(width) + "x" + string(height) + ); + } +} \ No newline at end of file diff --git a/Kinect_23/scripts/KinectSource/KinectSource.yy b/Kinect_23/scripts/KinectSource/KinectSource.yy new file mode 100644 index 0000000..1cfcaab --- /dev/null +++ b/Kinect_23/scripts/KinectSource/KinectSource.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Objects", + "path": "folders/Objects.yy", + }, + "resourceVersion": "1.0", + "name": "KinectSource", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/Kinect_23/scripts/trace/trace.gml b/Kinect_23/scripts/trace/trace.gml new file mode 100644 index 0000000..1508cf7 --- /dev/null +++ b/Kinect_23/scripts/trace/trace.gml @@ -0,0 +1,12 @@ +/// @description trace(...) +/// @param ... +function trace() { + var r = string(argument[0]); + for (var i = 1; i < argument_count; i++) { + r += " " + string(argument[i]); + } + show_debug_message(r); + + + +} diff --git a/Kinect_23/scripts/trace/trace.yy b/Kinect_23/scripts/trace/trace.yy new file mode 100644 index 0000000..0637bc5 --- /dev/null +++ b/Kinect_23/scripts/trace/trace.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "Scripts", + "path": "folders/Scripts.yy", + }, + "resourceVersion": "1.0", + "name": "trace", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/Kinect_yy/Kinect.yyp b/Kinect_yy/Kinect.yyp new file mode 100644 index 0000000..1360422 --- /dev/null +++ b/Kinect_yy/Kinect.yyp @@ -0,0 +1,278 @@ +{ + "id": "f38cca66-ec84-4f8c-8d5c-34f9190932d3", + "modelName": "GMProject", + "mvc": "1.0", + "IsDnDProject": false, + "configs": [ + + ], + "option_ecma": false, + "parentProject": { + "id": "e72c2b0f-3fcf-442b-99b8-f39aca2b6b28", + "modelName": "GMProjectParent", + "mvc": "1.0", + "alteredResources": [ + { + "Key": "ed6a955d-5826-4f98-a450-10b414266c27", + "Value": { + "configDeltas": [ + "inherited" + ], + "id": "f32ee1ce-cb3b-424f-9be4-0c424c357045", + "resourcePath": "options\\main\\options_main.yy", + "resourceType": "GMMainOptions" + } + } + ], + "hiddenResources": [ + + ], + "projectPath": "${base_project}" + }, + "resources": [ + { + "Key": "1a1012ca-9702-4cd0-870a-3101ca12fddb", + "Value": { + "id": "bfd0da8f-b556-4257-b249-1d663bbb4642", + "resourcePath": "views\\1a1012ca-9702-4cd0-870a-3101ca12fddb.yy", + "resourceType": "GMFolder" + } + }, + { + "Key": "3a5af38c-757d-41ae-98c0-5d4b09e14e6a", + "Value": { + "id": "3efaa511-edf7-46f7-9330-92138e9bbf86", + "resourcePath": "options\\switch\\options_switch.yy", + "resourceType": "GMSwitchOptions" + } + }, + { + "Key": "4f96784b-1ebd-4fc6-8c5b-10ee426a2840", + "Value": { + "id": "912c61ec-e718-4f7f-a2f5-d912c46804db", + "resourcePath": "views\\4f96784b-1ebd-4fc6-8c5b-10ee426a2840.yy", + "resourceType": "GMFolder" + } + }, + { + "Key": "504c1931-39ad-4f48-b783-4eb537b963d6", + "Value": { + "id": "4de1e70e-2a1b-43a9-b5c3-5fe4695c6b91", + "resourcePath": "views\\504c1931-39ad-4f48-b783-4eb537b963d6.yy", + "resourceType": "GMFolder" + } + }, + { + "Key": "5b69cb1a-9117-3b4c-bbf6-68667a6d174d", + "Value": { + "id": "c23ba412-ec73-47c2-a31b-635d32f01a79", + "resourcePath": "rooms\\rm_test\\rm_test.yy", + "resourceType": "GMRoom" + } + }, + { + "Key": "690caa00-bb5f-4c7f-b921-6fd3330a6bc3", + "Value": { + "id": "17ab6a1b-2351-44f4-bca7-5f60a1858bd2", + "resourcePath": "views\\690caa00-bb5f-4c7f-b921-6fd3330a6bc3.yy", + "resourceType": "GMFolder" + } + }, + { + "Key": "6e9a4a1b-fa39-4f06-94c9-1a7f8822216a", + "Value": { + "id": "03a5762f-e117-4e69-974f-681404ee986c", + "resourcePath": "views\\6e9a4a1b-fa39-4f06-94c9-1a7f8822216a.yy", + "resourceType": "GMFolder" + } + }, + { + "Key": "75ac291e-7061-4bcb-8e8a-3b3545332d41", + "Value": { + "id": "1d0c9ed3-f4a7-4945-b717-197c8b979822", + "resourcePath": "options\\html5\\options_html5.yy", + "resourceType": "GMHtml5Options" + } + }, + { + "Key": "81be6123-f045-42c2-ad8f-dd97676ed387", + "Value": { + "id": "5aa926e9-be5f-40da-b4a4-7634095fb4f3", + "resourcePath": "views\\81be6123-f045-42c2-ad8f-dd97676ed387.yy", + "resourceType": "GMFolder" + } + }, + { + "Key": "8427047f-9ef8-4c77-89f3-9c20623d07b6", + "Value": { + "id": "73b0c5f4-79ce-41c6-87e7-eda693bd0e7d", + "resourcePath": "options\\ios\\options_ios.yy", + "resourceType": "GMiOSOptions" + } + }, + { + "Key": "8c638ff8-1abe-4e11-bc32-7ef6af8b7b4f", + "Value": { + "id": "acd89560-7841-42f8-8e4b-bd25da77089a", + "resourcePath": "views\\8c638ff8-1abe-4e11-bc32-7ef6af8b7b4f.yy", + "resourceType": "GMFolder" + } + }, + { + "Key": "93566aad-c3b3-48a9-8fa7-9c5ee19f74ac", + "Value": { + "id": "5c5a0221-b6dc-4fd5-9526-dfa64a342473", + "resourcePath": "options\\tvos\\options_tvos.yy", + "resourceType": "GMtvOSOptions" + } + }, + { + "Key": "9878a9d0-ce0a-4455-91a7-89de6e4976a2", + "Value": { + "id": "9f7bffcc-be07-4268-965d-e2c5e1f99520", + "resourcePath": "views\\9878a9d0-ce0a-4455-91a7-89de6e4976a2.yy", + "resourceType": "GMFolder" + } + }, + { + "Key": "9a74872b-1d34-4b7c-8038-1116e4426c86", + "Value": { + "id": "e35af51e-75a5-43d5-846a-27e7be98eafb", + "resourcePath": "objects\\obj_test\\obj_test.yy", + "resourceType": "GMObject" + } + }, + { + "Key": "9fdcc299-adf8-4729-b2f3-076ababf81ed", + "Value": { + "id": "97564aa1-1714-4f87-8ec1-239823503c35", + "resourcePath": "views\\9fdcc299-adf8-4729-b2f3-076ababf81ed.yy", + "resourceType": "GMFolder" + } + }, + { + "Key": "a128950b-5063-4876-b4a6-b99dbd2ea6d1", + "Value": { + "id": "b65303e9-2e74-4ae1-b7ea-35c71786b951", + "resourcePath": "options\\amazonfire\\options_amazonfire.yy", + "resourceType": "GMAmazonFireOptions" + } + }, + { + "Key": "a9188620-a624-4a5a-83ae-a1b53faf038b", + "Value": { + "id": "6ef21923-5c8d-4a4a-8fb3-8e78ba8510c5", + "resourcePath": "options\\linux\\options_linux.yy", + "resourceType": "GMLinuxOptions" + } + }, + { + "Key": "b0dd5a43-c44b-402e-b40f-a394287a9e3e", + "Value": { + "id": "85e8934c-8ea3-49dc-884f-75423f6f6b44", + "resourcePath": "scripts\\trace\\trace.yy", + "resourceType": "GMScript" + } + }, + { + "Key": "c583b9bc-76c2-490f-a077-1eeafac7f5ec", + "Value": { + "id": "34ad12ce-1f16-4e35-8e72-9d166cbf2412", + "resourcePath": "views\\c583b9bc-76c2-490f-a077-1eeafac7f5ec.yy", + "resourceType": "GMFolder" + } + }, + { + "Key": "c9dcc6e5-46f1-4578-8543-9af4f6a4f7de", + "Value": { + "id": "feb828a2-7ad5-43f6-aa87-0fdfe3cf337f", + "resourcePath": "views\\c9dcc6e5-46f1-4578-8543-9af4f6a4f7de.yy", + "resourceType": "GMFolder" + } + }, + { + "Key": "cc98d028-7bdd-4680-85f3-c87a7baa481e", + "Value": { + "id": "fd66a313-d4db-47e0-ae6f-0ce859b96dc2", + "resourcePath": "options\\windows\\options_windows.yy", + "resourceType": "GMWindowsOptions" + } + }, + { + "Key": "cd167524-ca47-2561-47ba-fcf23257e43d", + "Value": { + "id": "7211ca9e-d381-4e90-ae76-dc01e24ebe81", + "resourcePath": "fonts\\fnt_test\\fnt_test.yy", + "resourceType": "GMFont" + } + }, + { + "Key": "e1f1ecaa-5d53-86e3-173d-52e6d8f9bb6c", + "Value": { + "id": "fcd60484-ba8e-4df5-a982-2d3043353c3f", + "resourcePath": "extensions\\Kinect\\Kinect.yy", + "resourceType": "GMExtension" + } + }, + { + "Key": "e42bf5cc-3f46-4d67-a6d0-a4885a11ac3f", + "Value": { + "id": "4aadebc5-71f1-4e35-8032-a388a336fbaa", + "resourcePath": "options\\android\\options_android.yy", + "resourceType": "GMAndroidOptions" + } + }, + { + "Key": "e5b1e8fe-f417-43e8-b65f-8a518d723aea", + "Value": { + "id": "208821a9-72b5-4824-b28f-62242e054e4e", + "resourcePath": "views\\e5b1e8fe-f417-43e8-b65f-8a518d723aea.yy", + "resourceType": "GMFolder" + } + }, + { + "Key": "e5bc0382-83e6-4bfa-b68f-c702a7545129", + "Value": { + "id": "a0581282-fe40-48a8-babe-198de1cc3f54", + "resourcePath": "views\\e5bc0382-83e6-4bfa-b68f-c702a7545129.yy", + "resourceType": "GMFolder" + } + }, + { + "Key": "f2ec9b0e-c3fe-4297-a78d-fa6f418fd827", + "Value": { + "id": "77d92dc4-7823-4537-bbfb-28e7b8562ab4", + "resourcePath": "views\\f2ec9b0e-c3fe-4297-a78d-fa6f418fd827.yy", + "resourceType": "GMFolder" + } + }, + { + "Key": "f418569b-3bdd-4706-a0e4-364317f54032", + "Value": { + "id": "ffea5fd3-2861-405a-988a-b8c8d9cc88b8", + "resourcePath": "options\\mac\\options_mac.yy", + "resourceType": "GMMacOptions" + } + }, + { + "Key": "f664cd6f-a19b-470a-8b94-844b0367b313", + "Value": { + "id": "1cf6315f-4b3f-4ce6-b0ac-c1600e4d26bf", + "resourcePath": "views\\f664cd6f-a19b-470a-8b94-844b0367b313.yy", + "resourceType": "GMFolder" + } + }, + { + "Key": "f8edfe34-8789-4236-b7e4-741b59e181b8", + "Value": { + "id": "1bc8d64d-ad12-41fe-95ad-ddc598d6b6be", + "resourcePath": "views\\f8edfe34-8789-4236-b7e4-741b59e181b8.yy", + "resourceType": "GMFolder" + } + } + ], + "script_order": [ + "b0dd5a43-c44b-402e-b40f-a394287a9e3e" + ], + "tutorial": "" +} \ No newline at end of file diff --git a/Kinect_yy/extensions/Kinect/Kinect.yy b/Kinect_yy/extensions/Kinect/Kinect.yy new file mode 100644 index 0000000..5fc5588 --- /dev/null +++ b/Kinect_yy/extensions/Kinect/Kinect.yy @@ -0,0 +1,650 @@ +{ + "id": "e1f1ecaa-5d53-86e3-173d-52e6d8f9bb6c", + "modelName": "GMExtension", + "mvc": "1.2", + "name": "Kinect", + "IncludedResources": [ + + ], + "androidPermissions": [ + + ], + "androidProps": true, + "androidactivityinject": "", + "androidclassname": "", + "androidinject": "", + "androidmanifestinject": "", + "androidsourcedir": "", + "author": "", + "classname": "", + "copyToTargets": 113497714299118, + "date": "2019-34-12 01:12:29", + "description": "", + "exportToGame": true, + "extensionName": "", + "files": [ + { + "id": "bac80d6c-a2e2-445c-9d9d-6141adb131a5", + "modelName": "GMExtensionFile", + "mvc": "1.0", + "ProxyFiles": [ + + ], + "constants": [ + { + "id": "c3d3ce88-f7f9-2cc1-e8c2-2591a960ff2e", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_source_color", + "hidden": false, + "value": "1" + }, + { + "id": "a4b49e4f-c2a4-d5a4-b04e-e06e21d51fc8", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_source_infrared", + "hidden": false, + "value": "2" + }, + { + "id": "e1f1ecaa-808e-5be3-173d-8f3b00acee3c", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_source_infrared_long_exposure", + "hidden": false, + "value": "4" + }, + { + "id": "648fec35-0865-8fc5-0589-1cf4df1d4e86", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_source_depth", + "hidden": false, + "value": "8" + }, + { + "id": "87978acc-5d53-8685-5379-70c4f235558a", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_color_image_format_none", + "hidden": false, + "value": "0" + }, + { + "id": "cc076453-95b8-bcf2-7c10-7ed8ff190ac2", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_color_image_format_rgba", + "hidden": false, + "value": "1" + }, + { + "id": "1fd216c7-4424-2a55-4514-4a2216ab174b", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_color_image_format_yuv", + "hidden": false, + "value": "2" + }, + { + "id": "ffd6da51-1499-b63a-49d0-84e0aad3cb7c", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_color_image_format_bgra", + "hidden": false, + "value": "3" + }, + { + "id": "8a23b3ee-9efe-95aa-fc40-e9ef34983fbc", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_color_image_format_bayer", + "hidden": false, + "value": "4" + }, + { + "id": "e4e7945d-e252-a371-5bd9-305df369f8b7", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_color_image_format_yuy2", + "hidden": false, + "value": "5" + } + ], + "copyToTargets": 9223372036854775807, + "filename": "Kinect.dll", + "final": "", + "functions": [ + { + "id": "d2c2df99-f7f9-2cd0-e8c2-3480b2ca449f", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 0, + "args": [ + + ], + "externalName": "kinect_init_raw", + "help": "kinect_init_raw()", + "hidden": false, + "kind": 1, + "name": "kinect_init_raw", + "returnType": 2 + }, + { + "id": "880b3477-fcdc-53c8-d086-74875a7295f2", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 0, + "args": [ + + ], + "externalName": "kinect_open", + "help": "kinect_open()", + "hidden": false, + "kind": 1, + "name": "kinect_open", + "returnType": 2 + }, + { + "id": "f590e9e6-57eb-c5a8-2ca1-b277a2c06364", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 0, + "args": [ + + ], + "externalName": "kinect_close", + "help": "kinect_close()", + "hidden": false, + "kind": 1, + "name": "kinect_close", + "returnType": 2 + }, + { + "id": "2d3d2066-4c42-972f-dbf1-43f7c93577a0", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 2, + "args": [ + 1, + 2 + ], + "externalName": "kinect_get_frame_description_raw", + "help": "", + "hidden": true, + "kind": 11, + "name": "kinect_get_frame_description_raw", + "returnType": 2 + }, + { + "id": "1b70139f-779a-2567-24cd-8de6a08c5fc2", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 1, + "args": [ + 2 + ], + "externalName": "kinect_reader_open", + "help": "kinect_reader_open(_source_types)", + "hidden": false, + "kind": 1, + "name": "kinect_reader_open", + "returnType": 2 + }, + { + "id": "a5b5a8ee-3b35-e0a7-173d-70c4fc9f9948", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 0, + "args": [ + + ], + "externalName": "kinect_reader_close", + "help": "kinect_reader_close()", + "hidden": false, + "kind": 1, + "name": "kinect_reader_close", + "returnType": 2 + }, + { + "id": "a59efd8e-21fc-bcfd-8d98-9fc74bda3968", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 0, + "args": [ + + ], + "externalName": "kinect_reader_acquire_frame", + "help": "kinect_reader_acquire_frame()", + "hidden": false, + "kind": 1, + "name": "kinect_reader_acquire_frame", + "returnType": 2 + }, + { + "id": "5b5ada0b-864a-a2d3-6046-684c91da4a9e", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 0, + "args": [ + + ], + "externalName": "kinect_reader_release_frame", + "help": "kinect_reader_release_frame()", + "hidden": false, + "kind": 1, + "name": "kinect_reader_release_frame", + "returnType": 2 + }, + { + "id": "e1f1ecaa-2a24-f1e3-240e-16a2988eff2c", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 2, + "args": [ + 1, + 2 + ], + "externalName": "kinect_reader_copy_raw_color_data_", + "help": "", + "hidden": true, + "kind": 11, + "name": "kinect_reader_copy_raw_color_data_", + "returnType": 2 + }, + { + "id": "d0746b1c-bc38-1860-448a-06ddc07d8cc2", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 0, + "args": [ + + ], + "externalName": "kinect_reader_get_raw_color_data_format", + "help": "kinect_reader_get_raw_color_data_format()", + "hidden": false, + "kind": 1, + "name": "kinect_reader_get_raw_color_data_format", + "returnType": 2 + }, + { + "id": "fe94951e-6048-70b6-7feb-e8de3b5f89f3", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 3, + "args": [ + 1, + 2, + 2 + ], + "externalName": "kinect_reader_copy_converted_color_data_", + "help": "", + "hidden": true, + "kind": 11, + "name": "kinect_reader_copy_converted_color_data_", + "returnType": 2 + }, + { + "id": "d2c2df99-919f-4ad0-e8c2-52e6d806885f", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 2, + "args": [ + 1, + 2 + ], + "externalName": "kinect_reader_copy_raw_depth_data_", + "help": "", + "hidden": true, + "kind": 11, + "name": "kinect_reader_copy_raw_depth_data_", + "returnType": 2 + }, + { + "id": "0d1675db-fa47-da9d-8bdc-556b5845c6b5", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 3, + "args": [ + 1, + 2, + 1 + ], + "externalName": "kinect_reader_copy_converted_depth_data_", + "help": "", + "hidden": true, + "kind": 11, + "name": "kinect_reader_copy_converted_depth_data_", + "returnType": 2 + }, + { + "id": "5a4a5711-f7f9-2c58-ac86-f84c742466b7", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 2, + "args": [ + 1, + 2 + ], + "externalName": "kinect_reader_copy_raw_infrared_data_", + "help": "", + "hidden": true, + "kind": 11, + "name": "kinect_reader_copy_raw_infrared_data_", + "returnType": 2 + }, + { + "id": "6a610242-ae03-7036-36ab-efc77b00934a", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 3, + "args": [ + 1, + 2, + 1 + ], + "externalName": "kinect_reader_copy_converted_infrared_data_", + "help": "", + "hidden": true, + "kind": 11, + "name": "kinect_reader_copy_converted_infrared_data_", + "returnType": 2 + } + ], + "init": "", + "kind": 1, + "order": [ + + ], + "origname": "extensions\\Kinect.dll", + "uncompress": false + }, + { + "id": "7cc73678-e3b5-432b-8372-a1d5779ceb4b", + "modelName": "GMExtensionFile", + "mvc": "1.0", + "ProxyFiles": [ + + ], + "constants": [ + { + "id": "87978acc-919f-4a85-173d-f84c73e8cc1a", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_struct_ptr", + "hidden": true, + "value": "buffer_get_address(kinect_struct_buf)" + } + ], + "copyToTargets": 9223372036854775807, + "filename": "kinect_core.gml", + "final": "", + "functions": [ + { + "id": "67bcdf17-3c21-da97-2ddc-5fcd54290a1f", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 0, + "args": [ + + ], + "externalName": "kinect_init", + "help": "", + "hidden": true, + "kind": 11, + "name": "kinect_init", + "returnType": 2 + }, + { + "id": "a40f34e5-62be-6e15-b8c8-8612fb7c9cf2", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": -1, + "args": [ + + ], + "externalName": "kinect_struct_create", + "help": "", + "hidden": true, + "kind": 11, + "name": "kinect_struct_create", + "returnType": 2 + }, + { + "id": "e3f89bbd-b5b8-ade1-4a98-38bbd0390a2c", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 2, + "args": [ + 2, + 2 + ], + "externalName": "kinect_struct_read", + "help": "", + "hidden": true, + "kind": 11, + "name": "kinect_struct_read", + "returnType": 2 + }, + { + "id": "da61028e-6f12-ade6-3032-7b859e0d4e68", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 1, + "args": [ + 2 + ], + "externalName": "kinect_get_frame_description", + "help": "kinect_get_frame_description(kind)->kinect_frame_description", + "hidden": false, + "kind": 2, + "name": "kinect_get_frame_description", + "returnType": 2 + }, + { + "id": "b59efddb-068b-9eda-f8ab-ded42cce7d4a", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 1, + "args": [ + 2 + ], + "externalName": "kinect_reader_copy_raw_color_data", + "help": "kinect_reader_copy_raw_color_data(out:buffer)", + "hidden": false, + "kind": 2, + "name": "kinect_reader_copy_raw_color_data", + "returnType": 2 + }, + { + "id": "64915963-11bd-e1f4-bb78-c191b0f1a045", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 2, + "args": [ + 2, + 2 + ], + "externalName": "kinect_reader_copy_converted_color_data", + "help": "kinect_reader_copy_converted_color_data(out:buffer, format)", + "hidden": false, + "kind": 2, + "name": "kinect_reader_copy_converted_color_data", + "returnType": 2 + }, + { + "id": "a5b5a8ee-3b35-e0a7-8ea4-e95d6271ee38", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 4, + "args": [ + 2, + 2, + 2, + 2 + ], + "externalName": "kinect_reader_copy_converted_depth_data", + "help": "kinect_reader_copy_converted_depth_data(out:buffer, min:number, max:number, col:number)", + "hidden": false, + "kind": 2, + "name": "kinect_reader_copy_converted_depth_data", + "returnType": 2 + }, + { + "id": "aa610271-4b56-165b-eccd-5fc033381b0e", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 4, + "args": [ + 2, + 2, + 2, + 2 + ], + "externalName": "kinect_reader_copy_converted_infrared_data", + "help": "kinect_reader_copy_converted_infrared_data(out:buffer, min:number, max:number, col:number)", + "hidden": false, + "kind": 2, + "name": "kinect_reader_copy_converted_infrared_data", + "returnType": 2 + } + ], + "init": "", + "kind": 2, + "order": [ + + ], + "origname": "extensions\\gml.gml", + "uncompress": false + }, + { + "id": "4c2bff56-cf82-4236-a8e9-bd06435476ba", + "modelName": "GMExtensionFile", + "mvc": "1.0", + "ProxyFiles": [ + + ], + "constants": [ + { + "id": "3c2c3177-e6e8-3d3e-cae0-e95d667133e1", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_frame_description_width", + "hidden": false, + "value": "0" + }, + { + "id": "78687533-0806-d37a-dbf1-52e6d7cadd05", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_frame_description_height", + "hidden": false, + "value": "1" + }, + { + "id": "9f3457ca-7b56-f8b6-3f10-09a853a2b14a", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_frame_description_horizontalFieldOfView", + "hidden": false, + "value": "2" + }, + { + "id": "97e18f5e-da63-2a52-9d95-5b9ae9533653", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_frame_description_verticalFieldOfView", + "hidden": false, + "value": "3" + }, + { + "id": "776e52de-44e7-d06c-2f82-c39ecc1f0d95", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_frame_description_diagonalFieldOfView", + "hidden": false, + "value": "4" + }, + { + "id": "73b08e99-9efe-34bb-ea1e-70bdb1ba1dc0", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_frame_description_lengthInPixels", + "hidden": false, + "value": "5" + }, + { + "id": "285ce86e-d6b4-b2a5-bbd0-a7e27b24e1d5", + "modelName": "GMExtensionConstant", + "mvc": "1.0", + "constantName": "kinect_frame_description_bytesPerPixel", + "hidden": false, + "value": "6" + } + ], + "copyToTargets": -1, + "filename": "kinect_structs.gml", + "final": "", + "functions": [ + { + "id": "8e81d5f1-8c89-0907-df3b-f83b6bf1a885", + "modelName": "GMExtensionFunction", + "mvc": "1.0", + "argCount": 0, + "args": [ + + ], + "externalName": "kinect_init_structs", + "help": "", + "hidden": true, + "kind": 11, + "name": "kinect_init_structs", + "returnType": 2 + } + ], + "init": "", + "kind": 2, + "order": [ + "8e81d5f1-8c89-0907-df3b-f83b6bf1a885" + ], + "origname": "", + "uncompress": false + } + ], + "gradleinject": "", + "helpfile": "", + "installdir": "", + "iosProps": true, + "iosSystemFrameworkEntries": [ + + ], + "iosThirdPartyFrameworkEntries": [ + + ], + "iosdelegatename": "", + "iosplistinject": "", + "license": "Proprietary", + "maccompilerflags": "", + "maclinkerflags": "", + "macsourcedir": "", + "options": null, + "optionsFile": "options.json", + "packageID": "", + "productID": "", + "sourcedir": "", + "supportedTargets": 113497714299118, + "tvosProps": false, + "tvosSystemFrameworkEntries": [ + + ], + "tvosThirdPartyFrameworkEntries": [ + + ], + "tvosclassname": "", + "tvosdelegatename": "", + "tvosmaccompilerflags": "", + "tvosmaclinkerflags": "", + "tvosplistinject": "", + "version": "1.0.0" +} \ No newline at end of file diff --git a/Kinect_yy/extensions/Kinect/kinect_core.gml b/Kinect_yy/extensions/Kinect/kinect_core.gml new file mode 100644 index 0000000..407e19b --- /dev/null +++ b/Kinect_yy/extensions/Kinect/kinect_core.gml @@ -0,0 +1,89 @@ +#define kinect_init +//#macro kinect_struct_ptr buffer_get_address(kinect_struct_buf)~ +if (!kinect_init_raw()) show_debug_message("Failed to load Kinect dll"); +kinect_init_structs(); +globalvar kinect_struct_buf; kinect_struct_buf = buffer_create(1024, buffer_grow, 1); + +#define kinect_struct_create +/// (...pairs)~ +var _argc = argument_count; +var _size = _argc div 2; +var _types = array_create(_size); +var k = 0; +/* GMS >= 2.3: +var _names = array_create(_size); +var _out = { names: _names, types: _types }; +for (var i = 0; i < argument_count; i += 2) { + _names[@k] = argument[i]; + _types[@k] = argument[i + 1]; + k += 1; +} +return _out; +/*/ +for (var i = 0; i < argument_count; i += 2) { + _types[k] = argument[i + 1]; + k += 1; +} +return _types; +//*/ + +#define kinect_struct_read +/// (status, struct_t)~ +var _status = argument0, _proto = argument1; +if (_status <= 0) return undefined; +var _buf = kinect_struct_buf; +buffer_seek(_buf, buffer_seek_start, 0); +/* GMS >= 2.3: +var _types = _proto.types; +var _names = _proto.names; +var _size = array_length(_types); +var _obj = {}; +for (var i = 0; i < _size; i++) { + variable_struct_set(_obj, _names[i], buffer_read(_buf, _types[i])); +} +return _obj; +/*/ +var _size = array_length_1d(_proto); +var _arr = array_create(_size); +for (var i = 0; i < _size; i++) { + _arr[i] = buffer_read(_buf, _proto[i]); +} +return _arr; +//*/ + +#define kinect_get_frame_description +/// (kind)->kinect_frame_description +return kinect_struct_read( + kinect_get_frame_description_raw(kinect_struct_ptr, argument0), + global.__kinect_frame_description +); + +#define kinect_reader_copy_raw_color_data +/// (out:buffer) +var _buf = argument0; +return kinect_reader_copy_raw_color_data_(buffer_get_address(_buf), buffer_get_size(_buf)); + +#define kinect_reader_copy_converted_color_data +/// (out:buffer, format) +var _buf = argument0, _format = argument1; +return kinect_reader_copy_converted_color_data_(buffer_get_address(_buf), buffer_get_size(_buf), _format); + +#define kinect_reader_copy_converted_depth_data +/// (out:buffer, min:number, max:number, col:number) +var _out = argument0, _min = argument1, _max = argument2, _col = argument3; +var b = kinect_struct_buf; +buffer_seek(b, buffer_seek_start, 0); +buffer_write(b, buffer_f64, _min); +buffer_write(b, buffer_f64, _max); +buffer_write(b, buffer_u32, _col); +return kinect_reader_copy_converted_depth_data_(buffer_get_address(_out), buffer_get_size(_out), buffer_get_address(b)); + +#define kinect_reader_copy_converted_infrared_data +/// (out:buffer, min:number, max:number, col:number) +var _out = argument0, _min = argument1, _max = argument2, _col = argument3; +var b = kinect_struct_buf; +buffer_seek(b, buffer_seek_start, 0); +buffer_write(b, buffer_f64, _min); +buffer_write(b, buffer_f64, _max); +buffer_write(b, buffer_u32, _col); +return kinect_reader_copy_converted_infrared_data_(buffer_get_address(_out), buffer_get_size(_out), buffer_get_address(b)); diff --git a/Kinect_yy/extensions/Kinect/kinect_structs.gml b/Kinect_yy/extensions/Kinect/kinect_structs.gml new file mode 100644 index 0000000..49c916a --- /dev/null +++ b/Kinect_yy/extensions/Kinect/kinect_structs.gml @@ -0,0 +1,19 @@ +#define kinect_init_structs +// NB! Much of this file is updated by GmxGen based on structs in C++ code +/// @hint {int} kinect_frame_description:width +/// @hint {int} kinect_frame_description:height +/// @hint {number} kinect_frame_description:horizontalFieldOfView +/// @hint {number} kinect_frame_description:verticalFieldOfView +/// @hint {number} kinect_frame_description:diagonalFieldOfView +/// @hint {int} kinect_frame_description:lengthInPixels +/// @hint {int} kinect_frame_description:bytesPerPixel +// GMS < 2.3: +//#macro kinect_frame_description_width 0 +//#macro kinect_frame_description_height 1 +//#macro kinect_frame_description_horizontalFieldOfView 2 +//#macro kinect_frame_description_verticalFieldOfView 3 +//#macro kinect_frame_description_diagonalFieldOfView 4 +//#macro kinect_frame_description_lengthInPixels 5 +//#macro kinect_frame_description_bytesPerPixel 6 +//*/ +global.__kinect_frame_description = kinect_struct_create("width", buffer_s32, "height", buffer_s32, "horizontalFieldOfView", buffer_f32, "verticalFieldOfView", buffer_f32, "diagonalFieldOfView", buffer_f32, "lengthInPixels", buffer_u32, "bytesPerPixel", buffer_u32); diff --git a/Kinect_yy/fonts/fnt_test/fnt_test.gms1.png b/Kinect_yy/fonts/fnt_test/fnt_test.gms1.png new file mode 100644 index 0000000..f7e73fc Binary files /dev/null and b/Kinect_yy/fonts/fnt_test/fnt_test.gms1.png differ diff --git a/Kinect_yy/fonts/fnt_test/fnt_test.gms1.yy b/Kinect_yy/fonts/fnt_test/fnt_test.gms1.yy new file mode 100644 index 0000000..a5de249 --- /dev/null +++ b/Kinect_yy/fonts/fnt_test/fnt_test.gms1.yy @@ -0,0 +1,1461 @@ +{ + "id": "cd167524-ca47-2561-47ba-fcf23257e43d", + "modelName": "GMFont", + "mvc": "1.1", + "name": "fnt_test", + "AntiAlias": 0, + "TTFName": "", + "ascenderOffset": 0, + "bold": false, + "charset": 1, + "first": 0, + "fontName": "Ubuntu Condensed SemiItalic", + "glyphOperations": 0, + "glyphs": [ + { + "Key": 32, + "Value": { + "id": "1fd41a76-3351-40af-927e-468676c7b33c", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 32, + "h": 24, + "offset": 0, + "shift": 4, + "w": 4, + "x": 226, + "y": 75 + } + }, + { + "Key": 33, + "Value": { + "id": "30298886-ceba-44ea-85fc-ebbeeb281160", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 33, + "h": 24, + "offset": 0, + "shift": 6, + "w": 6, + "x": 174, + "y": 75 + } + }, + { + "Key": 34, + "Value": { + "id": "29c4bfeb-1bc7-4bf5-9a0f-f87ee168dfc9", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 34, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 87, + "y": 50 + } + }, + { + "Key": 35, + "Value": { + "id": "5f4499e6-b580-484f-8c8e-856490ac6a05", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 35, + "h": 24, + "offset": 0, + "shift": 13, + "w": 13, + "x": 83, + "y": 0 + } + }, + { + "Key": 36, + "Value": { + "id": "e160edd6-c5b3-4674-93f5-040717bb36d1", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 36, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 97, + "y": 50 + } + }, + { + "Key": 37, + "Value": { + "id": "7328bb00-d4b2-42af-833a-9209c524f072", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 37, + "h": 24, + "offset": 0, + "shift": 14, + "w": 14, + "x": 68, + "y": 0 + } + }, + { + "Key": 38, + "Value": { + "id": "a54839ed-da35-4e53-adea-5e3184229ed3", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 38, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 228, + "y": 0 + } + }, + { + "Key": 39, + "Value": { + "id": "03235ec1-8bdf-4c47-a05c-9a9cab5d641d", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 39, + "h": 24, + "offset": 0, + "shift": 6, + "w": 6, + "x": 160, + "y": 75 + } + }, + { + "Key": 40, + "Value": { + "id": "6d5f5fff-94ab-4def-a7d8-a19e16520271", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 40, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 247, + "y": 50 + } + }, + { + "Key": 41, + "Value": { + "id": "b720fd67-e487-405f-a7a5-e83754c2fbd2", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 41, + "h": 24, + "offset": 0, + "shift": 7, + "w": 7, + "x": 120, + "y": 75 + } + }, + { + "Key": 42, + "Value": { + "id": "0a9a9010-1d40-4c90-9861-3a948ae7f1ff", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 42, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 77, + "y": 50 + } + }, + { + "Key": 43, + "Value": { + "id": "6f1bcb8c-c415-4d6a-97c3-8413d8e75de6", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 43, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 96, + "y": 25 + } + }, + { + "Key": 44, + "Value": { + "id": "47f97006-1998-464b-9f09-97d0c4d712a2", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 44, + "h": 24, + "offset": 0, + "shift": 5, + "w": 5, + "x": 250, + "y": 25 + } + }, + { + "Key": 45, + "Value": { + "id": "d80369d7-627b-403b-9f5b-0b352acc9a83", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 45, + "h": 24, + "offset": 0, + "shift": 6, + "w": 6, + "x": 167, + "y": 75 + } + }, + { + "Key": 46, + "Value": { + "id": "10cb6210-c0ce-4962-9954-f256cae78c66", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 46, + "h": 24, + "offset": 0, + "shift": 5, + "w": 5, + "x": 202, + "y": 75 + } + }, + { + "Key": 47, + "Value": { + "id": "6956063f-42d1-40ad-85f5-e1019c9e12a4", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 47, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 217, + "y": 25 + } + }, + { + "Key": 48, + "Value": { + "id": "778db60c-747d-41db-af06-6fb1cebcbb4d", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 48, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 177, + "y": 50 + } + }, + { + "Key": 49, + "Value": { + "id": "999c1ce3-4b26-49ae-bf7c-e7593fae5cdf", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 49, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 187, + "y": 50 + } + }, + { + "Key": 50, + "Value": { + "id": "b3093f61-8722-4f19-98f6-5f0de161cf32", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 50, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 137, + "y": 50 + } + }, + { + "Key": 51, + "Value": { + "id": "ea683cb3-0346-4d4a-96ac-97599b7a277d", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 51, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 207, + "y": 50 + } + }, + { + "Key": 52, + "Value": { + "id": "7ff826b4-95ad-4e97-b8df-d38e861a4862", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 52, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 22, + "y": 50 + } + }, + { + "Key": 53, + "Value": { + "id": "f2609491-7df3-4056-b321-11e98719bdad", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 53, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 147, + "y": 50 + } + }, + { + "Key": 54, + "Value": { + "id": "f5b18e47-66c9-419a-8b75-57401de77eeb", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 54, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 20, + "y": 75 + } + }, + { + "Key": 55, + "Value": { + "id": "61ca310f-d737-4319-8d37-343a083bebe0", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 55, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 33, + "y": 50 + } + }, + { + "Key": 56, + "Value": { + "id": "a1cd5721-752c-465c-bd41-7448c24b01a8", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 56, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 44, + "y": 50 + } + }, + { + "Key": 57, + "Value": { + "id": "ddb8bd57-e469-44f9-87c8-917097e284d1", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 57, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 217, + "y": 50 + } + }, + { + "Key": 58, + "Value": { + "id": "15433883-9c4f-4253-90b2-7d3fb1cedb40", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 58, + "h": 24, + "offset": 0, + "shift": 5, + "w": 5, + "x": 220, + "y": 75 + } + }, + { + "Key": 59, + "Value": { + "id": "626729a3-9711-4a5a-88c2-42bad3f202f8", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 59, + "h": 24, + "offset": 0, + "shift": 5, + "w": 5, + "x": 214, + "y": 75 + } + }, + { + "Key": 60, + "Value": { + "id": "2e31fcbb-8371-42c3-9f53-9f11621130ff", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 60, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 197, + "y": 50 + } + }, + { + "Key": 61, + "Value": { + "id": "bc1470c0-c884-4d90-b107-33c4ce369841", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 61, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 55, + "y": 50 + } + }, + { + "Key": 62, + "Value": { + "id": "0f7ef3ee-fb91-4a08-9c81-1b2be9847477", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 62, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 167, + "y": 50 + } + }, + { + "Key": 63, + "Value": { + "id": "637c55dc-a5e9-4403-bb37-416f832f2905", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 63, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 157, + "y": 50 + } + }, + { + "Key": 64, + "Value": { + "id": "d59fd303-aab4-4c98-a579-669f7955127e", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 64, + "h": 24, + "offset": 0, + "shift": 17, + "w": 17, + "x": 18, + "y": 0 + } + }, + { + "Key": 65, + "Value": { + "id": "1624a2f1-2f33-491a-b609-c6ce3da53a56", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 65, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 0, + "y": 25 + } + }, + { + "Key": 66, + "Value": { + "id": "4821f616-8aac-465c-9e57-ced611888e22", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 66, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 12, + "y": 25 + } + }, + { + "Key": 67, + "Value": { + "id": "b4cf7e03-d740-4b43-9888-51ff0f667275", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 67, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 24, + "y": 25 + } + }, + { + "Key": 68, + "Value": { + "id": "11ed4d56-2e7e-42d7-ae7c-f8f6172b7ca8", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 68, + "h": 24, + "offset": 0, + "shift": 12, + "w": 12, + "x": 152, + "y": 0 + } + }, + { + "Key": 69, + "Value": { + "id": "ba666f8b-462b-4be9-92f9-df88689c7783", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 69, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 36, + "y": 25 + } + }, + { + "Key": 70, + "Value": { + "id": "731366c2-9629-441a-9fcf-4ea725f65e94", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 70, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 66, + "y": 50 + } + }, + { + "Key": 71, + "Value": { + "id": "189f194d-a39a-49e7-83b2-fe0b7244dff4", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 71, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 48, + "y": 25 + } + }, + { + "Key": 72, + "Value": { + "id": "f08d649a-5277-40f8-9c8b-0533662c546c", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 72, + "h": 24, + "offset": 0, + "shift": 12, + "w": 12, + "x": 178, + "y": 0 + } + }, + { + "Key": 73, + "Value": { + "id": "0aab8022-c75c-45ae-ac77-a297841145f6", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 73, + "h": 24, + "offset": 0, + "shift": 5, + "w": 5, + "x": 208, + "y": 75 + } + }, + { + "Key": 74, + "Value": { + "id": "5b0791ae-f632-4127-a43a-f76b94740bb9", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 74, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 30, + "y": 75 + } + }, + { + "Key": 75, + "Value": { + "id": "e123db70-6b00-462d-a6c0-73ca10f14c90", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 75, + "h": 24, + "offset": 0, + "shift": 12, + "w": 12, + "x": 191, + "y": 0 + } + }, + { + "Key": 76, + "Value": { + "id": "e386c99c-9e34-442e-9155-0db54a7dcc3f", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 76, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 227, + "y": 50 + } + }, + { + "Key": 77, + "Value": { + "id": "795e5fdb-6de7-4a84-9bef-b09f5cf80b82", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 77, + "h": 24, + "offset": 0, + "shift": 15, + "w": 15, + "x": 36, + "y": 0 + } + }, + { + "Key": 78, + "Value": { + "id": "7edc0b68-d8c3-469f-afe3-6c953c5100a9", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 78, + "h": 24, + "offset": 0, + "shift": 12, + "w": 12, + "x": 165, + "y": 0 + } + }, + { + "Key": 79, + "Value": { + "id": "24b01a24-bc07-4310-8d0b-0ee7245772ab", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 79, + "h": 24, + "offset": 0, + "shift": 13, + "w": 13, + "x": 97, + "y": 0 + } + }, + { + "Key": 80, + "Value": { + "id": "80a36fba-6cf3-4616-9cdc-3322df37e53d", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 80, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 72, + "y": 25 + } + }, + { + "Key": 81, + "Value": { + "id": "52f4a501-c045-4671-af98-65337e42711e", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 81, + "h": 24, + "offset": 0, + "shift": 13, + "w": 13, + "x": 111, + "y": 0 + } + }, + { + "Key": 82, + "Value": { + "id": "ca22dfd2-6b80-4e8a-984f-1a1040faed89", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 82, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 60, + "y": 25 + } + }, + { + "Key": 83, + "Value": { + "id": "646c6c07-e36a-4f25-831a-b5631fb5ed85", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 83, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 117, + "y": 50 + } + }, + { + "Key": 84, + "Value": { + "id": "c401844d-5cbe-42b3-a41c-c503a8fedaf8", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 84, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 240, + "y": 0 + } + }, + { + "Key": 85, + "Value": { + "id": "260ec74d-32bb-479b-8a53-45b8fff9d30e", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 85, + "h": 24, + "offset": 0, + "shift": 12, + "w": 12, + "x": 139, + "y": 0 + } + }, + { + "Key": 86, + "Value": { + "id": "35b69296-0523-43e4-a3ee-0bc6f26b8802", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 86, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 216, + "y": 0 + } + }, + { + "Key": 87, + "Value": { + "id": "8a5799c6-744a-4bfb-ad73-cfda9c8e53ab", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 87, + "h": 24, + "offset": 0, + "shift": 17, + "w": 17, + "x": 0, + "y": 0 + } + }, + { + "Key": 88, + "Value": { + "id": "bff76ec6-e290-4f71-af56-7f169a16628e", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 88, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 204, + "y": 0 + } + }, + { + "Key": 89, + "Value": { + "id": "97afdc35-107f-4a07-98ea-0fe3e12fd995", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 89, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 84, + "y": 25 + } + }, + { + "Key": 90, + "Value": { + "id": "fedb3143-2267-4903-bf0d-026d736f4da0", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 90, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 118, + "y": 25 + } + }, + { + "Key": 91, + "Value": { + "id": "32c89df4-13e5-42b0-b698-a7f95c6a1777", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 91, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 75, + "y": 75 + } + }, + { + "Key": 92, + "Value": { + "id": "70ce35c8-74cc-4a31-9c3c-a7e369a57732", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 92, + "h": 24, + "offset": 0, + "shift": 7, + "w": 7, + "x": 144, + "y": 75 + } + }, + { + "Key": 93, + "Value": { + "id": "fbe193fc-bb08-4d93-a2a5-0ebd3cf4f6db", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 93, + "h": 24, + "offset": 0, + "shift": 7, + "w": 7, + "x": 128, + "y": 75 + } + }, + { + "Key": 94, + "Value": { + "id": "0ecbd7b1-e484-4ee2-a577-bafbe7cb03ca", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 94, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 129, + "y": 25 + } + }, + { + "Key": 95, + "Value": { + "id": "a2d0d7c6-c367-413b-8a9a-7a1901809cd7", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 95, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 237, + "y": 50 + } + }, + { + "Key": 96, + "Value": { + "id": "0c91314f-2f84-4993-a0a5-e8a36f9e45ee", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 96, + "h": 24, + "offset": 0, + "shift": 7, + "w": 7, + "x": 136, + "y": 75 + } + }, + { + "Key": 97, + "Value": { + "id": "2da0181a-b2ef-4fbd-86e5-c5f01665bcf7", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 97, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 10, + "y": 75 + } + }, + { + "Key": 98, + "Value": { + "id": "44320d22-3bc8-4951-bacb-37a8c2eefe61", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 98, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 140, + "y": 25 + } + }, + { + "Key": 99, + "Value": { + "id": "8129d2d2-82df-48d5-9062-b3190d35322c", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 99, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 39, + "y": 75 + } + }, + { + "Key": 100, + "Value": { + "id": "d6f63643-7ee7-4a43-8b4a-ef2b12728ae0", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 100, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 151, + "y": 25 + } + }, + { + "Key": 101, + "Value": { + "id": "fc3ac724-eafa-40c8-8963-19faf4636b68", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 101, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 127, + "y": 50 + } + }, + { + "Key": 102, + "Value": { + "id": "5dcf3d4f-270d-45ca-a893-d037d0c49c13", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 102, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 48, + "y": 75 + } + }, + { + "Key": 103, + "Value": { + "id": "77248847-9f83-4144-8f48-a644782dc49f", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 103, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 162, + "y": 25 + } + }, + { + "Key": 104, + "Value": { + "id": "2c303a16-1f44-4326-8623-fb7c157a9256", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 104, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 173, + "y": 25 + } + }, + { + "Key": 105, + "Value": { + "id": "2f0c8cad-c64d-441e-bc86-2d38405af0fe", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 105, + "h": 24, + "offset": 0, + "shift": 6, + "w": 6, + "x": 181, + "y": 75 + } + }, + { + "Key": 106, + "Value": { + "id": "ff781041-79c5-431b-9c74-1a749f7ce8a3", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 106, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 57, + "y": 75 + } + }, + { + "Key": 107, + "Value": { + "id": "b25063ca-59c4-4e94-b9af-5a9ef169b136", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 107, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 184, + "y": 25 + } + }, + { + "Key": 108, + "Value": { + "id": "13d93a2b-3632-4680-a877-660e22455112", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 108, + "h": 24, + "offset": 0, + "shift": 6, + "w": 6, + "x": 188, + "y": 75 + } + }, + { + "Key": 109, + "Value": { + "id": "498e8dea-2794-4f49-8ec1-d5d245dcde61", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 109, + "h": 24, + "offset": 0, + "shift": 15, + "w": 15, + "x": 52, + "y": 0 + } + }, + { + "Key": 110, + "Value": { + "id": "3094e8c4-126e-48be-8e57-ddf8a05fb0b6", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 110, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 195, + "y": 25 + } + }, + { + "Key": 111, + "Value": { + "id": "78935cbc-24fd-4579-8030-39a2181633d7", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 111, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 206, + "y": 25 + } + }, + { + "Key": 112, + "Value": { + "id": "3675d721-9de4-4eb3-ad0b-271e7ff17454", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 112, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 228, + "y": 25 + } + }, + { + "Key": 113, + "Value": { + "id": "b4464081-7f28-4b98-80a3-acfecf21632d", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 113, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 239, + "y": 25 + } + }, + { + "Key": 114, + "Value": { + "id": "3a816e06-2edc-4668-8e14-9c777db628ff", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 114, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 84, + "y": 75 + } + }, + { + "Key": 115, + "Value": { + "id": "8fd2b492-ef90-4bd9-a6b4-d3ecdbbd1342", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 115, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 111, + "y": 75 + } + }, + { + "Key": 116, + "Value": { + "id": "6a195503-6bea-4fca-ad40-be1951cd4abf", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 116, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 66, + "y": 75 + } + }, + { + "Key": 117, + "Value": { + "id": "93922190-dee9-4cf1-881b-7480626cf2f1", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 117, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 0, + "y": 50 + } + }, + { + "Key": 118, + "Value": { + "id": "4e40ee06-18cf-47e7-96e4-a027a5de4afe", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 118, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 107, + "y": 50 + } + }, + { + "Key": 119, + "Value": { + "id": "e78f9dc6-7b89-471d-8631-fc34e30d7110", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 119, + "h": 24, + "offset": 0, + "shift": 13, + "w": 13, + "x": 125, + "y": 0 + } + }, + { + "Key": 120, + "Value": { + "id": "e7877393-ccd5-4778-99be-4fe5d906ca61", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 120, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 0, + "y": 75 + } + }, + { + "Key": 121, + "Value": { + "id": "25ec7a00-f485-4110-b89d-9b759f062357", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 121, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 11, + "y": 50 + } + }, + { + "Key": 122, + "Value": { + "id": "1dbb437d-c8b0-48d5-a942-284fcd62e163", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 122, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 93, + "y": 75 + } + }, + { + "Key": 123, + "Value": { + "id": "c43b49db-453d-411a-95aa-8d80277b2e69", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 123, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 102, + "y": 75 + } + }, + { + "Key": 124, + "Value": { + "id": "0de5fc72-b1f2-4f27-8b2a-1981332c6114", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 124, + "h": 24, + "offset": 0, + "shift": 6, + "w": 6, + "x": 195, + "y": 75 + } + }, + { + "Key": 125, + "Value": { + "id": "78f77127-12e9-49f2-9f33-4febddba8b00", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 125, + "h": 24, + "offset": 0, + "shift": 7, + "w": 7, + "x": 152, + "y": 75 + } + }, + { + "Key": 126, + "Value": { + "id": "68a0ced6-6354-411c-80dd-e5a2802842f2", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 126, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 107, + "y": 25 + } + } + ], + "hinting": 0, + "includeTTF": false, + "interpreter": 0, + "italic": false, + "kerningPairs": [ + + ], + "last": 0, + "maintainGms1Font": true, + "pointRounding": 0, + "ranges": [ + { + "x": 32, + "y": 126 + } + ], + "sampleText": "abcdef ABCDEF\\u000a0123456789 .,<>\"'&!?\\u000athe quick brown fox jumps over the lazy dog\\u000aTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\\u000aDefault character: ▯ (9647)", + "size": 24, + "styleName": "Regular", + "textureGroupId": "1225f6b0-ac20-43bd-a82e-be73fa0b6f4f" +} \ No newline at end of file diff --git a/Kinect_yy/fonts/fnt_test/fnt_test.png b/Kinect_yy/fonts/fnt_test/fnt_test.png new file mode 100644 index 0000000..f7e73fc Binary files /dev/null and b/Kinect_yy/fonts/fnt_test/fnt_test.png differ diff --git a/Kinect_yy/fonts/fnt_test/fnt_test.yy b/Kinect_yy/fonts/fnt_test/fnt_test.yy new file mode 100644 index 0000000..a5de249 --- /dev/null +++ b/Kinect_yy/fonts/fnt_test/fnt_test.yy @@ -0,0 +1,1461 @@ +{ + "id": "cd167524-ca47-2561-47ba-fcf23257e43d", + "modelName": "GMFont", + "mvc": "1.1", + "name": "fnt_test", + "AntiAlias": 0, + "TTFName": "", + "ascenderOffset": 0, + "bold": false, + "charset": 1, + "first": 0, + "fontName": "Ubuntu Condensed SemiItalic", + "glyphOperations": 0, + "glyphs": [ + { + "Key": 32, + "Value": { + "id": "1fd41a76-3351-40af-927e-468676c7b33c", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 32, + "h": 24, + "offset": 0, + "shift": 4, + "w": 4, + "x": 226, + "y": 75 + } + }, + { + "Key": 33, + "Value": { + "id": "30298886-ceba-44ea-85fc-ebbeeb281160", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 33, + "h": 24, + "offset": 0, + "shift": 6, + "w": 6, + "x": 174, + "y": 75 + } + }, + { + "Key": 34, + "Value": { + "id": "29c4bfeb-1bc7-4bf5-9a0f-f87ee168dfc9", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 34, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 87, + "y": 50 + } + }, + { + "Key": 35, + "Value": { + "id": "5f4499e6-b580-484f-8c8e-856490ac6a05", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 35, + "h": 24, + "offset": 0, + "shift": 13, + "w": 13, + "x": 83, + "y": 0 + } + }, + { + "Key": 36, + "Value": { + "id": "e160edd6-c5b3-4674-93f5-040717bb36d1", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 36, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 97, + "y": 50 + } + }, + { + "Key": 37, + "Value": { + "id": "7328bb00-d4b2-42af-833a-9209c524f072", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 37, + "h": 24, + "offset": 0, + "shift": 14, + "w": 14, + "x": 68, + "y": 0 + } + }, + { + "Key": 38, + "Value": { + "id": "a54839ed-da35-4e53-adea-5e3184229ed3", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 38, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 228, + "y": 0 + } + }, + { + "Key": 39, + "Value": { + "id": "03235ec1-8bdf-4c47-a05c-9a9cab5d641d", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 39, + "h": 24, + "offset": 0, + "shift": 6, + "w": 6, + "x": 160, + "y": 75 + } + }, + { + "Key": 40, + "Value": { + "id": "6d5f5fff-94ab-4def-a7d8-a19e16520271", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 40, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 247, + "y": 50 + } + }, + { + "Key": 41, + "Value": { + "id": "b720fd67-e487-405f-a7a5-e83754c2fbd2", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 41, + "h": 24, + "offset": 0, + "shift": 7, + "w": 7, + "x": 120, + "y": 75 + } + }, + { + "Key": 42, + "Value": { + "id": "0a9a9010-1d40-4c90-9861-3a948ae7f1ff", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 42, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 77, + "y": 50 + } + }, + { + "Key": 43, + "Value": { + "id": "6f1bcb8c-c415-4d6a-97c3-8413d8e75de6", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 43, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 96, + "y": 25 + } + }, + { + "Key": 44, + "Value": { + "id": "47f97006-1998-464b-9f09-97d0c4d712a2", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 44, + "h": 24, + "offset": 0, + "shift": 5, + "w": 5, + "x": 250, + "y": 25 + } + }, + { + "Key": 45, + "Value": { + "id": "d80369d7-627b-403b-9f5b-0b352acc9a83", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 45, + "h": 24, + "offset": 0, + "shift": 6, + "w": 6, + "x": 167, + "y": 75 + } + }, + { + "Key": 46, + "Value": { + "id": "10cb6210-c0ce-4962-9954-f256cae78c66", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 46, + "h": 24, + "offset": 0, + "shift": 5, + "w": 5, + "x": 202, + "y": 75 + } + }, + { + "Key": 47, + "Value": { + "id": "6956063f-42d1-40ad-85f5-e1019c9e12a4", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 47, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 217, + "y": 25 + } + }, + { + "Key": 48, + "Value": { + "id": "778db60c-747d-41db-af06-6fb1cebcbb4d", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 48, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 177, + "y": 50 + } + }, + { + "Key": 49, + "Value": { + "id": "999c1ce3-4b26-49ae-bf7c-e7593fae5cdf", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 49, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 187, + "y": 50 + } + }, + { + "Key": 50, + "Value": { + "id": "b3093f61-8722-4f19-98f6-5f0de161cf32", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 50, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 137, + "y": 50 + } + }, + { + "Key": 51, + "Value": { + "id": "ea683cb3-0346-4d4a-96ac-97599b7a277d", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 51, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 207, + "y": 50 + } + }, + { + "Key": 52, + "Value": { + "id": "7ff826b4-95ad-4e97-b8df-d38e861a4862", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 52, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 22, + "y": 50 + } + }, + { + "Key": 53, + "Value": { + "id": "f2609491-7df3-4056-b321-11e98719bdad", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 53, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 147, + "y": 50 + } + }, + { + "Key": 54, + "Value": { + "id": "f5b18e47-66c9-419a-8b75-57401de77eeb", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 54, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 20, + "y": 75 + } + }, + { + "Key": 55, + "Value": { + "id": "61ca310f-d737-4319-8d37-343a083bebe0", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 55, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 33, + "y": 50 + } + }, + { + "Key": 56, + "Value": { + "id": "a1cd5721-752c-465c-bd41-7448c24b01a8", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 56, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 44, + "y": 50 + } + }, + { + "Key": 57, + "Value": { + "id": "ddb8bd57-e469-44f9-87c8-917097e284d1", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 57, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 217, + "y": 50 + } + }, + { + "Key": 58, + "Value": { + "id": "15433883-9c4f-4253-90b2-7d3fb1cedb40", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 58, + "h": 24, + "offset": 0, + "shift": 5, + "w": 5, + "x": 220, + "y": 75 + } + }, + { + "Key": 59, + "Value": { + "id": "626729a3-9711-4a5a-88c2-42bad3f202f8", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 59, + "h": 24, + "offset": 0, + "shift": 5, + "w": 5, + "x": 214, + "y": 75 + } + }, + { + "Key": 60, + "Value": { + "id": "2e31fcbb-8371-42c3-9f53-9f11621130ff", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 60, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 197, + "y": 50 + } + }, + { + "Key": 61, + "Value": { + "id": "bc1470c0-c884-4d90-b107-33c4ce369841", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 61, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 55, + "y": 50 + } + }, + { + "Key": 62, + "Value": { + "id": "0f7ef3ee-fb91-4a08-9c81-1b2be9847477", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 62, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 167, + "y": 50 + } + }, + { + "Key": 63, + "Value": { + "id": "637c55dc-a5e9-4403-bb37-416f832f2905", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 63, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 157, + "y": 50 + } + }, + { + "Key": 64, + "Value": { + "id": "d59fd303-aab4-4c98-a579-669f7955127e", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 64, + "h": 24, + "offset": 0, + "shift": 17, + "w": 17, + "x": 18, + "y": 0 + } + }, + { + "Key": 65, + "Value": { + "id": "1624a2f1-2f33-491a-b609-c6ce3da53a56", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 65, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 0, + "y": 25 + } + }, + { + "Key": 66, + "Value": { + "id": "4821f616-8aac-465c-9e57-ced611888e22", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 66, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 12, + "y": 25 + } + }, + { + "Key": 67, + "Value": { + "id": "b4cf7e03-d740-4b43-9888-51ff0f667275", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 67, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 24, + "y": 25 + } + }, + { + "Key": 68, + "Value": { + "id": "11ed4d56-2e7e-42d7-ae7c-f8f6172b7ca8", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 68, + "h": 24, + "offset": 0, + "shift": 12, + "w": 12, + "x": 152, + "y": 0 + } + }, + { + "Key": 69, + "Value": { + "id": "ba666f8b-462b-4be9-92f9-df88689c7783", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 69, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 36, + "y": 25 + } + }, + { + "Key": 70, + "Value": { + "id": "731366c2-9629-441a-9fcf-4ea725f65e94", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 70, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 66, + "y": 50 + } + }, + { + "Key": 71, + "Value": { + "id": "189f194d-a39a-49e7-83b2-fe0b7244dff4", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 71, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 48, + "y": 25 + } + }, + { + "Key": 72, + "Value": { + "id": "f08d649a-5277-40f8-9c8b-0533662c546c", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 72, + "h": 24, + "offset": 0, + "shift": 12, + "w": 12, + "x": 178, + "y": 0 + } + }, + { + "Key": 73, + "Value": { + "id": "0aab8022-c75c-45ae-ac77-a297841145f6", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 73, + "h": 24, + "offset": 0, + "shift": 5, + "w": 5, + "x": 208, + "y": 75 + } + }, + { + "Key": 74, + "Value": { + "id": "5b0791ae-f632-4127-a43a-f76b94740bb9", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 74, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 30, + "y": 75 + } + }, + { + "Key": 75, + "Value": { + "id": "e123db70-6b00-462d-a6c0-73ca10f14c90", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 75, + "h": 24, + "offset": 0, + "shift": 12, + "w": 12, + "x": 191, + "y": 0 + } + }, + { + "Key": 76, + "Value": { + "id": "e386c99c-9e34-442e-9155-0db54a7dcc3f", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 76, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 227, + "y": 50 + } + }, + { + "Key": 77, + "Value": { + "id": "795e5fdb-6de7-4a84-9bef-b09f5cf80b82", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 77, + "h": 24, + "offset": 0, + "shift": 15, + "w": 15, + "x": 36, + "y": 0 + } + }, + { + "Key": 78, + "Value": { + "id": "7edc0b68-d8c3-469f-afe3-6c953c5100a9", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 78, + "h": 24, + "offset": 0, + "shift": 12, + "w": 12, + "x": 165, + "y": 0 + } + }, + { + "Key": 79, + "Value": { + "id": "24b01a24-bc07-4310-8d0b-0ee7245772ab", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 79, + "h": 24, + "offset": 0, + "shift": 13, + "w": 13, + "x": 97, + "y": 0 + } + }, + { + "Key": 80, + "Value": { + "id": "80a36fba-6cf3-4616-9cdc-3322df37e53d", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 80, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 72, + "y": 25 + } + }, + { + "Key": 81, + "Value": { + "id": "52f4a501-c045-4671-af98-65337e42711e", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 81, + "h": 24, + "offset": 0, + "shift": 13, + "w": 13, + "x": 111, + "y": 0 + } + }, + { + "Key": 82, + "Value": { + "id": "ca22dfd2-6b80-4e8a-984f-1a1040faed89", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 82, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 60, + "y": 25 + } + }, + { + "Key": 83, + "Value": { + "id": "646c6c07-e36a-4f25-831a-b5631fb5ed85", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 83, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 117, + "y": 50 + } + }, + { + "Key": 84, + "Value": { + "id": "c401844d-5cbe-42b3-a41c-c503a8fedaf8", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 84, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 240, + "y": 0 + } + }, + { + "Key": 85, + "Value": { + "id": "260ec74d-32bb-479b-8a53-45b8fff9d30e", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 85, + "h": 24, + "offset": 0, + "shift": 12, + "w": 12, + "x": 139, + "y": 0 + } + }, + { + "Key": 86, + "Value": { + "id": "35b69296-0523-43e4-a3ee-0bc6f26b8802", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 86, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 216, + "y": 0 + } + }, + { + "Key": 87, + "Value": { + "id": "8a5799c6-744a-4bfb-ad73-cfda9c8e53ab", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 87, + "h": 24, + "offset": 0, + "shift": 17, + "w": 17, + "x": 0, + "y": 0 + } + }, + { + "Key": 88, + "Value": { + "id": "bff76ec6-e290-4f71-af56-7f169a16628e", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 88, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 204, + "y": 0 + } + }, + { + "Key": 89, + "Value": { + "id": "97afdc35-107f-4a07-98ea-0fe3e12fd995", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 89, + "h": 24, + "offset": 0, + "shift": 11, + "w": 11, + "x": 84, + "y": 25 + } + }, + { + "Key": 90, + "Value": { + "id": "fedb3143-2267-4903-bf0d-026d736f4da0", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 90, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 118, + "y": 25 + } + }, + { + "Key": 91, + "Value": { + "id": "32c89df4-13e5-42b0-b698-a7f95c6a1777", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 91, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 75, + "y": 75 + } + }, + { + "Key": 92, + "Value": { + "id": "70ce35c8-74cc-4a31-9c3c-a7e369a57732", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 92, + "h": 24, + "offset": 0, + "shift": 7, + "w": 7, + "x": 144, + "y": 75 + } + }, + { + "Key": 93, + "Value": { + "id": "fbe193fc-bb08-4d93-a2a5-0ebd3cf4f6db", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 93, + "h": 24, + "offset": 0, + "shift": 7, + "w": 7, + "x": 128, + "y": 75 + } + }, + { + "Key": 94, + "Value": { + "id": "0ecbd7b1-e484-4ee2-a577-bafbe7cb03ca", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 94, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 129, + "y": 25 + } + }, + { + "Key": 95, + "Value": { + "id": "a2d0d7c6-c367-413b-8a9a-7a1901809cd7", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 95, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 237, + "y": 50 + } + }, + { + "Key": 96, + "Value": { + "id": "0c91314f-2f84-4993-a0a5-e8a36f9e45ee", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 96, + "h": 24, + "offset": 0, + "shift": 7, + "w": 7, + "x": 136, + "y": 75 + } + }, + { + "Key": 97, + "Value": { + "id": "2da0181a-b2ef-4fbd-86e5-c5f01665bcf7", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 97, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 10, + "y": 75 + } + }, + { + "Key": 98, + "Value": { + "id": "44320d22-3bc8-4951-bacb-37a8c2eefe61", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 98, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 140, + "y": 25 + } + }, + { + "Key": 99, + "Value": { + "id": "8129d2d2-82df-48d5-9062-b3190d35322c", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 99, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 39, + "y": 75 + } + }, + { + "Key": 100, + "Value": { + "id": "d6f63643-7ee7-4a43-8b4a-ef2b12728ae0", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 100, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 151, + "y": 25 + } + }, + { + "Key": 101, + "Value": { + "id": "fc3ac724-eafa-40c8-8963-19faf4636b68", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 101, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 127, + "y": 50 + } + }, + { + "Key": 102, + "Value": { + "id": "5dcf3d4f-270d-45ca-a893-d037d0c49c13", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 102, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 48, + "y": 75 + } + }, + { + "Key": 103, + "Value": { + "id": "77248847-9f83-4144-8f48-a644782dc49f", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 103, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 162, + "y": 25 + } + }, + { + "Key": 104, + "Value": { + "id": "2c303a16-1f44-4326-8623-fb7c157a9256", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 104, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 173, + "y": 25 + } + }, + { + "Key": 105, + "Value": { + "id": "2f0c8cad-c64d-441e-bc86-2d38405af0fe", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 105, + "h": 24, + "offset": 0, + "shift": 6, + "w": 6, + "x": 181, + "y": 75 + } + }, + { + "Key": 106, + "Value": { + "id": "ff781041-79c5-431b-9c74-1a749f7ce8a3", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 106, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 57, + "y": 75 + } + }, + { + "Key": 107, + "Value": { + "id": "b25063ca-59c4-4e94-b9af-5a9ef169b136", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 107, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 184, + "y": 25 + } + }, + { + "Key": 108, + "Value": { + "id": "13d93a2b-3632-4680-a877-660e22455112", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 108, + "h": 24, + "offset": 0, + "shift": 6, + "w": 6, + "x": 188, + "y": 75 + } + }, + { + "Key": 109, + "Value": { + "id": "498e8dea-2794-4f49-8ec1-d5d245dcde61", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 109, + "h": 24, + "offset": 0, + "shift": 15, + "w": 15, + "x": 52, + "y": 0 + } + }, + { + "Key": 110, + "Value": { + "id": "3094e8c4-126e-48be-8e57-ddf8a05fb0b6", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 110, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 195, + "y": 25 + } + }, + { + "Key": 111, + "Value": { + "id": "78935cbc-24fd-4579-8030-39a2181633d7", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 111, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 206, + "y": 25 + } + }, + { + "Key": 112, + "Value": { + "id": "3675d721-9de4-4eb3-ad0b-271e7ff17454", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 112, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 228, + "y": 25 + } + }, + { + "Key": 113, + "Value": { + "id": "b4464081-7f28-4b98-80a3-acfecf21632d", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 113, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 239, + "y": 25 + } + }, + { + "Key": 114, + "Value": { + "id": "3a816e06-2edc-4668-8e14-9c777db628ff", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 114, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 84, + "y": 75 + } + }, + { + "Key": 115, + "Value": { + "id": "8fd2b492-ef90-4bd9-a6b4-d3ecdbbd1342", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 115, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 111, + "y": 75 + } + }, + { + "Key": 116, + "Value": { + "id": "6a195503-6bea-4fca-ad40-be1951cd4abf", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 116, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 66, + "y": 75 + } + }, + { + "Key": 117, + "Value": { + "id": "93922190-dee9-4cf1-881b-7480626cf2f1", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 117, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 0, + "y": 50 + } + }, + { + "Key": 118, + "Value": { + "id": "4e40ee06-18cf-47e7-96e4-a027a5de4afe", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 118, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 107, + "y": 50 + } + }, + { + "Key": 119, + "Value": { + "id": "e78f9dc6-7b89-471d-8631-fc34e30d7110", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 119, + "h": 24, + "offset": 0, + "shift": 13, + "w": 13, + "x": 125, + "y": 0 + } + }, + { + "Key": 120, + "Value": { + "id": "e7877393-ccd5-4778-99be-4fe5d906ca61", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 120, + "h": 24, + "offset": 0, + "shift": 9, + "w": 9, + "x": 0, + "y": 75 + } + }, + { + "Key": 121, + "Value": { + "id": "25ec7a00-f485-4110-b89d-9b759f062357", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 121, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 11, + "y": 50 + } + }, + { + "Key": 122, + "Value": { + "id": "1dbb437d-c8b0-48d5-a942-284fcd62e163", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 122, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 93, + "y": 75 + } + }, + { + "Key": 123, + "Value": { + "id": "c43b49db-453d-411a-95aa-8d80277b2e69", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 123, + "h": 24, + "offset": 0, + "shift": 8, + "w": 8, + "x": 102, + "y": 75 + } + }, + { + "Key": 124, + "Value": { + "id": "0de5fc72-b1f2-4f27-8b2a-1981332c6114", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 124, + "h": 24, + "offset": 0, + "shift": 6, + "w": 6, + "x": 195, + "y": 75 + } + }, + { + "Key": 125, + "Value": { + "id": "78f77127-12e9-49f2-9f33-4febddba8b00", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 125, + "h": 24, + "offset": 0, + "shift": 7, + "w": 7, + "x": 152, + "y": 75 + } + }, + { + "Key": 126, + "Value": { + "id": "68a0ced6-6354-411c-80dd-e5a2802842f2", + "modelName": "GMGlyph", + "mvc": "1.0", + "character": 126, + "h": 24, + "offset": 0, + "shift": 10, + "w": 10, + "x": 107, + "y": 25 + } + } + ], + "hinting": 0, + "includeTTF": false, + "interpreter": 0, + "italic": false, + "kerningPairs": [ + + ], + "last": 0, + "maintainGms1Font": true, + "pointRounding": 0, + "ranges": [ + { + "x": 32, + "y": 126 + } + ], + "sampleText": "abcdef ABCDEF\\u000a0123456789 .,<>\"'&!?\\u000athe quick brown fox jumps over the lazy dog\\u000aTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\\u000aDefault character: ▯ (9647)", + "size": 24, + "styleName": "Regular", + "textureGroupId": "1225f6b0-ac20-43bd-a82e-be73fa0b6f4f" +} \ No newline at end of file diff --git a/Kinect_yy/objects/obj_test/Create_0.gml b/Kinect_yy/objects/obj_test/Create_0.gml new file mode 100644 index 0000000..8329ec5 --- /dev/null +++ b/Kinect_yy/objects/obj_test/Create_0.gml @@ -0,0 +1,13 @@ +kinect_init(); +trace("open?", kinect_open()); +kind = kinect_source_color; +desc = kinect_get_frame_description(kind); +if (desc == undefined) { + show_message("No kinect!"); + exit; +} +width = desc[kinect_frame_description_width]; +height = desc[kinect_frame_description_height]; +buffer = buffer_create(width * height * 4, buffer_fixed, 1); +surf = noone; +trace("open reader?", kinect_reader_open(kind)); \ No newline at end of file diff --git a/Kinect_yy/objects/obj_test/Draw_0.gml b/Kinect_yy/objects/obj_test/Draw_0.gml new file mode 100644 index 0000000..a726e0f --- /dev/null +++ b/Kinect_yy/objects/obj_test/Draw_0.gml @@ -0,0 +1,6 @@ +draw_set_font(fnt_test); +draw_set_color(c_white); +if (surface_exists(surf)) draw_surface(surf, 0, 0); +draw_text(5, 5, string(fps) + + "\n" + string(width) + "x" + string(height) +); \ No newline at end of file diff --git a/Kinect_yy/objects/obj_test/Step_0.gml b/Kinect_yy/objects/obj_test/Step_0.gml new file mode 100644 index 0000000..44963c1 --- /dev/null +++ b/Kinect_yy/objects/obj_test/Step_0.gml @@ -0,0 +1,18 @@ +if (kinect_reader_acquire_frame()) { + var ok; + switch (kind) { + case kinect_source_depth: + ok = kinect_reader_copy_converted_depth_data(buffer, 0, 0.1, c_white); + break; + case kinect_source_color: + ok = kinect_reader_copy_converted_color_data(buffer, kinect_color_image_format_rgba); + break; + default: + ok = false; + } + if (ok) { + if (surf == noone) surf = surface_create(width, height); + buffer_set_surface(buffer, surf, 0, 0, 0); + } + kinect_reader_release_frame(); +} diff --git a/Kinect_yy/objects/obj_test/obj_test.yy b/Kinect_yy/objects/obj_test/obj_test.yy new file mode 100644 index 0000000..9361218 --- /dev/null +++ b/Kinect_yy/objects/obj_test/obj_test.yy @@ -0,0 +1,60 @@ +{ + "id": "9a74872b-1d34-4b7c-8038-1116e4426c86", + "modelName": "GMObject", + "mvc": "1.0", + "name": "obj_test", + "eventList": [ + { + "id": "f93557ac-a01c-475b-a656-4fbd2ebcf2fb", + "modelName": "GMEvent", + "mvc": "1.0", + "IsDnD": false, + "collisionObjectId": "00000000-0000-0000-0000-000000000000", + "enumb": 0, + "eventtype": 0, + "m_owner": "9a74872b-1d34-4b7c-8038-1116e4426c86" + }, + { + "id": "9f151821-c696-4aef-b011-948071008f29", + "modelName": "GMEvent", + "mvc": "1.0", + "IsDnD": false, + "collisionObjectId": "00000000-0000-0000-0000-000000000000", + "enumb": 0, + "eventtype": 3, + "m_owner": "9a74872b-1d34-4b7c-8038-1116e4426c86" + }, + { + "id": "6ef8ae5e-f16b-4a4b-8d63-5453f3f747bb", + "modelName": "GMEvent", + "mvc": "1.0", + "IsDnD": false, + "collisionObjectId": "00000000-0000-0000-0000-000000000000", + "enumb": 0, + "eventtype": 8, + "m_owner": "9a74872b-1d34-4b7c-8038-1116e4426c86" + } + ], + "maskSpriteId": "00000000-0000-0000-0000-000000000000", + "overriddenProperties": null, + "parentObjectId": "00000000-0000-0000-0000-000000000000", + "persistent": false, + "physicsAngularDamping": 0.1, + "physicsDensity": 0.5, + "physicsFriction": 0.2, + "physicsGroup": 0, + "physicsKinematic": false, + "physicsLinearDamping": 0.1, + "physicsObject": false, + "physicsRestitution": 0.1, + "physicsSensor": false, + "physicsShape": 0, + "physicsShapePoints": [ + + ], + "physicsStartAwake": true, + "properties": null, + "solid": false, + "spriteId": "00000000-0000-0000-0000-000000000000", + "visible": true +} \ No newline at end of file diff --git a/Kinect_yy/rooms/rm_test/rm_test.yy b/Kinect_yy/rooms/rm_test/rm_test.yy new file mode 100644 index 0000000..05d6ed1 --- /dev/null +++ b/Kinect_yy/rooms/rm_test/rm_test.yy @@ -0,0 +1,117 @@ + +{ + "name": "rm_test", + "id": "5b69cb1a-9117-3b4c-bbf6-68667a6d174d", + "creationCodeFile": "", + "inheritCode": false, + "inheritCreationOrder": false, + "inheritLayers": false, + "instanceCreationOrderIDs": [ + "4d58891e-1585-4382-bb94-bca9111f3e75" + ], + "IsDnD": false, + "layers": [ + { + "__type": "GMRInstanceLayer_Model:#YoYoStudio.MVCFormat", + "name": "Compatibility_Instances_Depth_0", + "id": "09d227b0-1aa1-460a-a408-6178fac14587", + "depth": 0, + "grid_x": 32, + "grid_y": 32, + "hierarchyFrozen": false, + "hierarchyVisible": true, + "inheritLayerDepth": false, + "inheritLayerSettings": false, + "inheritSubLayers": false, + "inheritVisibility": false, + "instances": [ +{"name": "inst_F55A924E","id": "4d58891e-1585-4382-bb94-bca9111f3e75","colour": { "Value": 4294967295 },"creationCodeFile": "","creationCodeType": "","ignore": false,"imageIndex": 0,"imageSpeed": 1,"inheritCode": false,"inheritItemSettings": false,"IsDnD": false,"m_originalParentID": "00000000-0000-0000-0000-000000000000","m_serialiseFrozen": false,"modelName": "GMRInstance","name_with_no_file_rename": "inst_F55A924E","objId": "9a74872b-1d34-4b7c-8038-1116e4426c86","properties": null,"rotation": 0,"scaleX": 1,"scaleY": 1,"mvc": "1.1","x": 0,"y": 0} + ], + "layers": [ + + ], + "m_parentID": "00000000-0000-0000-0000-000000000000", + "m_serialiseFrozen": false, + "modelName": "GMRInstanceLayer", + "mvc": "1.0", + "userdefined_depth": true, + "visible": true + }, + { + "__type": "GMRBackgroundLayer_Model:#YoYoStudio.MVCFormat", + "name": "Compatibility_Colour", + "id": "6afee845-c922-4bf9-85e9-065928765c84", + "animationFPS": 15, + "animationSpeedType": "0", + "colour": { "Value": 4291141256 }, + "depth": 2147483600, + "grid_x": 32, + "grid_y": 32, + "hierarchyFrozen": false, + "hierarchyVisible": true, + "hspeed": 0, + "htiled": false, + "inheritLayerDepth": false, + "inheritLayerSettings": false, + "inheritSubLayers": false, + "inheritVisibility": false, + "layers": [ + + ], + "m_parentID": "00000000-0000-0000-0000-000000000000", + "m_serialiseFrozen": false, + "modelName": "GMRBackgroundLayer", + "mvc": "1.0", + "spriteId": "00000000-0000-0000-0000-000000000000", + "stretch": false, + "userdefined_animFPS": false, + "userdefined_depth": true, + "visible": true, + "vspeed": 0, + "vtiled": false, + "x": 0, + "y": 0 + } + ], + "modelName": "GMRoom", + "parentId": "00000000-0000-0000-0000-000000000000", + "physicsSettings": { + "id": "b7403fa9-bf72-4513-b984-85176c73e161", + "inheritPhysicsSettings": false, + "modelName": "GMRoomPhysicsSettings", + "PhysicsWorld": false, + "PhysicsWorldGravityX": 0, + "PhysicsWorldGravityY": 10, + "PhysicsWorldPixToMeters": 0.1, + "mvc": "1.0" + }, + "roomSettings": { + "id": "666f1db1-76f4-4b46-b569-a14a9e087371", + "Height": 720, + "inheritRoomSettings": false, + "modelName": "GMRoomSettings", + "persistent": false, + "mvc": "1.0", + "Width": 1280 + }, + "mvc": "1.0", + "views": [ +{"id": "cabe6b74-9f67-477f-9abd-c8ef26df5094","hborder": 32,"hport": 768,"hspeed": -1,"hview": 768,"inherit": false,"modelName": "GMRView","objId": "00000000-0000-0000-0000-000000000000","mvc": "1.0","vborder": 32,"visible": false,"vspeed": -1,"wport": 1024,"wview": 1024,"xport": 0,"xview": 0,"yport": 0,"yview": 0}, +{"id": "db14fd37-7fc3-456e-8e61-2e2e6f64178a","hborder": 32,"hport": 768,"hspeed": -1,"hview": 768,"inherit": false,"modelName": "GMRView","objId": "00000000-0000-0000-0000-000000000000","mvc": "1.0","vborder": 32,"visible": false,"vspeed": -1,"wport": 1024,"wview": 1024,"xport": 0,"xview": 0,"yport": 0,"yview": 0}, +{"id": "2337f30d-64b1-40de-8d3e-ed308db09ac5","hborder": 32,"hport": 768,"hspeed": -1,"hview": 768,"inherit": false,"modelName": "GMRView","objId": "00000000-0000-0000-0000-000000000000","mvc": "1.0","vborder": 32,"visible": false,"vspeed": -1,"wport": 1024,"wview": 1024,"xport": 0,"xview": 0,"yport": 0,"yview": 0}, +{"id": "ef43db4d-32f1-4107-8275-037e24bf4d8f","hborder": 32,"hport": 768,"hspeed": -1,"hview": 768,"inherit": false,"modelName": "GMRView","objId": "00000000-0000-0000-0000-000000000000","mvc": "1.0","vborder": 32,"visible": false,"vspeed": -1,"wport": 1024,"wview": 1024,"xport": 0,"xview": 0,"yport": 0,"yview": 0}, +{"id": "c0321e7e-5342-43d5-9cb6-0a05865fc9a0","hborder": 32,"hport": 768,"hspeed": -1,"hview": 768,"inherit": false,"modelName": "GMRView","objId": "00000000-0000-0000-0000-000000000000","mvc": "1.0","vborder": 32,"visible": false,"vspeed": -1,"wport": 1024,"wview": 1024,"xport": 0,"xview": 0,"yport": 0,"yview": 0}, +{"id": "772a9ca7-b559-4b38-a609-babb49c50f00","hborder": 32,"hport": 768,"hspeed": -1,"hview": 768,"inherit": false,"modelName": "GMRView","objId": "00000000-0000-0000-0000-000000000000","mvc": "1.0","vborder": 32,"visible": false,"vspeed": -1,"wport": 1024,"wview": 1024,"xport": 0,"xview": 0,"yport": 0,"yview": 0}, +{"id": "10182f32-99b6-4d2c-a521-4da1fd17fd90","hborder": 32,"hport": 768,"hspeed": -1,"hview": 768,"inherit": false,"modelName": "GMRView","objId": "00000000-0000-0000-0000-000000000000","mvc": "1.0","vborder": 32,"visible": false,"vspeed": -1,"wport": 1024,"wview": 1024,"xport": 0,"xview": 0,"yport": 0,"yview": 0}, +{"id": "56a3294c-402f-47ab-a5bd-00dcf76170e1","hborder": 32,"hport": 768,"hspeed": -1,"hview": 768,"inherit": false,"modelName": "GMRView","objId": "00000000-0000-0000-0000-000000000000","mvc": "1.0","vborder": 32,"visible": false,"vspeed": -1,"wport": 1024,"wview": 1024,"xport": 0,"xview": 0,"yport": 0,"yview": 0} + ], + "viewSettings": { + "id": "a7adc1a1-7fc5-4454-ae75-1b8dc45aabfc", + "clearDisplayBuffer": true, + "clearViewBackground": true, + "enableViews": false, + "inheritViewSettings": false, + "modelName": "GMRoomViewSettings", + "mvc": "1.0" + } +} \ No newline at end of file diff --git a/Kinect_yy/scripts/trace/trace.gml b/Kinect_yy/scripts/trace/trace.gml new file mode 100644 index 0000000..5b258b4 --- /dev/null +++ b/Kinect_yy/scripts/trace/trace.gml @@ -0,0 +1,7 @@ +/// @description trace(...) +/// @param ... +var r = string(argument[0]); +for (var i = 1; i < argument_count; i++) { + r += " " + string(argument[i]); +} +show_debug_message(r); diff --git a/Kinect_yy/scripts/trace/trace.yy b/Kinect_yy/scripts/trace/trace.yy new file mode 100644 index 0000000..1703abb --- /dev/null +++ b/Kinect_yy/scripts/trace/trace.yy @@ -0,0 +1,8 @@ +{ + "id": "b0dd5a43-c44b-402e-b40f-a394287a9e3e", + "modelName": "GMScript", + "mvc": "1.0", + "name": "trace", + "IsCompatibility": false, + "IsDnD": false +} \ No newline at end of file diff --git a/Kinect_yy/views/1a1012ca-9702-4cd0-870a-3101ca12fddb.yy b/Kinect_yy/views/1a1012ca-9702-4cd0-870a-3101ca12fddb.yy new file mode 100644 index 0000000..900f32c --- /dev/null +++ b/Kinect_yy/views/1a1012ca-9702-4cd0-870a-3101ca12fddb.yy @@ -0,0 +1,13 @@ +{ + "id": "1a1012ca-9702-4cd0-870a-3101ca12fddb", + "modelName": "GMFolder", + "mvc": "1.1", + "name": "1a1012ca-9702-4cd0-870a-3101ca12fddb", + "children": [ + + ], + "filterType": "GMSprite", + "folderName": "sprites", + "isDefaultView": false, + "localisedFolderName": "ResourceTree_Sprites" +} \ No newline at end of file diff --git a/Kinect_yy/views/4f96784b-1ebd-4fc6-8c5b-10ee426a2840.yy b/Kinect_yy/views/4f96784b-1ebd-4fc6-8c5b-10ee426a2840.yy new file mode 100644 index 0000000..5e5257c --- /dev/null +++ b/Kinect_yy/views/4f96784b-1ebd-4fc6-8c5b-10ee426a2840.yy @@ -0,0 +1,27 @@ +{ + "id": "4f96784b-1ebd-4fc6-8c5b-10ee426a2840", + "modelName": "GMFolder", + "mvc": "1.1", + "name": "4f96784b-1ebd-4fc6-8c5b-10ee426a2840", + "children": [ + "1a1012ca-9702-4cd0-870a-3101ca12fddb", + "9fdcc299-adf8-4729-b2f3-076ababf81ed", + "9878a9d0-ce0a-4455-91a7-89de6e4976a2", + "e5b1e8fe-f417-43e8-b65f-8a518d723aea", + "c9dcc6e5-46f1-4578-8543-9af4f6a4f7de", + "f664cd6f-a19b-470a-8b94-844b0367b313", + "f2ec9b0e-c3fe-4297-a78d-fa6f418fd827", + "c583b9bc-76c2-490f-a077-1eeafac7f5ec", + "e5bc0382-83e6-4bfa-b68f-c702a7545129", + "504c1931-39ad-4f48-b783-4eb537b963d6", + "f8edfe34-8789-4236-b7e4-741b59e181b8", + "690caa00-bb5f-4c7f-b921-6fd3330a6bc3", + "6e9a4a1b-fa39-4f06-94c9-1a7f8822216a", + "8c638ff8-1abe-4e11-bc32-7ef6af8b7b4f", + "81be6123-f045-42c2-ad8f-dd97676ed387" + ], + "filterType": "root", + "folderName": "Default", + "isDefaultView": true, + "localisedFolderName": "" +} \ No newline at end of file diff --git a/Kinect_yy/views/504c1931-39ad-4f48-b783-4eb537b963d6.yy b/Kinect_yy/views/504c1931-39ad-4f48-b783-4eb537b963d6.yy new file mode 100644 index 0000000..79b224d --- /dev/null +++ b/Kinect_yy/views/504c1931-39ad-4f48-b783-4eb537b963d6.yy @@ -0,0 +1,13 @@ +{ + "id": "504c1931-39ad-4f48-b783-4eb537b963d6", + "modelName": "GMFolder", + "mvc": "1.1", + "name": "504c1931-39ad-4f48-b783-4eb537b963d6", + "children": [ + "5b69cb1a-9117-3b4c-bbf6-68667a6d174d" + ], + "filterType": "GMRoom", + "folderName": "rooms", + "isDefaultView": false, + "localisedFolderName": "ResourceTree_Rooms" +} \ No newline at end of file diff --git a/Kinect_yy/views/690caa00-bb5f-4c7f-b921-6fd3330a6bc3.yy b/Kinect_yy/views/690caa00-bb5f-4c7f-b921-6fd3330a6bc3.yy new file mode 100644 index 0000000..59c95f8 --- /dev/null +++ b/Kinect_yy/views/690caa00-bb5f-4c7f-b921-6fd3330a6bc3.yy @@ -0,0 +1,13 @@ +{ + "id": "690caa00-bb5f-4c7f-b921-6fd3330a6bc3", + "modelName": "GMFolder", + "mvc": "1.1", + "name": "690caa00-bb5f-4c7f-b921-6fd3330a6bc3", + "children": [ + + ], + "filterType": "GMIncludedFile", + "folderName": "datafiles", + "isDefaultView": false, + "localisedFolderName": "ResourceTree_IncludedFiles" +} \ No newline at end of file diff --git a/Kinect_yy/views/6e9a4a1b-fa39-4f06-94c9-1a7f8822216a.yy b/Kinect_yy/views/6e9a4a1b-fa39-4f06-94c9-1a7f8822216a.yy new file mode 100644 index 0000000..9606e5a --- /dev/null +++ b/Kinect_yy/views/6e9a4a1b-fa39-4f06-94c9-1a7f8822216a.yy @@ -0,0 +1,13 @@ +{ + "id": "6e9a4a1b-fa39-4f06-94c9-1a7f8822216a", + "modelName": "GMFolder", + "mvc": "1.1", + "name": "6e9a4a1b-fa39-4f06-94c9-1a7f8822216a", + "children": [ + "e1f1ecaa-5d53-86e3-173d-52e6d8f9bb6c" + ], + "filterType": "GMExtension", + "folderName": "extensions", + "isDefaultView": false, + "localisedFolderName": "ResourceTree_Extensions" +} \ No newline at end of file diff --git a/Kinect_yy/views/81be6123-f045-42c2-ad8f-dd97676ed387.yy b/Kinect_yy/views/81be6123-f045-42c2-ad8f-dd97676ed387.yy new file mode 100644 index 0000000..a3dcca7 --- /dev/null +++ b/Kinect_yy/views/81be6123-f045-42c2-ad8f-dd97676ed387.yy @@ -0,0 +1,13 @@ +{ + "id": "81be6123-f045-42c2-ad8f-dd97676ed387", + "modelName": "GMFolder", + "mvc": "1.1", + "name": "81be6123-f045-42c2-ad8f-dd97676ed387", + "children": [ + + ], + "filterType": "GMConfig", + "folderName": "configs", + "isDefaultView": false, + "localisedFolderName": "ResourceTree_Configs" +} \ No newline at end of file diff --git a/Kinect_yy/views/8c638ff8-1abe-4e11-bc32-7ef6af8b7b4f.yy b/Kinect_yy/views/8c638ff8-1abe-4e11-bc32-7ef6af8b7b4f.yy new file mode 100644 index 0000000..ebc9dc4 --- /dev/null +++ b/Kinect_yy/views/8c638ff8-1abe-4e11-bc32-7ef6af8b7b4f.yy @@ -0,0 +1,21 @@ +{ + "id": "8c638ff8-1abe-4e11-bc32-7ef6af8b7b4f", + "modelName": "GMFolder", + "mvc": "1.1", + "name": "8c638ff8-1abe-4e11-bc32-7ef6af8b7b4f", + "children": [ + "ed6a955d-5826-4f98-a450-10b414266c27", + "f418569b-3bdd-4706-a0e4-364317f54032", + "a9188620-a624-4a5a-83ae-a1b53faf038b", + "cc98d028-7bdd-4680-85f3-c87a7baa481e", + "93566aad-c3b3-48a9-8fa7-9c5ee19f74ac", + "75ac291e-7061-4bcb-8e8a-3b3545332d41", + "8427047f-9ef8-4c77-89f3-9c20623d07b6", + "a128950b-5063-4876-b4a6-b99dbd2ea6d1", + "e42bf5cc-3f46-4d67-a6d0-a4885a11ac3f" + ], + "filterType": "GMOptions", + "folderName": "options", + "isDefaultView": false, + "localisedFolderName": "ResourceTree_Options" +} \ No newline at end of file diff --git a/Kinect_yy/views/9878a9d0-ce0a-4455-91a7-89de6e4976a2.yy b/Kinect_yy/views/9878a9d0-ce0a-4455-91a7-89de6e4976a2.yy new file mode 100644 index 0000000..0320bc9 --- /dev/null +++ b/Kinect_yy/views/9878a9d0-ce0a-4455-91a7-89de6e4976a2.yy @@ -0,0 +1,13 @@ +{ + "id": "9878a9d0-ce0a-4455-91a7-89de6e4976a2", + "modelName": "GMFolder", + "mvc": "1.1", + "name": "9878a9d0-ce0a-4455-91a7-89de6e4976a2", + "children": [ + + ], + "filterType": "GMSound", + "folderName": "sounds", + "isDefaultView": false, + "localisedFolderName": "ResourceTree_Sounds" +} \ No newline at end of file diff --git a/Kinect_yy/views/9fdcc299-adf8-4729-b2f3-076ababf81ed.yy b/Kinect_yy/views/9fdcc299-adf8-4729-b2f3-076ababf81ed.yy new file mode 100644 index 0000000..e451b7a --- /dev/null +++ b/Kinect_yy/views/9fdcc299-adf8-4729-b2f3-076ababf81ed.yy @@ -0,0 +1,13 @@ +{ + "id": "9fdcc299-adf8-4729-b2f3-076ababf81ed", + "modelName": "GMFolder", + "mvc": "1.1", + "name": "9fdcc299-adf8-4729-b2f3-076ababf81ed", + "children": [ + + ], + "filterType": "GMTileSet", + "folderName": "tilesets", + "isDefaultView": false, + "localisedFolderName": "ResourceTree_Tilesets" +} \ No newline at end of file diff --git a/Kinect_yy/views/c583b9bc-76c2-490f-a077-1eeafac7f5ec.yy b/Kinect_yy/views/c583b9bc-76c2-490f-a077-1eeafac7f5ec.yy new file mode 100644 index 0000000..aeb39e0 --- /dev/null +++ b/Kinect_yy/views/c583b9bc-76c2-490f-a077-1eeafac7f5ec.yy @@ -0,0 +1,13 @@ +{ + "id": "c583b9bc-76c2-490f-a077-1eeafac7f5ec", + "modelName": "GMFolder", + "mvc": "1.1", + "name": "c583b9bc-76c2-490f-a077-1eeafac7f5ec", + "children": [ + + ], + "filterType": "GMTimeline", + "folderName": "timelines", + "isDefaultView": false, + "localisedFolderName": "ResourceTree_Timelines" +} \ No newline at end of file diff --git a/Kinect_yy/views/c9dcc6e5-46f1-4578-8543-9af4f6a4f7de.yy b/Kinect_yy/views/c9dcc6e5-46f1-4578-8543-9af4f6a4f7de.yy new file mode 100644 index 0000000..6ea4e4f --- /dev/null +++ b/Kinect_yy/views/c9dcc6e5-46f1-4578-8543-9af4f6a4f7de.yy @@ -0,0 +1,13 @@ +{ + "id": "c9dcc6e5-46f1-4578-8543-9af4f6a4f7de", + "modelName": "GMFolder", + "mvc": "1.1", + "name": "c9dcc6e5-46f1-4578-8543-9af4f6a4f7de", + "children": [ + "b0dd5a43-c44b-402e-b40f-a394287a9e3e" + ], + "filterType": "GMScript", + "folderName": "scripts", + "isDefaultView": false, + "localisedFolderName": "ResourceTree_Scripts" +} \ No newline at end of file diff --git a/Kinect_yy/views/e5b1e8fe-f417-43e8-b65f-8a518d723aea.yy b/Kinect_yy/views/e5b1e8fe-f417-43e8-b65f-8a518d723aea.yy new file mode 100644 index 0000000..442692e --- /dev/null +++ b/Kinect_yy/views/e5b1e8fe-f417-43e8-b65f-8a518d723aea.yy @@ -0,0 +1,13 @@ +{ + "id": "e5b1e8fe-f417-43e8-b65f-8a518d723aea", + "modelName": "GMFolder", + "mvc": "1.1", + "name": "e5b1e8fe-f417-43e8-b65f-8a518d723aea", + "children": [ + + ], + "filterType": "GMPath", + "folderName": "paths", + "isDefaultView": false, + "localisedFolderName": "ResourceTree_Paths" +} \ No newline at end of file diff --git a/Kinect_yy/views/e5bc0382-83e6-4bfa-b68f-c702a7545129.yy b/Kinect_yy/views/e5bc0382-83e6-4bfa-b68f-c702a7545129.yy new file mode 100644 index 0000000..d3ff6b4 --- /dev/null +++ b/Kinect_yy/views/e5bc0382-83e6-4bfa-b68f-c702a7545129.yy @@ -0,0 +1,13 @@ +{ + "id": "e5bc0382-83e6-4bfa-b68f-c702a7545129", + "modelName": "GMFolder", + "mvc": "1.1", + "name": "e5bc0382-83e6-4bfa-b68f-c702a7545129", + "children": [ + "9a74872b-1d34-4b7c-8038-1116e4426c86" + ], + "filterType": "GMObject", + "folderName": "objects", + "isDefaultView": false, + "localisedFolderName": "ResourceTree_Objects" +} \ No newline at end of file diff --git a/Kinect_yy/views/f2ec9b0e-c3fe-4297-a78d-fa6f418fd827.yy b/Kinect_yy/views/f2ec9b0e-c3fe-4297-a78d-fa6f418fd827.yy new file mode 100644 index 0000000..d5561f4 --- /dev/null +++ b/Kinect_yy/views/f2ec9b0e-c3fe-4297-a78d-fa6f418fd827.yy @@ -0,0 +1,13 @@ +{ + "id": "f2ec9b0e-c3fe-4297-a78d-fa6f418fd827", + "modelName": "GMFolder", + "mvc": "1.1", + "name": "f2ec9b0e-c3fe-4297-a78d-fa6f418fd827", + "children": [ + "cd167524-ca47-2561-47ba-fcf23257e43d" + ], + "filterType": "GMFont", + "folderName": "fonts", + "isDefaultView": false, + "localisedFolderName": "ResourceTree_Fonts" +} \ No newline at end of file diff --git a/Kinect_yy/views/f664cd6f-a19b-470a-8b94-844b0367b313.yy b/Kinect_yy/views/f664cd6f-a19b-470a-8b94-844b0367b313.yy new file mode 100644 index 0000000..6728e59 --- /dev/null +++ b/Kinect_yy/views/f664cd6f-a19b-470a-8b94-844b0367b313.yy @@ -0,0 +1,13 @@ +{ + "id": "f664cd6f-a19b-470a-8b94-844b0367b313", + "modelName": "GMFolder", + "mvc": "1.1", + "name": "f664cd6f-a19b-470a-8b94-844b0367b313", + "children": [ + + ], + "filterType": "GMShader", + "folderName": "shaders", + "isDefaultView": false, + "localisedFolderName": "ResourceTree_Shaders" +} \ No newline at end of file diff --git a/Kinect_yy/views/f8edfe34-8789-4236-b7e4-741b59e181b8.yy b/Kinect_yy/views/f8edfe34-8789-4236-b7e4-741b59e181b8.yy new file mode 100644 index 0000000..06f5fd5 --- /dev/null +++ b/Kinect_yy/views/f8edfe34-8789-4236-b7e4-741b59e181b8.yy @@ -0,0 +1,13 @@ +{ + "id": "f8edfe34-8789-4236-b7e4-741b59e181b8", + "modelName": "GMFolder", + "mvc": "1.1", + "name": "f8edfe34-8789-4236-b7e4-741b59e181b8", + "children": [ + + ], + "filterType": "GMNotes", + "folderName": "notes", + "isDefaultView": false, + "localisedFolderName": "ResourceTree_Notes" +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..4b98258 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# Kinect.gml + +A good starting point for working with Microsoft Kinect SDK in GameMaker. + +## Features + +* Color/depth/infrared frame capture from Kinect camera +* Frame description polling (to figure out width/height/FOV/etc. of the camera) + +## Compatibility + +The extension is compatible with GameMaker Studio 2.3+, GameMaker Studio 2.2.5, and last few versions of GameMaker: Studio (1.4.1804+). + +The extension is primarily made for use with GMS2.3+ - for example, accessing the frame description in earlier versions means doing `desc[kinect_frame_description_width]` instead of just `desc.width`. + +Sample projects are included for GMS2.3+ (complete - press digit keys to switch camera modes) and GMS2.2.5 (basic - switch camera mode constant in Create event). GMS1 implementation should be functionally identical to GMS2, but there is no justification for me to spend time making (and subsequently updating) a separate GMS1 sample. + +## Setting up + +You will reasonably need a Kinect V2 (Asure Kinect not tested) and an adapter cable to connect it to the computer through a USB3.0 port. + +Once that is done, install [Kinect V2 SDK](https://www.microsoft.com/en-us/download/details.aspx?id=44561), verify configuration ("Kinect Configuration Verifier" in SDK Browser), and you should be good to go. + +## Compiling + +Open the included Visual Studio 2019 solution, make sure that Platform is set to x86 in toolbar, and pick menu:Build➜Build Solution (F8). + +If you do not have [GmxGen](https://github.com/YAL-GameMaker-Tools/GmxGen) added to PATH, the build will succeed but post-build step will fail, which is okay so long as you are not adding new features to the codebase. + +With this, you should get an updated Kinect.dll and be able to run the included sample projects / "Add existing" the GameMaker extension to your project. + +**NB!** Only edit the GML files in the 2.3 project - they are automatically copied over to GMS2.2.5/GMS1 projects during the post-build step. + +## Meta + +**Author:** [YellowAfterlife](https://github.com/YellowAfterlife) +**License:** GNU LGPL v3.0 https://www.gnu.org/licenses/lgpl-3.0 \ No newline at end of file