Code Monkey home page Code Monkey logo

gameswf's Introduction

Marmalade port of GameSWF
Orginal version http://tulrich.com/geekstuff/gameswf.html

Port Author
===========

Pete Hobson (twitter - @psk https://plus.google.com/102056279279488385121/)

Disclaimer form original project
================================

gameswf has bugs and quirks, and is not a complete implementation of Flash. The library as a whole is not highly optimized for memory use or speed. However, the text renderer is pretty decent, and the library is currently probably about as well implemented as the GUI library in the average commercial game. It has been used in many real projects but has a lot of rough edges.

How to use marmalade version
============================

Open and run demo GameSwfPortDemo.mkb
or, drop in GameSwf folder and associated mkf

Current State
=============

Compiles and runs on both x68 and ARM
Anti aliasing is not good quality
Doesn't handle device rotations well.

However, im interested in importing and rendering some simple UI assets, for that its working well

Problems
========

Heres my todo entries form the code.  They are really due to my limited understanding
of c++, so if anyone can advise/fix id be grateful :)


utility.h

//TODO - pete - this log2 causses errors on arm - for now im wrapping it an a conditional
#ifdef I3D_ARCH_X86 
 inline float	log2(float f) { return logf(f) / LN_2; }
#endif


gameswf.h
//TODO - pete - not sure what exported_module is?
	
	exported_module render_handler*	create_render_handler_iwgl();
	
	
gameswf_render_handler_iwgl.cpp
//TODO - pete - GL_BGRA undefined in IWGL?  swapping to GL_RGBA
//glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, GL_BGRA, GL_UNSIGNED_BYTE, data);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data);


GameMain.g (demo)
	//TODO pete - glOrtho not defined?
	//glOrtho(-OVERSIZE, OVERSIZE, OVERSIZE, -OVERSIZE, -1, 1);
	
container.h
	//TODO - pete - fix strcasecmp infinite loop - redefine?
	//define in _root.cpp
	return strcmp(a, b);
	//return strcasecmp(a, b);
	
tu_timer.cpp
//Pete H - no sys/timeb in marmalade
//#include <sys/timeb.h>	// for ftime()


utility.cpp
 TODO - Pete - disabled - look into mallifo struct on arm 
 struct mallinfo mi;

gameswf's People

Contributors

99lives avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.