Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NetWorld
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fatus
NetWorld
Commits
4a468980
Commit
4a468980
authored
Sep 21, 2020
by
guillaume
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init viewer
parent
38d59627
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
84 additions
and
3 deletions
+84
-3
.gitignore
.gitignore
+1
-1
CMakeLists.txt
CMakeLists.txt
+4
-1
make.sh
bin/make.sh
+1
-1
main-viewer.c
src/main-viewer.c
+65
-0
networld.c
src/networld.c
+7
-0
networld.h
src/networld.h
+6
-0
No files found.
.gitignore
View file @
4a468980
...
@@ -5,4 +5,4 @@ raylib
...
@@ -5,4 +5,4 @@ raylib
# Generated files:
# Generated files:
nw-hello
nw-*
\ No newline at end of file
\ No newline at end of file
CMakeLists.txt
View file @
4a468980
...
@@ -6,10 +6,13 @@ SET(CMAKE_C_FLAGS "-std=c99 -Wall -Wextra" )
...
@@ -6,10 +6,13 @@ SET(CMAKE_C_FLAGS "-std=c99 -Wall -Wextra" )
# RayLib:
# RayLib:
find_package
(
raylib 2.0 REQUIRED
)
find_package
(
raylib 2.0 REQUIRED
)
#set(raylib_VERBOSE 1)
# project configuration :
# project configuration :
include_directories
(
${
PROJECT_SOURCE_DIR
}
${
PROJECT_SOURCE_DIR
}
/src
)
include_directories
(
${
PROJECT_SOURCE_DIR
}
${
PROJECT_SOURCE_DIR
}
/src
)
add_executable
(
nw-hello src/hello.c
)
add_executable
(
nw-hello src/hello.c
)
#set(raylib_VERBOSE 1)
target_link_libraries
(
nw-hello raylib
)
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
bin/make.sh
View file @
4a468980
...
@@ -8,4 +8,4 @@ cd build
...
@@ -8,4 +8,4 @@ cd build
cmake ..
cmake ..
make
make
cp
nw-
hello
..
cp
nw-
*
..
src/main-viewer.c
0 → 100644
View file @
4a468980
/*******************************************************************************************
*
* 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
src/networld.c
0 → 100644
View file @
4a468980
#include "networld.h"
#include <stdio.h>
int
test
(){
puts
(
"hello"
);
return
0
;
}
src/networld.h
0 → 100644
View file @
4a468980
#ifndef NETWORLD_H
#define NETWORLD_H
int
test
();
#endif //NETWORLD_H
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment