mirror of
https://github.com/lubosz/overte.git
synced 2025-04-17 01:57:45 +02:00
Log cleanup. removed star field meridians.
This commit is contained in:
parent
a56ad3ec28
commit
527b65f6a4
6 changed files with 23 additions and 19 deletions
|
@ -14,9 +14,9 @@ from random import random,randint
|
|||
from math import sqrt, hypot, atan2, pi, fmod, degrees
|
||||
from sys import argv,stderr
|
||||
|
||||
hemisphere_only, equator, meridians= False, 0, 1000
|
||||
hemisphere_only, equator, meridians=False, 0, 1000
|
||||
|
||||
n_random = 100000
|
||||
n_random = 50000
|
||||
if len(argv) > 1:
|
||||
n_random = int(argv[1])
|
||||
|
||||
|
@ -35,9 +35,9 @@ def meridian(azimuth,n,(r0,g0,b0),(r1,g1,b1)):
|
|||
print "%f %f #%02x%02x%02x" % (azimuth,altitude,r,g,b)
|
||||
print "%f %f #%02x%02x%02x" % (azimuth,-altitude,r,g,b)
|
||||
|
||||
if meridians:
|
||||
meridian( 0,meridians,(255,255,255), (180, 60,255)) # N->S
|
||||
meridian(90,meridians,( 80,255, 80), (255,240, 40)) # E->W
|
||||
#if meridians:
|
||||
#meridian( 0,meridians,(255,255,255), (180, 60,255)) # N->S
|
||||
#meridian(90,meridians,( 80,255, 80), (255,240, 40)) # E->W
|
||||
|
||||
if equator:
|
||||
azis = 360.0/equator
|
||||
|
|
|
@ -1991,13 +1991,17 @@ int main(int argc, const char * argv[]) {
|
|||
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH);
|
||||
glutInitWindowSize(WIDTH, HEIGHT);
|
||||
glutCreateWindow("Interface");
|
||||
printLog( "Created Display Window.\n" );
|
||||
|
||||
#ifdef _WIN32
|
||||
glewInit();
|
||||
printLog( "Glew Init complete.\n" );
|
||||
|
||||
#endif
|
||||
|
||||
// we need to create a QApplication instance in order to use Qt's font rendering
|
||||
app = new QApplication(argc, const_cast<char**>(argv));
|
||||
printLog( "Created QT Application.\n" );
|
||||
|
||||
// Before we render anything, let's set up our viewFrustumOffsetCamera with a sufficiently large
|
||||
// field of view and near and far clip to make it interesting.
|
||||
|
@ -2005,11 +2009,9 @@ int main(int argc, const char * argv[]) {
|
|||
viewFrustumOffsetCamera.setNearClip(0.1);
|
||||
viewFrustumOffsetCamera.setFarClip(500.0*TREE_SCALE);
|
||||
|
||||
printLog( "Created Display Window.\n" );
|
||||
|
||||
|
||||
initMenu();
|
||||
initDisplay();
|
||||
printLog( "Initialized Display.\n" );
|
||||
|
||||
glutDisplayFunc(display);
|
||||
glutReshapeFunc(reshape);
|
||||
|
@ -2021,6 +2023,8 @@ int main(int argc, const char * argv[]) {
|
|||
glutPassiveMotionFunc(mouseoverFunc);
|
||||
glutMouseFunc(mouseFunc);
|
||||
glutIdleFunc(idle);
|
||||
printLog( "Initialized Display.\n" );
|
||||
|
||||
|
||||
init();
|
||||
printLog( "Init() complete.\n" );
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace starfield {
|
|||
|
||||
return false;
|
||||
}
|
||||
printLog("Stars.cpp: read %u vertices, using %lu\n", _valRecordsRead, _ptrVertices->size());
|
||||
printLog("Loaded %u stars.\n", _valRecordsRead);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -254,15 +254,13 @@ void Agent::printLog(Agent const& agent) {
|
|||
char publicAddressBuffer[16] = {'\0'};
|
||||
unsigned short publicAddressPort = loadBufferWithSocketInfo(publicAddressBuffer, agent.publicSocket);
|
||||
|
||||
char localAddressBuffer[16] = {'\0'};
|
||||
unsigned short localAddressPort = loadBufferWithSocketInfo(localAddressBuffer, agent.localSocket);
|
||||
//char localAddressBuffer[16] = {'\0'};
|
||||
//unsigned short localAddressPort = loadBufferWithSocketInfo(localAddressBuffer, agent.localSocket);
|
||||
|
||||
::printLog("ID: %d T: %s (%c) PA: %s:%d LA: %s:%d\n",
|
||||
::printLog("# %d %s (%c) @ %s:%d\n",
|
||||
agent.agentId,
|
||||
agent.getTypeName(),
|
||||
agent.type,
|
||||
publicAddressBuffer,
|
||||
publicAddressPort,
|
||||
localAddressBuffer,
|
||||
localAddressPort);
|
||||
publicAddressPort);
|
||||
}
|
|
@ -284,7 +284,7 @@ void AgentList::addAgentToList(Agent* newAgent) {
|
|||
|
||||
++_numAgents;
|
||||
|
||||
printLog("Added agent - ");
|
||||
printLog("Added ");
|
||||
Agent::printLog(*newAgent);
|
||||
}
|
||||
|
||||
|
@ -377,7 +377,7 @@ void *removeSilentAgents(void *args) {
|
|||
if ((checkTimeUSecs - agent->getLastHeardMicrostamp()) > AGENT_SILENCE_THRESHOLD_USECS
|
||||
&& agent->getType() != AGENT_TYPE_VOXEL) {
|
||||
|
||||
printLog("Killing agent - ");
|
||||
printLog("Killed ");
|
||||
Agent::printLog(*agent);
|
||||
|
||||
agent->setAlive(false);
|
||||
|
@ -416,12 +416,12 @@ void *checkInWithDomainServer(void *args) {
|
|||
sockaddr_in tempAddress;
|
||||
memcpy(&tempAddress.sin_addr, pHostInfo->h_addr_list[0], pHostInfo->h_length);
|
||||
strcpy(DOMAIN_IP, inet_ntoa(tempAddress.sin_addr));
|
||||
printLog("Domain server: %s - %s\n", DOMAIN_HOSTNAME, DOMAIN_IP);
|
||||
printLog("Domain Server: %s \n", DOMAIN_HOSTNAME);
|
||||
|
||||
} else {
|
||||
printLog("Failed lookup domainserver\n");
|
||||
}
|
||||
} else printLog("Using static domainserver IP: %s\n", DOMAIN_IP);
|
||||
} else printLog("Domain Server IP: %s\n", DOMAIN_IP);
|
||||
|
||||
AgentList* parentAgentList = (AgentList*) args;
|
||||
|
||||
|
|
|
@ -96,6 +96,7 @@ void UrlReader::getinfo(char const*& url,
|
|||
if (time > s.st_mtime) {
|
||||
// file on server is newer -> update cache file
|
||||
_ptrCacheFile = fopen(_strCacheFile, "wb");
|
||||
printf("From URL: ");
|
||||
if (_ptrCacheFile != 0l) {
|
||||
_valCacheMode = cache_write;
|
||||
}
|
||||
|
@ -108,6 +109,7 @@ void UrlReader::getinfo(char const*& url,
|
|||
}
|
||||
}
|
||||
_ptrCacheFile = fopen(_strCacheFile, "rb");
|
||||
printf("From file: ");
|
||||
if (_ptrCacheFile != 0l) {
|
||||
_valCacheMode = cache_read;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue