Love 0.7 docs WIP
Posted: Mon Sep 20, 2010 5:53 am
I'll probably get some work done on Löve 0.7 docs now and then. I will post updates to this thread. I don't think I will be putting anything in the official docs in the Wiki before 0.7 is out of beta. It's kind of impolite to crap over the docs when people still might use 0.6.2.
Also, I like working off-line better.
Anyway, to get started, we can find the documentation topics by use of some basic Unix shell tools.
The Löve Devs seem to keep almost all the Lua API in consistently named files. Their names always begin with wrap_ and end in .cpp or .h. So, we can use find to ferret them all out easily.
Going to the love-0.7.0-beta/src directory and issuing the command find * -name wrap*cpp | sort results in this data:
There is some Lua code in the scripts directory which we will look at later. We can also use grep to find all the names that are provided for the wrapped functions in Lua, because the nice and friendly dev folks have also been nice and friendly enough to list the consistently. The grep command I use to look for them might not look so nice, but let's not dwell on that.
Since most everything is in modules directory, I step into it and then issue the command grep "{.*\".*\",.*}" -r * | sort
(It would be more efficient to only grep thru the files we found in step one, and I'm sure you could come up with a better regexp. But this command works so fast there's no sense in wasting time on this.
As it turned out, the output is so big it would post this posting over the limit of characters for one post. So you get two posts for the price of one. To be continued.
Also, I like working off-line better.
Anyway, to get started, we can find the documentation topics by use of some basic Unix shell tools.
The Löve Devs seem to keep almost all the Lua API in consistently named files. Their names always begin with wrap_ and end in .cpp or .h. So, we can use find to ferret them all out easily.
Going to the love-0.7.0-beta/src directory and issuing the command find * -name wrap*cpp | sort results in this data:
Code: Select all
common/wrap_Data.cpp
modules/audio/wrap_Audio.cpp
modules/audio/wrap_Source.cpp
modules/event/sdl/wrap_Event.cpp
modules/filesystem/physfs/wrap_File.cpp
modules/filesystem/physfs/wrap_FileData.cpp
modules/filesystem/physfs/wrap_Filesystem.cpp
modules/font/freetype/wrap_Font.cpp
modules/font/wrap_FontData.cpp
modules/font/wrap_GlyphData.cpp
modules/font/wrap_Rasterizer.cpp
modules/graphics/opengl/wrap_Font.cpp
modules/graphics/opengl/wrap_Framebuffer.cpp
modules/graphics/opengl/wrap_Glyph.cpp
modules/graphics/opengl/wrap_Graphics.cpp
modules/graphics/opengl/wrap_Image.cpp
modules/graphics/opengl/wrap_ParticleSystem.cpp
modules/graphics/opengl/wrap_Quad.cpp
modules/graphics/opengl/wrap_SpriteBatch.cpp
modules/image/wrap_EncodedImageData.cpp
modules/image/wrap_Image.cpp
modules/image/wrap_ImageData.cpp
modules/joystick/sdl/wrap_Joystick.cpp
modules/keyboard/sdl/wrap_Keyboard.cpp
modules/mouse/sdl/wrap_Mouse.cpp
modules/physics/box2d/wrap_Body.cpp
modules/physics/box2d/wrap_CircleShape.cpp
modules/physics/box2d/wrap_Contact.cpp
modules/physics/box2d/wrap_DistanceJoint.cpp
modules/physics/box2d/wrap_GearJoint.cpp
modules/physics/box2d/wrap_Joint.cpp
modules/physics/box2d/wrap_MouseJoint.cpp
modules/physics/box2d/wrap_Physics.cpp
modules/physics/box2d/wrap_PolygonShape.cpp
modules/physics/box2d/wrap_PrismaticJoint.cpp
modules/physics/box2d/wrap_PulleyJoint.cpp
modules/physics/box2d/wrap_RevoluteJoint.cpp
modules/physics/box2d/wrap_Shape.cpp
modules/physics/box2d/wrap_World.cpp
modules/sound/wrap_Decoder.cpp
modules/sound/wrap_Sound.cpp
modules/sound/wrap_SoundData.cpp
modules/thread/sdl/wrap_Thread.cpp
modules/timer/sdl/wrap_Timer.cpp
Since most everything is in modules directory, I step into it and then issue the command grep "{.*\".*\",.*}" -r * | sort
(It would be more efficient to only grep thru the files we found in step one, and I'm sure you could come up with a better regexp. But this command works so fast there's no sense in wasting time on this.
As it turned out, the output is so big it would post this posting over the limit of characters for one post. So you get two posts for the price of one. To be continued.