main.h
上传用户:liujun12jf
上传日期:2022-07-12
资源大小:638k
文件大小:10k
源码类别:

OpenGL

开发平台:

Visual C++

  1. // All the necessary includes...
  2. #ifndef _MAIN_H_
  3. #define _MAIN_H_
  4. #include <windows.h>             // The windows header file.
  5. #include <gl/gl.h>               // Standard opengl include.
  6. #include <gl/glu.h>              // Opengl utilities.
  7. #include <gl/glaux.h>            // auxiliary functions.
  8. #include <GL/glext.h>
  9. #include <string.h>
  10. #include <stdio.h>
  11. #include <math.h>
  12. #include <fstream>
  13. #include <iostream.h>
  14. #include <vector>
  15. #include <fmod/fmod.hpp>
  16. #include <fmod/fmod_errors.h>
  17. #include <Newton.h>
  18. #include <time.h>
  19. #include "other.h"
  20. #include "CVector.h"
  21. #include "vectorq.h"
  22. #include "CSceneNode.h"
  23. #include "CParticleSystem.h"
  24. #include "object_graphics.h"
  25. #include "object_physics.h"
  26. #include "object_roots.h"
  27. #include "CPhysic.h"
  28. #include "CTimer.h"
  29. #include "CSound.h"
  30. #include "textureGen.h"
  31. #endif
  32. /****************
  33. * TODO AND STUFF *
  34. ******************
  35. ************************************************************************************************
  36. ************************************************************************************************
  37. SOME.TXT
  38. :: some todo
  39. - screenshots, frustum culling, particles
  40. :: stuff to research || rows with '!!!' are problem for too long yet
  41. - !!! terrain collision detection
  42. - !!! using bone animation, how it works, what format, connection with newton
  43. - 3rd person view
  44. - sorting blended triangles
  45. - trigger database (it must be attachable to npcs and mobs, or even objects).. how to implement?
  46. - collision grid - split world in many areas, and calculate which objects are IN (calculate only once in init)
  47. - cell architecture, write all the containing things
  48. - grid architecture, -||-, connection with game engine
  49. - gui management, architecture (and develop buttons, !!textedit!!, scrolling (movable button with boundaries))
  50. - player (npcs, mobs, items, etc) character class
  51. - scripting (objects need some ids for scripts)
  52. - grass, foliage
  53. - dropping objects - picking position
  54. - ducking
  55. :: not to forget || not so essential problems
  56. - triangles count
  57. - possibility of changing fighting method, so archer can beat with his bow, or also throw it :)
  58. - get models of many houses, walls, fences, trees, etc, etc..
  59. - interiors are accesible from exteriors, but need to be loaded after click on the door
  60.   (door will be mostly closed, so interior/exterior can be culled)
  61. - AI (use sctipting, maybe python?) (unit groups use tactic, and fleeing)
  62. - mistakes in AI, and logic AI, this should be very strictly tested
  63. - write all skillz and attributes, which will be used
  64.   (heh, write whole design document about the game, which i dont even think about yet.. engine first..)
  65. - include in cell - paths, weather, objects, !!interiors!!
  66. - redefine keys possibility
  67. - get some nice font
  68. - structure of savegame (includes everything what changed, items, units, terrain)
  69. - engine function to find out best performance, report recommended settings (draw distance, culling)
  70. - if some cell does not exist (is somewhere out of world), generate it (i'm quite proud of this idea =])
  71. - watch samurai jack and red dwarf to get the rpg ideas !!
  72. ************************************************************************************************
  73. ************************************************************************************************
  74. ************************************************************************************************
  75. ************************************************************************************************
  76. DOC.TXT
  77. :: progress
  78. - triangles count
  79. - camera movement - camera attachment, object movement, matrix and glulookat
  80. - 3rd person
  81. - transparent sorting
  82. - object databases (units, items, triggers) - somehow like vSounds vector in CSound
  83. - grid, cell implementation
  84. - loading data from file (xml?)
  85. - animations !!
  86. - object attachment on animated objects (weapons, clothes)
  87. - basic graphic object with LOD (hipoly detail, lowpoly detail, billboard)
  88. - gui (textedit, label, scrolling, button, checkbox - event system)
  89. - physic materials, callbacks
  90. - basic player interface objects (hp/mp, map, talking dialog, console, ..)
  91. - inventory (no problem, just vector)
  92. - saving/loading (all objects, screenshot, time/date info, gameplay time, gta:sa-like statistics)
  93. - mobs (ai, interaction, moving, animation, leveled mobs, leveled lists, grouping, tactics)
  94. - fight system (magic, normal, long-range and combinations)
  95. - weapons collision detection damage
  96. - armours/decoratives on mobs (this way we get many types of one mob type)
  97. - terrain
  98. - grass, foliage, trees
  99. - objects have slots for common things (such as house has slot for doors and body has slot for head =])
  100. - facial animation
  101. - pathways (connections, path finding, moving over long distances using paths, nodes with priorities)
  102. - people go inside houses at night (loading interiors for this? or some part of interior will be for this)
  103. - terrain decoration (rivers, rocks, waterfalls, trees, flowers, plants)
  104. - weather (sky, fog, snow, rain, sun glare, weather AI, smooth replacing, definitions in objects)
  105. - opengl picking (persian gulf src, newton examples)
  106. - npc database (ai patterns, dialogs, sound lists, voices, quest giving, scripting)
  107. - mobs database (ai patterns, sound lists, scripting)
  108. - items database (properties, editor, scripting, physic shapes)
  109. - designs
  110.   (fighting, cells, sounds, frustum, skills, attributes, spells, creatures, story, quests, npcs, items, money)
  111. (trading, dropping, guilds, ranks, religions, countries, travelling, mining, fishing, cooking, hunting)
  112. (flesh gathering, alchemy, enchant, food, toilet, sims-like characters, weapons, armour, materials)
  113. (society hierarchy, thieves, production/creating, diplomacy, ingame building, personality, money->evil)
  114. (cooking ingredients, herbs, condition disintegrating, mobs grouping/hierarchy/tactic, mob categories)
  115. (player character creating, key locations(lineage style, important places), map, world, quest scripting)
  116. (scripting, training areas(cheap arrows, moving targets), quests such as beer drinking or another misc quests)
  117. (le parkour, space, plantes, planes, ships, cars, domestic animals)
  118. - equipping items (items has to have ids, so characters can hold list of ids of equipped items)
  119. - triggers (world object, colliding, timer using, scripting)
  120. - music (add support in CSound)
  121. - doors (opening style, connection with interior loading, cant open until loaded, sound types)
  122. - camera track (newton null body?, list of positions, look at positions, speed or time, scripting)
  123. - world time (weather, npc ai, mobs ai, plants ai!)
  124. - maps (real based on game world)
  125. - menu (new, load, save, options, credits, exit.. menu themes, gui themens)
  126. - additional npcs ai (toilet using, eating, random time offsets for actions, greeting)
  127. - additional mobs ai (attacking area/distance, state - guarding, nothing, intercepting.. sleeping at night)
  128. - screen resolution changing (gui based on -1 to 1 positions)
  129. - editor for everything
  130. - world parts (forests, castles, villages, dungeons)
  131. - interiors (keeping visited, fast loading)
  132. - exteriors (grid, fast loading)
  133. - dropping objects (oblivion style, use newton, or also morrowind style - dropping to mouse position)
  134. - containers (max encumberance, max size!.. backpacks, shelfs, dead units, chests, wardrobes..)
  135. - real interiors/exteriors (many usable items, switches, scripted items)
  136. - exterior generating if outside of saved (using seed)
  137. - diary (quests, needed items, needed actions, html?)
  138. - fighting ai (grouping, hierarchic commands, covering, flanking, mistakes, fleeing, bleeding)
  139. todo later:
  140. - think up quests
  141. - think up creatures, what they drop, how much xp give, types of attacks, moving types
  142. - bone animations, idling animatins
  143. - guilds and ranks
  144. - food, plants, fruits, vegetables
  145. - building new structs, camping, making fire, burning things
  146. - guards, crimes, paying penalties
  147. - character creating, very much properties
  148. - treasure maps, secret places, old legends
  149. - readable books
  150. - skillz hierarchy
  151. - think up stories, quests, tasks, quest items, quest npcs
  152. - theme areas
  153.   (snow, swamps, foggy, dark, psychedelic, horror, death, angelic, heaven, dust, mountains, oceanic, islands)
  154. (castles, very natural, in sky, maze, black&white!, on ship, on plane, on train, moon, world wars, tales)
  155. (city, village, cottage, monumental, empty(white with a few objects), canyons, insect world, bacteries world)
  156. :: old example
  157. |--------------------------------------------------------------------|
  158. | |====HP=========| ==============INVENTORY========================= |
  159. | |==========MP===| |   __  /--    _  ||  |  |  |  |  |  |  |  |/| |
  160. |                   |  |  | ----   |_| ||-----------------------|--| |
  161. | |=====STATS=====| |  |  | |..|   |_| ||  |  |  |  |  |  |  |  |  | |
  162. | | name: hlsman  | |  |__| |__|   |_| ||-----------------------|  | |
  163. | | level: 23     | |       _||_       ||  |  |  |  |  |  |  |  |--| |
  164. | | race: elf     | |     /|    |     ||-----------------------|xx| |
  165. | | class: mage   | |    //|    |\    ||  |  |  |  |  |  |  |  |--| |
  166. | |============|==| |  _// |____| \_  ||-----------------------|  | |
  167. | | str: 9     |/| | |_/  | / |  _| ||  |  |  |  |  |  |  |  |  | |
  168. | | dex: 23    |  | |      |/  |      ||-----------------------|  | |
  169. | | int: 8     |  | |      ||  ||      ||  |  |  |  |  |  |  |  |  | |
  170. | | alchemy: 6 |  | |     _||  ||_     ||-----------------------|--| |
  171. | | acrobat: 9 |/| |    |__|  |__|    ||  |  |  |  |  |  |  |  |/| |
  172. | |============|==| ================================================ |
  173. |                                                              __ __ |
  174. | =======TALKING DIALOG======================================  || || |
  175. | |  /  | here is some text:                            |/|  || || |
  176. | |  /  | 1. bullshit!                                  |  |  HP MP |
  177. | | /|| | 2. thats great idea!                          |/|  || || |
  178. | ===========================================================  || || |
  179. | [?][?]                                                       -- -- |
  180. |--------------------------------------------------------------------|
  181. */