Jean Privat [Thu, 15 Jun 2017 19:43:37 +0000 (15:43 -0400)]
Merge: gamnit: replace missing textures by a checker texture
Use a checker texture to replace textures that fail to load. This replaces the previous behavior where an invalid texture name was passed to OpenGL ES which displayed it as full black.
In support, revamp the implementation of `CheckerTexture` to be only black and white and to have a size of 32 pixels by default. The new color is more neutral while being easier to spot and report by an end user (see the tower in the screenshot below). And the new size will make it easier to see than the previous 2x2 on non-scaled 2D sprites.
Also intro `CustomTexture`, a texture build programmatically by setting the color of each pixel. This can be used to create very simple textures (like the crosshair or the fuel indicator in the screenshot) or to represent end user drawings. This API is not very optimized, but clients can still subclass `Texture` for performance critical textures.
![screenshot from 2017-06-10 14 30 13](https://user-images.githubusercontent.com/208057/
27045782-
11600cde-4f70-11e7-80ac-
742e3ab96204.png)
Pull-Request: #2490
Jean Privat [Thu, 15 Jun 2017 19:43:36 +0000 (15:43 -0400)]
Merge: tests: measure time with elapsed time instead of user-mode time
This will help to identify where the real elapsed time is going.
Pull-Request: #2491
Reviewed-by: Jean-Christophe Beaupré <jcbrinfo.public@gmail.com>
Jean Privat [Thu, 15 Jun 2017 19:43:35 +0000 (15:43 -0400)]
Merge: modelize_property: Remove an unreachable case
Exploit the De Morgan’s law.
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Pull-Request: #2493
Jean Privat [Thu, 15 Jun 2017 19:43:34 +0000 (15:43 -0400)]
Merge: nit-makepackage: add missing manpage
jenkins does not like missing manpages, even for trivial tools.
Pull-Request: #2494
Jean Privat [Thu, 15 Jun 2017 19:43:31 +0000 (15:43 -0400)]
Merge: core: move file related services from `String` to `Text`
Update services from `core::file` to accept any `Text` as receiver or argument. In order to avoid breaking any clients, the return type is left to `String`. However, to get better performances, future improvements could also change the return type to `Text`, and update all the clients.
Pull-Request: #2495
Jean-Christophe Beaupré [Thu, 15 Jun 2017 19:16:36 +0000 (15:16 -0400)]
modelize_property: Add a variable to shorten some code
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Fri, 9 Jun 2017 05:30:16 +0000 (01:30 -0400)]
modelize_class: Link `subset_kind` with its corresponding production
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Fri, 9 Jun 2017 04:38:35 +0000 (00:38 -0400)]
parser: Recompile
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Fri, 9 Jun 2017 04:38:02 +0000 (00:38 -0400)]
parser: Add the concrete grammar for predicate definitions
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Thu, 15 Jun 2017 17:24:37 +0000 (13:24 -0400)]
neo4j: Add a fluent interface to set queries’ parameters
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean Privat [Thu, 15 Jun 2017 15:29:35 +0000 (11:29 -0400)]
nitc: use ccache again
c02e04291807cf97228068cc5b52f453d84ab37b unexpectedly disable ccache.
Since CC is set by default[1], the ?= attempt did never assign anything[2].
The solution is to assign unless if CC is set by another mean.
This can be done thanks to the origin function[3].
[1]: https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
[2]: https://www.gnu.org/software/make/manual/html_node/Flavors.html
[3]: https://www.gnu.org/software/make/manual/html_node/Origin-Function.html
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 15 Jun 2017 13:18:58 +0000 (09:18 -0400)]
tests/neo4j: hardening the test not_empty to `length == 1`
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 15 Jun 2017 13:16:43 +0000 (09:16 -0400)]
tests/neo4j: clear the potential existing elements before starting the tests
Signed-off-by: Jean Privat <jean@pryen.org>
Jean-Christophe Beaupré [Wed, 14 Jun 2017 03:48:23 +0000 (23:48 -0400)]
modelize_property: Remove an unreachable case
Exploit the De Morgan’s law.
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Wed, 14 Jun 2017 21:15:30 +0000 (17:15 -0400)]
modelize_property: Implement `is_new` like `is_init`
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Alexis Laferrière [Mon, 12 Jun 2017 15:57:56 +0000 (11:57 -0400)]
core: move more servies to Text (receiver and args only)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 14 Jun 2017 01:52:23 +0000 (21:52 -0400)]
gamnit: intro `CustomTexture::fill`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sat, 10 Jun 2017 18:39:45 +0000 (14:39 -0400)]
gamnit: move `pixelated=` up to `Texture`
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Sun, 11 Jun 2017 02:54:06 +0000 (22:54 -0400)]
gamnit: intro custom textures, built programmatically pixel per pixel
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Jean Privat [Wed, 14 Jun 2017 13:08:41 +0000 (09:08 -0400)]
nit-makepackage: add missing manpage
jenkins does not like missing manpages, even for trivial tools.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 14 Jun 2017 12:44:40 +0000 (08:44 -0400)]
test: use `command` instead of `env` to bypass Bash’s built-ins
Signed-off-by: Jean Privat <jean@pryen.org>
Jean-Christophe Beaupré [Fri, 9 Jun 2017 04:37:33 +0000 (00:37 -0400)]
parser: Add the abstract grammar for predicate definitions
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Fri, 9 Jun 2017 04:34:16 +0000 (00:34 -0400)]
parser_nodes: Allow to flag predicate definitions
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Thu, 8 Jun 2017 23:38:23 +0000 (19:38 -0400)]
parser: Add the grammar for subset definitions
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Thu, 8 Jun 2017 23:34:03 +0000 (19:34 -0400)]
parser_nodes: Add a class kind for class subsets
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Fri, 9 Jun 2017 15:06:44 +0000 (11:06 -0400)]
model: Add a class kind for class subsets
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Fri, 9 Jun 2017 15:06:33 +0000 (11:06 -0400)]
model: Don’t blacklist in specialization rules
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Mon, 29 May 2017 15:44:06 +0000 (11:44 -0400)]
model: Add `can_customize_isa` and `can_init` attributes to class kinds
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean Privat [Tue, 13 Jun 2017 15:21:16 +0000 (11:21 -0400)]
tests: measure time with elapsed time instead of user-mode time
This will help to identify where the real elapsed time is going.
Signed-off-by: Jean Privat <jean@pryen.org>
Jean-Christophe Beaupré [Tue, 13 Jun 2017 00:30:13 +0000 (20:30 -0400)]
modelize_class: Test the handling of a formal supertypes
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Tue, 13 Jun 2017 00:29:06 +0000 (20:29 -0400)]
modelize_class: Fix the wording of an error message.
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Tue, 13 Jun 2017 00:28:18 +0000 (20:28 -0400)]
modelize_class: Don’t crash on a formal supertype
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean Privat [Mon, 12 Jun 2017 20:39:34 +0000 (16:39 -0400)]
Merge: nitweb: use ui-router
A lot of refactoring to replace ng-router by ui-router.
The finality is to provide direct links within documentations tabs:
* link to dependencies: http://nitweb.moz-code.org/doc/core/graph
* link to code: http://nitweb.moz-code.org/doc/core::kernel/code
* link to linearization: http://nitweb.moz-code.org/doc/core::Array/lin
Also removed the special pages for mclassdefs and mpropdefs. They now link directly to their relative mclass/mproperty linearization:
* http://nitweb.moz-code.org/doc/core::Array/lin#pthreads::redef_collections$core::Array
* http://nitweb.moz-code.org/doc/core::SimpleCollection::add_all/lin#core$CircularArray$SimpleCollection::add_all
Demo: http://nitweb.moz-code.org/
Fixes #2177
Pull-Request: #2489
Jean Privat [Mon, 12 Jun 2017 20:39:27 +0000 (16:39 -0400)]
Merge: testmodel: what about docunits to test model-related services?
Just create standalone pre-constructed models already filled with entities that are exposed as attributes.
Then use these models to test various services.
In the prof-of-concept PR, I just added 2 simple docunits.
Pull-Request: #2488
Reviewed-by: Jean-Christophe Beaupré <jcbrinfo.public@gmail.com>
Jean Privat [Mon, 12 Jun 2017 20:39:13 +0000 (16:39 -0400)]
Merge: lib/popcorn: introduce BoolValidator in popcorn::pop_validation
A Boolean validator.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2478
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 12 Jun 2017 20:39:02 +0000 (16:39 -0400)]
Merge: More package.ini
package.ini file are not mandatory, so to convince people to use then, here is a new tool.
Pull-Request: #2485
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Jean-Christophe Beaupré <jcbrinfo.public@gmail.com>
Jean Privat [Mon, 12 Jun 2017 14:37:07 +0000 (10:37 -0400)]
testmodel: what about docunits to test model-related services?
Just create standalone pre-constructed models already filled with entities that are exposed as attributes.
The use the same model to test various services.
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Fri, 9 Jun 2017 14:48:09 +0000 (10:48 -0400)]
gamnit: if a texture fails to load, use the checker texture
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Fri, 9 Jun 2017 14:47:46 +0000 (10:47 -0400)]
gamnit: CheckerTexture with custom size and move up implementation
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexandre Terrasa [Mon, 12 Jun 2017 18:28:19 +0000 (14:28 -0400)]
lib/popcorn: introduce BoolValidator in popcorn::pop_validation
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Mon, 12 Jun 2017 17:51:45 +0000 (13:51 -0400)]
nitweb: classdefs and propdefs link directly into class / property linerarization list
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Mon, 12 Jun 2017 17:43:46 +0000 (13:43 -0400)]
Merge: lib/popcorn: use GetName for deserialization process
First official use of the Goret<sup>©</sup> approach.
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2487
Jean Privat [Mon, 12 Jun 2017 17:43:45 +0000 (13:43 -0400)]
Merge: lib/dot: rename `exemples` to `examples`
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2479
Jean Privat [Fri, 9 Jun 2017 15:58:16 +0000 (11:58 -0400)]
add 2 missing package.ini files
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 9 Jun 2017 15:57:12 +0000 (11:57 -0400)]
new script to ease the creation of `package.ini` files
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Mon, 12 Jun 2017 12:44:25 +0000 (08:44 -0400)]
Merge: nitsmell : Add code smell detection
Adding code smell detection :
- Long class
- Long method parameter list
- Long size method
- Feature envy
Adding a visitor to analyse the contents of the methods
Pull-Request: #2445
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Jean-Christophe Beaupré <jcbrinfo.public@gmail.com>
Alexandre Terrasa [Fri, 9 Jun 2017 21:20:09 +0000 (17:20 -0400)]
nitweb: split mentity module into views
Tabs are now reachable via url
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean-Christophe Beaupré [Fri, 9 Jun 2017 17:16:59 +0000 (13:16 -0400)]
modelize_class: Simplify `collect_supertypes` by defining some variables
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Fri, 9 Jun 2017 17:09:50 +0000 (13:09 -0400)]
modelize_class: Extract supertype collection logic
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Alexandre Terrasa [Fri, 9 Jun 2017 18:54:25 +0000 (14:54 -0400)]
nitweb: remove model module
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 18:52:48 +0000 (14:52 -0400)]
nitweb: move metrics model to metrics module
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 18:51:46 +0000 (14:51 -0400)]
nitweb: move users model to users module
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 18:50:30 +0000 (14:50 -0400)]
nitweb: move ui-router config to users module
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 18:47:50 +0000 (14:47 -0400)]
nitweb: move grades model to grades module
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 18:46:45 +0000 (14:46 -0400)]
nitweb: move ui-router config to grades module
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 18:44:21 +0000 (14:44 -0400)]
nitweb: move doc-down model to doc-down module
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 18:43:06 +0000 (14:43 -0400)]
nitweb: move ui-router configuration to doc-down module
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 18:33:28 +0000 (14:33 -0400)]
nitweb: move entity state configuration to entity module
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 18:33:08 +0000 (14:33 -0400)]
mitweb: move entity model to entity module
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 18:28:41 +0000 (14:28 -0400)]
nitweb: index use ui-router and views for tabs
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 18:07:30 +0000 (14:07 -0400)]
nitweb: remove useless dependency from index to ngSanitize
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 18:06:48 +0000 (14:06 -0400)]
nitweb: move index model to index module
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 18:05:17 +0000 (14:05 -0400)]
nitweb: remove useless module injection from module index
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 18:04:19 +0000 (14:04 -0400)]
nitweb: move index state configuration to index module
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 18:02:30 +0000 (14:02 -0400)]
nitweb: move anchorscroll configuration to main script
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 18:01:24 +0000 (14:01 -0400)]
nitweb: replace ngRouter by ui.router
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 05:49:29 +0000 (01:49 -0400)]
nitweb: split css files
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 17:30:25 +0000 (13:30 -0400)]
lib/popcorn: use GetName for deserialization process
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean-Christophe Beaupré [Fri, 9 Jun 2017 17:09:14 +0000 (13:09 -0400)]
modelize_class: Continue supertype collection after an invalid supertype
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Fri, 9 Jun 2017 17:08:04 +0000 (13:08 -0400)]
modelize_class: Minimize the context used to resolve supertypes
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Fri, 9 Jun 2017 16:31:40 +0000 (12:31 -0400)]
modelize_class: Rename `collect_a_mclassdef_inheritance`
Rename `collect_a_mclassdef_inheritance` to `build_a_mclassdef_inheritance`
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Jean-Christophe Beaupré [Fri, 9 Jun 2017 16:29:57 +0000 (12:29 -0400)]
modelize_class: Extract the bound collection logic
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Alexandre Terrasa [Fri, 9 Jun 2017 17:22:38 +0000 (13:22 -0400)]
lib/dot: add sav for do examples
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Alexandre Terrasa [Fri, 9 Jun 2017 17:22:21 +0000 (13:22 -0400)]
lib/dot: do not show graph by default in examples so we can test them
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Fri, 9 Jun 2017 15:52:01 +0000 (11:52 -0400)]
package.ini: fix broken links
Signed-off-by: Jean Privat <jean@pryen.org>
Jean Privat [Fri, 9 Jun 2017 14:55:14 +0000 (10:55 -0400)]
Merge: gamnit: fix color buffer clearing issues on some computers
This PR clear the drawing buffers *after* selecting the target framebuffer, even when the buffer does not change. This should fix the issue @BlackMinou was having (the color buffer not being cleared) when running Tinks! 3D or https://gitlab.com/xymus/jumpngun.
However, this does not fix a similar issue on my desktop computer and I think an issue remained with the depth buffer on @BlackMinou computer.
Pull-Request: #2480
Jean Privat [Fri, 9 Jun 2017 14:55:13 +0000 (10:55 -0400)]
Merge: gamnit: dynamic window resize
Enable dynamic window resizing on desktop computers. It follows the current behavior to preserve the virtual height of 1080 units while adapting the width to respect the window aspect ratio. This is the foolproof behavior, but clients can redef `on_resize` to configure the display as needed, or disable window resizing by setting a custom `GamnitDisplay::sdl_window_flags`.
As support, move `IPoint3d::offset` out of `gamnit` to `geometry` so it can be used by game logic (not just UI logic). And rework sprite positions derived from a camera anchor (such as `ui_camera.center` or `ui_camera.top_left`) to update them when the display is resized.
If needed, we could add a service to preserve the aspect ratio to the desired value. However, since mobile platforms are first class targets, gamnit games should support different resolutions. So have a range of accepted aspect ratios could be a solution to avoid unexpected ratios.
![screenshot from 2017-06-06 20 06 23](https://user-images.githubusercontent.com/208057/
26857006-
a295d456-4af5-11e7-9d47-
1321319b5887.png)
![screenshot from 2017-06-06 20 06 32](https://user-images.githubusercontent.com/208057/
26857008-
a587c034-4af5-11e7-9816-
358e8999a239.png)
![screenshot from 2017-06-06 20 06 37](https://user-images.githubusercontent.com/208057/
26857010-
a8c33e9a-4af5-11e7-9c61-
3117a68f51ef.png)
![screenshot from 2017-06-06 20 06 40](https://user-images.githubusercontent.com/208057/
26857016-
aae02224-4af5-11e7-84ff-
07f092f0289b.png)
Pull-Request: #2477
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Thu, 8 Jun 2017 20:01:29 +0000 (16:01 -0400)]
Merge: gamnit: fix README and docker latest-full references to the use of SDL2 mixer
Update gamnit README and latest-full docker for #2466.
Pull-Request: #2481
Jean Privat [Thu, 8 Jun 2017 20:01:05 +0000 (16:01 -0400)]
Merge: lib/meta: add a *goret* approach to get the name of random types.
may be used to improve deserialization?
Pull-Request: #2482
Reviewed-by: Jean-Christophe Beaupré <jcbrinfo.public@gmail.com>
Jean Privat [Thu, 8 Jun 2017 18:14:48 +0000 (14:14 -0400)]
lib/meta: add a *goret* approach to get the name of random types.
may be used to improve deserialization?
Signed-off-by: Jean Privat <jean@pryen.org>
Alexis Laferrière [Thu, 8 Jun 2017 16:27:42 +0000 (12:27 -0400)]
docker full: install missing package for SDL2 mixer
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Thu, 8 Jun 2017 16:27:10 +0000 (12:27 -0400)]
gamnit: don't recommend to install a package that is not used anymore
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 7 Jun 2017 11:53:25 +0000 (07:53 -0400)]
app: disable example leading to a threaded crash on an abstract method
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 11 Apr 2017 14:12:34 +0000 (10:12 -0400)]
gamnit: resize in dynamic resolution
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 6 Jun 2017 23:33:08 +0000 (19:33 -0400)]
gamnit: enable dynamic window resizing on desktop
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 6 Jun 2017 23:32:00 +0000 (19:32 -0400)]
gamnit: cache UICamera anchor points
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Tue, 6 Jun 2017 23:30:59 +0000 (19:30 -0400)]
geometry: move up `Point3d::offset` from gamnit
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Mon, 10 Apr 2017 14:55:58 +0000 (10:55 -0400)]
gamnit: fix `UICamera::height` doc and double assignation
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexis Laferrière [Wed, 7 Jun 2017 19:35:50 +0000 (15:35 -0400)]
gamnit: fix color buffer clearing issues on some computers
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Alexandre Terrasa [Wed, 7 Jun 2017 22:06:22 +0000 (18:06 -0400)]
lib/dot: rename `exemples` to `examples`
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Jean Privat [Wed, 7 Jun 2017 20:11:11 +0000 (16:11 -0400)]
Merge: nitin: use GPL-3.0 instead of GPL-3
the tag is used to fill the catalog, http://nitlanguage.org/catalog/p/nitin.html but the link is broken whereas https://opensource.org/licenses/GPL-3.0 works
Signed-off-by: Jean Privat <jean@pryen.org>
Pull-Request: #2476
Jean Privat [Wed, 7 Jun 2017 20:11:10 +0000 (16:11 -0400)]
Merge: listfull.sh: Quote paths
Make the list unambiguous and easy to consume by POSIX shell scripts.
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Pull-Request: #2473
Reviewed-by: Jean Privat <jean@pryen.org>
Jean Privat [Wed, 7 Jun 2017 20:11:09 +0000 (16:11 -0400)]
Merge: modelbuilder_base: Refactor the signature of `resolve_mtype*`
Only `modelize_mclass` require support for partial context. Furthermore, in
a future PR, it may need to resolve types just before modeling the class
definition (in a place where the `MClass` is available and must be used).
Also include various related cleanups.
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Pull-Request: #2472
Jean Privat [Wed, 7 Jun 2017 20:11:08 +0000 (16:11 -0400)]
Merge: gamnit: Blinn-Phong specular lighting, 3 axes of rotation and more
Implement a Blinn-Phong specular lighting shader to replace the previous Lamber diffuse lighting. It creates a reflection effect either from `specular_color` (as on the shields) or `specular_texture` (as on the gold tower).
![screenshot from 2017-05-31 10 16 13](https://cloud.githubusercontent.com/assets/208057/
26636318/
5a017ffc-45ea-11e7-8571-
0918f13f6d9c.png)
![screenshot from 2017-05-30 23 13 32](https://cloud.githubusercontent.com/assets/208057/
26636316/
59c940c4-45ea-11e7-9106-
99f9344cecbf.png)
The required material attributes for the specular effect were already present but not implemented. This PR adds similar attributes for normal maps, but leave them as a TODO. The new shader is fine but not optimal, I'll probably need to rewrite it to gain some performance, support normal maps and improve normals per vertex.
Add two angles of rotation to actors for full 3D rotation with Euler angles. All rotation angles follow the right-hand rule and are consistent between the camera and actors.
Other changes:
* Intro `Cuboid` that can be created by `Boxed3d::to_mesh`.
* Better error management when loading models.
* Fix missing `lock_cursor` implementation on desktop. It allows creating FPS like cameras.
* Fix and update `angle_lerp` to follow the style of `lerp` (where `self` is the weight).
* Improve the template project so 3D objects don't blend in the background and explain the printed performance statistics.
In a future PR, I'll standardize the assets classes and move some service up to `Asset`. This would allow for easier loading of all assets at once, no matter their type, and offer a standard behavior regarding errors and lazy loading.
Pull-Request: #2471
Reviewed-by: Jean-Christophe Beaupré <jcbrinfo.public@gmail.com>
Jean Privat [Wed, 7 Jun 2017 20:11:06 +0000 (16:11 -0400)]
Merge: Wrapper gmp
gmp: Initial implementation of the GMP wrapper and simple test for it.
Pull-Request: #2460
Reviewed-by: Jean-Christophe Beaupré <jcbrinfo.public@gmail.com>
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Alexis Laferrière [Mon, 10 Apr 2017 14:55:18 +0000 (10:55 -0400)]
sdl2: intro window events
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Florian Deljarry [Fri, 26 May 2017 18:39:47 +0000 (20:39 +0200)]
Adding code smell detection :
Long class
Long method parameter list
Long size method
Feature envy
Adding a visitor to analyse the contents of the methods
Signed-off-by: Florian Deljarry <deljarry.florian@gmail.com>
Jean Privat [Tue, 6 Jun 2017 16:01:39 +0000 (12:01 -0400)]
Merge: lib/core: introduce replace_first in text/string_search
Replace the first occurrence of `pattern` with `string`
~~~nit
assert "hlelo".replace_first("le", "el") == "hello"
assert "hello".replace_first('l', "") == "helo"
~~~
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
Pull-Request: #2475
Jean Privat [Tue, 6 Jun 2017 15:48:00 +0000 (11:48 -0400)]
Merge: gamnit::network: add server discovery via UDP
Move server discovery logic from Tinks! up to `gamnit::network` and extend existing services with more options. These new services allow for an easy discovery of local servers over UDP, as in the following example which also creates a server if none is found:
~~~nit
import gamnit::network
# Discover local servers
var servers = discover_local_servers
if servers.not_empty then
# Try to connect to the first local server
var server_info = servers.first
var server = new RemoteServer(server_info)
if not server.connect then
print_error "Failed to connect to {server_info.address}:{server_info.port}"
else if not server.handshake then
print_error "Failed handshake with {server_info.address}:{server_info.port}"
else
# Connected!
print "Connected to {server_info.address}:{server_info.port}"
# Write something and close connection
server.writer.serialize "hello server"
server.socket.as(not null).close
end
else
# Create a local server
var connect_port = 38271
print "Launching server: connect on {connect_port}, discovery on {discovery_port}"
var server = new Server(connect_port)
# Don't loop if testing
if "NIT_TESTING".environ == "true" then exit 0
loop
# Respond to discovery requests
server.answer_discovery_requests
# Accept new clients
var new_clients = server.accept_clients
for client in new_clients do
# Read something and close connection
assert client.reader.deserialize == "hello server"
client.socket.close
end
end
end
~~~
Pull-Request: #2470
Reviewed-by: Jean-Christophe Beaupré <jcbrinfo.public@gmail.com>
Jean Privat [Tue, 6 Jun 2017 15:45:44 +0000 (11:45 -0400)]
Merge: parser_nodes: Fix spelling mistakes
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Pull-Request: #2468
Reviewed-by: Jean Privat <jean@pryen.org>