Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <signal.h>
#include <string>
#include <unistd.h>
#include <stdio.h>
#include <pwd.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
#include <sys/types.h>
#include <sys/stat.h>
#include "inet_file.h"
#include "inet.h"
#include <fcntl.h>
#include <sys/file.h>
#include "softvolume.h"
#include <iostream>
#include <fstream>
Go to the source code of this file.
Macros | |
#define | SDL_MIX_MAXVOLUME 128 |
#define | MIX_CHANNEL_POST -2 |
#define | STD_ERR stderr |
#define | STD_OUT stdout |
#define | SONG_MUTEX 0 |
Typedefs | |
typedef int | Mix_Music |
Functions | |
int | my_getchar (int socket) |
std::string | my_getstring (int socket) |
bool | my_bytestoread (int socket) |
void | errorv (char *str, va_list ap) |
std::string | concat (const std::vector< std::string > &) |
void | cleanExit (char *str,...) |
void | changehome (bool to, bool linuxhome=true) |
std::string | alphanum (std::string s) |
void | concat_ostream (std::ofstream &o, const std::vector< std::string > &files) |
std::vector< std::string > | split (std::string tmpstr, std::string splitter) |
Mix_Music * | PlayMusic (std::string file, Mix_Music *oldmusic) |
void | music_finished () |
int | main (int argc, char **argv) |
Variables | |
int | fadeout = 0 |
int | fadein = 0 |
Mix_SoftVolume_Shape | fadeshape = MIX_SV_SHAPE_EASED |
float | volume = 0 |
float | soft_volume = 1 |
int | bits = 0 |
int | done = 0 |
static bool | fnet = false |
std::string | HOMESUBDIR = ".vegastrike" |
int | mysocket = -1 |
int | mysocket_write = -1 |
volatile bool | sende = true |
std::string | curmus |
#define MIX_CHANNEL_POST -2 |
Definition at line 52 of file soundserver.cpp.
Referenced by main(), and PlayMusic().
#define SDL_MIX_MAXVOLUME 128 |
Definition at line 3 of file soundserver.cpp.
Referenced by main(), and PlayMusic().
#define SONG_MUTEX 0 |
Definition at line 101 of file soundserver.cpp.
#define STD_ERR stderr |
Definition at line 93 of file soundserver.cpp.
Referenced by errorv().
#define STD_OUT stdout |
Definition at line 94 of file soundserver.cpp.
Referenced by concat(), main(), music_finished(), and PlayMusic().
Definition at line 10 of file soundserver.cpp.
std::string alphanum | ( | std::string | s) |
void cleanExit | ( | char * | str, |
... | |||
) |
std::string concat | ( | const std::vector< std::string > & | files) |
Definition at line 196 of file soundserver.cpp.
References alphanum(), concat_ostream(), fclose, fopen, fprintf, i, and STD_OUT.
Referenced by PlayMusic().
void concat_ostream | ( | std::ofstream & | o, |
const std::vector< std::string > & | files | ||
) |
Definition at line 172 of file soundserver.cpp.
References changehome(), and i.
Referenced by concat().
void errorv | ( | char * | str, |
va_list | ap | ||
) |
Definition at line 112 of file soundserver.cpp.
References fprintf, and STD_ERR.
Referenced by cleanExit().
Definition at line 422 of file soundserver.cpp.
References bits, c, cleanExit(), curmus, done, fadein, fadeout, fadeshape, fclose, float, fnet, fNET_cleanup(), fNET_close(), fNET_startup(), fopen, fprintf, HAVE_SDL, HOMESUBDIR, INET_AcceptFrom(), INET_cleanup(), INET_close(), INET_startup(), int, VsnetOSS::memcpy(), MIX_CHANNEL_POST, Mix_SoftVolume_Change(), MIX_SV_SHAPE_EASED, MIX_SV_SHAPE_EASED_EXP, MIX_SV_SHAPE_EXP, MIX_SV_SHAPE_LINEAR, music_finished(), my_getchar(), my_getstring(), mysocket, mysocket_write, StarSystemGent::names, PlayMusic(), SDL_MIX_MAXVOLUME, soft_volume, split(), STD_OUT, and volume.
void music_finished | ( | ) |
Definition at line 370 of file soundserver.cpp.
References fnet, fNET_Write(), fprintf, INET_Write(), mysocket_write, PlayMusic(), sende, and STD_OUT.
Referenced by main(), and watch_for_sende().
Definition at line 80 of file soundserver.cpp.
References fnet, fNET_BytesToRead(), and INET_BytesToRead().
Definition at line 61 of file soundserver.cpp.
References fnet, fNET_fgetc(), and INET_fgetc().
Referenced by main(), and my_getstring().
std::string my_getstring | ( | int | socket) |
Definition at line 307 of file soundserver.cpp.
References changehome(), concat(), fadein, fadeout, fadeshape, fprintf, int, MIX_CHANNEL_POST, Mix_SoftVolume_AutoStopMusic(), Mix_SoftVolume_Change(), Mix_SoftVolume_Force(), SDL_MIX_MAXVOLUME, sende, soft_volume, split(), STD_OUT, and volume.
Referenced by main(), and music_finished().
std::vector< std::string > split | ( | std::string | tmpstr, |
std::string | splitter | ||
) |
Definition at line 251 of file soundserver.cpp.
Referenced by main(), PlayMusic(), and GameUnit< UnitType >::Split().
int bits = 0 |
Definition at line 59 of file soundserver.cpp.
Referenced by NetBuffer::addFloat(), decode_dxt3_alpha(), decode_dxt5_alpha(), NetBuffer::getFloat(), main(), POSH_FloatFromBigBits(), and POSH_FloatFromLittleBits().
std::string curmus |
Definition at line 284 of file soundserver.cpp.
Referenced by main().
int done = 0 |
Definition at line 59 of file soundserver.cpp.
Referenced by NavComputer::constructControls(), BaseComputer::constructControls(), Orders::MoveToParent::Execute(), Orders::FireAt::Execute(), Orders::MatchRoll::Execute(), Orders::LoopAround::Execute(), Orders::LoopAroundAgro::Execute(), Orders::FacePerpendicular::Execute(), FlyTo::Execute(), LaunchOneParticle(), VsnetDownload::Server::Manager::lower_check_queues(), main(), NavigationSystem::CachedSystemIterator::operator*(), NavigationSystem::CachedSectorIterator::operator*(), NavigationSystem::CachedSystemIterator::operator->(), NavigationSystem::CachedSectorIterator::operator->(), and NavigationSystem::SystemIterator::Position().
int fadein = 0 |
Definition at line 55 of file soundserver.cpp.
int fadeout = 0 |
Definition at line 55 of file soundserver.cpp.
Mix_SoftVolume_Shape fadeshape = MIX_SV_SHAPE_EASED |
Definition at line 56 of file soundserver.cpp.
Referenced by main(), and PlayMusic().
|
static |
Definition at line 60 of file soundserver.cpp.
Referenced by main(), music_finished(), my_bytestoread(), and my_getchar().
std::string HOMESUBDIR = ".vegastrike" |
Definition at line 133 of file soundserver.cpp.
Referenced by changehome(), VSFileSystem::InitDataDirectory(), VSFileSystem::InitHomeDirectory(), and main().
int mysocket = -1 |
Definition at line 274 of file soundserver.cpp.
Referenced by main().
int mysocket_write = -1 |
Definition at line 275 of file soundserver.cpp.
Referenced by main(), and music_finished().
volatile bool sende = true |
Definition at line 283 of file soundserver.cpp.
Referenced by music_finished(), PlayMusic(), and watch_for_sende().
float soft_volume = 1 |
Definition at line 58 of file soundserver.cpp.
Referenced by main(), and PlayMusic().
float volume = 0 |
Definition at line 57 of file soundserver.cpp.