Skip to content

Instantly share code, notes, and snippets.

View arissa34's full-sized avatar

Rami Martin arissa34

View GitHub Profile
@arissa34
arissa34 / [LIBGDX] BoundingBoxModel
Last active December 1, 2019 20:57
[LIBGDX] If you need to render your BoundingBox to see where is this slut like after a matrix transform !
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Camera;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.VertexAttribute;
import com.badlogic.gdx.graphics.glutils.IndexBufferObject;
import com.badlogic.gdx.graphics.glutils.ShaderProgram;
import com.badlogic.gdx.graphics.glutils.VertexBufferObject;
import com.badlogic.gdx.math.collision.BoundingBox;
import com.badlogic.gdx.utils.FloatArray;
@arissa34
arissa34 / [LIBGDX] LazyTextureRegion
Created December 1, 2019 20:56
Http request for TextureRegion with Texture placeholder during loading + cache + assets management
package rma.ox.data.network.http.texture;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Net;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.PixmapIO;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.net.HttpRequestBuilder;
import com.badlogic.gdx.utils.FlushablePool;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.math.Interpolation;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.actions.Actions;
import com.badlogic.gdx.scenes.scene2d.ui.Dialog;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.Window;
import com.badlogic.gdx.utils.Array;
package rma.ox.engine.ressource.language;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.utils.I18NBundle;
import java.util.Locale;
import rma.ox.engine.settings.SettingsHelper;
public class Languages {
private static String PATH_STRINGS = "data/lang/strings";
@arissa34
arissa34 / [LIBGDX] Cantor pairing
Last active June 17, 2021 21:18
[LIBGDX] Cantor pairing
package rma.ox.engine.core.math;
import com.badlogic.gdx.math.Vector2;
/****
* When I need to flat 2D coord to an ID
* https://en.wikipedia.org/wiki/Pairing_function
*/
public class CantorPairing {
@arissa34
arissa34 / compiling_building_c_cpp_notes.md
Created October 25, 2021 20:03 — forked from gubatron/compiling_building_c_cpp_notes.md
Things to remember when compiling and linking C/C++ programs

Things to remember when compiling/linking C/C++ software

by Angel Leon. March 17, 2015; August 29, 2019.

Include Paths

On the compilation phase, you will usually need to specify the different include paths so that the interfaces (.h, .hpp) which define structs, classes, constans, and functions can be found.

With gcc and llvm include paths are passed with -I/path/to/includes, you can pass as many -I as you need.

In Windows, cl.exe takes include paths with the following syntax: /I"c:\path\to\includes\ you can also pass as many as you need.