Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2003:
[Freeciv-Dev] client programming problems
Home

[Freeciv-Dev] client programming problems

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] client programming problems
From: Lukas Tönne <lukas.toenne@xxxxxx>
Date: Thu, 28 Aug 2003 13:36:18 +0200
Reply-to: lukas.toenne@xxxxxx

I have started trying to program an OpenGL client, but since my programming 
knowledge is concentrated on C++ i have some annoying problems now:

1) 
Can someone tell me how to link the OpenGL library files using the configure 
script and makefiles ? i have mostly used programming environments like 
kdevelop until now for doing such things, so i don't know how to link those 
libraries manually. I tried modifying the SDL client stuff, but i don't 
really understand that scripting language.

2)
When compiling the following code (and similar things) with the first "if" 
expression included, i get a "parse error before struct" in the line just 
below. Return values have no meaning yet and i also tried using "NULL" 
instead of "0" for pointer testing. Isn't there some sort of "assert" 
function for such stuff ?


int gui_widget_run(struct gui_widget *modal_widget)
{
// no idea why this doesn't work !  :(
//  if (modal_widget == 0) {
//    return 0;
//  }

  // find the root widget for painting the whole gui tree
  struct gui_widget *root_widget = modal_widget;
  while (root_widget->parent != 0) {
    root_widget = root_widget->parent;
  }
  // run the event loop without blocking up the CPU
  while (!modal_widget->quit) {
    SDL_Delay(10);
    gui_widget_paint(root_widget);
  }
  return 0;
}


If someone is working on client code such as this, please tell me. I would be 
glad about any help  :-)  !



[Prev in Thread] Current Thread [Next in Thread]