From f368d380e708bd39589a309e2611b55306b78b3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 25 Apr 2016 18:49:56 +0200 Subject: Drop obsolete WIP for Flash platform It was apparently never fully functional and has not been maintained. Flash itself is nowadays clearly a deprecated technology, so there will not be further work on it. platform/javascript and the upcoming WebAssembly technologies should have a brighter future. --- platform/flash/godot_flash.cpp | 80 ------------------------------------------ 1 file changed, 80 deletions(-) delete mode 100644 platform/flash/godot_flash.cpp (limited to 'platform/flash/godot_flash.cpp') diff --git a/platform/flash/godot_flash.cpp b/platform/flash/godot_flash.cpp deleted file mode 100644 index 5e7d6214b8..0000000000 --- a/platform/flash/godot_flash.cpp +++ /dev/null @@ -1,80 +0,0 @@ - -#include "main/main.h" -#include "os_flash.h" -#include -#include - -#include - -using namespace AS3::ui; - -static int frames = 0; - -static OSFlash* os_flash = NULL; -static uint64_t last_time = 0; - -static var frame(void* data, var args) { - - if (frames < 3) { - uint64_t now = os_flash->get_ticks_usec(); - printf("enter frame %i, %f\n", frames, (now - last_time) / 1000000.0); - last_time = now; - }; - switch (frames) { - - case 0: { - char* argv[] = {"-test", "gui", NULL}; - Main::setup("", 2, argv, false); - ++frames; - } break; - case 1: - Main::setup2(); - ++frames; - break; - case 2: - Main::start(); - ++frames; - break; - default: - os_flash->iterate(); - inline_as3("import GLS3D.*;\n" - "GLAPI.instance.context.present();\n" - : : - ); - /* - flash::display::Stage stage = internal::get_Stage(); - flash::display::Stage3D s3d = var(var(stage->stage3Ds)[0]); - flash::display3D::Context3D ctx3d = s3d->context3D; - ctx3d->present(); - */ - break; - }; - - return internal::_undefined; -}; - -static var context_error(void *arg, var as3Args) { - - printf("stage 3d error!\n"); - - return internal::_undefined; -}; - -int main(int argc, char* argv[]) { - - printf("godot flash\n"); - os_flash = new OSFlash; - printf("os\n"); - - last_time = os_flash->get_ticks_usec(); - - flash::display::Stage stage = internal::get_Stage(); - stage->scaleMode = flash::display::StageScaleMode::NO_SCALE; - stage->align = flash::display::StageAlign::TOP_LEFT; - stage->frameRate = 60; - - stage->addEventListener(flash::events::Event::ENTER_FRAME, Function::_new(frame, NULL)); - - AS3_GoAsync(); -}; - -- cgit v1.2.3