rpms/8Kingdoms/F-7 8Kingdoms-1.1.0-64bit.patch, NONE, 1.1 8Kingdoms-1.1.0-locking.patch, NONE, 1.1 8Kingdoms.desktop, NONE, 1.1 8Kingdoms.png, NONE, 1.1 8Kingdoms.spec, NONE, 1.1 extgl.h, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Tue Dec 11 11:49:35 UTC 2007


Author: jwrdegoede

Update of /cvs/extras/rpms/8Kingdoms/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22129

Modified Files:
	.cvsignore sources 
Added Files:
	8Kingdoms-1.1.0-64bit.patch 8Kingdoms-1.1.0-locking.patch 
	8Kingdoms.desktop 8Kingdoms.png 8Kingdoms.spec extgl.h 
Log Message:
* Sun Dec  2 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 1.1.0-2
- Replace BuildRequires expat with expat-devel (oops)
- Add a patch which stops 8Kingdoms from hanging in certain cases
- Use opengl-games-utils wrapper to show error dialog when DRI is missing


8Kingdoms-1.1.0-64bit.patch:

--- NEW FILE 8Kingdoms-1.1.0-64bit.patch ---
diff -ur 8Kingdoms-1.1.0/gui/contexts/Game.cpp 8Kingdoms-1.1.0.new/gui/contexts/Game.cpp
--- 8Kingdoms-1.1.0/gui/contexts/Game.cpp	2007-07-22 03:32:57.000000000 +0200
+++ 8Kingdoms-1.1.0.new/gui/contexts/Game.cpp	2007-11-24 22:44:14.000000000 +0100
@@ -3216,7 +3216,7 @@
         else          
           ei = GAME_EVENT(iPlayerOnTurn, eitUnitMembersDied, hid, rmtxti->getWChar(wtemp, LABEL_MAX_LENGTH, TEXT_EVENT_UNHEALEDMEN));
         ei->data1 = (void*)u;
-        ei->data2 = *((void**)&count);
+        ei->data2 = (void*)count;
       }
       else{
         u->membersDied(count);
diff -ur 8Kingdoms-1.1.0/net/netinit.cpp 8Kingdoms-1.1.0.new/net/netinit.cpp
--- 8Kingdoms-1.1.0/net/netinit.cpp	2007-07-22 03:32:59.000000000 +0200
+++ 8Kingdoms-1.1.0.new/net/netinit.cpp	2007-11-24 22:43:29.000000000 +0100
@@ -325,7 +325,7 @@
           if (freeprofilename==0) // pokud takovy profil neni uz pripojen
           {
             net_server->startPing(from);
-            KSendMessage(RQUEUE,MSG_NEW_CONNECTION_ACCEPTED,MOD_NET,MOD_NET,*((void**)(&from)));
+            KSendMessage(RQUEUE,MSG_NEW_CONNECTION_ACCEPTED,MOD_NET,MOD_NET,(void*)from);
           }
           else
           {
@@ -379,8 +379,8 @@
         int from = new_connection_info->msgFrom();
         net_server->stopAnnouncingMissingPlayers();
         net_server->startPing(from);
-        KSendMessage(RQUEUE,MSG_CLIENT_HAS_RECONNECTED,MOD_NET,BROADCAST,*((void**)(&from)));
-        KSendMessage(RQUEUE,MSG_CLIENT_RECONNECTION_ACCEPTED,MOD_NET,MOD_NET,*((void**)(&from)));
+        KSendMessage(RQUEUE,MSG_CLIENT_HAS_RECONNECTED,MOD_NET,BROADCAST,(void*)from);
+        KSendMessage(RQUEUE,MSG_CLIENT_RECONNECTION_ACCEPTED,MOD_NET,MOD_NET,(void*)from);
       }
     }
 
@@ -435,9 +435,9 @@
         net_client->addClientInfo(ni);
       }
       if (msgId==MSG_CLIENT_RECONNECTION_INFO)
-        KSendMessage(RQUEUE,MSG_CLIENT_RECONNECTION_REPORT,MOD_NET,BROADCAST,*((void**)(&(ni->clientid)))); 
+        KSendMessage(RQUEUE,MSG_CLIENT_RECONNECTION_REPORT,MOD_NET,BROADCAST,(void*)(ni->clientid)); 
       else
-        KSendMessage(RQUEUE,MSG_NEW_CONNECTION_REPORT,MOD_NET,BROADCAST,*((void**)(&(ni->clientid)))); 
+        KSendMessage(RQUEUE,MSG_NEW_CONNECTION_REPORT,MOD_NET,BROADCAST,(void*)(ni->clientid)); 
 
       delete(new_connetion_info);
       KMemFree(ni);
@@ -489,7 +489,7 @@
       {
         net_client->removeClientInfo(who);
       }
-      KSendMessage(RQUEUE,MSG_CLIENT_DISCONNECTION_REPORT,MOD_NET,BROADCAST,*((void**)(&who))); 
+      KSendMessage(RQUEUE,MSG_CLIENT_DISCONNECTION_REPORT,MOD_NET,BROADCAST,(void*)who); 
       delete(message);
     }
     break;
diff -ur 8Kingdoms-1.1.0/net/server.cpp 8Kingdoms-1.1.0.new/net/server.cpp
--- 8Kingdoms-1.1.0/net/server.cpp	2007-07-22 03:32:59.000000000 +0200
+++ 8Kingdoms-1.1.0.new/net/server.cpp	2007-11-24 22:42:03.000000000 +0100
@@ -259,7 +259,7 @@
 
     // In case in profile is set to announce and is not currently announcing
 
-    KSendMessage(RQUEUE,MSG_CLIENT_DISCONNECTION_ACCEPTED,MOD_NET,MOD_NET,*((void**)(&id)));
+    KSendMessage(RQUEUE,MSG_CLIENT_DISCONNECTION_ACCEPTED,MOD_NET,MOD_NET,(void*)id);
   }
   else
   {
@@ -345,7 +345,7 @@
 //                  printf("Socket se zavrel - klient %i\n",i);
                   if (that->status!=STATUS_ENDING) 
                   {
-                    KSendMessage(RQUEUE,MSG_CLIENT_HAS_DISCONNECTED,MOD_NET,BROADCAST,*((void**)(&i)));
+                    KSendMessage(RQUEUE,MSG_CLIENT_HAS_DISCONNECTED,MOD_NET,BROADCAST,(void*)i);
                     that->clientDisconnected(i);
                   }
                 }
@@ -655,8 +655,8 @@
       GLOBALLOGID(PRIORITY_NEW_CONNECTION, "Server - A local client having id %i has connected, free space: %i",(*client)->clientid,this->getFreeClientCount());
 //      printf("\nKlient se pripojil id %i, port %i, volne: %i",(*client)->clientid,(*client)->fd,this->getFreeClientCount()); 
 
-      KSendMessage(RQUEUE,MSG_LOCAL_CLIENT_ADDED,MOD_NET,MOD_NET,*((void**)(&((*client)->clientid))));
-      KSendMessage(RQUEUE,MSG_NEW_CONNECTION_ACCEPTED,MOD_NET,MOD_NET,*((void**)(&((*client)->clientid))));
+      KSendMessage(RQUEUE,MSG_LOCAL_CLIENT_ADDED,MOD_NET,MOD_NET,(void*)((*client)->clientid));
+      KSendMessage(RQUEUE,MSG_NEW_CONNECTION_ACCEPTED,MOD_NET,MOD_NET,(void*)((*client)->clientid));
 
       this->unlock();
       return 1;
@@ -1223,7 +1223,7 @@
           {
             that->unlock();
             if (that->status!=STATUS_ENDING) 
-              KSendMessage(RQUEUE,MSG_CLIENT_HAS_DISCONNECTED,MOD_NET,BROADCAST,*((void**)(&i)));
+              KSendMessage(RQUEUE,MSG_CLIENT_HAS_DISCONNECTED,MOD_NET,BROADCAST,(void*)i);
             else
               return 0;
             that->lock();
diff -ur 8Kingdoms-1.1.0/world/world_server.cpp 8Kingdoms-1.1.0.new/world/world_server.cpp
--- 8Kingdoms-1.1.0/world/world_server.cpp	2007-07-22 03:33:12.000000000 +0200
+++ 8Kingdoms-1.1.0.new/world/world_server.cpp	2007-11-24 22:45:14.000000000 +0100
@@ -2032,7 +2032,7 @@
 
               for (int i = 0; i < MAX_PLAYERS; i++)
               {
-                if (game_start_disconnections[i] == ((int) p)) 
+                if (game_start_disconnections[i] == ((long) p))
                 {
                   game_start_disconnections[i] = 0;
                   break;
@@ -2043,7 +2043,7 @@
             else if (world_server->state == WSS_GAME_STARTED) 
             {
               // Hra jiz bezi, tedy doslo k znovu pripojeni    
-              int client_id = (int)p;
+              int client_id = (long)p;
               for (TPlayerIterator it = world_server->world.players.begin(); it != world_server->world.players.end(); it++) 
               {
                 int temp=it->second->data().client_data.oldclient_id;
@@ -2099,7 +2099,7 @@
               // Az skonci nahravani hry, odpojeni klienta se vyresi dodatecne
               for (int i = 0; i < MAX_PLAYERS; i++) 
                 if (game_start_disconnections[i] == 0) 
-                  game_start_disconnections[i] = (int)p;
+                  game_start_disconnections[i] = (long)p;
               break;
             }
             else if (world_server->state < WSS_GAME_STARTED) {
@@ -2110,7 +2110,7 @@
             }
             else if (world_server->state == WSS_GAME_STARTED) {
               // Hra jiz bezi    
-              int client_id = (int)p;
+              int client_id = (long)p;
               for (TPlayerIterator it = world_server->world.players.begin(); it != world_server->world.players.end(); it++) {
                 if (it->second->data().client_data.client_id == client_id) {
                   // odpojil se hrac it->first
diff -up 8Kingdoms-1.1.0/net/server.cpp~ 8Kingdoms-1.1.0/net/server.cpp
--- 8Kingdoms-1.1.0/net/server.cpp~	2007-11-24 22:57:18.000000000 +0100
+++ 8Kingdoms-1.1.0/net/server.cpp	2007-11-24 22:57:18.000000000 +0100
@@ -415,7 +415,7 @@ int accept_thread(void * data)
   #ifdef WIN32 
     int sin_size = sizeof(struct sockaddr_in); // Windows chteji do accept int
   #else
-    size_t sin_size = sizeof(struct sockaddr_in);
+    socklen_t sin_size = sizeof(struct sockaddr_in);
   #endif
 
     int s;

8Kingdoms-1.1.0-locking.patch:

--- NEW FILE 8Kingdoms-1.1.0-locking.patch ---
diff -up 8Kingdoms-1.1.0/world/world_engine.cpp~ 8Kingdoms-1.1.0/world/world_engine.cpp
--- 8Kingdoms-1.1.0/world/world_engine.cpp~	2007-12-02 12:43:53.000000000 +0100
+++ 8Kingdoms-1.1.0/world/world_engine.cpp	2007-12-02 12:43:53.000000000 +0100
@@ -1214,7 +1214,10 @@ int TWorldServerEngine::unitMove(int uni
   }
 
   if (!can_move)
+  {
+    unlock();
     return ERR_NotOperational;   
+  }
 
   TPacket_RCT_UNIT_MOVE * packet = new TPacket_RCT_UNIT_MOVE();
   packet->unit_id = unit_id;
diff -up 8Kingdoms-1.1.0/world/world_client.cpp~ 8Kingdoms-1.1.0/world/world_client.cpp
--- 8Kingdoms-1.1.0/world/world_client.cpp~	2007-12-02 12:09:28.000000000 +0100
+++ 8Kingdoms-1.1.0/world/world_client.cpp	2007-12-02 12:09:28.000000000 +0100
@@ -321,6 +321,7 @@ RVAL WORLD_CLIENT_MSG_HANDLER(MESSAGE_ID
                   
                   if (world_client[i]->state == WCS_GAME_ENDED && action_type == AT_ENDGAME) {
                     // zprava o ukonceni hry pro jiz ukoncenou hru - ignoruji
+                    world_client_mutex.unlock();
                     break;
                   } 
                   else if (!(((action_type == AT_GAME_START) && (world_client[i]->state >= WCS_WORLD_INITIALIZED) && (world_client[i]->state < WCS_GAME_STARTED))
@@ -328,6 +329,7 @@ RVAL WORLD_CLIENT_MSG_HANDLER(MESSAGE_ID
                     (world_client[i]->state == WCS_GAME_STARTED)
                     )) {
                     // zprava prisla v nevhodnou chvili - ignoruji
+                    world_client_mutex.unlock();
                     break;
                   }                  
                   


--- NEW FILE 8Kingdoms.desktop ---
[Desktop Entry]
Name=8 Kingdoms
Comment=A 3D turn-based fantasy strategic game
Exec=8Kingdoms-wrapper
Icon=8Kingdoms
Type=Application
Categories=Game;StrategyGame;


--- NEW FILE 8Kingdoms.spec ---
# Copyright (c) 2007 oc2pus <toni at links2linux.de>
# Copyright (c) 2007 Hans de Goede <j.w.r.degoede at hhs.nl>
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.

Name:           8Kingdoms
Version:        1.1.0
Release:        2%{?dist}
Summary:        8 Kingdoms is a 3D turn-based fantasy strategic game
Group:          Amusements/Games
License:        GPL+
URL:            http://kralovstvi.sourceforge.net/
# This is:
# http://downloads.sourceforge.net/kralovstvi/%{name}-%{version}.tar.gz
# With external/extgl.h removed, as that contains parts of Windows gl.h and
# parts of a version of glext.h which falls under the "SGI Free Software
# License B", neither which are Free software.
Source0:        %{name}-%{version}.tar.gz
# This is a Free replacement file with the troublesome parts replaced with
# parts from Mesa's gl.h and from The Kronos Group glext.h .
Source1:        extgl.h
Source2:        %{name}.desktop
Source3:        %{name}.png
Patch0:         8Kingdoms-1.1.0-64bit.patch
Patch1:         8Kingdoms-1.1.0-locking.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  expat-devel SDL_mixer-devel tcl-devel desktop-file-utils
Requires:       hicolor-icon-theme opengl-games-utils

%description
8 Kingdoms is a 3D turn-based fantasy strategic game in which
players become kings, build their empires and conquer enemy
kingdoms.

Theme of the game 8 Kingdoms is inspirated by the world of fantasy.
Players play on a fully 3D hex map. They construct buildings,
recruit units including infantry, mounted units, mages, catapults
and finally they attack enemy or help allies. Units gain experiences
during the battle, each unit can get some abilities upgraded to be
stronger. Data are stored in XML and freely accessible - from
language versions to units' attributes, moreover map editor with
random map generator is included for comfortable map editing.


%prep
%setup -q
%patch0 -p1
%patch1 -p1
cp -a %{SOURCE1} external
chmod -x doc/gui/gui_img1.png
# configure won't recognize --datadir ...
sed -i 's|games/8Kingdoms|share/8Kingdoms|g' configure


%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
# And here we must explicitly set pkgdatadir despite our earlier sed!
make install DESTDIR=$RPM_BUILD_ROOT pkgdatadir=%{_datadir}/%{name}
ln -s opengl-game-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/%{name}-wrapper

# below is the desktop file and icon stuff.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  %{SOURCE2}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/96x96/apps
install -p -m 644 %{SOURCE3} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/96x96/apps


%clean
rm -rf $RPM_BUILD_ROOT


%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi


%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING README doc/*
%{_bindir}/%{name}*
%{_datadir}/%{name}
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/96x96/apps/%{name}.png


%changelog
* Sun Dec  2 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 1.1.0-2
- Replace BuildRequires expat with expat-devel (oops)
- Add a patch which stops 8Kingdoms from hanging in certain cases
- Use opengl-games-utils wrapper to show error dialog when DRI is missing

* Sat Nov 24 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 1.1.0-1
- Adapted Packman specfile for Fedora

* Fri Aug 10 2007 Toni Graffy <toni at links2linux.de> - 1.1.0-0.pm.1
- initial build 1.1.0


--- NEW FILE extgl.h ---
/*  Most parts copyright (c) 2001-2002 Lev Povalahev under this lisence: */

/* ----------------------------------------------------------------------------
Copyright (c) 2002, Lev Povalahev
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, 
are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice, 
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice, 
      this list of conditions and the following disclaimer in the documentation 
      and/or other materials provided with the distribution.
    * The name of the author may not be used to endorse or promote products 
      derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
THE POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------*/
/*
    GL_draw_range_elements support added by Benjamin Karaban
  
    Lev Povalahev contact information:
    
    levp at gmx.net

    http://www.levp.de/3d/
*/
/* These extensions are supported:                
GL_ARB_depth_texture
GL_ARB_fragment_program
GL_ARB_imaging
GL_ARB_matrix_palette
GL_ARB_multisample
GL_ARB_multitexture
GL_ARB_point_parameters
GL_ARB_shadow
GL_ARB_shadow_ambient
GL_ARB_texture_compression
GL_ARB_texture_env_add
GL_ARB_texture_env_dot3
GL_ARB_texture_env_combine
GL_ARB_texture_env_crossbar
GL_ARB_texture_border_clamp
GL_ARB_texture_cube_map
GL_ARB_texture_mirrored_repeat
GL_ARB_transpose_matrix
GL_ARB_vertex_blend
GL_ARB_vertex_buffer_object
GL_ARB_vertex_program
GL_ARB_window_pos
GL_EXT_abgr
GL_EXT_bgra
GL_EXT_blend_color
GL_EXT_blend_func_separate
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_compiled_vertex_array
GL_EXT_cull_vertex
GL_EXT_depth_bounds_test
GL_EXT_draw_range_elements
GL_EXT_fog_coord
GL_EXT_multi_draw_arrays
GL_EXT_point_parameters
GL_EXT_secondary_color  
GL_EXT_separate_specular_color
GL_EXT_shadow_funcs
GL_EXT_stencil_two_side
GL_EXT_stencil_wrap
GL_EXT_texture_compression_s3tc
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_lod_bias
GL_EXT_texture_rectangle
GL_EXT_vertex_shader
GL_EXT_vertex_weighting
GL_ATI_draw_buffers
GL_ATI_element_array
GL_ATI_envmap_bumpmap
GL_ATI_fragment_shader
GL_ATI_map_object_buffer
GL_ATI_pn_triangles
GL_ATI_separate_stencil
GL_ATI_text_fragment_shader
GL_ATI_texture_env_combine3
GL_ATI_texture_float
GL_ATI_texture_mirror_once
GL_ATI_vertex_array_object;
GL_ATI_vertex_attrib_array_object
GL_ATI_vertex_streams
GL_ATIX_point_sprites
GL_ATIX_texture_env_route
GL_HP_occlusion_test
GL_NV_blend_square
GL_NV_copy_depth_to_color
GL_NV_depth_clamp
GL_NV_element_array
GL_NV_evaluators
GL_NV_fence
GL_NV_float_buffer
GL_NV_fog_distance
GL_NV_fragment_program
GL_NV_half_float
GL_NV_light_max_exponent
GL_NV_occlusion_query
GL_NV_packed_depth_stencil
GL_NV_pixel_data_range
GL_NV_point_sprite
GL_NV_primitive_restart
GL_NV_register_combiners
GL_NV_register_combiners2
GL_NV_texgen_reflection
GL_NV_texture_env_combine4
GL_NV_texture_expand_normal
GL_NV_texture_rectangle
GL_NV_texture_shader
GL_NV_texture_shader2
GL_NV_texture_shader3
GL_NV_vertex_array_range
GL_NV_vertex_array_range2
GL_NV_vertex_program
GL_NV_vertex_program1_1
GL_NV_vertex_program2
GL_SGIS_generate_mipmap
GL_SGIX_shadow
GL_SGIX_depth_texture
WGL_ARB_buffer_region
WGL_ARB_extensions_string
WGL_ARB_make_current_read;
WGL_ARB_multisample
WGL_ARB_pbuffer
WGL_ARB_pixel_format
WGL_ARB_render_texture 
WGL_ATI_pixel_format_float
WGL_EXT_extensions_string
WGL_EXT_swap_control
WGL_NV_render_depth_texture
WGL_NV_render_texture_rectangle
*/

/* VERSION 1.04 */

/*
CHANGES

08.06.03 Added GL_EXT_depth_bounds_test

01.06.03 Added GL_EXT_texture_rectangle

13.04.03 Fixed a typo in ARBvbo

24.03.03 I'm starting version numbering and protocolling the changes here from this release on. 
This version will be 1.01. The additions in this version will be 
ARB_vertex_buffer_object and hopefully cygwin support. Fixed a typo in a license.
*/
#ifndef __EXTGL_H__
#define __EXTGL_H__

/*-----------------------------------------*/

#ifdef __gl_h_
#error extgl.h should be included before gl.h
#endif
#ifdef __GL_H_
#error extgl.h should be included before gl.h
#endif

#define __glext_h_
#define __GLEXT_H_

#define __gl_h_
#define __GL_H__

#ifndef APIENTRY
#define APIENTRY
#endif

#define GLAPI extern
#define GLAPIENTRY __stdcall

#ifdef __cplusplus
extern "C" {
#endif

/* stuff for NV_half_float extension (datatype and conversion functions) 
   I hope this type will be reused for other 2 byte float extensions */

union ieee_half /* ieee-like 16 bit float */ 
{
    unsigned short bits;
    struct 
[...5552 lines suppressed...]
#define WGL_TEXTURE_DEPTH_COMPONENT_NV                          0x20A6
#define WGL_NO_TEXTURE_ARB                                      0x2077
#define WGL_DEPTH_COMPONENT_NV                                  0x20A7

#endif /* WGL_NV_render_depth_texture */

/*-------------------------------------------------------------------*/
/*------------WGL_NV_RENDER_TEXTURE_RECTANGLE-----------------------*/
/*-------------------------------------------------------------------*/

#ifndef WGL_NV_render_texture_rectangle 
#define WGL_NV_render_texture_rectangle 1

#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV                    0x20A0
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV                   0x20A1
#define WGL_TEXTURE_RECTANGLE_NV                                0x20A2

#endif /* WGL_NV_render_texture_rectangle */

/*-------------------------------------------------------------------*/
/*------------WGL_ATI_PIXEL_FORMAT_FLOAT-----------------------------*/
/*-------------------------------------------------------------------*/

#ifndef WGL_ATI_pixel_format_float
#define WGL_ATI_pixel_format_float 1

#define GL_RGBA_FLOAT_MODE_ATI                                  0x8820
#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI                      0x8835
#define WGL_TYPE_RGBA_FLOAT_ATI                                 0x21A0

#endif /* WGL_ATI_pixel_format_float */

/*-------------------------------------------------------------------*/
/*------------END WGL EXTENSIONS-------------------------------------*/
/*-------------------------------------------------------------------*/

#endif /* WIN32 */

/* helper stuff */

/* I use int here because C does not know bool */

#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)

struct WGLExtensionTypes
{
    int ARB_buffer_region;
    int ARB_extensions_string;
    int ARB_make_current_read;
    int ARB_multisample;
    int ARB_pbuffer;
    int ARB_pixel_format;
    int ARB_render_texture;
    int ATI_pixel_format_float;
    int EXT_extensions_string;
    int EXT_swap_control;
    int NV_render_depth_texture;
    int NV_render_texture_rectangle;
};

#else /* No WIN32 */

struct GLXExtensionTypes
{

};

#endif /* WIN32 */

struct ExtensionTypes
{
#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) /* WGL extensions */   
    struct WGLExtensionTypes wgl;
#else /* no WIN32 */
/*    struct GLXExtensionTypes glx;*/
#endif /* WIN32 */
    int ARB_imaging;
    int ARB_depth_texture;
    int ARB_fragment_program;
    int ARB_matrix_palette;
    int ARB_multisample;
    int ARB_multitexture;
    int ARB_point_parameters;
    int ARB_shadow;
    int ARB_shadow_ambient;
    int ARB_texture_border_clamp;
    int ARB_texture_compression;
    int ARB_texture_cube_map;
    int ARB_texture_env_add;
    int ARB_texture_env_dot3;
    int ARB_texture_env_combine;
    int ARB_texture_env_crossbar;
    int ARB_texture_mirrored_repeat;
    int ARB_transpose_matrix;
    int ARB_vertex_blend;
    int ARB_vertex_buffer_object;
    int ARB_vertex_program;
    int ARB_window_pos;
    int EXT_abgr;
    int EXT_bgra;
    int EXT_blend_color;
    int EXT_blend_func_separate;
    int EXT_blend_minmax;
    int EXT_blend_subtract;
    int EXT_compiled_vertex_array;
    int EXT_cull_vertex;
    int EXT_depth_bounds_test;
    int EXT_draw_range_elements;
    int EXT_fog_coord;
    int EXT_multi_draw_arrays;
    int EXT_point_parameters;
    int EXT_secondary_color;
    int EXT_separate_specular_color;
    int EXT_shadow_funcs;
    int EXT_stencil_two_side;
    int EXT_stencil_wrap;
    int EXT_texture_compression_s3tc;
    int EXT_texture_env_combine;
    int EXT_texture_filter_anisotropic;
    int EXT_texture_lod_bias;
    int EXT_texture_rectangle;
    int EXT_vertex_shader;
    int EXT_vertex_weighting;
    int ATI_draw_buffers;
    int ATI_element_array;
    int ATI_envmap_bumpmap;
    int ATI_fragment_shader;
    int ATI_map_object_buffer;
    int ATI_pn_triangles;
    int ATI_point_cull_mode;
    int ATI_separate_stencil;
    int ATI_text_fragment_shader;
    int ATI_texture_env_combine3;
    int ATI_texture_float;
    int ATI_texture_mirror_once;
    int ATI_vertex_array_object;
    int ATI_vertex_attrib_array_object;
    int ATI_vertex_streams;
    int ATIX_point_sprites;
    int ATIX_texture_env_route;
    int HP_occlusion_test;
    int NV_blend_square;
    int NV_copy_depth_to_color;
    int NV_depth_clamp;
    int NV_element_array;
    int NV_evaluators;
    int NV_fence;
    int NV_float_buffer;
    int NV_fog_distance;
    int NV_fragment_program;
    int NV_half_float;
    int NV_light_max_exponent;
    int NV_occlusion_query;
    int NV_packed_depth_stencil;
    int NV_pixel_data_range;
    int NV_point_sprite;
    int NV_primitive_restart;
    int NV_register_combiners;
    int NV_register_combiners2;
    int NV_texgen_reflection;
    int NV_texture_env_combine4;
    int NV_texture_expand_normal;
    int NV_texture_rectangle;
    int NV_texture_shader;
    int NV_texture_shader2;
    int NV_texture_shader3;
    int NV_vertex_array_range;
    int NV_vertex_array_range2;
    int NV_vertex_program;
    int NV_vertex_program1_1;
    int NV_vertex_program2;
    int SGIS_generate_mipmap;
    int SGIS_texture_lod;
    int SGIX_shadow;
    int SGIX_depth_texture;
    int OpenGL12;
    int OpenGL13;
    int OpenGL14;
};

extern struct ExtensionTypes extgl_Extensions;

extern struct ExtensionTypes SupportedExtensions; /* deprecated, please do not use */

/* initializes everything, call this right after the rc is created. the function returns 0 if successful */
int extgl_Initialize();

/* returns true if a given extension is supported by extgl - if an extension is supported by the ogl driver
but is not supported by extgl this will return false */
int extgl_ExtensionSupported(const char *name);

int glInitialize(); /* deprecated, please do not use */



#ifdef __cplusplus
}
#endif

#endif /* __EXTGL_H__ */


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/8Kingdoms/F-7/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	4 Dec 2007 20:02:53 -0000	1.1
+++ .cvsignore	11 Dec 2007 11:48:58 -0000	1.2
@@ -0,0 +1 @@
+8Kingdoms-1.1.0.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/8Kingdoms/F-7/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	4 Dec 2007 20:02:53 -0000	1.1
+++ sources	11 Dec 2007 11:48:58 -0000	1.2
@@ -0,0 +1 @@
+bf70d7d21281852250116ab6894a3c33  8Kingdoms-1.1.0.tar.gz




More information about the fedora-extras-commits mailing list