64 Commits

Author SHA1 Message Date
exilief
dc8d781393 Switching from SDL to SFML (#14)
* Add SFML support besides SDL. Choose with global macro USE_SDL / USE_SFML.

+ Small fixes to make it compile on MinGW (with Glad instead of GLEW -> option NO_GLEW)

* Add SFML support besides SDL (Part 3). Cleaned up some macros.

* Add SFML support besides SDL (Part 4). Small SFML fixes. Changed Spaces->Tabs

* Add SFML support besides SDL (Part 5). Cleaning up more macros + small fixes.

* Port to SFML. Removed all SDL code.

* Small changes

* Conversion functions to/from SFML types for Vector2/3 and Color.

* Removed unused SDL files

* Changes for SFML port

* Changes for SFML port

* Fixed line endings (probably?)
2018-12-26 18:36:46 +01:00
Quentin Bazin
5d1b024d64 [Registry] Now able to register items from a Lua table. 2018-12-20 17:51:19 +01:00
Quentin Bazin
ca953b6661 [Registry] Now able to register elements from a Lua table. 2018-12-20 13:31:32 +01:00
Quentin Bazin
ff69ddb160 [ScriptEngine] Now able to register crafts. 2018-12-20 05:19:56 +01:00
Quentin Bazin
2dadf9dc0a [ScriptEngine] Now able to register block/item properties. 2018-12-20 03:30:11 +01:00
Quentin Bazin
a26a567e95 [ScriptEngine] Added. Items and Blocks are partially loaded from Lua now. 2018-12-20 02:51:30 +01:00
Quentin Bazin
3e6751e6e6 [Application] Template code added to start Lua API later. 2018-12-19 22:36:20 +01:00
Quentin Bazin
4ad7257c44 Small fixes. 2018-12-15 04:57:26 +01:00
exilief
3984492e0b Updates to compile with MinGW 7.2 + small fixes (#13)
* Added missing headers to compile with MinGW 7.2. Added support for Glad instead of GLEW with USE_GLAD.

* [BlockFurnace] Fixed smelting timer. Bit shifting u16(32) by <<16(32) is undefined behaviour.

* #undef M_PI and redefine to ensure portability
2018-11-20 02:49:59 +01:00
Quentin Bazin
fd4c357403 [BlockInfoWidget] Waila-like widget added. 2018-07-06 15:11:09 +02:00
Quentin Bazin
2003ee63dc [ChunkBuilder] Very basic smooth lighting implementation. 2018-07-06 11:58:34 +02:00
Quentin Bazin
16463b99ca [RenderStates] Bitfield for vertex attributes added. 2018-07-02 12:54:12 +02:00
Quentin Bazin
31411a9da6 [Box] Added. [BlockCursor] Now displaying correct box size. 2018-07-02 04:30:17 +02:00
Quentin Bazin
96da02fa15 [Registry] Small fixes. 2018-07-02 02:58:02 +02:00
Quentin Bazin
7df693e4af [Recipe|SmeltingRecipe] Added. [BlockFurnace] Now supports SmeltingRecipe. 2018-06-30 03:48:04 +02:00
Quentin Bazin
dbb6fb5736 [Registry] Blocks, item and recipe data loaded from XML files. 2018-06-30 02:55:34 +02:00
Quentin Bazin
618ff96277 [Block|Item] Block hardness and item mining level/speed handled. 2018-06-29 21:55:47 +02:00
Quentin Bazin
95842ddc07 [Block] Item drop added. Now CoalOre drops Coal and Stone drops Cobblestone. 2018-06-29 21:18:48 +02:00
Quentin Bazin
a258fde36a [BlockFurnace] Now able to smelt iron ore into ingots, using coal as fuel. 2018-06-29 08:56:59 +02:00
Quentin Bazin
9f8768886c [MenuWidget] Now supports multiple buttons. [PauseMenuState] 'Resume' button added. 2018-06-28 11:31:51 +02:00
Quentin Bazin
e5dbcb565a [BlockFurnace|FurnaceWidget] Added. 2018-06-28 10:13:29 +02:00
Quentin Bazin
d53f080fb7 [CraftingRecipe] Improved shaped recipe matching. [SmallCraftingWidget] Added. Now items are craftable from inventory. 2018-06-27 10:42:34 +02:00
Quentin Bazin
e8173578b1 [Player] Added, it's only a container for player's inventory. [BlockWorkbench] Added. Can display WorkbenchWidget on right click. 2018-06-27 05:09:30 +02:00
Quentin Bazin
8fe7a68666 [Registry] Glowstone added. [Chunk] Cobblestone no longer emits light. 2018-06-25 22:50:30 +02:00
Quentin Bazin
6422524da9 [Text] Fixed glyph spacing. [MouseItemWidget] Tooltip added when hovering items. 2018-06-25 22:34:29 +02:00
Quentin Bazin
6fdf1fc81d [CraftingRecipe] Small fix for shapeless recipes. 2018-06-25 18:27:27 +02:00
Quentin Bazin
b18333d43c [BlockType|ItemType|ItemBlock] Added. Better block/item id handling! 2018-06-25 18:12:27 +02:00
Quentin Bazin
ddf771af6a [Item] Attributes isBlock and textureID added. 2018-06-25 16:32:32 +02:00
Quentin Bazin
e07a090a34 [Registry] Recipes for stone tools added. 2018-06-24 09:46:11 +02:00
Quentin Bazin
626285c38d [CraftingRecipe] Support for shapeless recipes added. 2018-06-24 07:46:34 +02:00
Quentin Bazin
8016402116 [Registry] Planks and stick recipes added. 2018-06-24 07:18:31 +02:00
Quentin Bazin
1de5c04b14 [CraftingRecipe] Added. [Registry] Basic axe recipe added. [WorkbenchWidget] Recipe support added. 2018-06-24 07:11:50 +02:00
Quentin Bazin
f2dc9775ad [ItemWidget] Basic item system added. Can display sticks and a hoe now. 2018-06-24 06:35:49 +02:00
Quentin Bazin
5c0735da26 [ItemStack] Added. 2018-06-24 01:42:06 +02:00
Quentin Bazin
75c8352501 [BlockWater] Added. Failed to add a good block updating system. 2018-06-24 01:09:32 +02:00
Quentin Bazin
be69cfbc5b [Chunk] Now stores u32 instead of Block. [Registry] Added. 2018-06-23 23:05:36 +02:00
Quentin Bazin
60c6eaed3b [Color|Sprite|SpriteAnimation|Timer|Vector2] Added. [TerrainGenerator|MouseItemWidget] Small improvements. 2018-06-23 07:00:47 +02:00
Quentin Bazin
28071a6b89 [InventoryWidget] Small bugs fixed. 2018-06-23 00:34:02 +02:00
Quentin Bazin
fb3f7f0501 Lot of changes. [...]
[Renderer] Deleted, code moved to Application.
[Transformable] Transformations are now applied to model matrix in applyTransform.
[ResourceHandler|TextureLoader|XMLFile] Added.
[Debug|Exception] Updated.
2018-06-21 05:45:17 +02:00
Quentin Bazin
2892475ecc [InventoryState|WorkbenchWidget] Added. Starting inventory system. 2018-06-21 00:55:38 +02:00
Quentin Bazin
e4db36e0e4 [TerrainGenerator] Now using another generation. [Chunk] Block storage heavily reworked. Now using a compile-time array instead of a vector. 2018-06-16 16:45:48 +02:00
Quentin Bazin
7191b61bdf [ApplicationState] Using new rendering system. 2018-06-14 23:36:01 +02:00
Quentin Bazin
e56a6b7d2f Headers cleaned. [CMakeLists.txt] Now using -O3 and -ffast-math. 2018-06-14 03:20:20 +02:00
Quentin Bazin
4c3fe96ca4 [GameState] Now using left mouse click to delete block. 2018-06-14 03:02:47 +02:00
Quentin Bazin
b0050a1f34 [CoreApplication] Replacing most old Application code. [ApplicationState|ApplicationStateStack] Updated. 2018-06-14 02:38:25 +02:00
Quentin Bazin
70efbfce5b [.gitignore|CMakeLists.txt] Cleaned/improved. [sources] Cleaned some headers. 2018-06-12 09:24:43 +02:00
Quentin Bazin
96bd9c590a [Application|Camera] Better mouse handling. 2018-06-05 17:17:09 +02:00
Quentin Bazin
5a969f055a Merged with last 'dev' branch commit. 2018-06-05 16:51:58 +02:00
Quentin Bazin
4bdea4b341 Lots of small fixes. 2018-06-05 16:17:40 +02:00
Quentin Bazin
e09f177511 Small fixes. 2018-06-05 01:48:01 +02:00