- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
main.h
资源名称:brm2.rar [点击查看]
上传用户:liujun12jf
上传日期:2022-07-12
资源大小:638k
文件大小:10k
源码类别:
OpenGL
开发平台:
Visual C++
- // All the necessary includes...
- #ifndef _MAIN_H_
- #define _MAIN_H_
- #include <windows.h> // The windows header file.
- #include <gl/gl.h> // Standard opengl include.
- #include <gl/glu.h> // Opengl utilities.
- #include <gl/glaux.h> // auxiliary functions.
- #include <GL/glext.h>
- #include <string.h>
- #include <stdio.h>
- #include <math.h>
- #include <fstream>
- #include <iostream.h>
- #include <vector>
- #include <fmod/fmod.hpp>
- #include <fmod/fmod_errors.h>
- #include <Newton.h>
- #include <time.h>
- #include "other.h"
- #include "CVector.h"
- #include "vectorq.h"
- #include "CSceneNode.h"
- #include "CParticleSystem.h"
- #include "object_graphics.h"
- #include "object_physics.h"
- #include "object_roots.h"
- #include "CPhysic.h"
- #include "CTimer.h"
- #include "CSound.h"
- #include "textureGen.h"
- #endif
- /****************
- * TODO AND STUFF *
- ******************
- ************************************************************************************************
- ************************************************************************************************
- SOME.TXT
- :: some todo
- - screenshots, frustum culling, particles
- :: stuff to research || rows with '!!!' are problem for too long yet
- - !!! terrain collision detection
- - !!! using bone animation, how it works, what format, connection with newton
- - 3rd person view
- - sorting blended triangles
- - trigger database (it must be attachable to npcs and mobs, or even objects).. how to implement?
- - collision grid - split world in many areas, and calculate which objects are IN (calculate only once in init)
- - cell architecture, write all the containing things
- - grid architecture, -||-, connection with game engine
- - gui management, architecture (and develop buttons, !!textedit!!, scrolling (movable button with boundaries))
- - player (npcs, mobs, items, etc) character class
- - scripting (objects need some ids for scripts)
- - grass, foliage
- - dropping objects - picking position
- - ducking
- :: not to forget || not so essential problems
- - triangles count
- - possibility of changing fighting method, so archer can beat with his bow, or also throw it :)
- - get models of many houses, walls, fences, trees, etc, etc..
- - interiors are accesible from exteriors, but need to be loaded after click on the door
- (door will be mostly closed, so interior/exterior can be culled)
- - AI (use sctipting, maybe python?) (unit groups use tactic, and fleeing)
- - mistakes in AI, and logic AI, this should be very strictly tested
- - write all skillz and attributes, which will be used
- (heh, write whole design document about the game, which i dont even think about yet.. engine first..)
- - include in cell - paths, weather, objects, !!interiors!!
- - redefine keys possibility
- - get some nice font
- - structure of savegame (includes everything what changed, items, units, terrain)
- - engine function to find out best performance, report recommended settings (draw distance, culling)
- - if some cell does not exist (is somewhere out of world), generate it (i'm quite proud of this idea =])
- - watch samurai jack and red dwarf to get the rpg ideas !!
- ************************************************************************************************
- ************************************************************************************************
- ************************************************************************************************
- ************************************************************************************************
- DOC.TXT
- :: progress
- - triangles count
- - camera movement - camera attachment, object movement, matrix and glulookat
- - 3rd person
- - transparent sorting
- - object databases (units, items, triggers) - somehow like vSounds vector in CSound
- - grid, cell implementation
- - loading data from file (xml?)
- - animations !!
- - object attachment on animated objects (weapons, clothes)
- - basic graphic object with LOD (hipoly detail, lowpoly detail, billboard)
- - gui (textedit, label, scrolling, button, checkbox - event system)
- - physic materials, callbacks
- - basic player interface objects (hp/mp, map, talking dialog, console, ..)
- - inventory (no problem, just vector)
- - saving/loading (all objects, screenshot, time/date info, gameplay time, gta:sa-like statistics)
- - mobs (ai, interaction, moving, animation, leveled mobs, leveled lists, grouping, tactics)
- - fight system (magic, normal, long-range and combinations)
- - weapons collision detection damage
- - armours/decoratives on mobs (this way we get many types of one mob type)
- - terrain
- - grass, foliage, trees
- - objects have slots for common things (such as house has slot for doors and body has slot for head =])
- - facial animation
- - pathways (connections, path finding, moving over long distances using paths, nodes with priorities)
- - people go inside houses at night (loading interiors for this? or some part of interior will be for this)
- - terrain decoration (rivers, rocks, waterfalls, trees, flowers, plants)
- - weather (sky, fog, snow, rain, sun glare, weather AI, smooth replacing, definitions in objects)
- - opengl picking (persian gulf src, newton examples)
- - npc database (ai patterns, dialogs, sound lists, voices, quest giving, scripting)
- - mobs database (ai patterns, sound lists, scripting)
- - items database (properties, editor, scripting, physic shapes)
- - designs
- (fighting, cells, sounds, frustum, skills, attributes, spells, creatures, story, quests, npcs, items, money)
- (trading, dropping, guilds, ranks, religions, countries, travelling, mining, fishing, cooking, hunting)
- (flesh gathering, alchemy, enchant, food, toilet, sims-like characters, weapons, armour, materials)
- (society hierarchy, thieves, production/creating, diplomacy, ingame building, personality, money->evil)
- (cooking ingredients, herbs, condition disintegrating, mobs grouping/hierarchy/tactic, mob categories)
- (player character creating, key locations(lineage style, important places), map, world, quest scripting)
- (scripting, training areas(cheap arrows, moving targets), quests such as beer drinking or another misc quests)
- (le parkour, space, plantes, planes, ships, cars, domestic animals)
- - equipping items (items has to have ids, so characters can hold list of ids of equipped items)
- - triggers (world object, colliding, timer using, scripting)
- - music (add support in CSound)
- - doors (opening style, connection with interior loading, cant open until loaded, sound types)
- - camera track (newton null body?, list of positions, look at positions, speed or time, scripting)
- - world time (weather, npc ai, mobs ai, plants ai!)
- - maps (real based on game world)
- - menu (new, load, save, options, credits, exit.. menu themes, gui themens)
- - additional npcs ai (toilet using, eating, random time offsets for actions, greeting)
- - additional mobs ai (attacking area/distance, state - guarding, nothing, intercepting.. sleeping at night)
- - screen resolution changing (gui based on -1 to 1 positions)
- - editor for everything
- - world parts (forests, castles, villages, dungeons)
- - interiors (keeping visited, fast loading)
- - exteriors (grid, fast loading)
- - dropping objects (oblivion style, use newton, or also morrowind style - dropping to mouse position)
- - containers (max encumberance, max size!.. backpacks, shelfs, dead units, chests, wardrobes..)
- - real interiors/exteriors (many usable items, switches, scripted items)
- - exterior generating if outside of saved (using seed)
- - diary (quests, needed items, needed actions, html?)
- - fighting ai (grouping, hierarchic commands, covering, flanking, mistakes, fleeing, bleeding)
- todo later:
- - think up quests
- - think up creatures, what they drop, how much xp give, types of attacks, moving types
- - bone animations, idling animatins
- - guilds and ranks
- - food, plants, fruits, vegetables
- - building new structs, camping, making fire, burning things
- - guards, crimes, paying penalties
- - character creating, very much properties
- - treasure maps, secret places, old legends
- - readable books
- - skillz hierarchy
- - think up stories, quests, tasks, quest items, quest npcs
- - theme areas
- (snow, swamps, foggy, dark, psychedelic, horror, death, angelic, heaven, dust, mountains, oceanic, islands)
- (castles, very natural, in sky, maze, black&white!, on ship, on plane, on train, moon, world wars, tales)
- (city, village, cottage, monumental, empty(white with a few objects), canyons, insect world, bacteries world)
- :: old example
- |--------------------------------------------------------------------|
- | |====HP=========| ==============INVENTORY========================= |
- | |==========MP===| | __ /-- _ || | | | | | | | |/| |
- | | | | ---- |_| ||-----------------------|--| |
- | |=====STATS=====| | | | |..| |_| || | | | | | | | | | |
- | | name: hlsman | | |__| |__| |_| ||-----------------------| | |
- | | level: 23 | | _||_ || | | | | | | | |--| |
- | | race: elf | | /| | ||-----------------------|xx| |
- | | class: mage | | //| |\ || | | | | | | | |--| |
- | |============|==| | _// |____| \_ ||-----------------------| | |
- | | str: 9 |/| | |_/ | / | _| || | | | | | | | | | |
- | | dex: 23 | | | |/ | ||-----------------------| | |
- | | int: 8 | | | || || || | | | | | | | | | |
- | | alchemy: 6 | | | _|| ||_ ||-----------------------|--| |
- | | acrobat: 9 |/| | |__| |__| || | | | | | | | |/| |
- | |============|==| ================================================ |
- | __ __ |
- | =======TALKING DIALOG====================================== || || |
- | | / | here is some text: |/| || || |
- | | / | 1. bullshit! | | HP MP |
- | | /|| | 2. thats great idea! |/| || || |
- | =========================================================== || || |
- | [?][?] -- -- |
- |--------------------------------------------------------------------|
- */