Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add the whole project

  • Loading branch information...
commit 101b4d6a2b7321c6c0b6f2b36adf490ff279d12a 1 parent ac857df
@jorge-d authored
Showing with 46,318 additions and 0 deletions.
  1. +225 −0 Makefile
  2. BIN  assets/menu/arrow.png
  3. BIN  assets/menu/backgroundIntro.jpg
  4. BIN  assets/menu/backgroundLoose.jpg
  5. BIN  assets/menu/backgroundMainMenu.jpg
  6. BIN  assets/menu/backgroundNewGame.jpg
  7. BIN  assets/menu/backgroundPause.png
  8. BIN  assets/menu/backgroundWin.jpg
  9. BIN  assets/menu/text.png
  10. +609 −0 assets/models/bomb.fbx
  11. BIN  assets/models/marvinLowLowPo.fbx
  12. BIN  assets/sfx/breakbox.wav
  13. BIN  assets/sfx/explosion.wav
  14. BIN  assets/sfx/game.wav
  15. BIN  assets/sfx/menu.wav
  16. BIN  assets/sfx/powerup.wav
  17. BIN  assets/sfx/tintin.wav
  18. BIN  assets/textures/bag.png
  19. BIN  assets/textures/bg.jpg
  20. BIN  assets/textures/box.jpg
  21. BIN  assets/textures/bricks.png
  22. BIN  assets/textures/flame.jpg
  23. BIN  assets/textures/grass.png
  24. BIN  assets/textures/rangebx.jpg
  25. BIN  assets/textures/speed.png
  26. +22 −0 gdl/include/AnimStates.hpp
  27. +32 −0 gdl/include/Assert.hpp
  28. +84 −0 gdl/include/Clock.hpp
  29. +88 −0 gdl/include/Color.hpp
  30. +92 −0 gdl/include/Game.hpp
  31. +89 −0 gdl/include/GameClock.hpp
  32. +45 −0 gdl/include/IClock.hpp
  33. +79 −0 gdl/include/Image.hpp
  34. +112 −0 gdl/include/Input.hpp
  35. +262 −0 gdl/include/Model.hpp
  36. +26 −0 gdl/include/ModelException.hpp
  37. +111 −0 gdl/include/Resource.hpp
  38. +26 −0 gdl/include/Text.hpp
  39. +142 −0 gdl/include/Window.hpp
  40. BIN  gdl/lib/libgdl_gl-d.so
  41. BIN  gdl/lib/libgdl_gl.so
  42. +85 −0 inc/Engine.hh
  43. +2,241 −0 inc/GL/gl.h
  44. +1,985 −0 inc/GL/gl_mangle.h
  45. +10,081 −0 inc/GL/glext.h
  46. +149 −0 inc/GL/glfbdev.h
  47. +353 −0 inc/GL/glu.h
  48. +86 −0 inc/GL/glu_mangle.h
  49. +665 −0 inc/GL/glut.h
  50. +81 −0 inc/GL/glutf90.h
  51. +542 −0 inc/GL/glx.h
  52. +82 −0 inc/GL/glx_mangle.h
  53. +948 −0 inc/GL/glxext.h
  54. +137 −0 inc/GL/glxint.h
  55. +54 −0 inc/GL/glxmd.h
  56. +2,613 −0 inc/GL/glxproto.h
  57. +285 −0 inc/GL/glxtokens.h
  58. +809 −0 inc/GL/internal/dri_interface.h
  59. +181 −0 inc/GL/internal/glcore.h
  60. +121 −0 inc/GL/mesa_wgl.h
  61. +79 −0 inc/GL/mglmesa.h
  62. +289 −0 inc/GL/osmesa.h
  63. +1,224 −0 inc/GL/vms_x_fix.h
  64. +869 −0 inc/GL/wglext.h
  65. +141 −0 inc/GL/wmesa.h
  66. +81 −0 inc/Game.hh
  67. +119 −0 inc/game_engine/GameEngine.hh
  68. +65 −0 inc/game_engine/Map.hh
  69. +59 −0 inc/game_engine/elements/AElement.hh
  70. +66 −0 inc/game_engine/elements/APlayer.hh
  71. +17 −0 inc/game_engine/elements/BagBonus.hh
  72. +28 −0 inc/game_engine/elements/Bomb.hh
  73. +20 −0 inc/game_engine/elements/BreakableWall.hh
  74. +35 −0 inc/game_engine/elements/Computer.hh
  75. +26 −0 inc/game_engine/elements/Flame.hh
  76. +37 −0 inc/game_engine/elements/Human.hh
  77. +21 −0 inc/game_engine/elements/PermanentWall.hh
  78. +17 −0 inc/game_engine/elements/RangeBonus.hh
  79. +17 −0 inc/game_engine/elements/SpeedBonus.hh
  80. +22 −0 inc/gdl/AnimStates.hpp
  81. +32 −0 inc/gdl/Assert.hpp
  82. +84 −0 inc/gdl/Clock.hpp
  83. +88 −0 inc/gdl/Color.hpp
  84. +92 −0 inc/gdl/Game.hpp
  85. +89 −0 inc/gdl/GameClock.hpp
  86. +45 −0 inc/gdl/IClock.hpp
  87. +79 −0 inc/gdl/Image.hpp
  88. +112 −0 inc/gdl/Input.hpp
  89. +262 −0 inc/gdl/Model.hpp
  90. +26 −0 inc/gdl/ModelException.hpp
  91. +111 −0 inc/gdl/Resource.hpp
  92. +26 −0 inc/gdl/Text.hpp
  93. +142 −0 inc/gdl/Window.hpp
  94. +74 −0 inc/gfx_engine/Camera.hh
  95. +104 −0 inc/gfx_engine/DisplayLists.hh
  96. +101 −0 inc/gfx_engine/GraphicsEngine.hh
  97. +36 −0 inc/gfx_engine/LoadHelper.hpp
  98. +102 −0 inc/gfx_engine/ScreenBoard.hh
  99. +93 −0 inc/gfx_engine/Square.hh
  100. +32 −0 inc/gfx_engine/Vector3f.hh
  101. +68 −0 inc/gfx_engine/drawables/BindHelper.hh
  102. +61 −0 inc/gfx_engine/drawables/DrawableFactory.hh
  103. +52 −0 inc/gfx_engine/drawables/GBagBx.hh
  104. +56 −0 inc/gfx_engine/drawables/GBomb.hh
  105. +52 −0 inc/gfx_engine/drawables/GBox.hh
  106. +52 −0 inc/gfx_engine/drawables/GEmpty.hh
  107. +52 −0 inc/gfx_engine/drawables/GFlame.hh
  108. +65 −0 inc/gfx_engine/drawables/GPlayer.hh
  109. +52 −0 inc/gfx_engine/drawables/GRangeBx.hh
  110. +52 −0 inc/gfx_engine/drawables/GSpeedBx.hh
  111. +49 −0 inc/gfx_engine/drawables/GWall.hh
  112. +34 −0 inc/gfx_engine/drawables/IDrawable.hh
  113. +30 −0 inc/gfx_engine/menu/IMenu.hh
  114. +50 −0 inc/gfx_engine/menu/IntroSceneMenu.hh
  115. +42 −0 inc/gfx_engine/menu/LoadMenu.hh
  116. +41 −0 inc/gfx_engine/menu/LooseMenu.hh
  117. +41 −0 inc/gfx_engine/menu/MainMenu.hh
  118. +65 −0 inc/gfx_engine/menu/Menu.hh
  119. +42 −0 inc/gfx_engine/menu/NewGameMenu.hh
  120. +48 −0 inc/gfx_engine/menu/PauseMenu.hh
  121. +48 −0 inc/gfx_engine/menu/ScoreMenu.hh
  122. +89 −0 inc/gfx_engine/menu/String.hh
  123. +46 −0 inc/gfx_engine/menu/WinMenu.hh
  124. +33 −0 inc/gfx_engine/primitives/CSplit.hh
  125. +33 −0 inc/gfx_engine/primitives/IPrimitive.hh
  126. +33 −0 inc/gfx_engine/primitives/TBackG.hh
  127. +41 −0 inc/gfx_engine/primitives/TCube.hh
  128. +44 −0 inc/gfx_engine/primitives/TRect.hh
  129. +67 −0 inc/others/Constants.hh
  130. +23 −0 inc/others/Exception.hh
  131. +34 −0 inc/others/LuaBind.hh
  132. +21 −0 inc/others/LuaException.hh
  133. +25 −0 inc/others/ScanDir.hh
  134. +62 −0 inc/sfx_engine/SoundEngine.hh
  135. +65 −0 inc/xml/ABombxml.hh
  136. +21 −0 inc/xml/LoadMap.hh
  137. +23 −0 inc/xml/LoadSave.hh
  138. +48 −0 inc/xml/SaveMap.hh
  139. +32 −0 inc/xml/Scores.hh
  140. +305 −0 inc/xml/tinyxml/tinystr.h
  141. +1,805 −0 inc/xml/tinyxml/tinyxml.h
  142. +192 −0 maps/BigFight.xml
  143. +133 −0 maps/Bomb.xml
  144. +3,506 −0 maps/Bunny.xml
  145. +103 −0 maps/Castle.xml
  146. +136 −0 maps/EightManStandoff.xml
  147. +163 −0 maps/Generated.xml
  148. +491 −0 maps/JohnSpecial.xml
  149. +660 −0 maps/JohnSpecialReverse.xml
  150. +131 −0 maps/Kreog.xml
  151. +144 −0 maps/LongRoad.xml
  152. +38 −0 maps/Threesome.xml
  153. +267 −0 maps/Vertigo.xml
  154. +584 −0 maps/classic.xml
  155. +236 −0 maps/crazyIA.xml
  156. +26 −0 maps/creator/BigFight.map
  157. +20 −0 maps/creator/Castle.map
  158. +16 −0 maps/creator/EightManStandoff.map
  159. +38 −0 maps/creator/JohnSpecial.map
  160. +38 −0 maps/creator/JohnSpecialReverse.map
  161. +54 −0 maps/creator/LongRoad.map
  162. +9 −0 maps/creator/Threesome.map
  163. +41 −0 maps/creator/classic.map
  164. +95 −0 maps/creator/convert.php
  165. +4 −0 maps/creator/legend.txt
  166. +5 −0 maps/creator/noissue.map
  167. +41 −0 maps/duel.xml
  168. +126 −0 maps/generator/generator.py
  169. +484 −0 maps/generator/markup.py
  170. +172 −0 maps/giantMap.xml
  171. +172 −0 maps/noissue.xml
  172. +278 −0 scripts/ia.lua
  173. +42 −0 src/Engine.cpp
  174. +122 −0 src/Game.cpp
  175. +500 −0 src/game_engine/GameEngine.cpp
  176. +361 −0 src/game_engine/Map.cpp
  177. +44 −0 src/game_engine/elements/AElement.cpp
  178. +192 −0 src/game_engine/elements/APlayer.cpp
  179. +18 −0 src/game_engine/elements/BagBonus.cpp
  180. +42 −0 src/game_engine/elements/Bomb.cpp
  181. +42 −0 src/game_engine/elements/BreakableWall.cpp
  182. +134 −0 src/game_engine/elements/Computer.cpp
  183. +76 −0 src/game_engine/elements/Flame.cpp
  184. +102 −0 src/game_engine/elements/Human.cpp
  185. +22 −0 src/game_engine/elements/PermanentWall.cpp
  186. +18 −0 src/game_engine/elements/RangeBonus.cpp
  187. +18 −0 src/game_engine/elements/SpeedBonus.cpp
  188. +102 −0 src/gfx_engine/Camera.cpp
  189. +124 −0 src/gfx_engine/DisplayLists.cpp
  190. +134 −0 src/gfx_engine/GraphicsEngine.cpp
  191. +170 −0 src/gfx_engine/ScreenBoard.cpp
  192. +124 −0 src/gfx_engine/Square.cpp
  193. +26 −0 src/gfx_engine/Vector3f.cpp
  194. +37 −0 src/gfx_engine/drawables/BindHelper.cpp
  195. +117 −0 src/gfx_engine/drawables/DrawableFactory.cpp
  196. +38 −0 src/gfx_engine/drawables/GBagBx.cpp
  197. +40 −0 src/gfx_engine/drawables/GBomb.cpp
  198. +38 −0 src/gfx_engine/drawables/GBox.cpp
  199. +39 −0 src/gfx_engine/drawables/GEmpty.cpp
  200. +38 −0 src/gfx_engine/drawables/GFlame.cpp
  201. +84 −0 src/gfx_engine/drawables/GPlayer.cpp
  202. +37 −0 src/gfx_engine/drawables/GRangeBx.cpp
  203. +37 −0 src/gfx_engine/drawables/GSpeedBx.cpp
  204. +45 −0 src/gfx_engine/drawables/GWall.cpp
  205. +129 −0 src/gfx_engine/menu/IntroSceneMenu.cpp
  206. +100 −0 src/gfx_engine/menu/LoadMenu.cpp
  207. +89 −0 src/gfx_engine/menu/LooseMenu.cpp
  208. +87 −0 src/gfx_engine/menu/MainMenu.cpp
  209. +150 −0 src/gfx_engine/menu/Menu.cpp
  210. +111 −0 src/gfx_engine/menu/NewGameMenu.cpp
  211. +123 −0 src/gfx_engine/menu/PauseMenu.cpp
  212. +151 −0 src/gfx_engine/menu/ScoreMenu.cpp
  213. +209 −0 src/gfx_engine/menu/String.cpp
  214. +101 −0 src/gfx_engine/menu/WinMenu.cpp
  215. +53 −0 src/gfx_engine/primitives/CSplit.cpp
  216. +52 −0 src/gfx_engine/primitives/TBackG.cpp
  217. +62 −0 src/gfx_engine/primitives/TCube.cpp
  218. +37 −0 src/gfx_engine/primitives/TRect.cpp
  219. +45 −0 src/main.cpp
  220. +19 −0 src/others/Exception.cpp
  221. +93 −0 src/others/LuaBind.cpp
  222. +17 −0 src/others/LuaException.cpp
  223. +42 −0 src/others/ScanDir.cpp
  224. +117 −0 src/sfx_engine/SoundEngine.cpp
  225. +126 −0 src/xml/ABombxml.cpp
  226. +95 −0 src/xml/LoadMap.cpp
  227. +149 −0 src/xml/LoadSave.cpp
  228. +174 −0 src/xml/SaveMap.cpp
  229. +104 −0 src/xml/Scores.cpp
  230. +111 −0 src/xml/tinyxml/tinystr.cpp
Sorry, we could not display the entire diff because it was too big.
View
225 Makefile
@@ -0,0 +1,225 @@
+##
+## Makefile for bomberman in /home/mesure_a/workspace
+##
+## Made by arnaud mesureur
+## Login <mesure_a@epitech.net>
+##
+## Started on Tue May 3 16:53:28 2011 arnaud mesureur
+##
+
+#
+# GNU Makefile (use gmake)
+#
+
+# \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
+# *** VARIABLES ***
+# //////////////////////////////////////////////////
+
+SHELL = /bin/sh
+
+##########################################
+### Directories & Path
+##########################################
+
+SRCDIR = src
+HDRDIR = inc
+OBJDIR = obj
+
+GAME_ENGINE = game_engine
+ELEMENTS = elements
+
+GFX_ENGINE = gfx_engine
+DRAWABLES = drawables
+PRIMITIVES = primitives
+MENU = menu
+
+SFX_ENGINE = sfx_engine
+
+OTHERS = others
+
+XML = xml
+TINYXML = tinyxml
+
+VPATH = $(SRCDIR) \
+ :$(SRCDIR)/$(GAME_ENGINE) \
+ :$(SRCDIR)/$(GAME_ENGINE)/$(ELEMENTS) \
+ :$(SRCDIR)/$(GFX_ENGINE) \
+ :$(SRCDIR)/$(GFX_ENGINE)/$(DRAWABLES) \
+ :$(SRCDIR)/$(GFX_ENGINE)/$(MENU) \
+ :$(SRCDIR)/$(GFX_ENGINE)/$(PRIMITIVES) \
+ :$(SRCDIR)/$(SFX_ENGINE) \
+ :$(SRCDIR)/$(OTHERS) \
+ :$(SRCDIR)/$(XML) \
+ :$(SRCDIR)/$(XML)/$(TINYXML)
+
+
+##########################################
+### Compiler configurations
+##########################################
+
+CXX = $(if $(CLG), clang++, g++)
+CXXFLAGS += -Wall -Wextra -pipe
+CXXFLAGS += $(INCLUDE)
+CXXFLAGS += $(if $(XF), $(XFLAGS),)
+CXXFLAGS += $(if $(DF), $(DFLAGS), $(OFLAGS))
+
+# includes
+INCLUDE = -I. -I$(HDRDIR)
+INCLUDE += -I$(HDRDIR)/$(GAME_ENGINE)
+INCLUDE += -I$(HDRDIR)/$(GAME_ENGINE)/$(ELEMENTS)
+INCLUDE += -I$(HDRDIR)/$(GFX_ENGINE)
+INCLUDE += -I$(HDRDIR)/$(GFX_ENGINE)/$(DRAWABLES)
+INCLUDE += -I$(HDRDIR)/$(GFX_ENGINE)/$(MENU)
+INCLUDE += -I$(HDRDIR)/$(GFX_ENGINE)/$(PRIMITIVES)
+INCLUDE += -I$(HDRDIR)/$(SFX_ENGINE)
+INCLUDE += -I$(HDRDIR)/$(OTHERS)
+INCLUDE += -I$(HDRDIR)/$(XML)
+INCLUDE += -I$(HDRDIR)/$(XML)/$(TINYXML)
+INCLUDE += -I$(HDRDIR)/gdl
+INCLUDE += -I/usr/X11/lib
+
+# libraries
+LDFLAGS = -framework OpenGL -lm
+LDFLAGS += -Lgdl/lib -lgdl_gl -Wl,-rpath=./gdl/lib -llua
+LDFLAGS += -lsfml-audio
+
+# debug flags activated w/ DF on otherwise
+# optimization is on by default (OF)
+DFLAGS += -ggdb -DDEBUG_
+OFLAGS += -O2
+
+##########################################
+### Sources
+##########################################
+
+EXEC = bomberman
+SRCS = main.cpp \
+ Game.cpp \
+ Engine.cpp \
+ $(GAME_SRCS) \
+ $(GFX_SRCS) \
+ $(SOUND_SRCS) \
+ $(OTHER_SRCS) \
+ $(XML_SRCS)
+
+OBJS = $(SRCS:%.cpp=$(OBJDIR)/%.o)
+
+GAME_SRCS = GameEngine.cpp \
+ Map.cpp \
+ APlayer.cpp \
+ Flame.cpp \
+ Human.cpp \
+ Computer.cpp \
+ Bomb.cpp \
+ AElement.cpp \
+ BreakableWall.cpp \
+ PermanentWall.cpp \
+ SpeedBonus.cpp \
+ RangeBonus.cpp \
+ BagBonus.cpp
+
+# Main gfx
+GFX_SRCS = GraphicsEngine.cpp \
+ DisplayLists.cpp \
+ Vector3f.cpp \
+ Camera.cpp \
+ ScreenBoard.cpp \
+ Square.cpp
+# Primitives gfx
+GFX_SRCS += TRect.cpp \
+ TCube.cpp \
+ CSplit.cpp \
+ TBackG.cpp
+# Drawables gfx
+GFX_SRCS += DrawableFactory.cpp \
+ GWall.cpp \
+ GPlayer.cpp \
+ GBomb.cpp \
+ GEmpty.cpp \
+ GBox.cpp \
+ GFlame.cpp \
+ GRangeBx.cpp \
+ GBagBx.cpp \
+ GSpeedBx.cpp \
+ BindHelper.cpp
+
+# Menus
+GFX_SRCS += Menu.cpp \
+ String.cpp \
+ IntroSceneMenu.cpp \
+ MainMenu.cpp \
+ NewGameMenu.cpp \
+ PauseMenu.cpp \
+ ScoreMenu.cpp \
+ LoadMenu.cpp \
+ WinMenu.cpp \
+ LooseMenu.cpp
+
+SOUND_SRCS = SoundEngine.cpp
+
+OTHER_SRCS = ScanDir.cpp \
+ Exception.cpp \
+ LuaBind.cpp \
+ LuaException.cpp
+
+XML_SRCS = ABombxml.cpp \
+
+#Save
+XML_SRCS += SaveMap.cpp \
+
+#load
+XML_SRCS += LoadMap.cpp \
+ LoadSave.cpp \
+
+# TinyXml
+XML_SRCS += tinystr.cpp \
+ tinyxml.cpp \
+ tinyxmlerror.cpp \
+ tinyxmlparser.cpp
+
+# Scores
+XML_SRCS += Scores.cpp
+
+##########################################
+### Tools
+##########################################
+
+TAR = tar czf
+PRINTF = /usr/bin/printf
+END = \033[m
+GREEN = \033[32m
+RED = \033[31m
+
+
+# \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
+# *** RULES ***
+# ////////////////////////////////////////
+
+all : $(EXEC)
+
+$(EXEC) : $(OBJS)
+ @$(CXX) -o $(EXEC) $(OBJS) $(LDFLAGS)
+ @$(PRINTF) "$(GREEN)[OK]$(END) $@ successfully linked\n"
+
+clean :
+ @$(RM) $(OBJS)
+ @ $(PRINTF) "$(RED)[OK]$(END) CLEAN $(EXEC) - objs\n"
+
+fclean : clean
+ @$(RM) $(EXEC)
+ @$(PRINTF) "$(RED)[OK]$(END) FCLEAN $(EXEC)\n"
+
+re : fclean all
+
+tarball : fclean
+ @$(TAR) $(EXEC).tar.gz $(SRCDIR) $(HDRDIR) $(OBJDIR) Makefile
+ @$(PRINTF) "$(RED)[OK]$(END) tarball created: $(EXEC).tar.gz\n"
+
+.SUFFIXES :
+.SUFFIXES : .cpp .o
+
+$(OBJDIR)/%.o : %.cpp
+ @$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
+ @$(PRINTF) "$(GREEN)[OK]$(END) --> $< \n"
+
+.PHONY : all clean fclean re tarball
View
BIN  assets/menu/arrow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/menu/backgroundIntro.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/menu/backgroundLoose.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/menu/backgroundMainMenu.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/menu/backgroundNewGame.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/menu/backgroundPause.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/menu/backgroundWin.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/menu/text.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
609 assets/models/bomb.fbx
609 additions, 0 deletions not shown
View
BIN  assets/models/marvinLowLowPo.fbx
Binary file not shown
View
BIN  assets/sfx/breakbox.wav
Binary file not shown
View
BIN  assets/sfx/explosion.wav
Binary file not shown
View
BIN  assets/sfx/game.wav
Binary file not shown
View
BIN  assets/sfx/menu.wav
Binary file not shown
View
BIN  assets/sfx/powerup.wav
Binary file not shown
View
BIN  assets/sfx/tintin.wav
Binary file not shown
View
BIN  assets/textures/bag.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/textures/bg.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/textures/box.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/textures/bricks.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/textures/flame.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/textures/grass.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/textures/rangebx.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  assets/textures/speed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
22 gdl/include/AnimStates.hpp
@@ -0,0 +1,22 @@
+#ifndef ANIMSTATES__HPP
+# define ANIMSTATES__HPP
+
+namespace gdl
+{
+ namespace Anim
+ {
+ ////////////////////////////////////////////////////////////
+ /// Enum for the states of the animations
+ ////////////////////////////////////////////////////////////
+ enum AnimStates
+ {
+ STOP = 0, // Stop the animation
+ RUN = 1, // Run the animation
+ LOOP = 2, // The animation is play in loop.
+ REVERT = 4, // Revert the animation
+ PAUSE = 8 // Pause the animation
+ };
+ }
+}
+
+# endif /* !ANIMSTATES__HPP */
View
32 gdl/include/Assert.hpp
@@ -0,0 +1,32 @@
+#ifndef ASSERTEXCEPTION__HPP
+# define ASSERTEXCEPTION__HPP
+
+# include <string>
+
+namespace gdl
+{
+ ////////////////////////////////////////////////////////////
+ /// Send an assert.
+ ///
+ /// \param condition Condition to test
+ /// \param msg Message when the condition failed
+ ////////////////////////////////////////////////////////////
+ void Assert(bool condition, const std::string& msg);
+}
+
+// #include <exception>
+// #include <string>
+
+// class AssertException : public exception
+// {
+// private:
+// const std::string& m_what;
+
+// AssertException(const std::string& _error);
+
+// virtual const char* what() const throw();
+
+// static inline void Assert(bool expression, const std::string& msg) throw(AssertException);
+// };
+
+#endif /* !ASSERTEXCEPTION__HPP */
View
84 gdl/include/Clock.hpp
@@ -0,0 +1,84 @@
+#ifndef CLOCK_HPP
+# define CLOCK_HPP
+
+# include "IClock.hpp"
+
+namespace gdl
+{
+ ////////////////////////////////////////////////////////////
+ /// Forward declaration of GameClockImpl.
+ ////////////////////////////////////////////////////////////
+ class GameClockImpl;
+
+ ////////////////////////////////////////////////////////////
+ /// Clock is used to force a specific time implementation.
+ ////////////////////////////////////////////////////////////
+ class Clock : public IClock
+ {
+ public:
+ ////////////////////////////////////////////////////////////
+ /// Default constructror.
+ ////////////////////////////////////////////////////////////
+ Clock();
+
+ ////////////////////////////////////////////////////////////
+ /// Default destructror.
+ ////////////////////////////////////////////////////////////
+ ~Clock();
+
+ ////////////////////////////////////////////////////////////
+ /// Start the clock.
+ ////////////////////////////////////////////////////////////
+ void play(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Stop the clock until you play it again.
+ ////////////////////////////////////////////////////////////
+ void pause(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Up the time of the clock.
+ ////////////////////////////////////////////////////////////
+ void update(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Reset the clock to 0.
+ ////////////////////////////////////////////////////////////
+ void reset(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Return the time between now and the last call of the update method.
+ ///
+ /// \return The time in float.
+ ////////////////////////////////////////////////////////////
+ float getElapsedTime(void) const;
+
+ ////////////////////////////////////////////////////////////
+ /// Return the time between now and the instance of the Game class.
+ ///
+ /// \return The time in float.
+ ////////////////////////////////////////////////////////////
+ float getTotalElapsedTime(void) const;
+ private:
+ ////////////////////////////////////////////////////////////
+ /// GameClockImp member reference.
+ ////////////////////////////////////////////////////////////
+ GameClockImpl& clock_;
+ ////////////////////////////////////////////////////////////
+ /// Member to know if the clock is active or not.
+ ////////////////////////////////////////////////////////////
+ bool isActiv_;
+ ////////////////////////////////////////////////////////////
+ /// Elapsed time, member in float.
+ ////////////////////////////////////////////////////////////
+ float elapsedTime_;
+ ////////////////////////////////////////////////////////////
+ /// Elapsed game time, member in float.
+ ////////////////////////////////////////////////////////////
+ float savedTime_;
+
+ float totalClock_;
+ };
+}
+
+#endif
View
88 gdl/include/Color.hpp
@@ -0,0 +1,88 @@
+#ifndef __GDL__COLOR__HPP__
+#define __GDL__COLOR__HPP__
+
+namespace gdl
+{
+ ////////////////////////////////////////////////////////////
+ /// The color class provides an simple container to manage
+ /// colors.
+ ////////////////////////////////////////////////////////////
+ struct Color
+ {
+ ////////////////////////////////////////////////////////////
+ /// Type redefinition.
+ ////////////////////////////////////////////////////////////
+ typedef unsigned char uchar;
+
+ ////////////////////////////////////////////////////////////
+ /// Default constructor.
+ ////////////////////////////////////////////////////////////
+ Color();
+
+ ////////////////////////////////////////////////////////////
+ /// Constructor.
+ ///
+ /// \param[in] r Byte for red component.
+ /// \param[in] g Byte for green component.
+ /// \param[in] b Byte for blue component.
+ /// \param[in] a Byte for alpha component.
+ ////////////////////////////////////////////////////////////
+ Color(uchar r, uchar g, uchar b, uchar a = 255);
+
+ ////////////////////////////////////////////////////////////
+ /// Copy constructor.
+ ///
+ /// \param[in] color Instance to copy.
+ ////////////////////////////////////////////////////////////
+ Color(const Color &);
+
+ ////////////////////////////////////////////////////////////
+ /// Default destructor.
+ ////////////////////////////////////////////////////////////
+ ~Color(void)
+ {
+ }
+
+ ////////////////////////////////////////////////////////////
+ /// Overloading of the assignment operator.
+ ///
+ /// \return An reference on the Color instance.
+ ////////////////////////////////////////////////////////////
+ Color& operator=(Color const &);
+
+ ////////////////////////////////////////////////////////////
+ /// Overloading of the comparison operator.
+ ///
+ /// \return If the test succeed, true is returned.
+ /// Otherwise, false is returned.
+ ////////////////////////////////////////////////////////////
+ bool operator==(Color const &) const;
+
+ ////////////////////////////////////////////////////////////
+ /// Overloading of the comparison operator.
+ ///
+ /// \return If the test succeed, true is returned.
+ /// Otherwise, false is returned.
+ ////////////////////////////////////////////////////////////
+ bool operator!=(Color const &) const;
+
+ ////////////////////////////////////////////////////////////
+ /// Red component.
+ ////////////////////////////////////////////////////////////
+ uchar r;
+ ////////////////////////////////////////////////////////////
+ /// Green component.
+ ////////////////////////////////////////////////////////////
+ uchar g;
+ ////////////////////////////////////////////////////////////
+ /// Blue component.
+ ////////////////////////////////////////////////////////////
+ uchar b;
+ ////////////////////////////////////////////////////////////
+ /// Alpha component.
+ ////////////////////////////////////////////////////////////
+ uchar a;
+ };
+}
+
+#endif /* __GDL__COLOR__HPP__ */
View
92 gdl/include/Game.hpp
@@ -0,0 +1,92 @@
+#ifndef GAME_HPP
+# define GAME_HPP
+
+#include "Input.hpp"
+#include "Window.hpp"
+#include "GameClock.hpp"
+
+namespace gdl
+{
+ ////////////////////////////////////////////////////////////
+ /// Forward declaration of GameImpl.
+ ////////////////////////////////////////////////////////////
+ class GameImpl;
+ ////////////////////////////////////////////////////////////
+ /// The Window class offers you an easier way to develop a game.
+ /// You just need to inherite from it and override three
+ /// methods : initialize, update and draw.
+ ////////////////////////////////////////////////////////////
+ class Game
+ {
+ public:
+ ////////////////////////////////////////////////////////////
+ /// Default constructor.
+ ////////////////////////////////////////////////////////////
+ Game(void);
+ ////////////////////////////////////////////////////////////
+ /// Default destructor.
+ ////////////////////////////////////////////////////////////
+ virtual ~Game(void);
+ ////////////////////////////////////////////////////////////
+ /// Call the initialize methode, create the window.
+ /// While the window is open call update, draw and display
+ /// the window.
+ ////////////////////////////////////////////////////////////
+ void run(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Get the root for the Content.
+ ///
+ /// \return Path to the Root.
+ ////////////////////////////////////////////////////////////
+ std::string const & getContentRoot(void) const;
+
+ ////////////////////////////////////////////////////////////
+ /// Set the root for the Content.
+ ///
+ /// \param[in] name Path to the Root.
+ ////////////////////////////////////////////////////////////
+ void setContentRoot(std::string const &);
+
+ protected:
+ ////////////////////////////////////////////////////////////
+ /// To override.
+ ////////////////////////////////////////////////////////////
+ virtual void initialize(void) = 0;
+ ////////////////////////////////////////////////////////////
+ /// To override.
+ ////////////////////////////////////////////////////////////
+ virtual void update(void) = 0;
+ ////////////////////////////////////////////////////////////
+ /// To override.
+ ////////////////////////////////////////////////////////////
+ virtual void draw(void) = 0;
+ ////////////////////////////////////////////////////////////
+ /// To override.
+ ////////////////////////////////////////////////////////////
+ virtual void unload(void) = 0;
+
+ ////////////////////////////////////////////////////////////
+ /// Game window.
+ ////////////////////////////////////////////////////////////
+ Window window_;
+
+ ////////////////////////////////////////////////////////////
+ /// Game clock.
+ ////////////////////////////////////////////////////////////
+ GameClock gameClock_;
+
+ ////////////////////////////////////////////////////////////
+ /// Input manager.
+ ////////////////////////////////////////////////////////////
+ Input input_;
+
+ private:
+ ////////////////////////////////////////////////////////////
+ /// Game Implementation
+ ////////////////////////////////////////////////////////////
+ GameImpl& gameInternal_;
+ };
+}
+
+#endif /* !GAME_HPP */
View
89 gdl/include/GameClock.hpp
@@ -0,0 +1,89 @@
+#ifndef GAMECLOCK_HPP
+# define GAMECLOCK_HPP
+
+# include <IClock.hpp>
+
+namespace gdl
+{
+ class Game;
+
+ ////////////////////////////////////////////////////////////
+ /// Forward declaration of GameClockImpl.
+ ////////////////////////////////////////////////////////////
+ class GameClockImpl;
+
+ ////////////////////////////////////////////////////////////
+ /// GameClock provides a main clock for the entire game.
+ ////////////////////////////////////////////////////////////
+ class GameClock : public IClock
+ {
+ private:
+ ////////////////////////////////////////////////////////////
+ /// Default constructror.
+ ////////////////////////////////////////////////////////////
+ GameClock();
+
+ ////////////////////////////////////////////////////////////
+ /// Default destructror.
+ ////////////////////////////////////////////////////////////
+ ~GameClock();
+
+
+ public:
+ ////////////////////////////////////////////////////////////
+ /// Start the clock.
+ ////////////////////////////////////////////////////////////
+ void play(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Stop the clock until you play it again.
+ ////////////////////////////////////////////////////////////
+ void pause(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Up the time of the clock.
+ ////////////////////////////////////////////////////////////
+ void update(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Reset the clock to 0.
+ ////////////////////////////////////////////////////////////
+ void reset(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Return the time since the last Update call.
+ ///
+ /// \return The time in float.
+ ////////////////////////////////////////////////////////////
+ float getElapsedTime(void) const;
+
+ ////////////////////////////////////////////////////////////
+ /// Return the time between now and the start of the Game.
+ ///
+ /// \return The time in float.
+ ////////////////////////////////////////////////////////////
+ float getTotalGameTime(void) const;
+
+ private:
+ ////////////////////////////////////////////////////////////
+ /// GameClock implementation.
+ ////////////////////////////////////////////////////////////
+ GameClockImpl& clock_;
+ ////////////////////////////////////////////////////////////
+ /// Indicate if this clock is active.
+ ////////////////////////////////////////////////////////////
+ bool isActiv_;
+ ////////////////////////////////////////////////////////////
+ /// Elapsed time since the last update.
+ ////////////////////////////////////////////////////////////
+ float elapsedTime_;
+ ////////////////////////////////////////////////////////////
+ /// Elapsed time since the game is launched.
+ ////////////////////////////////////////////////////////////
+ float totalGameTime_;
+
+ friend class Game;
+ };
+}
+
+#endif /* !GAMECLOCK_HPP */
View
45 gdl/include/IClock.hpp
@@ -0,0 +1,45 @@
+#ifndef ICLOCK_H
+# define ICLOCK_H
+
+namespace gdl
+{
+ ////////////////////////////////////////////////////////////
+ /// Interface IClock is used to force a specific time
+ /// implementation.
+ ////////////////////////////////////////////////////////////
+ class IClock
+ {
+ public:
+ virtual ~IClock(void) {}
+
+ ////////////////////////////////////////////////////////////
+ /// Start the clock.
+ ////////////////////////////////////////////////////////////
+ virtual void play(void) = 0;
+
+ ////////////////////////////////////////////////////////////
+ /// Stop the clock until you play it again.
+ ////////////////////////////////////////////////////////////
+ virtual void pause(void) = 0;
+
+ ////////////////////////////////////////////////////////////
+ /// Up the time of the clock.
+ ////////////////////////////////////////////////////////////
+ virtual void update(void) = 0;
+
+ ////////////////////////////////////////////////////////////
+ /// Reset the clock to 0.
+ ////////////////////////////////////////////////////////////
+ virtual void reset(void) = 0;
+
+ ////////////////////////////////////////////////////////////
+ /// Return the time between now and the last call of the
+ /// update method.
+ ///
+ /// \return The time in float.
+ ////////////////////////////////////////////////////////////
+ virtual float getElapsedTime(void) const = 0;
+ };
+}
+
+#endif /* !ICLOCK_H */
View
79 gdl/include/Image.hpp
@@ -0,0 +1,79 @@
+#ifndef IMAGE_HPP
+#define IMAGE_HPP
+
+#include <string>
+#include "Resource.hpp"
+
+namespace gdl
+{
+ class ImageImpl;
+
+ ////////////////////////////////////////////////////////////
+ /// The Image class provides image loading and image
+ /// binding.
+ ////////////////////////////////////////////////////////////
+ class Image : private Resource<ImageImpl>
+ {
+ public:
+ ////////////////////////////////////////////////////////////
+ /// Default constructor.
+ ////////////////////////////////////////////////////////////
+ Image(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Default destructor.
+ ////////////////////////////////////////////////////////////
+ ~Image(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Load an image from a file.
+ ///
+ /// \param[in] filename Filename of the image with extension.
+ /// \return An instance of the resource.
+ ////////////////////////////////////////////////////////////
+ static Image load(std::string const & filename);
+
+ ////////////////////////////////////////////////////////////
+ /// Bind the texture on the GPU.
+ ////////////////////////////////////////////////////////////
+ void bind(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Get the width of the image.
+ ///
+ /// \return Width of the image.
+ ////////////////////////////////////////////////////////////
+ unsigned int getWidth(void) const;
+
+ ////////////////////////////////////////////////////////////
+ /// Get the height of the image.
+ ///
+ /// \return Height of the image.
+ ////////////////////////////////////////////////////////////
+ unsigned int getHeight(void) const;
+
+ ////////////////////////////////////////////////////////////
+ /// Get a pointer to the pixel array of the image.
+ ///
+ /// \return Pointer to the pixel array.
+ ////////////////////////////////////////////////////////////
+ unsigned char const* getPixelPtr(void) const;
+
+ using Resource<ImageImpl>::isValid;
+
+ private:
+ ////////////////////////////////////////////////////////////
+ /// Explicit constructor.
+ ///
+ /// \param impl Pointer on ImageImpl.
+ ////////////////////////////////////////////////////////////
+ explicit Image(ImageImpl* impl);
+
+ ////////////////////////////////////////////////////////////
+ /// Image implementation.
+ ////////////////////////////////////////////////////////////
+ friend class ImageImpl;
+ };
+}
+
+#endif /* IMAGE_HPP */
View
112 gdl/include/Input.hpp
@@ -0,0 +1,112 @@
+#ifndef INPUT_HPP
+# define INPUT_HPP
+
+# include "Window.hpp"
+
+namespace gdl
+{
+ ////////////////////////////////////////////////////////////
+ /// Forward declaration of InputImpl.
+ ////////////////////////////////////////////////////////////
+ class InputImpl;
+
+ namespace Keys
+ {
+ ////////////////////////////////////////////////////////////
+ /// Enum of keys.
+ ////////////////////////////////////////////////////////////
+ enum Key
+ {
+ A, B, C, D, E, F, G, H, I, J, K, L, M,
+ N, O, P, Q, R, S, T, U, V, W, X, Y, Z,
+ Num0, Num1, Num2, Num3, Num4,
+ Num5, Num6, Num7, Num8, Num9,
+ Escape, LControl, LShift, LAlt, LSystem,
+ RControl, RShift, RAlt, RSystem, Menu,
+ LBracket, RBracket, SemiColon, Comma,
+ Period, Quote, Slash, BackSlash, Tilde,
+ Equal, Dash, Space, Return, Back, Tab,
+ PageUp, PageDown, End, Home, Insert,
+ Delete, Add, Subtract, Multiply,
+ Divide, Left, Right, Up, Down,
+ Numpad0, Numpad1, Numpad2, Numpad3, Numpad4,
+ Numpad5, Numpad6, Numpad7, Numpad8, Numpad9,
+ F1, F2, F3, F4, F5, F6, F7, F8, F9,
+ F10, F11, F12, F13, F14, F15,
+ Pause, Count
+ };
+ }
+
+ namespace Mouse
+ {
+ ////////////////////////////////////////////////////////////
+ /// Enum of mouse's buttons
+ ////////////////////////////////////////////////////////////
+ enum Button
+ {
+ Left, Right, Middle
+ };
+ }
+
+ ////////////////////////////////////////////////////////////
+ /// The Input class catches each input event for a window.
+ ////////////////////////////////////////////////////////////
+ class Input
+ {
+ public:
+ ////////////////////////////////////////////////////////////
+ /// Constructor.
+ ///
+ /// \param[in] window Window to link with.
+ ////////////////////////////////////////////////////////////
+ Input(gdl::Window & window);
+
+ ////////////////////////////////////////////////////////////
+ /// Default destructor.
+ ////////////////////////////////////////////////////////////
+ ~Input();
+
+ ////////////////////////////////////////////////////////////
+ /// Check if a key is down.
+ ///
+ /// \param[in] key Key to check.
+ /// \return If the key is down, true is returned.
+ /// Otherwise, returned false.
+ ////////////////////////////////////////////////////////////
+ bool isKeyDown(gdl::Keys::Key key);
+ ////////////////////////////////////////////////////////////
+ /// Check if a mouse button is down.
+ ///
+ /// \param[in] button Button to check.
+ /// \return If the button is down, true is returned.
+ /// Otherwise, returned false.
+ ////////////////////////////////////////////////////////////
+ bool isMouseButtonDown(gdl::Mouse::Button button);
+ ////////////////////////////////////////////////////////////
+ /// Get the cursor position.
+ ///
+ /// \return The cursor position on x-axis.
+ ////////////////////////////////////////////////////////////
+ int getMousePositionX(void) const;
+ ////////////////////////////////////////////////////////////
+ /// Get the cursor position.
+ ///
+ /// \return The cursor position on y-axis.
+ ////////////////////////////////////////////////////////////
+ int getMousePositionY(void) const;
+ private:
+
+ ////////////////////////////////////////////////////////////
+ /// Link this class with the window's inputs.
+ /// Is called in the constructor.
+ ////////////////////////////////////////////////////////////
+ void getInput(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Input implementation.
+ ////////////////////////////////////////////////////////////
+ InputImpl& input_;
+ };
+}
+
+#endif
View
262 gdl/include/Model.hpp
@@ -0,0 +1,262 @@
+#ifndef MODEL_HPP
+# define MODEL_HPP
+
+# include <vector>
+# include <string>
+# include <map>
+# include <GL/gl.h>
+# include <GL/glu.h>
+
+# include "Color.hpp"
+# include "AnimStates.hpp"
+# include "Resource.hpp"
+# include "IClock.hpp"
+
+namespace gdl
+{
+
+ ////////////////////////////////////////////////////////////
+ /// Forward declaration of ModelImpl.
+ ////////////////////////////////////////////////////////////
+ class ModelImpl;
+
+ ////////////////////////////////////////////////////////////
+ /// Forward declaration of AnimConfigImpl.
+ ////////////////////////////////////////////////////////////
+ class AnimConfigImpl;
+
+ ////////////////////////////////////////////////////////////
+ /// The ModelImpl class provide the gestion of your model.
+ ////////////////////////////////////////////////////////////
+ class Model : private Resource<ModelImpl>
+ {
+ private:
+ bool CheckUniqueAnimation();
+
+ public:
+ ////////////////////////////////////////////////////////////
+ /// Default constructror.
+ ////////////////////////////////////////////////////////////
+ Model(void);
+ ////////////////////////////////////////////////////////////
+ /// Default destructror.
+ ////////////////////////////////////////////////////////////
+ ~Model(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Load the model.
+ ///
+ /// \param[in] filename Filename with the extension.
+ /// \return the Model.
+ ////////////////////////////////////////////////////////////
+ static Model load(std::string const & filename);
+
+ ////////////////////////////////////////////////////////////
+ /// Update the animation of the model.
+ ///
+ /// \param[in] gameTime Game's clock.
+ ////////////////////////////////////////////////////////////
+ void update(IClock const & gameTime);
+
+ ////////////////////////////////////////////////////////////
+ /// Draw the model in the Window.
+ ////////////////////////////////////////////////////////////
+ void draw(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Draw the model in a specific pose.
+ ///
+ /// \param[in] pose_id ID of the specific pose.
+ ////////////////////////////////////////////////////////////
+ void draw_pose(int pose_id);
+
+ ////////////////////////////////////////////////////////////
+ /// Do nothing.
+ /// Have to display informations about the Model
+ /// like stack anime number, vertices number...
+ ////////////////////////////////////////////////////////////
+ void infos(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Play the animation.
+ ///
+ /// \param[in] _name Animation name.
+ /// \param[in] state (AnimState enum).
+ /// \return If successful, true is returned.
+ /// Otherwise, false is returned.
+ ////////////////////////////////////////////////////////////
+ bool play(std::string const & _name, char state = Anim::RUN);
+
+ ////////////////////////////////////////////////////////////
+ /// Check if the animation has started.
+ ///
+ /// \param name Animation name.
+ /// \return If successful, true is returned.
+ /// Otherwise, false is returned.
+ ////////////////////////////////////////////////////////////
+ bool animation_hasStarted(std::string const & name) const;
+ ////////////////////////////////////////////////////////////
+ /// Check if the animation is ended.
+ ///
+ /// \param[in] name Animation name.
+ /// \return If the animation has ended, true is returned.
+ /// Otherwise, false is returned.
+ ////////////////////////////////////////////////////////////
+ bool anim_is_ended(std::string const & name) const;
+
+ ////////////////////////////////////////////////////////////
+ /// Stop the animation.
+ ///
+ /// \param[in] name Animation name.
+ ////////////////////////////////////////////////////////////
+ void stop_animation(std::string const & name);
+
+ ////////////////////////////////////////////////////////////
+ /// Get the animation speed.
+ ///
+ /// \param[in] name Animation name.
+ /// \return If the animation doesn't exist, -1 is returned.
+ ////////////////////////////////////////////////////////////
+ double get_anim_speed(std::string const & name) const;
+
+ ////////////////////////////////////////////////////////////
+ /// Get the blend factor.
+ ///
+ /// \param[in] name Animation name.
+ /// \return If the animation doesn't exist, -1 is returned.
+ ////////////////////////////////////////////////////////////
+ double get_anim_blendfactor(std::string const & name) const;
+
+ ////////////////////////////////////////////////////////////
+ /// Get the anim state.
+ ///
+ /// \param[in] name Animation name.
+ /// \return If the animation doesn't exist, -1 is returned.
+ ////////////////////////////////////////////////////////////
+ char get_anim_state(std::string const & name) const;
+
+ ////////////////////////////////////////////////////////////
+ /// Set the blend factor.
+ ///
+ /// \param[in] name Animation name.
+ /// \param[in] blendFactor Blend factor.
+ ////////////////////////////////////////////////////////////
+ void set_anim_bendfactor(std::string const & name, double blendFactor);
+
+ ////////////////////////////////////////////////////////////
+ /// Set the animation speed.
+ ///
+ /// \param[in] name Animation name.
+ /// \param[in] speed Speed of the animation.
+ ////////////////////////////////////////////////////////////
+ void set_anim_speed(std::string const & name, double speed);
+
+ ////////////////////////////////////////////////////////////
+ /// Get the default model color.
+ ///
+ /// \return The default color.
+ ////////////////////////////////////////////////////////////
+ Color const & get_default_model_color(void) const;
+
+ ////////////////////////////////////////////////////////////
+ /// Set the default model color.
+ ///
+ /// \param[in] color The default color.
+ ////////////////////////////////////////////////////////////
+ void set_default_model_color(Color const & color);
+
+ ////////////////////////////////////////////////////////////
+ /// Set the anim state.
+ ///
+ /// \param[in] name Animation name.
+ /// \param[in] state (with AnimState enum).
+ ////////////////////////////////////////////////////////////
+ void set_anim_state(std::string const & name, char state);
+
+ ////////////////////////////////////////////////////////////
+ /// Add an animation state.
+ ///
+ /// \param[in] name Animation name.
+ /// \param[in] state (in Anim namespace).
+ ////////////////////////////////////////////////////////////
+ void add_anim_state(std::string const & name, Anim::AnimStates state);
+
+ ////////////////////////////////////////////////////////////
+ /// Remove an animation state.
+ ///
+ /// \param[in] name Animation name.
+ /// \param[in] state (in Anim namespace).
+ ////////////////////////////////////////////////////////////
+ void remove_anim_state(std::string const & name, Anim::AnimStates state);
+
+ ////////////////////////////////////////////////////////////
+ /// Get the stack of the animation's name.
+ ///
+ /// \return Vector of strings.
+ ////////////////////////////////////////////////////////////
+ std::vector<std::string> const& get_stackanimation_names(void) const;
+
+ ////////////////////////////////////////////////////////////
+ /// Get the animation's name.
+ ///
+ /// \return Vector of strings.
+ ////////////////////////////////////////////////////////////
+ std::vector<std::string> const& get_animation_names(void) const;
+
+ ////////////////////////////////////////////////////////////
+ /// Cut the animation.
+ ///
+ /// \param[in] _model The model.
+ /// \param[in] stackAnim The animations stack.
+ /// \param[in] id_start First id.
+ /// \param[in] id_end Last id.
+ /// \param[in] _newName Name of the new animation.
+ /// \return If successfull, true is returned.
+ /// Otherwise, false is returned.
+ ////////////////////////////////////////////////////////////
+ static bool cut_animation(Model& _model,
+ std::string const & stackAnim,
+ int id_start,
+ int id_end,
+ std::string const & _newName);
+
+
+ ////////////////////////////////////////////////////////////
+ /// Open the scope to draw models.
+ ////////////////////////////////////////////////////////////
+ static void Begin(void);
+ ////////////////////////////////////////////////////////////
+ /// Close the scope to draw models.
+ ////////////////////////////////////////////////////////////
+ static void End(void);
+
+ using Resource<ModelImpl>::isValid;
+
+ private:
+
+ typedef std::map<std::string, AnimConfigImpl*> AnimationsType;
+ AnimationsType m_animations; // Animation type
+
+ ////////////////////////////////////////////////////////////
+ /// Explicit constructor.
+ ///
+ /// \param impl The pointer on ModelImpl.
+ ////////////////////////////////////////////////////////////
+ explicit Model(ModelImpl* impl);
+
+ // void isStatic(bool status);
+
+ ////////////////////////////////////////////////////////////
+ /// To reach private members of ModelImpl.
+ ////////////////////////////////////////////////////////////
+ friend class ModelImpl;
+
+ ////////////////////////////////////////////////////////////
+ /// To reach private members of ResourceManagerImpl.
+ ////////////////////////////////////////////////////////////
+ friend class ResourceManagerImpl;
+ };
+
+}
+
+#endif /* !MODEL_HPP */
View
26 gdl/include/ModelException.hpp
@@ -0,0 +1,26 @@
+#ifndef __MODELEXCEPTION__HH__
+#define __MODELEXCEPTION__HH__
+
+#include <exception>
+#include <string>
+
+namespace gdl
+{
+ ///////////////////////////////
+ /// Classe used to decribe error from Model Manipulation
+ ///////////////////////////////
+ class ModelException : public std::exception
+ {
+ private:
+ std::string m_what;
+
+ public:
+ ModelException(const std::string&);
+ virtual ~ModelException() throw() {}
+
+ virtual const char* what() const throw();
+
+ };
+
+}
+#endif /* __MODELEXCEPTION__HH__ */
View
111 gdl/include/Resource.hpp
@@ -0,0 +1,111 @@
+#ifndef __RESOURCE_HPP__
+#define __RESOURCE_HPP__
+
+namespace gdl
+{
+
+ class ResourceBase
+ {
+ public:
+ ////////////////////////////////////////////////////////////
+ /// Default constructor.
+ ////////////////////////////////////////////////////////////
+ ResourceBase();
+ ////////////////////////////////////////////////////////////
+ /// Copy constructor.
+ ////////////////////////////////////////////////////////////
+ ResourceBase(ResourceBase const & right);
+
+ ////////////////////////////////////////////////////////////
+ /// Default destructor.
+ ////////////////////////////////////////////////////////////
+ virtual ~ResourceBase();
+ ////////////////////////////////////////////////////////////
+ /// Overloading of the assignment operator.
+ ////////////////////////////////////////////////////////////
+ ResourceBase& operator=(ResourceBase const &);
+
+ protected:
+ ////////////////////////////////////////////////////////////
+ /// Check if the data pointer can be destroyed.
+ ////////////////////////////////////////////////////////////
+ void check_destroy();
+
+ private:
+ ////////////////////////////////////////////////////////////
+ /// Destroy the data pointer.
+ ////////////////////////////////////////////////////////////
+ virtual void destroy() = 0;
+ ////////////////////////////////////////////////////////////
+ /// Increase the reference counter.
+ ////////////////////////////////////////////////////////////
+ void incCount();
+ ////////////////////////////////////////////////////////////
+ /// Decrease the reference counter.
+ ////////////////////////////////////////////////////////////
+ void decCount();
+
+ int* counter_;
+ };
+
+ template <typename Type>
+ class Resource : private ResourceBase
+ {
+ public:
+ ////////////////////////////////////////////////////////////
+ /// Explicit constructor.
+ ///
+ /// \param[in] val The pointer on a resource.
+ ////////////////////////////////////////////////////////////
+ explicit Resource(Type* val);
+ ////////////////////////////////////////////////////////////
+ /// Copy constructor.
+ ///
+ /// \param[in] right Resource to copy.
+ ////////////////////////////////////////////////////////////
+ Resource(Resource const &);
+ ////////////////////////////////////////////////////////////
+ /// Overloading of the assignment operator.
+ ///
+ /// \return An reference on the Resource instance.
+ ////////////////////////////////////////////////////////////
+ Resource& operator=(Resource const &);
+ ////////////////////////////////////////////////////////////
+ /// Default destructor.
+ ////////////////////////////////////////////////////////////
+ virtual ~Resource();
+
+ ////////////////////////////////////////////////////////////
+ /// Check if the resource is valid.
+ ///
+ /// \return If valid, true is returned.
+ /// Otherwise, false is returned.
+ ////////////////////////////////////////////////////////////
+ bool isValid() const;
+
+ ////////////////////////////////////////////////////////////
+ /// Overloading of the member operator.
+ ////////////////////////////////////////////////////////////
+ Type* operator->();
+ ////////////////////////////////////////////////////////////
+ /// Overloading of the indirection operator.
+ ////////////////////////////////////////////////////////////
+ Type& operator*();
+
+ protected:
+ Type* data_; //Template type to point the data
+
+ ////////////////////////////////////////////////////////////
+ /// Reset the data.
+ ////////////////////////////////////////////////////////////
+ void HardReset();
+
+ private:
+ ////////////////////////////////////////////////////////////
+ /// Destroy the data.
+ ////////////////////////////////////////////////////////////
+ virtual void destroy();
+ };
+}
+
+#endif /* __RESOURCE_HPP__ */
View
26 gdl/include/Text.hpp
@@ -0,0 +1,26 @@
+#ifndef TEXT_HPP
+# define TEXT_HPP
+
+# include <string>
+# include "Color.hpp"
+
+namespace gdl
+{
+ class TextImpl;
+
+ class Text
+ {
+ public:
+ Text(std::string const &);
+
+ void setText(std::string const &);
+ void setFont(std::string const &);
+ void setColor(gdl::Color const &);
+ void setPosition(unsigned int const, unsigned int const);
+ private:
+ Text(void);
+ gdl::TextImpl textImpl_;
+ };
+}
+
+#endif /* !TEXT_HPP */
View
142 gdl/include/Window.hpp
@@ -0,0 +1,142 @@
+#ifndef WINDOW_H
+# define WINDOW_H
+
+# include <string>
+
+namespace gdl
+{
+ ////////////////////////////////////////////////////////////
+ /// Forward declaration of WindowImpl.
+ ////////////////////////////////////////////////////////////
+ class WindowImpl;
+
+ ////////////////////////////////////////////////////////////
+ /// Forward declaration of InputImpl.
+ ////////////////////////////////////////////////////////////
+ class InputImpl;
+
+ ////////////////////////////////////////////////////////////
+ ///The Window class offert you an OpenGL context.
+ ////////////////////////////////////////////////////////////
+ class Window
+ {
+ public:
+ ////////////////////////////////////////////////////////////
+ /// Construct Window object with default values.\n
+ /// Title : "Game"\n
+ /// Width : 800\n
+ /// Height : 600\n
+ /// Fullscreen mode : false\n
+ ////////////////////////////////////////////////////////////
+ Window(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Destroy Window object.
+ ////////////////////////////////////////////////////////////
+ ~Window(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Create (or recreate) the Window.
+ ////////////////////////////////////////////////////////////
+ void create(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Catch the event when the user closes the window.
+ ////////////////////////////////////////////////////////////
+ void catchEvent(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Display the window on screen.
+ ////////////////////////////////////////////////////////////
+ void display(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Close the window
+ ////////////////////////////////////////////////////////////
+ void close(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Tell if the window is open.
+ ///
+ /// \return If the window is open, true is returned.
+ /// Otherwise, false is returned.
+ ////////////////////////////////////////////////////////////
+ bool isOpened(void);
+
+ ////////////////////////////////////////////////////////////
+ /// Set the title to the window.
+ /// Must be called before create method.
+ ///
+ /// \param[in] title New title.
+ ////////////////////////////////////////////////////////////
+ void setTitle(std::string const & title);
+
+ ////////////////////////////////////////////////////////////
+ /// Set the width to the window.
+ /// Must be called before create method.
+ ///
+ /// \param[in] width New width.
+ ////////////////////////////////////////////////////////////
+ void setWidth(size_t const width);
+
+ ////////////////////////////////////////////////////////////
+ /// Set the height to the window.
+ /// Must be called before create method.
+ ///
+ /// \param height New height.
+ ////////////////////////////////////////////////////////////
+ void setHeight(size_t const height);
+
+ ////////////////////////////////////////////////////////////
+ ///Get the Windows's Width
+ ///
+ ////////////////////////////////////////////////////////////
+ size_t getWidth() const;
+
+ ////////////////////////////////////////////////////////////
+ ///Get the Windows's Height
+ ///
+ ////////////////////////////////////////////////////////////
+ size_t getHeight() const;
+
+
+
+ ////////////////////////////////////////////////////////////
+ /// Set the fullscreen mode to the window.
+ ///
+ /// \param[in] state True to set the fullscreen mode.
+ /// False to set windowed mode.
+ ////////////////////////////////////////////////////////////
+ void setFullscreen(bool const state);
+
+ ////////////////////////////////////////////////////////////
+ /// Set the cursor at a specified position.
+ ///
+ /// \param[in] x Position on x-axis (from left)
+ /// \param[in] y Position on y-axis (from top)
+ ////////////////////////////////////////////////////////////
+ void setCursorAt(unsigned int const x, unsigned int const y);
+
+ ////////////////////////////////////////////////////////////
+ /// Show or hide the mouse cursor.
+ ///
+ /// \param[in] status True to show the cursor.
+ /// False to hide it.
+ ////////////////////////////////////////////////////////////
+ void showCursor(bool const status);
+
+ ////////////////////////////////////////////////////////////
+ /// To reach private members of InputImpl.
+ ////////////////////////////////////////////////////////////
+ friend class InputImpl;
+
+ private:
+ ////////////////////////////////////////////////////////////
+ /// Window implementation
+ ////////////////////////////////////////////////////////////
+ WindowImpl& window_;
+ };
+}
+
+#endif /* !WINDOW_H */
+
View
BIN  gdl/lib/libgdl_gl-d.so
Binary file not shown
View
BIN  gdl/lib/libgdl_gl.so
Binary file not shown
View
85 inc/Engine.hh
@@ -0,0 +1,85 @@
+//
+// Engine.hh for bomberman
+//
+// Made by arnaud mesureur
+// Login <mesure_a@epitech.net>
+//
+// Started on Wed May 11 14:44:11 2011 arnaud mesureur
+//
+
+#ifndef ENGINE_HH_
+#define ENGINE_HH_
+
+#include <queue>
+
+namespace bomberman {
+
+class Game;
+class GameEngine;
+class GraphicsEngine;
+class SoundEngine;
+
+/**
+ * Generic engine class.
+ *
+ * This class contains hard pointer to other engines.
+ * It allows to access directly each engine faster and easier.
+ * Whereas this requires knowing in advance the number of
+ * modules to put in.
+ *
+ * @see Game
+ * @see GameEngine
+ * @see GraphicsEngine
+ * @see SoundEngine
+ */
+class Engine
+{
+public:
+ /**
+ * Constructor.
+ * @param game
+ */
+ Engine(Game*);
+ /**
+ * Destructor.
+ */
+ virtual ~Engine(void);
+
+ /**
+ * Attach game engine.
+ * @param the game engine.
+ */
+ void attachEngine(GameEngine*);
+ /**
+ * Attach graphics engine.
+ * @param the graphics engin.
+ */
+ void attachEngine(GraphicsEngine*);
+ /**
+ * Attach sound engine.
+ * @param the sound engin.
+ */
+ void attachEngine(SoundEngine*);
+
+ //////////////////////////////////////////
+ /// Virtual member functions that need to
+ /// be implemented by each engine.
+ //////////////////////////////////////////
+ virtual void initialize(void) = 0;
+ virtual void update(void) = 0;
+ virtual void unload(void) = 0;
+
+protected:
+ Game* parent_;
+ GameEngine* gameEngine_;
+ GraphicsEngine* graphicsEngine_;
+ SoundEngine* soundEngine_;
+
+private:
+ Engine(Engine const&);
+ Engine& operator=(Engine const&);
+};
+
+}
+
+#endif // ENGINE_HH_
View
2,241 inc/GL/gl.h
@@ -0,0 +1,2241 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.6
+ *
+ * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef __gl_h_
+#define __gl_h_
+
+#if defined(USE_MGL_NAMESPACE)
+#include "gl_mangle.h"
+#endif
+
+
+/**********************************************************************
+ * Begin system-specific stuff. Do not do any of this when building
+ * for SciTech SNAP, as this is all done before this header file is
+ * included.
+ */
+#if !defined(__SCITECH_SNAP__)
+
+#if defined(__BEOS__)
+#include <stdlib.h> /* to get some BeOS-isms */
+#endif
+
+#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
+#define OPENSTEP
+#endif
+
+#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
+#define __WIN32__
+#endif
+
+#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
+# define GLAPI __declspec(dllexport)
+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
+# define GLAPI __declspec(dllimport)
+# else /* for use with static link lib build of Win32 edition only */
+# define GLAPI extern
+# endif /* _STATIC_MESA support */
+# if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE) /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */
+# define GLAPIENTRY
+# else
+# define GLAPIENTRY __stdcall
+# endif
+#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
+# define GLAPI extern
+# define GLAPIENTRY __stdcall
+#elif defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
+# define GLAPI __attribute__((visibility("default")))
+# define GLAPIENTRY
+#endif /* WIN32 && !CYGWIN */
+
+#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
+# define PRAGMA_EXPORT_SUPPORTED 1
+#endif
+
+/*
+ * WINDOWS: Include windows.h here to define APIENTRY.
+ * It is also useful when applications include this file by
+ * including only glut.h, since glut.h depends on windows.h.
+ * Applications needing to include windows.h with parms other
+ * than "WIN32_LEAN_AND_MEAN" may include windows.h before
+ * glut.h or gl.h.
+ */
+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
+#include <windows.h>
+#endif
+
+#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_WIN32_WCE) \
+ && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) \
+ && !defined(__CYGWIN__) || defined(__MINGW32__)
+#include <GL/mesa_wgl.h>
+#endif
+
+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
+#pragma import on
+#endif
+
+#ifndef GLAPI
+#define GLAPI extern
+#endif
+
+#ifndef GLAPIENTRY
+#define GLAPIENTRY
+#endif
+
+#ifndef APIENTRY
+#define APIENTRY GLAPIENTRY
+#endif
+
+/* "P" suffix to be used for a pointer to a function */
+#ifndef APIENTRYP
+#define APIENTRYP APIENTRY *
+#endif
+
+#ifndef GLAPIENTRYP
+#define GLAPIENTRYP GLAPIENTRY *
+#endif
+
+#ifdef CENTERLINE_CLPP
+#define signed
+#endif
+
+#if defined(PRAGMA_EXPORT_SUPPORTED)
+#pragma export on
+#endif
+
+#endif /* !__SCITECH_SNAP__ */
+/*
+ * End system-specific stuff.
+ **********************************************************************/
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+#define GL_VERSION_1_1 1
+#define GL_VERSION_1_2 1
+#define GL_VERSION_1_3 1
+#define GL_ARB_imaging 1
+
+
+/*
+ * Datatypes
+ */
+typedef unsigned int GLenum;
+typedef unsigned char GLboolean;
+typedef unsigned int GLbitfield;
+typedef void GLvoid;
+typedef signed char GLbyte; /* 1-byte signed */
+typedef short GLshort; /* 2-byte signed */
+typedef int GLint; /* 4-byte signed */
+typedef unsigned char GLubyte; /* 1-byte unsigned */
+typedef unsigned short GLushort; /* 2-byte unsigned */
+typedef unsigned int GLuint; /* 4-byte unsigned */
+typedef int GLsizei; /* 4-byte signed */
+typedef float GLfloat; /* single precision float */
+typedef float GLclampf; /* single precision float in [0,1] */
+typedef double GLdouble; /* double precision float */
+typedef double GLclampd; /* double precision float in [0,1] */
+
+
+
+/*
+ * Constants
+ */
+
+/* Boolean values */
+#define GL_FALSE 0x0
+#define GL_TRUE 0x1
+
+/* Data types */
+#define GL_BYTE 0x1400
+#define GL_UNSIGNED_BYTE 0x1401
+#define GL_SHORT 0x1402
+#define GL_UNSIGNED_SHORT 0x1403
+#define GL_INT 0x1404
+#define GL_UNSIGNED_INT 0x1405
+#define GL_FLOAT 0x1406
+#define GL_2_BYTES 0x1407
+#define GL_3_BYTES 0x1408
+#define GL_4_BYTES 0x1409
+#define GL_DOUBLE 0x140A
+
+/* Primitives */
+#define GL_POINTS 0x0000
+#define GL_LINES 0x0001
+#define GL_LINE_LOOP 0x0002
+#define GL_LINE_STRIP 0x0003
+#define GL_TRIANGLES 0x0004
+#define GL_TRIANGLE_STRIP 0x0005
+#define GL_TRIANGLE_FAN 0x0006
+#define GL_QUADS 0x0007
+#define GL_QUAD_STRIP 0x0008
+#define GL_POLYGON 0x0009
+
+/* Vertex Arrays */
+#define GL_VERTEX_ARRAY 0x8074
+#define GL_NORMAL_ARRAY 0x8075
+#define GL_COLOR_ARRAY 0x8076
+#define GL_INDEX_ARRAY 0x8077
+#define GL_TEXTURE_COORD_ARRAY 0x8078
+#define GL_EDGE_FLAG_ARRAY 0x8079
+#define GL_VERTEX_ARRAY_SIZE 0x807A
+#define GL_VERTEX_ARRAY_TYPE 0x807B
+#define GL_VERTEX_ARRAY_STRIDE 0x807C
+#define GL_NORMAL_ARRAY_TYPE 0x807E
+#define GL_NORMAL_ARRAY_STRIDE 0x807F
+#define GL_COLOR_ARRAY_SIZE 0x8081
+#define GL_COLOR_ARRAY_TYPE 0x8082
+#define GL_COLOR_ARRAY_STRIDE 0x8083
+#define GL_INDEX_ARRAY_TYPE 0x8085
+#define GL_INDEX_ARRAY_STRIDE 0x8086
+#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
+#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
+#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
+#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
+#define GL_VERTEX_ARRAY_POINTER 0x808E
+#define GL_NORMAL_ARRAY_POINTER 0x808F
+#define GL_COLOR_ARRAY_POINTER 0x8090
+#define GL_INDEX_ARRAY_POINTER 0x8091
+#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
+#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
+#define GL_V2F 0x2A20
+#define GL_V3F 0x2A21
+#define GL_C4UB_V2F 0x2A22
+#define GL_C4UB_V3F 0x2A23
+#define GL_C3F_V3F 0x2A24
+#define GL_N3F_V3F 0x2A25
+#define GL_C4F_N3F_V3F 0x2A26
+#define GL_T2F_V3F 0x2A27
+#define GL_T4F_V4F 0x2A28
+#define GL_T2F_C4UB_V3F 0x2A29
+#define GL_T2F_C3F_V3F 0x2A2A
+#define GL_T2F_N3F_V3F 0x2A2B
+#define GL_T2F_C4F_N3F_V3F 0x2A2C
+#define GL_T4F_C4F_N3F_V4F 0x2A2D
+
+/* Matrix Mode */
+#define GL_MATRIX_MODE 0x0BA0
+#define GL_MODELVIEW 0x1700
+#define GL_PROJECTION 0x1701
+#define GL_TEXTURE 0x1702
+
+/* Points */
+#define GL_POINT_SMOOTH 0x0B10
+#define GL_POINT_SIZE 0x0B11
+#define GL_POINT_SIZE_GRANULARITY 0x0B13
+#define GL_POINT_SIZE_RANGE 0x0B12
+
+/* Lines */
+#define GL_LINE_SMOOTH 0x0B20
+#define GL_LINE_STIPPLE 0x0B24
+#define GL_LINE_STIPPLE_PATTERN 0x0B25
+#define GL_LINE_STIPPLE_REPEAT 0x0B26
+#define GL_LINE_WIDTH 0x0B21
+#define GL_LINE_WIDTH_GRANULARITY 0x0B23
+#define GL_LINE_WIDTH_RANGE 0x0B22
+
+/* Polygons */
+#define GL_POINT 0x1B00
+#define GL_LINE 0x1B01
+#define GL_FILL 0x1B02
+#define GL_CW 0x0900
+#define GL_CCW 0x0901
+#define GL_FRONT 0x0404
+#define GL_BACK 0x0405
+#define GL_POLYGON_MODE 0x0B40
+#define GL_POLYGON_SMOOTH 0x0B41
+#define GL_POLYGON_STIPPLE 0x0B42
+#define GL_EDGE_FLAG 0x0B43
+#define GL_CULL_FACE 0x0B44
+#define GL_CULL_FACE_MODE 0x0B45
+#define GL_FRONT_FACE 0x0B46
+#define GL_POLYGON_OFFSET_FACTOR 0x8038
+#define GL_POLYGON_OFFSET_UNITS 0x2A00
+#define GL_POLYGON_OFFSET_POINT 0x2A01
+#define GL_POLYGON_OFFSET_LINE 0x2A02
+#define GL_POLYGON_OFFSET_FILL 0x8037
+
+/* Display Lists */
+#define GL_COMPILE 0x1300
+#define GL_COMPILE_AND_EXECUTE 0x1301
+#define GL_LIST_BASE 0x0B32
+#define GL_LIST_INDEX 0x0B33
+#define GL_LIST_MODE 0x0B30
+
+/* Depth buffer */
+#define GL_NEVER 0x0200
+#define GL_LESS 0x0201
+#define GL_EQUAL 0x0202
+#define GL_LEQUAL 0x0203
+#define GL_GREATER 0x0204
+#define GL_NOTEQUAL 0x0205
+#define GL_GEQUAL 0x0206
+#define GL_ALWAYS 0x0207
+#define GL_DEPTH_TEST 0x0B71
+#define GL_DEPTH_BITS 0x0D56
+#define GL_DEPTH_CLEAR_VALUE 0x0B73
+#define GL_DEPTH_FUNC 0x0B74
+#define GL_DEPTH_RANGE 0x0B70
+#define GL_DEPTH_WRITEMASK 0x0B72
+#define GL_DEPTH_COMPONENT 0x1902
+
+/* Lighting */
+#define GL_LIGHTING 0x0B50
+#define GL_LIGHT0 0x4000
+#define GL_LIGHT1 0x4001
+#define GL_LIGHT2 0x4002
+#define GL_LIGHT3 0x4003
+#define GL_LIGHT4 0x4004
+#define GL_LIGHT5 0x4005
+#define GL_LIGHT6 0x4006
+#define GL_LIGHT7 0x4007
+#define GL_SPOT_EXPONENT 0x1205
+#define GL_SPOT_CUTOFF 0x1206
+#define GL_CONSTANT_ATTENUATION 0x1207
+#define GL_LINEAR_ATTENUATION 0x1208
+#define GL_QUADRATIC_ATTENUATION 0x1209
+#define GL_AMBIENT 0x1200
+#define GL_DIFFUSE 0x1201
+#define GL_SPECULAR 0x1202
+#define GL_SHININESS 0x1601
+#define GL_EMISSION 0x1600
+#define GL_POSITION 0x1203
+#define GL_SPOT_DIRECTION 0x1204
+#define GL_AMBIENT_AND_DIFFUSE 0x1602
+#define GL_COLOR_INDEXES 0x1603
+#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
+#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
+#define GL_LIGHT_MODEL_AMBIENT 0x0B53
+#define GL_FRONT_AND_BACK 0x0408
+#define GL_SHADE_MODEL 0x0B54
+#define GL_FLAT 0x1D00
+#define GL_SMOOTH 0x1D01
+#define GL_COLOR_MATERIAL 0x0B57
+#define GL_COLOR_MATERIAL_FACE 0x0B55
+#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
+#define GL_NORMALIZE 0x0BA1
+
+/* User clipping planes */
+#define GL_CLIP_PLANE0 0x3000
+#define GL_CLIP_PLANE1 0x3001
+#define GL_CLIP_PLANE2 0x3002
+#define GL_CLIP_PLANE3 0x3003
+#define GL_CLIP_PLANE4 0x3004
+#define GL_CLIP_PLANE5 0x3005
+
+/* Accumulation buffer */
+#define GL_ACCUM_RED_BITS 0x0D58
+#define GL_ACCUM_GREEN_BITS 0x0D59
+#define GL_ACCUM_BLUE_BITS 0x0D5A
+#define GL_ACCUM_ALPHA_BITS 0x0D5B
+#define GL_ACCUM_CLEAR_VALUE 0x0B80
+#define GL_ACCUM 0x0100
+#define GL_ADD 0x0104
+#define GL_LOAD 0x0101
+#define GL_MULT 0x0103
+#define GL_RETURN 0x0102
+
+/* Alpha testing */
+#define GL_ALPHA_TEST 0x0BC0
+#define GL_ALPHA_TEST_REF 0x0BC2
+#define GL_ALPHA_TEST_FUNC 0x0BC1
+
+/* Blending */
+#define GL_BLEND 0x0BE2
+#define GL_BLEND_SRC 0x0BE1
+#define GL_BLEND_DST 0x0BE0
+#define GL_ZERO 0x0
+#define GL_ONE 0x1
+#define GL_SRC_COLOR 0x0300
+#define GL_ONE_MINUS_SRC_COLOR 0x0301
+#define GL_SRC_ALPHA 0x0302
+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
+#define GL_DST_ALPHA 0x0304
+#define GL_ONE_MINUS_DST_ALPHA 0x0305
+#define GL_DST_COLOR 0x0306
+#define GL_ONE_MINUS_DST_COLOR 0x0307
+#define GL_SRC_ALPHA_SATURATE 0x0308
+
+/* Render Mode */
+#define GL_FEEDBACK 0x1C01
+#define GL_RENDER 0x1C00
+#define GL_SELECT 0x1C02
+
+/* Feedback */
+#define GL_2D 0x0600
+#define GL_3D 0x0601
+#define GL_3D_COLOR 0x0602
+#define GL_3D_COLOR_TEXTURE 0x0603
+#define GL_4D_COLOR_TEXTURE 0x0604
+#define GL_POINT_TOKEN 0x0701
+#define GL_LINE_TOKEN 0x0702
+#define GL_LINE_RESET_TOKEN 0x0707
+#define GL_POLYGON_TOKEN 0x0703
+#define GL_BITMAP_TOKEN 0x0704
+#define GL_DRAW_PIXEL_TOKEN 0x0705
+#define GL_COPY_PIXEL_TOKEN 0x0706
+#define GL_PASS_THROUGH_TOKEN 0x0700
+#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
+#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
+#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
+
+/* Selection */
+#define GL_SELECTION_BUFFER_POINTER 0x0DF3
+#define GL_SELECTION_BUFFER_SIZE 0x0DF4
+
+/* Fog */
+#define GL_FOG 0x0B60