Commit 4a468980 authored by guillaume's avatar guillaume

init viewer

parent 38d59627
......@@ -5,4 +5,4 @@ raylib
# Generated files:
nw-hello
\ No newline at end of file
nw-*
\ No newline at end of file
......@@ -6,10 +6,13 @@ SET(CMAKE_C_FLAGS "-std=c99 -Wall -Wextra" )
# RayLib:
find_package(raylib 2.0 REQUIRED)
#set(raylib_VERBOSE 1)
# project configuration :
include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/src)
add_executable(nw-hello src/hello.c)
#set(raylib_VERBOSE 1)
target_link_libraries(nw-hello raylib)
add_executable(nw-viewer src/main-viewer.c src/networld.c)
target_link_libraries(nw-viewer raylib)
\ No newline at end of file
......@@ -8,4 +8,4 @@ cd build
cmake ..
make
cp nw-hello ..
cp nw-* ..
/*******************************************************************************************
*
* NetWorld basic viewer
* Copyright (c) 2020-2020 Guillaume Lozenguez
*
********************************************************************************************/
#include "networld.h"
#include "raylib.h"
// Program attributes
//-------------------
const int screenWidth = 800;
const int screenHeight = 450;
const int targetFPS = 60;
void game_update();
void game_draw();
// Game attributes
//-----------------
bool game_end;
int main(int nbArg, char ** arg)
{
test();
// Raylib Initialization
//----------------------
InitWindow(screenWidth, screenHeight, "NetWorld basic viewer");
SetTargetFPS(targetFPS);
// Game Initialization
//--------------------
game_end= false;
// Main game loop
while (!game_end && !WindowShouldClose()) // Detect window close button or ESC key
{
game_update();
game_draw();
}
// proper closing
//---------------
CloseWindow(); // Close window and OpenGL context
return 0;
}
void game_update()
{
}
void game_draw()
{
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
EndDrawing();
}
\ No newline at end of file
#include "networld.h"
#include <stdio.h>
int test(){
puts("hello");
return 0;
}
#ifndef NETWORLD_H
#define NETWORLD_H
int test();
#endif //NETWORLD_H
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment