Skip to content

Commit

Permalink
[geogram] Update to 1.5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
simogasp committed Jan 26, 2018
1 parent a75a86e commit 2816fbe
Show file tree
Hide file tree
Showing 58 changed files with 22,042 additions and 135 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ include(cmake/geogram.cmake)

set(VORPALINE_VERSION_MAJOR 1)
set(VORPALINE_VERSION_MINOR 5)
set(VORPALINE_VERSION_PATCH 5)
set(VORPALINE_VERSION_PATCH 6)
set(VORPALINE_VERSION ${VORPALINE_VERSION_MAJOR}.${VORPALINE_VERSION_MINOR}.${VORPALINE_VERSION_PATCH})

set(VORPALINE_INCLUDE_SUBPATH geogram${VORPALINE_VERSION_MAJOR})
Expand Down
1 change: 0 additions & 1 deletion CMakeOptions.txt

This file was deleted.

7 changes: 0 additions & 7 deletions README.txt

This file was deleted.

3 changes: 3 additions & 0 deletions cmake/platforms/Linux-gcc.cmake
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ endif()
add_flags(CMAKE_CXX_FLAGS -frounding-math -ffp-contract=off)
add_flags(CMAKE_C_FLAGS -frounding-math -ffp-contract=off)

# Activate c++ 2011
add_flags(CMAKE_CXX_FLAGS -std=c++11)

# Enable glibc parallel mode
#add_flags(CMAKE_CXX_FLAGS -D_GLIBCXX_PARALLEL)

Expand Down
2 changes: 2 additions & 0 deletions src/bin/fpg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ aux_source_directories(SOURCES "" .)
include_directories(.)
vor_add_executable(mcc ${SOURCES})
target_link_libraries(mcc geogram)

set_target_properties(mcc PROPERTIES FOLDER "GEOGRAM")
2 changes: 2 additions & 0 deletions src/bin/geobox/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ aux_source_directories(SOURCES "" .)
add_executable(geobox ${SOURCES})
target_link_libraries(geobox geogram_gfx geogram ${GLFW_LIBRARIES})
install_runtime_targets(geobox)

set_target_properties(geobox PROPERTIES FOLDER "GEOGRAM")
2 changes: 2 additions & 0 deletions src/bin/geocod/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ aux_source_directories(SOURCES "lua" lua)
add_executable(geocod ${SOURCES})
target_link_libraries(geocod geogram_gfx geogram ${GLFW_LIBRARIES})
install_runtime_targets(geocod)

set_target_properties(geocod PROPERTIES FOLDER "GEOGRAM")
1 change: 1 addition & 0 deletions src/bin/geocod/lua/embed_lua_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ examples/maison.lua
games/hackman.lua
games/labyrinthe.lua
games/asteroids.lua
games/invaders.lua
book/S01E01.lua
book/S01E02.lua
"
Expand Down
196 changes: 196 additions & 0 deletions src/bin/geocod/lua/embedded_lua_files.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2019,6 +2019,202 @@ void register_embedded_lua_files() {
"end \n"
);

register_embedded_lua_file("games/invaders.lua",
"require(\"pixel\") \n"
" \n"
"-- Simple Space Invaders game \n"
"-- By Alicia Levy \n"
" \n"
"function GLUP.init_graphics() \n"
" GLUP.SetRegionOfInterest(1,1,1,11,11,1) \n"
"end \n"
" \n"
"oldtime=GLUP.ElapsedTime() \n"
" \n"
"x=5 \n"
"y=1 \n"
"missile=false \n"
"missileX=x \n"
"missileY=y+1 \n"
" \n"
"alien=true \n"
"alienTime=0 \n"
"alienX=5 \n"
"alienY=10 \n"
" \n"
"extra=true \n"
"extraTime=0 \n"
"extraX=5 \n"
"extraY=9 \n"
" \n"
"function animate() \n"
" \n"
" alienTime=alienTime+1 \n"
" if alienTime==4 then \n"
" alienTime=0 \n"
" end \n"
" \n"
" extraTime=extraTime+1 \n"
" if extraTime==2 then \n"
" extraTime=0 \n"
" end \n"
" \n"
" if missile then \n"
" missileY=missileY+1 \n"
" end \n"
" \n"
" if alienTime==0 then \n"
" alienX=alienX+1 \n"
" if alienX==11 then \n"
" alienX=1 \n"
" end \n"
" end \n"
" \n"
" if extraTime==0 then \n"
" extraX=extraX-1 \n"
" if extraX==0 then \n"
" extraX=10 \n"
" end \n"
" end \n"
"end \n"
" \n"
"function imgui.on_key_pressed(k) \n"
" if k=='right' then \n"
" x=x+1 \n"
" end \n"
" if k=='left' then \n"
" x=x-1 \n"
" end \n"
" if k=='up' and not missile then \n"
" missileY=2 \n"
" missileX=x \n"
" missile=true \n"
" end \n"
"end \n"
" \n"
"function Missile(x,y) \n"
" GLUP.Begin(GLUP.SPHERES) \n"
" GLUP.Vertex(x+0.5, y+0.5, 0.0, 0.1) \n"
" GLUP.End() \n"
"end \n"
" \n"
"function Rocket(x,y) \n"
" GLUP.PushMatrix() \n"
" GLUP.Translate(x+2.0/9.0,y,0) \n"
" GLUP.Scale(1.0/9.0, 1.0/7.0, 0.3) \n"
" x=0 \n"
" y=0 \n"
" pixBegin() \n"
" col(\"black\") \n"
" pix(x,y) \n"
" pix(x,y+1) \n"
" pix(x,y+2) \n"
" pix(x+4,y) \n"
" pix(x+4,y+1) \n"
" pix(x+4,y+2) \n"
" pix(x+1,y+1) \n"
" pix(x+2,y+1) \n"
" pix(x+3,y+1) \n"
" pix(x+1,y+2) \n"
" pix(x+2,y+2) \n"
" pix(x+3,y+2) \n"
" pix(x+1,y+3) \n"
" pix(x+2,y+3) \n"
" pix(x+3,y+3) \n"
" pix(x+1,y+4) \n"
" pix(x+2,y+4) \n"
" pix(x+3,y+4) \n"
" pix(x+1,y+5) \n"
" pix(x+2,y+5) \n"
" pix(x+3,y+5) \n"
" pix(x+2,y+6) \n"
" pix(x+2,y+7) \n"
" pixEnd() \n"
" GLUP.PopMatrix() \n"
"end \n"
" \n"
"function Alien(x,y,color) \n"
" GLUP.PushMatrix() \n"
" GLUP.Translate(x,y,0) \n"
" GLUP.Scale(1.0/9.0, 1.0/7.0, 0.3) \n"
" x=0 \n"
" y=0 \n"
" pixBegin() \n"
" col(color) \n"
" pix(x,y) \n"
" pix(x,y+1) \n"
" pix(x+1,y+2) \n"
" pix(x+2,y+2) \n"
" pix(x+2,y+1) \n"
" pix(x+3,y) \n"
" pix(x+5,y+2) \n"
" pix(x+4,y+2) \n"
" pix(x+3,y+2) \n"
" pix(x+6,y+2) \n"
" pix(x+6,y+1) \n"
" pix(x+5,y) \n"
" pix(x+7,y+2) \n"
" pix(x+8,y+1) \n"
" pix(x+8,y) \n"
" pix(x+1,y+3) \n"
" pix(x+2,y+4) \n"
" pix(x+3,y+4) \n"
" pix(x+4,y+4) \n"
" pix(x+5,y+4) \n"
" pix(x+6,y+4) \n"
" pix(x+7,y+3) \n"
" pix(x+3,y+3) \n"
" pix(x+4,y+3) \n"
" pix(x+5,y+3) \n"
" pix(x+2,y+5) \n"
" pix(x+1,y+6) \n"
" pix(x+6,y+5) \n"
" pix(x+7,y+6) \n"
" pixEnd() \n"
" GLUP.PopMatrix() \n"
"end \n"
" \n"
" \n"
"function GLUP.draw_scene() \n"
" \n"
" GLUP.Enable(GLUP.DRAW_MESH) \n"
" GLUP.SetCellsShrink(0.1) \n"
" pixGrid() \n"
" \n"
" Rocket(x,y) \n"
" \n"
" if alien==true then \n"
" Alien(alienX,alienY,\"blue\") \n"
" end \n"
" \n"
" if extra==true then \n"
" Alien(extraX,extraY,\"red\") \n"
" end \n"
" \n"
" if GLUP.ElapsedTime()-oldtime>0.025 then \n"
" oldtime=GLUP.ElapsedTime() \n"
" animate() \n"
" end \n"
" \n"
" if missileY>10 then \n"
" missile=false \n"
" end \n"
" \n"
" if missile then \n"
" Missile(missileX,missileY) \n"
" end \n"
" \n"
" if missileX==alienX and missileY==alienY then \n"
" alien=false \n"
" end \n"
" \n"
" if missileX==extraX and missileY==extraY then \n"
" extra=false \n"
" end \n"
"end \n"
" \n"
);

register_embedded_lua_file("book/S01E01.lua",
"-- FR Repare la fusee de Shift et Tab en utilisant pix et col \n"
"-- EN Repair Shift and Tab's rocket by using pix and col \n"
Expand Down
Loading

0 comments on commit 2816fbe

Please sign in to comment.