mnit: does not depends on opengles1

let nmit_android and mnit_linux import opengles1 themselves

Signed-off-by: Jean Privat <jean@pryen.org>
mnit: remove virtual type IE

There is no point in having specific input-event virtual type.
Most places do not even use IE but directly InputEvent.

Signed-off-by: Jean Privat <jean@pryen.org>
shoot: move only on pressed, not depressed

Signed-off-by: Jean Privat <jean@pryen.org>
lib/standard/text: Updated API for String/Buffer, a few methods disappear from Text and are relocated a level below.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
tests: Updated to fit new API.

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
model: fix a compiler crash on access to null constructor signature

Before this patch, compilation process stopped on a null pointer exception.
Because of the compilation workflow, nitg tried to access a super init even
if this init was malformed (type error) and thus not modelized properly.

This commit add one more condition to ensure that msignature is initialized before the test
and raise the correct error instead of crashing.

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
lib/mnit: introduce `mnit_injected_input` to inject events into mnit applications

Signed-off-by: Jean Privat <jean@pryen.org>
lib/mnit: introduce `mnit_null` to execute mnit without a display

Signed-off-by: Jean Privat <jean@pryen.org>
shoot: add a `null` target that uses mnit::mnit_null

Signed-off-by: Jean Privat <jean@pryen.org>
tests: teach tests.sh to use MNIT_* environment variables

Signed-off-by: Jean Privat <jean@pryen.org>
tests_full: add mnit_null variants, and the .inputs file for shoot

Signed-off-by: Jean Privat <jean@pryen.org>
Merge: model: fix a compiler crash on access to null constructor signature

Before this patch, compilation process stopped on a null pointer exception.
Because of the compilation workflow, nitg tried to access a super init even
if this init was malformed (type error) and thus not modelized properly.

This commit add one more condition to ensure that msignature is initialized before the test
and raise the correct error instead of crashing.

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

Pull-Request: #538
Reviewed-by: Jean Privat <jean@pryen.org>
Merge: String api

Modified a bit of the API for Strings/Buffers as a reaction to the `appendgate` that occured earlier this week.

Now, copy methods (+,*,to_upper/lower) are deferred to String and in-place equivalents are available for Buffer.

Pull-Request: #516
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Merge master to resolve conflict in tests not present yet
tests: update mnit

Signed-off-by: Jean Privat <jean@pryen.org>
Merge: Enable dummy executions of mnit applications

A dummy execution need a stream of input events and a dummy display that is not connected to a physical screen.

`lib/mnit/mnit_injected_events.nit` gives the injection of pseudo-events read from a file.
It can be used, by mixin-refinement, with any existing mnit programs.

Eg. to have a replay of a game, just compile with `-m` and run with some environment variables
~~~
$ cd examples/shoot
$ ../../bin/nitc -o bin/shoot src/shoot_linux.nit -m ../../lib/mnit/mnit_injected_input.nit
$ MNIT_SRAND=0 MNIT_READ_INPUT=../../tests/shoot_null.inputs bin/shoot
~~~

`lib/mnit/mnit_null.nit` gives a new dummy target-platform with no display.
It must be used instead of `mnit_linux` and `mnit_android`.

Eg. for the same run, but without display ; note that the main module is `shoot.nit` instead of `shoot_linux.nit`
~~~
$ cd examples/shoot
$ ../../bin/nitc -o bin/shoot src/shoot.nit -m ../../lib/mnit/mnit_null.nit
$ MNIT_SRAND=0 MNIT_READ_INPUT=../../tests/shoot_null.inputs bin/shoot
~~~

All this is mainly a proof of concept, and not that useful, except maybe for testing, it is why tests.sh has be extended to control the run of a dummy `shoot` game.

Pull-Request: #509
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>