Commit Graph

158 Commits

Author SHA1 Message Date
Matthias Richter
cd3df0c49f Camera: More intuitive functions names 2011-11-16 13:45:20 +01:00
Matthias Richter
31760b00c7 Update class to match class.commons spec 2011-11-16 13:34:59 +01:00
Matthias Richter
e2144b525d Adhere to Class-Commons specs with delayed initializers 2011-09-28 18:17:04 +02:00
Matthias Richter
dfac6aa4ce Add metatable to object before calling the constructor.
Previously, a constructor had no access to static members via self.
E.g. this would have failed:

  class = require 'class'
  A = class{function(self) assert(self.foo) end}
  A.foo = true
  a = A()
2011-09-28 17:48:25 +02:00
Matthias Richter
c8440e2bc0 Fix issue #2: mousepressed doesn't work in gamestate.lua (thanks, benloran!) 2011-09-08 14:26:02 +02:00
Matthias Richter
2264371c6b Class commons interface (see https://github.com/bartbes/Class-Commons) 2011-08-29 17:41:05 +02:00
Matthias Richter
6089ad4494 Bug in non-table syntax: "attempt to index local 'args'" 2011-08-12 21:42:58 +02:00
Matthias Richter
28b698fb00 Eliminate use of module(...) function 2011-07-06 14:19:31 +02:00
Matthias Richter
610de8fc98 Make periodic timer stoppable 2011-06-04 15:45:25 +02:00
Matthias Richter
c3e78cce45 Code cleanup 2011-04-24 21:12:33 +02:00
Matthias Richter
49554f2521 Try to infer name of class when no name given. Add obj:is_a(class). 2011-04-11 16:44:31 +02:00
Matthias Richter
e885ec90d4 Add gamestate:init() 2011-03-15 17:34:28 +01:00
Matthias Richter
94da317ed9 Add optional `inherits' argument to class.
`inherits' is basically a shortcut to Foo = class{...}
Foo:inherit(supers), i.e. those have the same effect:

Foo:class{ inherits = {super1, super2} }
Bar = class{}
Bar:inherit(super1, super2)
2011-03-12 23:59:43 +01:00
Matthias Richter
442fdf3d2f Fix Bug: ringbuffer:prev() does not return get() (thanks qualo) 2011-02-08 14:00:16 +01:00
Matthias Richter
ec3cfcab53 Apply nevon's patch: More gamestate callbacks 2011-01-22 11:53:31 +01:00
Matthias Richter
a4c075f450 Remove sequence module 2011-01-20 15:28:01 +01:00
Matthias Richter
b575417ede Correct tail recursion 2011-01-20 15:26:59 +01:00
Matthias Richter
5abd0f599d Add 'local' 2011-01-20 15:26:28 +01:00
Matthias Richter
762de78e51 API change: Call interpolator only when interpolation ongoing. 2011-01-20 15:26:12 +01:00
Matthias Richter
9bcb428555 Make proper tail recursion calls 2011-01-19 16:41:59 +01:00
Matthias Richter
d1d6dbb056 Make proper modules 2011-01-18 17:44:38 +01:00
Matthias Richter
0dc9eacc57 Bugfix: Timer.update(dt) sometimes fails on `for'
Deleting functions from the function register while looping over
it could break the next-iterator in the for loop. To prevent that
from happening, we collect the functions to be deleted and delete
them in an extra loop.
Functions will still only be called after they have been removed
from the timer register.
2011-01-12 12:18:37 +01:00
Matthias Richter
72b06e2387 Fix vector cross product 2011-01-06 23:24:27 +01:00
Matthias Richter
902437d562 Throw error in case of missing argument instead of silently failing 2010-11-16 16:26:33 +01:00
Matthias Richter
1e961e9a07 Remove useless 'Interface' function 2010-11-13 17:10:47 +01:00
Matthias Richter
1e25c2a2e2 Add convenience class:Inherit method 2010-11-13 16:53:50 +01:00
Matthias Richter
6b2f1f4caa Add missing callbacks, make ignorant of passed arguments, bug in Gamestate.keypressed 2010-10-31 13:04:08 +01:00
Matthias Richter
f093abdad1 Forward interpolating function arguments, add oscillator 2010-10-18 12:31:01 +02:00
Matthias Richter
12dd144d0b forward return value of interpolating function 2010-10-17 16:28:50 +02:00
Matthias Richter
2579a7f6bc Return nil if interpolation is stopped 2010-10-17 16:03:52 +02:00
Matthias Richter
0be37cfbba add timer module 2010-10-17 15:06:35 +02:00
Matthias Richter
770fe5234b Add cross product 2010-09-30 11:46:33 +02:00
Matthias Richter
0ab3a6898c Fix issue #1: Typo in assert 2010-09-30 11:44:31 +02:00
Matthias Richter
d306ce88fb Fix world to camera coordinate transformation 2010-09-19 15:38:39 +02:00
Matthias Richter
8311ddbad1 Add license header 2010-09-19 15:37:55 +02:00
Matthias Richter
b8dc9b6592 Function rename 2010-09-15 11:28:06 +02:00
Matthias Richter
1f69ddb249 add functions to convert from camera coords to screen coords 2010-09-15 11:17:11 +02:00
Matthias Richter
0e6ce6d8a9 remove possible bug when converting to camera coords 2010-09-15 11:15:58 +02:00
Matthias Richter
cfd4cfb28e Function renames 2010-09-15 11:15:23 +02:00
Matthias Richter
ded2110ab3 Bug: camera:transform(p) changed argument 2010-09-03 23:39:54 +02:00
Matthias Richter
4a25caee2c update readme 2010-08-17 21:58:14 +02:00
Matthias Richter
06bcada2d7 Bug: enter/leave not called 2010-08-17 21:54:09 +02:00
Matthias Richter
6a3742aae3 Add sequene class 2010-08-17 20:32:42 +02:00
Matthias Richter
376f31f30c Corrent remove functions 2010-08-17 19:29:41 +02:00
Matthias Richter
048a0bb7ae Add ringbuffer 2010-08-17 16:27:43 +02:00
Matthias Richter
66c0f92a30 Add projection and perpendicular 2010-08-17 13:17:01 +02:00
Matthias Richter
6315155955 Bug: prevent from switching to initial gamestate 2010-08-13 15:36:12 +02:00
Matthias Richter
5030f4db60 Fix link in markdown readme 2010-08-13 14:57:00 +02:00
Matthias Richter
da90605de9 Add error-producing initial gamestate 2010-08-13 14:48:24 +02:00
Matthias Richter
a46fea1805 Move documentation to project page 2010-08-13 14:45:24 +02:00