Compare commits

..

No commits in common. "6d743cad61b85c1bdd9cce3a7bf29f2f30b976da" and "4a0a631f933a20fd72e2461edcfb31fdb40c4fbc" have entirely different histories.

9 changed files with 15 additions and 51 deletions

View file

@ -3,7 +3,7 @@
OUTNAME = mtycoon
CFLAGS = -O0 -Wall -Wextra -g -I ./raylib/include -pipe
CFLAGS = -O0 -g -Wall -Wextra -I ./raylib/include -pipe
CC = gcc
@ -28,17 +28,16 @@ windef:
$(eval BUILD_DIR = build-win)
$(eval LDFLAGS = $(LDFLAGS_WIN))
builddir:
- mkdir $(BUILD_DIR)
mkdir build-tmp
- mv $(wildcard $(BUILD_DIR)/*.o) build-tmp/
build-tmp/%.o : $(SRC_DIR)/%.c
${CC} -c $< -o $@ ${CFLAGS}
build: $(OBJS)
${CC} ${CFLAGS} -o ${OUTPUT} $(OBJS) ${LDFLAGS}
builddir:
- mkdir $(BUILD_DIR)
mkdir build-tmp
- mv $(wildcard $(BUILD_DIR)/*.o) build-tmp/
builddir2:
mv $(wildcard build-tmp/*.o) $(BUILD_DIR)
@ -61,4 +60,4 @@ clean:
.NOTPARALLEL: builddir builddir2
.PHONY: all test clean win windef builddir builddir2 testwin
.PHONY: all test clean win testwin prodwin

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 960 B

View file

@ -2,7 +2,7 @@
#define VERSION_MAJ 0
#define VERSION_MIN 1
#define VERSION_PATCH 1
#define VERSION_PATCH 0
// Set in ui.c
extern char *VERSION_STR;

View file

@ -12,17 +12,9 @@
#include "draw.h"
#include "ui.h"
// Idées :
//Idées :
// - Drogues
/* TODO
* UI worker/machine :
* map :
* - Textures : ~
* - Affichage :
* - convertisseur :
*/
int init(Game *game){
int err = init_draw();
err |= init_game(game);
@ -53,7 +45,7 @@ int main(){
int c_worker = 0;
for(int k = 0; k < 42; k++){
for(int j = 0; j < 256; j++){
for(int j = 0; j < 1; j++){
Machine *coal_mine = add_machine(&game.machines, (V2d){k*250+40,j*400+40});
coal_mine->type = MT_CoalMine;
Machine *iron_mine = add_machine(&game.machines, (V2d){k*250+40,j*400+240});

View file

@ -1,12 +0,0 @@
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <raylib.h>
#include <raymath.h>
#include "types.h"

View file

@ -1,15 +0,0 @@
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <raylib.h>
#include <raymath.h>
#include "types.h"
#pragma once

View file

@ -180,7 +180,7 @@ bool widget_coll(Rectangle widget, V2d point){
bool widgets_treat_event(Game *game, MTEvent event){
bool treated = true;
for(int i = WIDGET_N-1; i >= 0 && treated; i--){
for(int i = 0; i < WIDGET_N; i++){
if(!gui_info.widget_active[i])
continue;
Widget *w = gui_info.widgets[i];
@ -193,11 +193,11 @@ bool widgets_treat_event(Game *game, MTEvent event){
default:
continue;
case EV_Mouse:
if(w->capt_flags & CF_Mouse)
if(w->capt_flags & ~CF_Mouse)
break;
continue;
case EV_Keyb:
if(w->capt_flags & CF_Keyb)
if(w->capt_flags & ~CF_Keyb)
break;
continue;
}

View file

@ -17,8 +17,8 @@
enum CaptureFlags {
CF_None = 0x0,
CF_Mouse = 0x1, //Mouse clicks
CF_Keyb = 0x2
CF_Mouse = 0x2, //Mouse clicks
CF_Keyb = 0x4
};
enum EventTypes {