Welcome Guest [Log In] [Register]
Welcome to Epee Engine. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Epee Engine; Documentation on the Epee Engine
Topic Started: Mar 8 2007, 11:43 AM (1,510 Views)
Alan
Administrator
[ *  *  * ]
EpeeEngine: This is the main class of the Epee Engine. This class handles events, playing sounds, handling network connections, and rendering the seen.

Inherits from: nothing

Function List:
see below and replies


public:
SetUp
RenderSeen
UpdateScreen
SetNumberOfMixingChannels
FindSound
CreateSound
DestroySound
PlaySoundNow
SetAndPlayBackGroundMusic
StopBackGroundMusic
FadeInSound
FadeOutSound
StopSoundNow
IsSoundPlaying
IsBackGoundMusicPlaying
LoadConfigurationFile
GetTimeSinceSetup
SleepDelay
CreateTextBox
CreateImage
CreateAnimation
CreateAnimationScript
CreateButtonTB
CreateButton
WasAButtonClicked
FindTextBox
FindButton
FindButtonTB
FindImage
FindAnimation
FindSprocketsE
ChangeSprocketZ
GetFps
SetFps
IsFoucsOnTextBox
GetCurrentRenderList
GetCurrentRenderListptr
SetCurrentRentderList




//***********NOTE IMAGES,ANIMATIONS TEXTBOXES,AND BUTTONS ARE ALL SPROCKETS***********************


image* CloneImage(image * _imageToClone,std::string _nameOfImage,std::string _RenderList="Current",int _x=-1,int _y=-1,int _z=-1);

textBox* CloneTextBox(textBox * _textBoxToClone,std::string _nameOfImage,std::string _RenderList="Current",int _x=-1,int _y=-1,int _z=-1 );






bool InsertRenderList(RenderList * _newRenderList); //This will be made private in the next version. Use create render list insted

bool DestroyRenderList(std::string _name);
bool RemoveIteamFromRendableList(std::string _card,std::string _renderList);
RenderList* FindRenderList(std::string _name);
RenderList * CreateRenderList(std::string _name);
unsigned int GetTotalRenderList();
bool ValideVersionNumberOfCppWithHeader();
double GetVersionNumberH();
double GetVersionNumberCpp();
void TransferSprocketToNewRenderList(RenderList * _sorceRenderList,RenderList * _destinationRenderList,Sprockets * _sprocketToTransfer);



EpeeEngineError GetLastError() {return m_cLastError;}//Returns the last error from the last funtion called

unsigned int GetTotalSprockesCreated();//returns that total number of sprockets created
unsigned int GetTotalSoundsCreated();//returns the total number of sounds created
void WriteRenderListToFile();//Writes the contents of the render list out to the cout file. Only works in debug right now
void WriteSoundListToFile();//Writes the contents of the sound list out to the cout file. Only works in debug right now
void TurnOnFPS();//Turns on the Frames Per Second in the upper left hand corner
void TurnOffFPS();//Turns Off the Frames Per Second in the upper left hand corner
void EpeeEngine::ToggleFullScreen(bool _FullScreen);//Toggles the window from fullscreen to window and back true for fullscreen false for windowed
void ChangedResolution(int _Width, int _height,bool _useCurrentFlags=true,bool _FullScreen=false,bool _Resize=false,bool _AnyFormat=false);//Changes the current window resolution
bool GetEvent(SDL_Event * _event); //Removes and polulates _event with the next event in the event que. Returns false if the is no events in the que returns true otherwise


unsigned int GetCurrentScreenHeight();
unsigned int GetCurrentScreenWidth();


bool IsKeyDisplayable(SDLKey _KeyToCheck);
char IsKeyModifiedByOtherKeys(SDLKey _KeyToCheck);
ControlCharacters * GetControlCharacters();

void DrawOutlineWithRect(SDL_Surface * _SurfaceToBeOutLined,SDL_Rect *OutLine,Uint8 _red=255,Uint8 _blue=0,Uint8 _green=0,unsigned int _thickness=1 );
void DrawOutline(SDL_Surface * _SurfaceToBeOutLined,unsigned int _x,unsigned int _y,Uint8 _red=255,Uint8 _blue=0,Uint8 _green=0,unsigned int _thickness=1 );
Offline Profile Quote Post Goto Top
 
Alan
Administrator
[ *  *  * ]
bool RenderSeen(
bool _UpdateScreenNow
);

Public function of the Epee Engine Class

Description:
Draws all renderable objects in the current render list to the back buffer
If true is passed into this function then after the objects have been drawn to the back buffer the front and back buffers are then flipped
call this function with true as an augment to draw images on the screen

Arguments:

Optional:
bool _UpdateScreenNow
if true the front an back buffers are flipped
if false the front an back buffers are not flipped
defaults to false

Return Value:
always returns to for now
Offline Profile Quote Post Goto Top
 
Alan
Administrator
[ *  *  * ]
bool UpdateScreen();

Public function of the Epee Engine Class

Description:
Flips front and back buffer
updates screen with what was drawn by RenderSeen
call after calling RenderSeen


Arguments:
none

Return Value:
always returns true for now
Offline Profile Quote Post Goto Top
 
Alan
Administrator
[ *  *  * ]
bool SetNumberOfMixingChannels(int _NumberOfChannels);

Public function of the Epee Engine Class

Description:
Set up function for the sound list this need to be at lest one for sounds to work.
Sounds are assigned to channels. Channels can have the volume increased and decreased which in turn control the volume of the sound associated with the channel
Channels can have more than one sound assigned to them

Arguments:

Required:
int _NumberOfChannels
Number of channels to create

Return Value:
returns true if channels are created successfully returns false other wise
Offline Profile Quote Post Goto Top
 
Alan
Administrator
[ *  *  * ]
Sound * FindSound(std::string _name);

Public function of the Epee Engine Class

Description:
Does a bubble search through the sound list until the sound is found or until it has searched the whole list.

Notes:
If the sound list is very long this function could take time.
The last found sound is cached so sequential calls to this function with the same name do not cost performance.


Arguments:

Required:
std::string _name
name of the sound to find in the sound list

Return Value:
If the sound is found in the list a pointer to the sound object is return other wise a NULL pointer is returned.
Offline Profile Quote Post Goto Top
 
Alan
Administrator
[ *  *  * ]
Sound * CreateSound(
std::string _GroupName,
std::string _FileName,
int _Channel,
int _NumberOfTimesToLoop,
int _Volume
)

Public function of the Epee Engine Class

Description:
creates a new sound and adds it to the sound list

Arguments:

Required:
std::string _GroupName
Name of the sound object
used for the find and destroy sound arguments.
not really a group name

std::string _FileName
name of the sound file you want to load and attach to the sound object for playback later

Optional:
int _Channel
channel the sound object is attached to
defaults to 0

int _NumberOfTimesToLoop
number of times the sound will play
setting this to zero will cause the sound to loop forever
defaults to 0

int _Volume
sets the volume used when playing the sound
defaults to MIX_MAX_VOLUME

Return Value:
if the sound is created successfully a pointer to the new sound object is returned other wise a NULL pointer is returned
Offline Profile Quote Post Goto Top
 
Alan
Administrator
[ *  *  * ]
bool DestroySound(std::string _name);

Public function of the Epee Engine Class

Description:
removes the a sound from the sound list and deletes the sound object


Arguments:

Required:
std::string _name
name of the sound to remove and delete

Return Value:
returns true if the sound is removed from the list and deleted.
returns false on failure of finding the sound in the list or if it can not be removed or deleted
Offline Profile Quote Post Goto Top
 
Alan
Administrator
[ *  *  * ]
bool PlaySoundNow(Sound * _pSound)

Public function of the Epee Engine Class

Description:
plays a sound pointed to by _pSound

Arguments:

Required:
Sound * _pSound
Pointer to the sound object to play.
The sound object does not need to be in the sound list for this function to work

Return Value:
returns true on successes, false otherwise
Offline Profile Quote Post Goto Top
 
Alan
Administrator
[ *  *  * ]
bool SetAndPlayBackGroundMusic(
std::string _NameOfAudio,
int _NumberOfTimesToLoop,
int _Volume,
int _ms
)

Public function of the Epee Engine Class

Description:
plays a sound file

Note about using this funtion
a pointer is saved to the loaded file and can be assessed with the flowing functions
StopBackGroundMusic and IsBackGoundMusicPlaying

This is NOT added to the sound list.
You can only have one music file loaded and playing at a time
if the function is called again the current playing music is stop.
A Sound object and music and play at the same time



Arguments:

Required:
std::string _NameOfAudio
name of audio file to play

int _NumberOfTimesToLoop
number of times to play

Optional:
int _Volume
volume to play the music at
defaults to MIX_MAX_VOLUME

int _ms
time in milliseconds to fade in the music
defaults to 0

Return Value:
returns true on successes, false otherwise
Offline Profile Quote Post Goto Top
 
Alan
Administrator
[ *  *  * ]
bool StopBackGroundMusic(int _ms);

Public function of the Epee Engine Class

Description:
fades out background music in _ms milliseconds

Arguments:

Optional:
int _ms
time in milliseconds to fade out the background music in.
defaults to 0

Return Value:
returns true on successes, false otherwise
Offline Profile Quote Post Goto Top
 
Alan
Administrator
[ *  *  * ]
bool FadeInSound(
Sound * _pSound,
int _ms
);

Public function of the Epee Engine Class

Description:
fades in the channel that the sound is assigned to and thus fades in the sound in _ms milliseconds

Arguments:

Required:
Sound * _pSound
Sound object to fade in

int _ms
time in milliseconds to fade in the sound


Return Value:
returns true on successes, false otherwise
Offline Profile Quote Post Goto Top
 
Alan
Administrator
[ *  *  * ]
bool FadeOutSound(
Sound * _pSound,
int _ms
);


Public function of the Epee Engine Class

Description:
fades out the channel that the sound is assigned to and thus fades out the sound in _ms milliseconds

Arguments:

Required:
Sound * _pSound
Sound object to fade out

int _ms
time in milliseconds to fade out the sound


Return Value:
returns true on successes, false otherwise
Offline Profile Quote Post Goto Top
 
Alan
Administrator
[ *  *  * ]
bool FadeOutSound(
int _Channel,
int _ms
)

Public function of the Epee Engine Class

Description:
fades out a channel in _ms milliseconds
this fade out all sound associated with _Channel
Arguments:

Required:
int _Channel
channel to fade out

int _ms
time in milliseconds to fade out the channel


Return Value:
returns true on successes, false otherwise
Offline Profile Quote Post Goto Top
 
Alan
Administrator
[ *  *  * ]
bool StopSoundNow(int _Channel)

Public function of the Epee Engine Class

Description:
stop all sounds playing on _Channel

Notes:
Same as calling FadeOutSound( _Channel,0)

Notes: same as calling

Arguments:

Required:
int _Channel
channel to stop


Return Value:
returns true on successes, false otherwise
Offline Profile Quote Post Goto Top
 
Alan
Administrator
[ *  *  * ]
bool StopSoundNow(Sound * _pSound)

Public function of the Epee Engine Class

Description:
Stops sounds playing on channel that _Sound is assigned to

Notes:
Same as calling FadeOutSound(_pSound,0)


Arguments:

Required:
Sound * _pSound
Sound object to stop playing


Return Value:
returns true on successes, false otherwise
Offline Profile Quote Post Goto Top
 
Go to Next Page
« Previous Topic · Documentation · Next Topic »
Add Reply