You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(187) |
Dec
(318) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(268) |
Feb
(231) |
Mar
(251) |
Apr
(372) |
May
(258) |
Jun
(197) |
Jul
(85) |
Aug
(175) |
Sep
(77) |
Oct
(213) |
Nov
(108) |
Dec
(53) |
| 2002 |
Jan
(38) |
Feb
(50) |
Mar
(32) |
Apr
(30) |
May
(34) |
Jun
(24) |
Jul
(42) |
Aug
(29) |
Sep
(58) |
Oct
(57) |
Nov
(73) |
Dec
(51) |
| 2003 |
Jan
(98) |
Feb
(64) |
Mar
(39) |
Apr
(38) |
May
(67) |
Jun
(39) |
Jul
(80) |
Aug
(21) |
Sep
(82) |
Oct
(85) |
Nov
(48) |
Dec
(30) |
| 2004 |
Jan
(29) |
Feb
(82) |
Mar
(43) |
Apr
(54) |
May
(60) |
Jun
(41) |
Jul
(23) |
Aug
(35) |
Sep
(55) |
Oct
(53) |
Nov
(18) |
Dec
(22) |
| 2005 |
Jan
(49) |
Feb
(28) |
Mar
(112) |
Apr
(60) |
May
(120) |
Jun
(67) |
Jul
(129) |
Aug
(67) |
Sep
(173) |
Oct
(221) |
Nov
(126) |
Dec
(198) |
| 2006 |
Jan
(172) |
Feb
(141) |
Mar
(54) |
Apr
(15) |
May
(60) |
Jun
(50) |
Jul
(79) |
Aug
(118) |
Sep
(114) |
Oct
(78) |
Nov
(56) |
Dec
(106) |
| 2007 |
Jan
(80) |
Feb
(268) |
Mar
(238) |
Apr
(222) |
May
(198) |
Jun
(178) |
Jul
(114) |
Aug
(234) |
Sep
(202) |
Oct
(141) |
Nov
(182) |
Dec
(446) |
| 2008 |
Jan
(260) |
Feb
(143) |
Mar
(210) |
Apr
(158) |
May
(342) |
Jun
(195) |
Jul
(309) |
Aug
(99) |
Sep
(154) |
Oct
(279) |
Nov
(555) |
Dec
(327) |
| 2009 |
Jan
(182) |
Feb
(289) |
Mar
(30) |
Apr
(51) |
May
(59) |
Jun
(304) |
Jul
(95) |
Aug
(50) |
Sep
(16) |
Oct
(44) |
Nov
(57) |
Dec
(27) |
| 2010 |
Jan
(59) |
Feb
(178) |
Mar
(220) |
Apr
(272) |
May
(297) |
Jun
(75) |
Jul
(104) |
Aug
(157) |
Sep
(247) |
Oct
(105) |
Nov
(100) |
Dec
(75) |
| 2011 |
Jan
(61) |
Feb
(32) |
Mar
(47) |
Apr
(79) |
May
(68) |
Jun
(247) |
Jul
(174) |
Aug
(98) |
Sep
(127) |
Oct
(198) |
Nov
(627) |
Dec
(421) |
| 2012 |
Jan
(521) |
Feb
(372) |
Mar
(489) |
Apr
(256) |
May
(143) |
Jun
(132) |
Jul
(74) |
Aug
(38) |
Sep
(42) |
Oct
(18) |
Nov
(58) |
Dec
(21) |
| 2013 |
Jan
(10) |
Feb
(10) |
Mar
(68) |
Apr
(50) |
May
(33) |
Jun
(17) |
Jul
(100) |
Aug
(111) |
Sep
(107) |
Oct
(21) |
Nov
(63) |
Dec
(53) |
| 2014 |
Jan
(29) |
Feb
(20) |
Mar
(39) |
Apr
(86) |
May
(122) |
Jun
(87) |
Jul
(7) |
Aug
(35) |
Sep
(40) |
Oct
(39) |
Nov
(21) |
Dec
(18) |
| 2015 |
Jan
(6) |
Feb
(56) |
Mar
(67) |
Apr
(24) |
May
(86) |
Jun
(5) |
Jul
(2) |
Aug
(17) |
Sep
(2) |
Oct
(14) |
Nov
(80) |
Dec
(97) |
| 2016 |
Jan
(9) |
Feb
(14) |
Mar
(3) |
Apr
(2) |
May
(45) |
Jun
(9) |
Jul
(5) |
Aug
(21) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(2) |
| 2017 |
Jan
(9) |
Feb
|
Mar
(7) |
Apr
|
May
(24) |
Jun
(35) |
Jul
(60) |
Aug
(44) |
Sep
(22) |
Oct
(1) |
Nov
(2) |
Dec
(2) |
| 2018 |
Jan
(21) |
Feb
(6) |
Mar
(1) |
Apr
(1) |
May
(11) |
Jun
(2) |
Jul
(1) |
Aug
(5) |
Sep
(11) |
Oct
(15) |
Nov
(4) |
Dec
(55) |
| 2019 |
Jan
(41) |
Feb
(9) |
Mar
(23) |
Apr
(25) |
May
(55) |
Jun
(82) |
Jul
(19) |
Aug
(81) |
Sep
(15) |
Oct
(11) |
Nov
(12) |
Dec
(37) |
| 2020 |
Jan
(11) |
Feb
(34) |
Mar
(77) |
Apr
(24) |
May
(6) |
Jun
(14) |
Jul
(4) |
Aug
(76) |
Sep
(141) |
Oct
(62) |
Nov
(46) |
Dec
(116) |
| 2021 |
Jan
(188) |
Feb
(134) |
Mar
(38) |
Apr
(55) |
May
(12) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(2) |
2
(2) |
3
(2) |
4
(1) |
5
|
|
6
(20) |
7
(2) |
8
(2) |
9
(15) |
10
(1) |
11
|
12
(1) |
|
13
(12) |
14
(6) |
15
(4) |
16
(2) |
17
(1) |
18
|
19
(3) |
|
20
(7) |
21
(9) |
22
(8) |
23
(3) |
24
(3) |
25
(1) |
26
(1) |
|
27
(1) |
28
(2) |
29
|
30
(1) |
31
|
|
|
|
From: <cro...@li...> - 2005-03-30 19:22:53
|
Module Name: maps-bigworld Committed By: akirschbaum Date: Wed Mar 30 19:22:28 UTC 2005 Modified Files: maps-bigworld/lake_country/ebony: entrance1 Log Message: Make the test for admission to the guild work again. Start of context diffs Index: maps-bigworld/lake_country/ebony/entrance1 diff -c maps-bigworld/lake_country/ebony/entrance1:1.3 maps-bigworld/lake_country/ebony/entrance1:1.4 *** maps-bigworld/lake_country/ebony/entrance1:1.3 Tue Mar 15 13:41:32 2005 --- maps-bigworld/lake_country/ebony/entrance1 Wed Mar 30 11:22:26 2005 *************** *** 1032,1043 **** arch cobblestones x 7 end - arch button_plate - connected 11 - x 7 - end arch dun2 - no_pass 0 x 7 end arch cobblestones --- 1032,1038 ---- *************** *** 1198,1210 **** arch cobblestones x 8 end ! arch spikes_open ! speed 0.500000 ! value 1 ! connected 10 ! x 8 ! end ! arch boulder x 8 end arch dun2 --- 1193,1200 ---- arch cobblestones x 8 end ! arch button_plate ! connected 11 x 8 end arch dun2 *************** *** 1397,1403 **** --- 1387,1404 ---- arch cobblestones x 9 end + arch spikes_open + speed 0.500000 + value 1 + connected 10 + x 9 + end arch dun2 + no_pass 0 + x 9 + end + arch boulder + invisible 1 x 9 end arch cobblestones |
|
From: <cro...@li...> - 2005-03-28 07:20:17
|
Module Name: crossfire
Committed By: mwedel
Date: Mon Mar 28 07:20:10 UTC 2005
Modified Files:
crossfire: ChangeLog
crossfire/socket: image.c request.c
Log Message:
socket/image.c: Change esrv_send_face to check for <=0 instead of <0 on face
number.
socket/request.c: Change if statement that acted improperly to determine when
to send faces.
MSW 2005-03-27
Start of context diffs
Index: crossfire/ChangeLog
diff -c crossfire/ChangeLog:1.266 crossfire/ChangeLog:1.267
*** crossfire/ChangeLog:1.266 Tue Mar 22 15:22:37 2005
--- crossfire/ChangeLog Sun Mar 27 23:20:07 2005
***************
*** 17,22 ****
--- 17,28 ----
------------------------------------------------------------------------------
Changes for CVS:
+ socket/image.c: Change esrv_send_face to check for <=0 instead of <0 on face
+ number.
+ socket/request.c: Change if statement that acted improperly to determine when
+ to send faces.
+ MSW 2005-03-27
+
include/sproto.h: get_who_escape_code_value is void, not void*.
server/c_misc.c: move local function outside the function.
server/c_wiz.c: remove sleep( 1 ) that would cause whole server to sleep one sec.
Index: crossfire/socket/image.c
diff -c crossfire/socket/image.c:1.6 crossfire/socket/image.c:1.7
*** crossfire/socket/image.c:1.6 Sat Mar 19 01:14:57 2005
--- crossfire/socket/image.c Sun Mar 27 23:20:10 2005
***************
*** 1,6 ****
/*
* static char *rcsid_init_c =
! * "$Id: image.c,v 1.6 2005/03/19 09:14:57 mwedel Exp $";
*/
/*
--- 1,6 ----
/*
* static char *rcsid_init_c =
! * "$Id: image.c,v 1.7 2005/03/28 07:20:10 mwedel Exp $";
*/
/*
***************
*** 327,333 ****
SockList sl;
char fallback;
! if (face_num < 0 || face_num >= nrofpixmaps) {
LOG(llevError,"esrv_send_face (%d) out of bounds??\n",face_num);
return;
}
--- 327,333 ----
SockList sl;
char fallback;
! if (face_num <= 0 || face_num >= nrofpixmaps) {
LOG(llevError,"esrv_send_face (%d) out of bounds??\n",face_num);
return;
}
Index: crossfire/socket/request.c
diff -c crossfire/socket/request.c:1.67 crossfire/socket/request.c:1.68
*** crossfire/socket/request.c:1.67 Sat Mar 19 01:14:57 2005
--- crossfire/socket/request.c Sun Mar 27 23:20:10 2005
***************
*** 1,6 ****
/*
* static char *rcsid_init_c =
! * "$Id: request.c,v 1.67 2005/03/19 09:14:57 mwedel Exp $";
*/
/*
--- 1,6 ----
/*
* static char *rcsid_init_c =
! * "$Id: request.c,v 1.68 2005/03/28 07:20:10 mwedel Exp $";
*/
/*
***************
*** 1072,1078 ****
if (face_num != ns->lastmap.cells[ax][ay].faces[layer]) {
SockList_AddShort(sl, face_num);
! if (!(face_num && ns->faces_sent[face_num] & NS_FACESENT_FACE))
esrv_send_face(ns, face_num, 0);
heads[(ay * MAX_HEAD_POS + ax) * MAX_LAYERS + layer] = NULL;
ns->lastmap.cells[ax][ay].faces[layer] = face_num;
--- 1072,1078 ----
if (face_num != ns->lastmap.cells[ax][ay].faces[layer]) {
SockList_AddShort(sl, face_num);
! if (face_num && !(ns->faces_sent[face_num] & NS_FACESENT_FACE))
esrv_send_face(ns, face_num, 0);
heads[(ay * MAX_HEAD_POS + ax) * MAX_LAYERS + layer] = NULL;
ns->lastmap.cells[ax][ay].faces[layer] = face_num;
|
|
From: <cro...@li...> - 2005-03-28 06:45:00
|
Module Name: client
Committed By: mwedel
Date: Mon Mar 28 06:44:53 UTC 2005
Modified Files:
client: ChangeLog configure configure.in
client/common: misc.c
client/gtk-v2/src: map.c
Log Message:
Various minor bugfixes:
configure.in, configure: Add warning message if we can't find gtk+ 2.0 or
later, but continue configure process instead of exiting.
common/misc.c: Fix code so that it compiles with older C compilers.
gtk-v2/src/map.c: Change code on need_recenter_map() - use MAX_MAP_OFFSET
instead of hard coded value of 2 - found a crash here when running
around the world map - could have been caused by a big image and/or
the fact my character moved 2 spaces in one tick. either way, this
change shouldn't impact things, as it is seldom the virtual map needs
to be recentered.
MSW 2005-03-27
Start of context diffs
Index: client/ChangeLog
diff -c client/ChangeLog:1.7 client/ChangeLog:1.8
*** client/ChangeLog:1.7 Sun Mar 27 12:51:23 2005
--- client/ChangeLog Sun Mar 27 22:44:51 2005
***************
*** 1,8 ****
! "$Id: ChangeLog,v 1.7 2005/03/27 20:51:23 akirschbaum Exp $"
Top of CVS tree:
------------------------------------------------------------------------------
This patch fixes a few memory leaks related to image caching in all clients.
common/image.c: Declare facetoname[] as static. Add all code accessing this
array. Print warning if image cannot be created.
--- 1,20 ----
! "$Id: ChangeLog,v 1.8 2005/03/28 06:44:51 mwedel Exp $"
Top of CVS tree:
------------------------------------------------------------------------------
+ Various minor bugfixes:
+ configure.in, configure: Add warning message if we can't find gtk+ 2.0 or
+ later, but continue configure process instead of exiting.
+ common/misc.c: Fix code so that it compiles with older C compilers.
+ gtk-v2/src/map.c: Change code on need_recenter_map() - use MAX_MAP_OFFSET
+ instead of hard coded value of 2 - found a crash here when running
+ around the world map - could have been caused by a big image and/or
+ the fact my character moved 2 spaces in one tick. either way, this
+ change shouldn't impact things, as it is seldom the virtual map needs
+ to be recentered.
+ MSW 2005-03-27
+
This patch fixes a few memory leaks related to image caching in all clients.
common/image.c: Declare facetoname[] as static. Add all code accessing this
array. Print warning if image cannot be created.
Index: client/configure
diff -c client/configure:1.50 client/configure:1.51
*** client/configure:1.50 Mon Mar 21 23:22:54 2005
--- client/configure Sun Mar 27 22:44:51 2005
***************
*** 2227,2233 ****
## If we have a custom action on failure, don't print errors, but
## do set a variable so people can do so.
PACKAGE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$pkg_modules"`
! echo $PACKAGE_PKG_ERRORS
fi
--- 2227,2233 ----
## If we have a custom action on failure, don't print errors, but
## do set a variable so people can do so.
PACKAGE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$pkg_modules"`
!
fi
***************
*** 2239,2249 ****
fi
if test $succeeded = yes; then
! :
else
! { { echo "$as_me:$LINENO: error: Library requirements ($pkg_modules) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
! echo "$as_me: error: Library requirements ($pkg_modules) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
! { (exit 1); exit 1; }; }
fi
--- 2239,2248 ----
fi
if test $succeeded = yes; then
! CF_SUBDIRS="$CF_SUBDIRS gtk-v2"
else
! { echo "$as_me:$LINENO: WARNING: GTK v2 libraries not found - will not build gtkv2 client" >&5
! echo "$as_me: WARNING: GTK v2 libraries not found - will not build gtkv2 client" >&2;}
fi
***************
*** 2273,2279 ****
- CF_SUBDIRS="$CF_SUBDIRS gtk-v2"
DEPDIR="${am__leading_dot}deps"
--- 2272,2277 ----
Index: client/configure.in
diff -c client/configure.in:1.49 client/configure.in:1.50
*** client/configure.in:1.49 Mon Mar 21 23:22:57 2005
--- client/configure.in Sun Mar 27 22:44:52 2005
***************
*** 32,43 ****
dnl for gtk-v2 client
pkg_modules="gtk+-2.0 >= 2.0.0"
! PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
AM_MAINTAINER_MODE
AC_SUBST(PACKAGE_LIBS)
AC_SUBST(INTLLIBS)
- CF_SUBDIRS="$CF_SUBDIRS gtk-v2"
AC_CHECK_LIB(glut, main, OPENGL_LIBS="-lglut")
AC_SUBST(OPENGL_LIBS)
--- 32,43 ----
dnl for gtk-v2 client
pkg_modules="gtk+-2.0 >= 2.0.0"
! PKG_CHECK_MODULES(PACKAGE, [$pkg_modules], CF_SUBDIRS="$CF_SUBDIRS gtk-v2",
! AC_MSG_WARN(GTK v2 libraries not found - will not build gtkv2 client) )
AM_MAINTAINER_MODE
AC_SUBST(PACKAGE_LIBS)
AC_SUBST(INTLLIBS)
AC_CHECK_LIB(glut, main, OPENGL_LIBS="-lglut")
AC_SUBST(OPENGL_LIBS)
Index: client/common/misc.c
diff -c client/common/misc.c:1.9 client/common/misc.c:1.10
*** client/common/misc.c:1.9 Sat Feb 5 15:31:31 2005
--- client/common/misc.c Sun Mar 27 22:44:53 2005
***************
*** 1,5 ****
char *rcsid_common_misc_c =
! "$Id: misc.c,v 1.9 2005/02/05 23:31:31 ryo_saeba Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_common_misc_c =
! "$Id: misc.c,v 1.10 2005/03/28 06:44:53 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 24,30 ****
/*
* static char *rcsid_misc_c =
! * "$Id: misc.c,v 1.9 2005/02/05 23:31:31 ryo_saeba Exp $";
*/
--- 24,30 ----
/*
* static char *rcsid_misc_c =
! * "$Id: misc.c,v 1.10 2005/03/28 06:44:53 mwedel Exp $";
*/
***************
*** 241,249 ****
if (!cp)
return; /*no child to monitor*/
if (waitpid(cp->pid,NULL,WNOHANG)){
/*pid is dead*/
LOG(LOG_INFO,"common::monitorChilds","Child %s died. Removing and closing pipes",cp->name?cp->name:"UNKNOWN");
- ChildProcess* next;
if (cp==LastChild)
LastChild=last;
next=cp->next;
--- 241,250 ----
if (!cp)
return; /*no child to monitor*/
if (waitpid(cp->pid,NULL,WNOHANG)){
+ ChildProcess* next;
+
/*pid is dead*/
LOG(LOG_INFO,"common::monitorChilds","Child %s died. Removing and closing pipes",cp->name?cp->name:"UNKNOWN");
if (cp==LastChild)
LastChild=last;
next=cp->next;
Index: client/gtk-v2/src/map.c
diff -c client/gtk-v2/src/map.c:1.5 client/gtk-v2/src/map.c:1.6
*** client/gtk-v2/src/map.c:1.5 Sat Mar 26 11:19:13 2005
--- client/gtk-v2/src/map.c Sun Mar 27 22:44:53 2005
***************
*** 1,5 ****
char *rcsid_gtk2_map_c =
! "$Id: map.c,v 1.5 2005/03/26 19:19:13 akirschbaum Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_gtk2_map_c =
! "$Id: map.c,v 1.6 2005/03/28 06:44:53 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 297,313 ****
/*
* Returns true if virtual view is about to butt up against
* the side of the virtual map on the next scroll
! * Add 2 as a fudge factor - in this way, code that checks
! * within the displayable area but +/-1 of the edges will
! * still process data within bounds.
*/
static int need_recenter_map( int dx, int dy)
{
! if( pl_pos.x + dx + use_config[CONFIG_MAPWIDTH] +2 >= the_map.x ||
! pl_pos.y + dy + use_config[CONFIG_MAPHEIGHT] +2 >= the_map.y ||
! pl_pos.x + dx -2 <= 0 ||
! pl_pos.y + dy -2 <= 0 )
{
return TRUE;
}
--- 297,314 ----
/*
* Returns true if virtual view is about to butt up against
* the side of the virtual map on the next scroll
! * Add 5 as a fudge factor - two wasn't enough - faster
! * players could hop two spaces in one tick, which would
! * cause problems here. 5 gives a decent buffer just in
! * case.
*/
static int need_recenter_map( int dx, int dy)
{
! if( pl_pos.x + dx + use_config[CONFIG_MAPWIDTH] + MAX_MAP_OFFSET >= the_map.x ||
! pl_pos.y + dy + use_config[CONFIG_MAPHEIGHT] + MAX_MAP_OFFSET >= the_map.y ||
! pl_pos.x + dx -5 <= 0 ||
! pl_pos.y + dy -5 <= 0 )
{
return TRUE;
}
|
|
From: <cro...@li...> - 2005-03-27 20:51:33
|
Module Name: client
Committed By: akirschbaum
Date: Sun Mar 27 20:51:25 UTC 2005
Modified Files:
client: ChangeLog
client/common: image.c
client/gtk: gx11.c image.c
client/gtk-v2/src: image.c main.c
client/x11: png.c x11.c x11.h xutil.c
Log Message:
This patch fixes a few memory leaks related to image caching in all clients.
common/image.c: Declare facetoname[] as static. Add all code accessing this
array. Print warning if image cannot be created.
gtk/gx11.c, gtk/image.c, gtk-v2/src/image.c, x11/x11.c, x11/xutil.c: Remove
code accessing facetoname[].
gtk/gx11.c, gtk-v2/src/main5H.c, x11/x11.c: Always call init_cache_data() to
initialize pixmaps[] array.
gtk/image.c, gtk-v2/src/image.c, x11/png.c: Reject invalid face
numbers and fix resource leak in create_and_rescale_image_from_data().
gtk/image.c, gtk-v2/src/image.c, get_map_image_size: Pretend invalid faces to
be of size 1x1 in get_map_image_size().
gtk-v2/src/image.c: Properly free opengl resources in free_pixmap(). Fix
resource leak when freeing old pixmaps in reset_image_data().
x11/png.c: Properly free resources if an error occurs.
x11/x11.c: Ignore invalid face numbers.
x11/x11.h Remove duplicate definition of MAXPIXMAPNUM and facetoname[].
x11/xutil.c: Initialize size of pixmaps[0].
Start of context diffs
Index: client/ChangeLog
diff -c client/ChangeLog:1.6 client/ChangeLog:1.7
*** client/ChangeLog:1.6 Sat Mar 26 11:19:12 2005
--- client/ChangeLog Sun Mar 27 12:51:23 2005
***************
*** 1,8 ****
! "$Id: ChangeLog,v 1.6 2005/03/26 19:19:12 akirschbaum Exp $"
Top of CVS tree:
------------------------------------------------------------------------------
gtk-v2/src/map.c: Fix typo to make it compile without opengl.
Andreas Kirschbaum 2005-03-26
--- 1,27 ----
! "$Id: ChangeLog,v 1.7 2005/03/27 20:51:23 akirschbaum Exp $"
Top of CVS tree:
------------------------------------------------------------------------------
+ This patch fixes a few memory leaks related to image caching in all clients.
+ common/image.c: Declare facetoname[] as static. Add all code accessing this
+ array. Print warning if image cannot be created.
+ gtk/gx11.c, gtk/image.c, gtk-v2/src/image.c, x11/x11.c, x11/xutil.c: Remove
+ code accessing facetoname[].
+ gtk/gx11.c, gtk-v2/src/main.c, x11/x11.c: Always call init_cache_data() to
+ initialize pixmaps[] array.
+ gtk/image.c, gtk-v2/src/image.c, x11/png.c: Reject invalid face
+ numbers and fix resource leak in create_and_rescale_image_from_data().
+ gtk/image.c, gtk-v2/src/image.c, get_map_image_size: Pretend invalid faces to
+ be of size 1x1 in get_map_image_size().
+ gtk-v2/src/image.c: Properly free opengl resources in free_pixmap(). Fix
+ resource leak when freeing old pixmaps in reset_image_data().
+ x11/png.c: Properly free resources if an error occurs.
+ x11/x11.c: Ignore invalid face numbers.
+ x11/x11.h Remove duplicate definition of MAXPIXMAPNUM and facetoname[].
+ x11/xutil.c: Initialize size of pixmaps[0].
+ Andreas Kirschbaum 2005-03-27
+
gtk-v2/src/map.c: Fix typo to make it compile without opengl.
Andreas Kirschbaum 2005-03-26
Index: client/common/image.c
diff -c client/common/image.c:1.17 client/common/image.c:1.18
*** client/common/image.c:1.17 Mon Mar 21 23:22:58 2005
--- client/common/image.c Sun Mar 27 12:51:24 2005
***************
*** 1,5 ****
char *rcsid_common_image_c =
! "$Id: image.c,v 1.17 2005/03/22 07:22:58 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_common_image_c =
! "$Id: image.c,v 1.18 2005/03/27 20:51:24 akirschbaum Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 171,177 ****
/* This holds the name we recieve with the 'face' command so we know what
* to save it as when we actually get the face.
*/
! char *facetoname[MAXPIXMAPNUM];
struct Image_Cache {
--- 171,177 ----
/* This holds the name we recieve with the 'face' command so we know what
* to save it as when we actually get the face.
*/
! static char *facetoname[MAXPIXMAPNUM];
struct Image_Cache {
***************
*** 335,340 ****
--- 335,346 ----
char bmaps[MAX_BUF], inbuf[MAX_BUF];
int i;
+ if (!want_config[CONFIG_CACHE])
+ return;
+
+ for (i = 0; i < MAXPIXMAPNUM; i++)
+ facetoname[i] = NULL;
+
/* First, make sure that image_cache is nulled out */
memset(image_cache, 0, IMAGE_HASH * sizeof(struct Image_Cache));
***************
*** 684,690 ****
}
pngtmp = png_to_data(buf, buflen, &width, &height);
! create_and_rescale_image_from_data(ce, face, pngtmp, width, height);
if (use_config[CONFIG_CACHE]) {
if (facetoname[face]) {
--- 690,698 ----
}
pngtmp = png_to_data(buf, buflen, &width, &height);
! if(create_and_rescale_image_from_data(ce, face, pngtmp, width, height)) {
! LOG(LOG_WARNING, "common::display_newpng", "create_and_rescale_image_from_data failed for face %ld", face);
! }
if (use_config[CONFIG_CACHE]) {
if (facetoname[face]) {
Index: client/gtk/gx11.c
diff -c client/gtk/gx11.c:1.61 client/gtk/gx11.c:1.62
*** client/gtk/gx11.c:1.61 Mon Mar 21 23:22:58 2005
--- client/gtk/gx11.c Sun Mar 27 12:51:24 2005
***************
*** 1,5 ****
char *rcsid_gtk_gx11_c =
! "$Id: gx11.c,v 1.61 2005/03/22 07:22:58 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_gtk_gx11_c =
! "$Id: gx11.c,v 1.62 2005/03/27 20:51:24 akirschbaum Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 580,591 ****
*
*****************************************************************************/
-
- /* This holds the name we recieve with the 'face' command so we know what
- * to save it as when we actually get the face.
- */
- char *facetoname[MAXPIXMAPNUM];
-
/* Initializes the data for image caching */
static void init_cache_data()
{
--- 580,585 ----
***************
*** 619,625 ****
pixmaps[0]->map_mask = pixmaps[0]->icon_mask;
}
pixmaps[0]->icon_width = pixmaps[0]->icon_height = pixmaps[0]->map_width = pixmaps[0]->map_height = map_image_size;
- facetoname[0]=NULL;
/* Don't do anything special for SDL image - rather, that drawing
* code will check to see if there is no data
--- 613,618 ----
***************
*** 628,634 ****
/* Initialize all the images to be of the same value. */
for (i=1; i<MAXPIXMAPNUM; i++) {
pixmaps[i] = pixmaps[0];
- facetoname[i]=NULL;
}
init_common_cache_data();
--- 621,626 ----
***************
*** 5655,5661 ****
return 1;
init_keys();
! if (want_config[CONFIG_CACHE]) init_cache_data();
if (want_config[CONFIG_SPLASH]) destroy_splash();
gtk_timeout_add (10,(GtkFunction)gtk_checkchilds,NULL);
return 0;
--- 5647,5653 ----
return 1;
init_keys();
! init_cache_data();
if (want_config[CONFIG_SPLASH]) destroy_splash();
gtk_timeout_add (10,(GtkFunction)gtk_checkchilds,NULL);
return 0;
Index: client/gtk/image.c
diff -c client/gtk/image.c:1.21 client/gtk/image.c:1.22
*** client/gtk/image.c:1.21 Mon Mar 21 23:22:59 2005
--- client/gtk/image.c Sun Mar 27 12:51:24 2005
***************
*** 1,5 ****
char *rcsid_gtk_image_c =
! "$Id: image.c,v 1.21 2005/03/22 07:22:59 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_gtk_image_c =
! "$Id: image.c,v 1.22 2005/03/27 20:51:24 akirschbaum Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 66,77 ****
#define BPP 4
- /* This holds the name we recieve with the 'face' command so we know what
- * to save it as when we actually get the face.
- */
- char *facetoname[MAXPIXMAPNUM];
-
-
int last_face_num=0;
/* this is used to rescale big images that will be drawn in the inventory/look
--- 66,71 ----
***************
*** 261,266 ****
--- 255,269 ----
uint8 *png_tmp;
PixmapInfo *pi;
+ if (pixmap_num <= 0 || pixmap_num >= MAXPIXMAPNUM)
+ return 1;
+
+ if (pixmaps[pixmap_num] != pixmaps[0]) {
+ free_pixmap(pixmaps[pixmap_num]);
+ free(pixmaps[pixmap_num]);
+ pixmaps[pixmap_num] = pixmaps[0];
+ }
+
pi = calloc(1, sizeof(PixmapInfo));
iscale = use_config[CONFIG_ICONSCALE];
***************
*** 448,454 ****
* is 33 wide, we want that to register as two spaces. By
* adding 31, that works out.
*/
! if ( (face <= 0) || (!pixmaps[face]) ) {
*w = 1;
*h = 1;
} else {
--- 451,457 ----
* is 33 wide, we want that to register as two spaces. By
* adding 31, that works out.
*/
! if (face < 0 || face >= MAXPIXMAPNUM) {
*w = 1;
*h = 1;
} else {
Index: client/gtk-v2/src/image.c
diff -c client/gtk-v2/src/image.c:1.2 client/gtk-v2/src/image.c:1.3
*** client/gtk-v2/src/image.c:1.2 Mon Mar 21 23:23:00 2005
--- client/gtk-v2/src/image.c Sun Mar 27 12:51:24 2005
***************
*** 1,5 ****
char *rcsid_gtk2_image_c =
! "$Id: image.c,v 1.2 2005/03/22 07:23:00 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_gtk2_image_c =
! "$Id: image.c,v 1.3 2005/03/27 20:51:24 akirschbaum Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 70,80 ****
#define BPP 4
- /* This holds the name we recieve with the 'face' command so we know what
- * to save it as when we actually get the face.
- */
- char *facetoname[MAXPIXMAPNUM];
-
PixmapInfo *pixmaps[MAXPIXMAPNUM];
int last_face_num=0;
--- 70,75 ----
***************
*** 229,252 ****
if (pi->icon_image) g_object_unref(pi->icon_image);
if (pi->icon_mask) g_object_unref(pi->icon_mask);
if (pi->map_mask) gdk_pixmap_unref(pi->map_mask);
- if (pi->map_image) {
- #ifdef HAVE_SDL
if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_SDL) {
SDL_FreeSurface(pi->map_image);
free(((SDL_Surface*)pi->map_image)->pixels);
SDL_FreeSurface(pi->fog_image);
free(((SDL_Surface*)pi->fog_image)->pixels);
}
- else
#endif
- if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_PIXMAP) {
- gdk_pixmap_unref(pi->map_image);
}
! else if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_PIXMAP) {
#ifdef HAVE_OPENGL
opengl_free_pixmap(pi);
#endif
}
}
}
--- 224,248 ----
if (pi->icon_image) g_object_unref(pi->icon_image);
if (pi->icon_mask) g_object_unref(pi->icon_mask);
if (pi->map_mask) gdk_pixmap_unref(pi->map_mask);
if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_SDL) {
+ #ifdef HAVE_SDL
+ if (pi->map_image) {
SDL_FreeSurface(pi->map_image);
free(((SDL_Surface*)pi->map_image)->pixels);
SDL_FreeSurface(pi->fog_image);
free(((SDL_Surface*)pi->fog_image)->pixels);
}
#endif
}
! else if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_OPENGL) {
#ifdef HAVE_OPENGL
opengl_free_pixmap(pi);
#endif
}
+ else if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_PIXMAP) {
+ if (pi->map_image) {
+ gdk_pixmap_unref(pi->map_image);
+ }
}
}
***************
*** 263,268 ****
--- 259,273 ----
uint8 *png_tmp;
PixmapInfo *pi;
+ if (pixmap_num <= 0 || pixmap_num >= MAXPIXMAPNUM)
+ return 1;
+
+ if (pixmaps[pixmap_num] != pixmaps[0]) {
+ free_pixmap(pixmaps[pixmap_num]);
+ free(pixmaps[pixmap_num]);
+ pixmaps[pixmap_num] = pixmaps[0];
+ }
+
pi = calloc(1, sizeof(PixmapInfo));
iscale = use_config[CONFIG_ICONSCALE];
***************
*** 386,394 ****
if (!want_config[CONFIG_CACHE] && pixmaps[i] != pixmaps[0]) {
free_pixmap(pixmaps[i]);
free(pixmaps[i]);
- }
pixmaps[i] = pixmaps[0];
}
memset( the_map.cells[0], 0, sizeof( sizeof( struct MapCell)*
the_map.x * the_map.y ));
}
--- 391,399 ----
if (!want_config[CONFIG_CACHE] && pixmaps[i] != pixmaps[0]) {
free_pixmap(pixmaps[i]);
free(pixmaps[i]);
pixmaps[i] = pixmaps[0];
}
+ }
memset( the_map.cells[0], 0, sizeof( sizeof( struct MapCell)*
the_map.x * the_map.y ));
}
***************
*** 455,461 ****
* is 33 wide, we want that to register as two spaces. By
* adding 31, that works out.
*/
! if ( (face <= 0) || (!pixmaps[face]) ) {
*w = 1;
*h = 1;
} else {
--- 460,466 ----
* is 33 wide, we want that to register as two spaces. By
* adding 31, that works out.
*/
! if ( face < 0 || face >= MAXPIXMAPNUM) {
*w = 1;
*h = 1;
} else {
***************
*** 470,481 ****
*
*****************************************************************************/
-
- /* This holds the name we recieve with the 'face' command so we know what
- * to save it as when we actually get the face.
- */
- char *facetoname[MAXPIXMAPNUM];
-
/* Initializes the data for image caching */
void init_cache_data()
{
--- 475,480 ----
***************
*** 516,522 ****
#endif
pixmaps[0]->icon_width = pixmaps[0]->icon_height = pixmaps[0]->map_width = pixmaps[0]->map_height = map_image_size;
- facetoname[0]=NULL;
/* Don't do anything special for SDL image - rather, that drawing
* code will check to see if there is no data
--- 515,520 ----
***************
*** 525,531 ****
/* Initialize all the images to be of the same value. */
for (i=1; i<MAXPIXMAPNUM; i++) {
pixmaps[i] = pixmaps[0];
- facetoname[i]=NULL;
}
init_common_cache_data();
--- 523,528 ----
Index: client/gtk-v2/src/main.c
diff -c client/gtk-v2/src/main.c:1.3 client/gtk-v2/src/main.c:1.4
*** client/gtk-v2/src/main.c:1.3 Mon Mar 21 23:23:00 2005
--- client/gtk-v2/src/main.c Sun Mar 27 12:51:24 2005
***************
*** 1,5 ****
char *rcsid_gtk2_main_c =
! "$Id: main.c,v 1.3 2005/03/22 07:23:00 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_gtk2_main_c =
! "$Id: main.c,v 1.4 2005/03/27 20:51:24 akirschbaum Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 567,573 ****
map_init(window_root);
magic_map = lookup_widget(window_root,"drawingarea_magic_map");
! if (use_config[CONFIG_CACHE]) init_cache_data();
/* Loop to connect to server/metaserver and play the game */
while (1) {
--- 567,573 ----
map_init(window_root);
magic_map = lookup_widget(window_root,"drawingarea_magic_map");
! init_cache_data();
/* Loop to connect to server/metaserver and play the game */
while (1) {
Index: client/x11/png.c
diff -c client/x11/png.c:1.13 client/x11/png.c:1.14
*** client/x11/png.c:1.13 Sun Apr 18 22:14:11 2004
--- client/x11/png.c Sun Mar 27 12:51:24 2005
***************
*** 1,5 ****
char *rcsid_x11_png_c =
! "$Id: png.c,v 1.13 2004/04/19 05:14:11 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_x11_png_c =
! "$Id: png.c,v 1.14 2005/03/27 20:51:24 akirschbaum Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 856,881 ****
{
struct PixmapInfo *pi;
pi = malloc(sizeof(struct PixmapInfo));
! pixmaps[pixmap_num] = pi;
! rgba_to_xpixmap(display, win_game, rgba_data, &pixmaps[pixmap_num]->pixmap,
! &pixmaps[pixmap_num]->mask, &colormap, width, height);
! if (!pixmaps[pixmap_num]->pixmap || !pixmaps[pixmap_num]->mask) return 1;
! pixmaps[pixmap_num]->width = width / image_size;
! pixmaps[pixmap_num]->height = height / image_size;
if (ce) {
ce->image_data = pi;
}
return 0;
}
void get_map_image_size(int face, uint8 *w, uint8 *h)
{
/* This function is not implemented yet, so just return default values */
! if (face == 0 || pixmaps[face] == NULL) {
*w = 1;
*h = 1;
}
--- 856,902 ----
{
struct PixmapInfo *pi;
+ if (pixmap_num <= 0 || pixmap_num >= MAXPIXMAPNUM)
+ return 1;
+
+ if (pixmaps[pixmap_num] != pixmaps[0]) {
+ XFreePixmap(display, pixmaps[pixmap_num]->pixmap);
+ if (pixmaps[pixmap_num]->mask)
+ XFreePixmap(display, pixmaps[pixmap_num]->mask);
+ free(pixmaps[pixmap_num]);
+ pixmaps[pixmap_num] = pixmaps[0];
+ }
+
pi = malloc(sizeof(struct PixmapInfo));
+ if (rgba_to_xpixmap(display, win_game, rgba_data, &pi->pixmap,
+ &pi->mask, &colormap, width, height) != 0) {
+ free(pi);
+ return 1;
+ }
! if (!pi->pixmap || !pi->mask) {
! if (pi->pixmap)
! XFreePixmap(display, pi->pixmap);
! if (pi->mask)
! XFreePixmap(display, pi->mask);
! free(pi);
! return 1;
! }
! pi->width = width / image_size;
! pi->height = height / image_size;
if (ce) {
ce->image_data = pi;
}
+ pixmaps[pixmap_num] = pi;
return 0;
}
void get_map_image_size(int face, uint8 *w, uint8 *h)
{
/* This function is not implemented yet, so just return default values */
! if (face < 0 || face >= MAXPIXMAPNUM) {
*w = 1;
*h = 1;
}
Index: client/x11/x11.c
diff -c client/x11/x11.c:1.27 client/x11/x11.c:1.28
*** client/x11/x11.c:1.27 Sat Feb 26 22:06:30 2005
--- client/x11/x11.c Sun Mar 27 12:51:24 2005
***************
*** 1,5 ****
char *rcsid_x11_x11_c =
! "$Id: x11.c,v 1.27 2005/02/27 06:06:30 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_x11_x11_c =
! "$Id: x11.c,v 1.28 2005/03/27 20:51:24 akirschbaum Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 350,356 ****
static void gen_draw_face(Drawable where,int face,int x,int y, int sx, int sy)
{
! if (face<0) {
fprintf(stderr,"Invalid face number: %d @ %d, %d\n", face, x, y);
return;
}
--- 350,356 ----
static void gen_draw_face(Drawable where,int face,int x,int y, int sx, int sy)
{
! if (face < 0 || face >= MAXPIXMAPNUM) {
fprintf(stderr,"Invalid face number: %d @ %d, %d\n", face, x, y);
return;
}
***************
*** 2985,2991 ****
return 1;
init_keys();
! if (want_config[CONFIG_CACHE]) init_cache_data();
set_window_pos();
info_ratio=(float) infodata.width/ (float) (infodata.width + INV_WIDTH);
return 0;
--- 2985,2991 ----
return 1;
init_keys();
! init_cache_data();
set_window_pos();
info_ratio=(float) infodata.width/ (float) (infodata.width + INV_WIDTH);
return 0;
***************
*** 3262,3267 ****
--- 3262,3269 ----
{
int i;
+ reset_image_cache_data();
+
for (i=1; i<MAXPIXMAPNUM; i++) {
if (!want_config[CONFIG_CACHE] && pixmaps[i] != pixmaps[0]) {
XFreePixmap(display, pixmaps[i]->pixmap);
***************
*** 3271,3280 ****
free(pixmaps[i]);
pixmaps[i] = pixmaps[0];
}
- if (want_config[CONFIG_CACHE] && facetoname[i]!=NULL) {
- free(facetoname[i]);
- facetoname[i]=NULL;
- }
}
memset((char*)&the_map.cells[0][0], 0, sizeof(struct MapCell)*the_map.x*the_map.y);
look_list.env=cpl.below;
--- 3273,3278 ----
Index: client/x11/x11.h
diff -c client/x11/x11.h:1.9 client/x11/x11.h:1.10
*** client/x11/x11.h:1.9 Mon Oct 6 00:04:02 2003
--- client/x11/x11.h Sun Mar 27 12:51:25 2005
***************
*** 1,6 ****
/*
* static char *rcsid_x11_h =
! * "$Id: x11.h,v 1.9 2003/10/06 07:04:02 mwedel Exp $";
*/
/*
Crossfire client, a client program for the crossfire program.
--- 1,6 ----
/*
* static char *rcsid_x11_h =
! * "$Id: x11.h,v 1.10 2005/03/27 20:51:25 akirschbaum Exp $";
*/
/*
Crossfire client, a client program for the crossfire program.
***************
*** 29,45 ****
#include "client-types.h"
- #define MAXPIXMAPNUM 10000
-
extern int map_size;
extern uint8 map_did_scroll;
extern uint8 updatekeycodes;
extern int updatelock;
- extern char *facetoname[MAXPIXMAPNUM];
struct PixmapInfo {
Pixmap pixmap,mask;
! uint8 width, height;
};
extern struct PixmapInfo *pixmaps[MAXPIXMAPNUM];
--- 29,42 ----
#include "client-types.h"
extern int map_size;
extern uint8 map_did_scroll;
extern uint8 updatekeycodes;
extern int updatelock;
struct PixmapInfo {
Pixmap pixmap,mask;
! uint8 width, height; /* size of pixmap in tiles */
};
extern struct PixmapInfo *pixmaps[MAXPIXMAPNUM];
Index: client/x11/xutil.c
diff -c client/x11/xutil.c:1.18 client/x11/xutil.c:1.19
*** client/x11/xutil.c:1.18 Mon Mar 21 23:23:00 2005
--- client/x11/xutil.c Sun Mar 27 12:51:25 2005
***************
*** 1,5 ****
char *rcsid_x11_xutil_c =
! "$Id: xutil.c,v 1.18 2005/03/22 07:23:00 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_x11_xutil_c =
! "$Id: xutil.c,v 1.19 2005/03/27 20:51:25 akirschbaum Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 123,133 ****
#define MAX_KEYCODE 255
static Key_Entry *keys[256];
- /* This holds the name we recieve with the 'face' command so we know what
- * to save it as when we actually get the face.
- */
- char *facetoname[MAXPIXMAPNUM];
-
/* Can be set when user is moving to new machine type */
uint8 updatekeycodes=FALSE;
--- 123,128 ----
***************
*** 154,169 ****
*/
pixmaps[0]->pixmap=XCreatePixmap(display, win_root, image_size, image_size,
DefaultDepth(display,DefaultScreen(display)));
XCopyPlane(display, ptmp, pixmaps[0]->pixmap, gc_game,
0,0,image_size,image_size,0,0,1);
XFreePixmap(display, ptmp);
- facetoname[0]=NULL;
-
/* Initialize all the images to be of the same value. */
for (i=1; i<MAXPIXMAPNUM; i++) {
pixmaps[i]=pixmaps[0];
- facetoname[i]=NULL;
}
init_common_cache_data();
--- 149,163 ----
*/
pixmaps[0]->pixmap=XCreatePixmap(display, win_root, image_size, image_size,
DefaultDepth(display,DefaultScreen(display)));
+ pixmaps[0]->width = 1;
+ pixmaps[0]->height = 1;
XCopyPlane(display, ptmp, pixmaps[0]->pixmap, gc_game,
0,0,image_size,image_size,0,0,1);
XFreePixmap(display, ptmp);
/* Initialize all the images to be of the same value. */
for (i=1; i<MAXPIXMAPNUM; i++) {
pixmaps[i]=pixmaps[0];
}
init_common_cache_data();
|
|
From: <cro...@li...> - 2005-03-26 19:19:22
|
Module Name: client
Committed By: akirschbaum
Date: Sat Mar 26 19:19:14 UTC 2005
Modified Files:
client: ChangeLog
client/gtk-v2/src: map.c
Log Message:
gtk-v2/src/map.c: Fix typo to make it compile without opengl.
Start of context diffs
Index: client/ChangeLog
diff -c client/ChangeLog:1.5 client/ChangeLog:1.6
*** client/ChangeLog:1.5 Mon Mar 21 23:22:54 2005
--- client/ChangeLog Sat Mar 26 11:19:12 2005
***************
*** 1,8 ****
! "$Id: ChangeLog,v 1.5 2005/03/22 07:22:54 mwedel Exp $"
Top of CVS tree:
------------------------------------------------------------------------------
Main change of this is addition of opengl drawing for the map in the gtk-v2
client. On my system, the opengl code is about 10 times faster than the
sdl code was, making it so I can turn on all the bells and whistles (smoothing,
--- 1,11 ----
! "$Id: ChangeLog,v 1.6 2005/03/26 19:19:12 akirschbaum Exp $"
Top of CVS tree:
------------------------------------------------------------------------------
+ gtk-v2/src/map.c: Fix typo to make it compile without opengl.
+ Andreas Kirschbaum 2005-03-26
+
Main change of this is addition of opengl drawing for the map in the gtk-v2
client. On my system, the opengl code is about 10 times faster than the
sdl code was, making it so I can turn on all the bells and whistles (smoothing,
Index: client/gtk-v2/src/map.c
diff -c client/gtk-v2/src/map.c:1.4 client/gtk-v2/src/map.c:1.5
*** client/gtk-v2/src/map.c:1.4 Wed Mar 23 14:19:01 2005
--- client/gtk-v2/src/map.c Sat Mar 26 11:19:13 2005
***************
*** 1,5 ****
char *rcsid_gtk2_map_c =
! "$Id: map.c,v 1.4 2005/03/23 22:19:01 tchize Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_gtk2_map_c =
! "$Id: map.c,v 1.5 2005/03/26 19:19:13 akirschbaum Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 798,804 ****
if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_SDL) sdl_gen_map(redraw);
else
#endif
! #ifdef HAVE_SDL
if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_OPENGL) opengl_gen_map(redraw);
else
#endif
--- 798,804 ----
if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_SDL) sdl_gen_map(redraw);
else
#endif
! #ifdef HAVE_OPENGL
if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_OPENGL) opengl_gen_map(redraw);
else
#endif
|
|
From: <cro...@li...> - 2005-03-25 07:53:54
|
Module Name: crossfire Committed By: cavesomething Date: Fri Mar 25 07:53:46 UTC 2005 Modified Files: crossfire/server: c_misc.c Log Message: fix for bug #1170280 Start of context diffs Index: crossfire/server/c_misc.c diff -c crossfire/server/c_misc.c:1.53 crossfire/server/c_misc.c:1.54 *** crossfire/server/c_misc.c:1.53 Wed Mar 23 13:35:07 2005 --- crossfire/server/c_misc.c Thu Mar 24 23:53:44 2005 *************** *** 1,6 **** /* * static char *rcsid_c_misc_c = ! * "$Id: c_misc.c,v 1.53 2005/03/23 21:35:07 cavesomething Exp $"; */ /* --- 1,6 ---- /* * static char *rcsid_c_misc_c = ! * "$Id: c_misc.c,v 1.54 2005/03/25 07:53:44 cavesomething Exp $"; */ /* *************** *** 405,411 **** break; case 'r' : strcpy(return_val,get_name_of_region_for_map(pl->ob->map)); break; ! case 'R' : strcpy(return_val,get_region_longname(pl->ob->map->region)); break; case 'i' : strcpy(return_val,pl->socket.host); break; --- 405,411 ---- break; case 'r' : strcpy(return_val,get_name_of_region_for_map(pl->ob->map)); break; ! case 'R' : strcpy(return_val,get_region_longname(get_region_by_map(pl->ob->map))); break; case 'i' : strcpy(return_val,pl->socket.host); break; |
|
From: <cro...@li...> - 2005-03-24 22:35:34
|
Module Name: crossfire
Committed By: cavesomething
Date: Thu Mar 24 22:35:26 UTC 2005
Modified Files:
crossfire/common: region.c
Log Message:
minor fix to remove compile error on old compilers
Start of context diffs
Index: crossfire/common/region.c
diff -c crossfire/common/region.c:1.2 crossfire/common/region.c:1.3
*** crossfire/common/region.c:1.2 Wed Mar 23 13:34:30 2005
--- crossfire/common/region.c Thu Mar 24 14:35:26 2005
***************
*** 1,6 ****
/*
* static char *rcsid_map_c =
! * "$Id: region.c,v 1.2 2005/03/23 21:34:30 cavesomething Exp $";
*/
/*
--- 1,6 ----
/*
* static char *rcsid_map_c =
! * "$Id: region.c,v 1.3 2005/03/24 22:35:26 cavesomething Exp $";
*/
/*
***************
*** 93,105 ****
region *get_region_from_string(char *name) {
region *reg;
char *substr;
sint16 i;
if (name==NULL) {
for (reg=first_region;reg->parent!=NULL;reg=reg->parent);
return reg;
}
! char *p = strchr(name, '\n');
if (p) *p = '\0';
for (reg=first_region;reg!=NULL;reg=reg->next)
if (!strcasecmp(reg->name, name)) return reg;
--- 93,106 ----
region *get_region_from_string(char *name) {
region *reg;
char *substr;
+ char *p;
sint16 i;
if (name==NULL) {
for (reg=first_region;reg->parent!=NULL;reg=reg->parent);
return reg;
}
! p = strchr(name, '\n');
if (p) *p = '\0';
for (reg=first_region;reg!=NULL;reg=reg->next)
if (!strcasecmp(reg->name, name)) return reg;
|
|
From: <cro...@li...> - 2005-03-24 21:53:36
|
Module Name: maps-bigworld Committed By: majorwoo Date: Thu Mar 24 21:53:26 UTC 2005 Modified Files: maps-bigworld/teamarena: twregister Log Message: Increased length of time marker lasts for teams in teamwar Start of context diffs Index: maps-bigworld/teamarena/twregister diff -c maps-bigworld/teamarena/twregister:1.1 maps-bigworld/teamarena/twregister:1.2 *** maps-bigworld/teamarena/twregister:1.1 Tue Mar 22 13:02:36 2005 --- maps-bigworld/teamarena/twregister Thu Mar 24 13:53:26 2005 *************** *** 1496,1501 **** --- 1496,1502 ---- Welcome to Team 1! endmsg slaying team1 + food 500000 x 12 y 2 end *************** *** 1716,1722 **** @match * Greetings! So which if you is brave enough to enter the Arena? Team 1 should enter on the left, and Team 2 on the right! ! Oh, we have been having some trouble powering the teleporters... You will probably need some more rubies to power them. I think 250 should do it for your team for awhile.. endmsg walk_on 0 --- 1717,1723 ---- @match * Greetings! So which if you is brave enough to enter the Arena? Team 1 should enter on the left, and Team 2 on the right! ! Oh, we have been having some trouble powering the teleporters... You will probably need some more rubies to power them. I think 250 should do it for your team for awhile.. endmsg walk_on 0 *************** *** 1816,1821 **** --- 1817,1823 ---- Welcome to Team 2! endmsg slaying team2 + food 500000 x 14 y 2 end *************** *** 1935,1941 **** y 11 end arch teleporter - invisible 1 hp 14 sp 9 speed 0.2 --- 1937,1942 ---- |
|
From: <cro...@li...> - 2005-03-24 21:07:58
|
Module Name: crossfire Committed By: tchize Date: Thu Mar 24 21:07:49 UTC 2005 Modified Files: crossfire/server: weather.c Log Message: Modified lots of call to GET_MAP_OB not checking for null The following files had too many changes to show the context diffs here: cvs rdiff -r1.35 -r1.36 crossfire/server/weather.c |
|
From: <cro...@li...> - 2005-03-23 22:21:22
|
Module Name: client
Committed By: tchize
Date: Wed Mar 23 22:19:11 UTC 2005
Modified Files:
client/common: client.h
client/gtk: map.c sdl.c
client/gtk-v2/src: map.c opengl.c sdl.c
Log Message:
Fixed smoothing on non floor layer.
Start of context diffs
Index: client/common/client.h
diff -c client/common/client.h:1.25 client/common/client.h:1.26
*** client/common/client.h:1.25 Mon Mar 21 23:22:58 2005
--- client/common/client.h Wed Mar 23 14:18:41 2005
***************
*** 1,6 ****
/*
* static char *rcsid_client_h =
! * "$Id: client.h,v 1.25 2005/03/22 07:22:58 mwedel Exp $";
*/
/*
Crossfire client, a client program for the crossfire program.
--- 1,6 ----
/*
* static char *rcsid_client_h =
! * "$Id: client.h,v 1.26 2005/03/23 22:18:41 tchize Exp $";
*/
/*
Crossfire client, a client program for the crossfire program.
***************
*** 74,80 ****
extern Animations animations[MAXANIM];
! #define CAN_SMOOTH(__SMOOTHLEVEL) (__SMOOTHLEVEL)
/* ClientSocket could probably hold more of the global values - it could
* probably hold most all socket/communication related values instead
--- 74,85 ----
extern Animations animations[MAXANIM];
! #define CAN_SMOOTH(__SQUARE,__LEVEL) ( ( \
! (__SQUARE.heads[__LEVEL].face==0) \
! && (__LEVEL >0) \
! ) \
! || (__SQUARE.smooth[layer]) \
! )
/* ClientSocket could probably hold more of the global values - it could
* probably hold most all socket/communication related values instead
Index: client/gtk/map.c
diff -c client/gtk/map.c:1.25 client/gtk/map.c:1.26
*** client/gtk/map.c:1.25 Mon Mar 21 23:22:59 2005
--- client/gtk/map.c Wed Mar 23 14:18:57 2005
***************
*** 1,5 ****
char *rcsid_gtk_map_c =
! "$Id: map.c,v 1.25 2005/03/22 07:22:59 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_gtk_map_c =
! "$Id: map.c,v 1.26 2005/03/23 22:18:57 tchize Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 433,439 ****
int dosmooth=0;
if ( (the_map.cells[mx][my].heads[0].face==0)
! || !CAN_SMOOTH(the_map.cells[mx][my].smooth[layer]) )
return;
for (i=0;i<8;i++){
emx=mx+dx[i];
--- 433,439 ----
int dosmooth=0;
if ( (the_map.cells[mx][my].heads[0].face==0)
! || !CAN_SMOOTH(the_map.cells[mx][my],layer) )
return;
for (i=0;i<8;i++){
emx=mx+dx[i];
Index: client/gtk/sdl.c
diff -c client/gtk/sdl.c:1.16 client/gtk/sdl.c:1.17
*** client/gtk/sdl.c:1.16 Mon Mar 21 23:22:59 2005
--- client/gtk/sdl.c Wed Mar 23 14:19:00 2005
***************
*** 1,5 ****
char *rcsid_gtk_sdl_c =
! "$Id: sdl.c,v 1.16 2005/03/22 07:22:59 mwedel Exp $";
/*
CrossFire, A Multiplayer game for X-windows
--- 1,5 ----
char *rcsid_gtk_sdl_c =
! "$Id: sdl.c,v 1.17 2005/03/23 22:19:00 tchize Exp $";
/*
CrossFire, A Multiplayer game for X-windows
***************
*** 637,644 ****
src.w=dst.w;
src.h=dst.h;
if ( (the_map.cells[mx][my].heads[0].face==0)
! || !CAN_SMOOTH(the_map.cells[mx][my].smooth[layer]) )
return;
for (i=0;i<8;i++){
emx=mx+dx[i];
emy=my+dy[i];
--- 637,645 ----
src.w=dst.w;
src.h=dst.h;
if ( (the_map.cells[mx][my].heads[0].face==0)
! || !CAN_SMOOTH(the_map.cells[mx][my],layer) ){
return;
+ }
for (i=0;i<8;i++){
emx=mx+dx[i];
emy=my+dy[i];
Index: client/gtk-v2/src/map.c
diff -c client/gtk-v2/src/map.c:1.3 client/gtk-v2/src/map.c:1.4
*** client/gtk-v2/src/map.c:1.3 Mon Mar 21 23:23:00 2005
--- client/gtk-v2/src/map.c Wed Mar 23 14:19:01 2005
***************
*** 1,5 ****
char *rcsid_gtk2_map_c =
! "$Id: map.c,v 1.3 2005/03/22 07:23:00 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_gtk2_map_c =
! "$Id: map.c,v 1.4 2005/03/23 22:19:01 tchize Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 512,518 ****
int smoothface;
int dosmooth=0;
if ( (the_map.cells[mx][my].heads[0].face==0)
! || !CAN_SMOOTH(the_map.cells[mx][my].smooth[layer]) )
return;
for (i=0;i<8;i++){
emx=mx+dx[i];
--- 512,518 ----
int smoothface;
int dosmooth=0;
if ( (the_map.cells[mx][my].heads[0].face==0)
! || !CAN_SMOOTH(the_map.cells[mx][my],layer) )
return;
for (i=0;i<8;i++){
emx=mx+dx[i];
Index: client/gtk-v2/src/opengl.c
diff -c client/gtk-v2/src/opengl.c:1.1 client/gtk-v2/src/opengl.c:1.2
*** client/gtk-v2/src/opengl.c:1.1 Mon Mar 21 23:23:00 2005
--- client/gtk-v2/src/opengl.c Wed Mar 23 14:19:02 2005
***************
*** 1,5 ****
char *rcsid_gtk_opengl_c =
! "$Id: opengl.c,v 1.1 2005/03/22 07:23:00 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_gtk_opengl_c =
! "$Id: opengl.c,v 1.2 2005/03/23 22:19:02 tchize Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 429,435 ****
my = y + pl_pos.y;
if ( the_map.cells[mx][my].heads[layer].face!=0 &&
! CAN_SMOOTH(the_map.cells[mx][my].smooth[layer]))
drawsmooth_opengl(x, y, mx, my, layer);
}
}
--- 429,435 ----
my = y + pl_pos.y;
if ( the_map.cells[mx][my].heads[layer].face!=0 &&
! CAN_SMOOTH(the_map.cells[mx][my],layer))
drawsmooth_opengl(x, y, mx, my, layer);
}
}
***************
*** 624,630 ****
glEnd();
}
! if (use_config[CONFIG_SMOOTH] && CAN_SMOOTH(the_map.cells[mx][my].smooth[layer]) &&
the_map.cells[mx][my].heads[layer].face !=0) {
got_smooth=1;
--- 624,630 ----
glEnd();
}
! if (use_config[CONFIG_SMOOTH] && CAN_SMOOTH(the_map.cells[mx][my],layer) &&
the_map.cells[mx][my].heads[layer].face !=0) {
got_smooth=1;
Index: client/gtk-v2/src/sdl.c
diff -c client/gtk-v2/src/sdl.c:1.2 client/gtk-v2/src/sdl.c:1.3
*** client/gtk-v2/src/sdl.c:1.2 Mon Mar 21 23:23:00 2005
--- client/gtk-v2/src/sdl.c Wed Mar 23 14:19:11 2005
***************
*** 1,5 ****
char *rcsid_gtk_sdl_c =
! "$Id: sdl.c,v 1.2 2005/03/22 07:23:00 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_gtk_sdl_c =
! "$Id: sdl.c,v 1.3 2005/03/23 22:19:11 tchize Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 649,655 ****
src.w=dst.w;
src.h=dst.h;
if ( (the_map.cells[mx][my].heads[0].face==0)
! || !CAN_SMOOTH(the_map.cells[mx][my].smooth[layer]) )
return;
for (i=0;i<8;i++){
emx=mx+dx[i];
--- 649,655 ----
src.w=dst.w;
src.h=dst.h;
if ( (the_map.cells[mx][my].heads[0].face==0)
! || !CAN_SMOOTH(the_map.cells[mx][my],layer) )
return;
for (i=0;i<8;i++){
emx=mx+dx[i];
|
|
From: <cro...@li...> - 2005-03-23 21:36:17
|
Module Name: crossfire
Committed By: cavesomething
Date: Wed Mar 23 21:35:13 UTC 2005
Modified Files:
crossfire/common: region.c
crossfire/doc/Developers: regions
crossfire/include: libproto.h sproto.h
crossfire/lib: regions
crossfire/server: c_misc.c
Log Message:
allow who command to take regions as arguments, if a region is given as an argument then only the players in the region are shown. Partial region names can be used also. Calling who on its own shows everyone that was shown before.
Start of context diffs
Index: crossfire/common/region.c
diff -c crossfire/common/region.c:1.1 crossfire/common/region.c:1.2
*** crossfire/common/region.c:1.1 Tue Mar 15 13:06:19 2005
--- crossfire/common/region.c Wed Mar 23 13:34:30 2005
***************
*** 1,6 ****
/*
* static char *rcsid_map_c =
! * "$Id: region.c,v 1.1 2005/03/15 21:06:19 ryo_saeba Exp $";
*/
/*
--- 1,6 ----
/*
* static char *rcsid_map_c =
! * "$Id: region.c,v 1.2 2005/03/23 21:34:30 cavesomething Exp $";
*/
/*
***************
*** 56,61 ****
--- 56,67 ----
LOG(llevInfo,"Got no region or fallback for region %s.\n", region_name);
return NULL;
}
+
+ /* This might need optimising at some point. */
+ region *get_region_by_map(mapstruct *m) {
+ return get_region_by_name(get_name_of_region_for_map(m));
+ }
+
/*
* Since we won't assume all maps have a region set properly, we need an
* explicit check that it is, this is much nicer here than scattered throughout
***************
*** 72,77 ****
--- 78,159 ----
return "unknown";
}
+ /*
+ * Tries to find a region that 'name' corresponds to.
+ * It looks, in order, for:
+ * an exact match to region name (case insensitive)
+ * an exact match to longname (case insensitive)
+ * a substring that matches to the longname (eg Kingdom)
+ * a substring that matches to the region name (eg nav)
+ * if it can find none of these it returns the first parentless region
+ * (there should be only one of these - the top level one)
+ * If we got a NULL, then just return the top level region
+ *
+ */
+ region *get_region_from_string(char *name) {
+ region *reg;
+ char *substr;
+ sint16 i;
+
+ if (name==NULL) {
+ for (reg=first_region;reg->parent!=NULL;reg=reg->parent);
+ return reg;
+ }
+ char *p = strchr(name, '\n');
+ if (p) *p = '\0';
+ for (reg=first_region;reg!=NULL;reg=reg->next)
+ if (!strcasecmp(reg->name, name)) return reg;
+
+ for (reg=first_region;reg!=NULL;reg=reg->next)
+ if (reg->longname != NULL) {
+ if (!strcasecmp(reg->longname, name)) return reg;
+ }
+
+ substr=NULL;
+ for (reg=first_region;reg!=NULL;reg=reg->next)
+ if (reg->longname != NULL) {
+ substr=strstr(reg->longname, name);
+ if (substr != NULL) return reg;
+ }
+ for (reg=first_region;reg!=NULL;reg=reg->next)
+ if (reg->longname != NULL) {
+ /*
+ * This is not a bug, we want the region that is most identifiably a discrete
+ * area in the game, eg if we have 'scor', we want to return 'scorn' and not
+ * 'scornarena', regardless of their order on the list so we only look at those
+ * regions with a longname set.
+ */
+ substr=strstr(reg->name, name);
+ if (substr != NULL) return reg;
+ }
+ for (reg=first_region;reg!=NULL;reg=reg->next) {
+ substr=strstr(reg->name, name);
+ if (substr != NULL) return reg;
+ }
+ /* if we are still here, we are going to have to give up, and give the top level region */
+ for (reg=first_region;reg->parent!=NULL;reg=reg->parent);
+ return reg;
+ }
+
+ /*
+ * returns 1 if the player is in the region reg, or a child region thereof
+ * otherwise returns 0
+ * if passed a NULL region returns -1
+ */
+
+ int region_is_child_of_region(region *child, region *r) {
+
+ if (r==NULL)
+ return -1;
+ if (child == NULL)
+ return 0;
+ if (!strcmp(child->name, r->name))
+ return 1;
+ else if(child->parent!=NULL)
+ return region_is_child_of_region(child->parent,r);
+ else return 0;
+ }
+
/*
* the longname of a region is not a required field, any given region
* may want to not set it and use the parent's one instead. so, we:
Index: crossfire/doc/Developers/regions
diff -c crossfire/doc/Developers/regions:1.1 crossfire/doc/Developers/regions:1.2
*** crossfire/doc/Developers/regions:1.1 Tue Mar 15 13:42:25 2005
--- crossfire/doc/Developers/regions Wed Mar 23 13:34:37 2005
***************
*** 1,7 ****
Included herein is a description of the Region system, as implemented in March 2005.
- Revision 0.1.1 - BT Lally.
-
If by the time you read this, this date is old, then this file may not have been kept
up to date, either that or no relevant changes have occurred, the Changelog should help
you determine which is the case.
--- 1,5 ----
***************
*** 153,158 ****
--- 151,166 ----
given a name returns the region with that name, or the fallback if there isn't one.
Used by the map loader and stuff using get_name_of_region_for_map at the moment.
+ extern int region_is_child_of_region(region *child, region *r);
+ 1 if the child is a subregion of r
+ 0 otherwise
+
+ extern region *get_region_from_string(char *name);
+ tries to guess which region 'name' corresponds to
+
+ extern region *get_region_by_map(mapstruct *m);
+ takes a map returns the region it is in.
+
extern char *get_name_of_region_for_map(mapstruct *m);
takes a map and returns the name of the region it is in.
***************
*** 178,187 ****
There is a command whereami that prints the regions name and description.
*****Known/suspected bugs*****
! Random maps probably don't get their regions set properly (haven't tried to verify this, not least
! because I am not even sure what 'properly' should be).
The region parser is not particularly robust, it dies if the 'endmsg' line is missing,
or if 'nomore' is missing, or if the 'end' line is missing. These stop the server from
--- 186,197 ----
There is a command whereami that prints the regions name and description.
+ who can be given regions as arguments, and only show the players in that region.
+
*****Known/suspected bugs*****
! Random maps probably don't get their regions set properly (though I am not quite sure what
! 'properly' should be here).
The region parser is not particularly robust, it dies if the 'endmsg' line is missing,
or if 'nomore' is missing, or if the 'end' line is missing. These stop the server from
***************
*** 193,201 ****
whereiseverybody command, showing region and the number of players there.
- modify who command so that PK servers can elect to show only region to other players
- (making it more challenging to hunt other players).
-
medium term:
Have the regions file 'compiled' in the same way the archetypes are.
--- 203,208 ----
Index: crossfire/include/libproto.h
diff -c crossfire/include/libproto.h:1.58 crossfire/include/libproto.h:1.59
*** crossfire/include/libproto.h:1.58 Tue Mar 15 13:06:20 2005
--- crossfire/include/libproto.h Wed Mar 23 13:34:39 2005
***************
*** 345,352 ****
--- 345,355 ----
extern void free_all_recipes(void);
/* region.c */
extern char *get_region_longname(region *r);
+ extern int region_is_child_of_region(region *child, region *r);
+ extern region *get_region_from_string(char *name);
extern char *get_region_msg(region *r);
extern region *get_region_by_name(char *region_name);
+ extern region *get_region_by_map(mapstruct *m);
extern char *get_name_of_region_for_map(mapstruct *m);
extern void parse_regions();
extern void init_regions();
Index: crossfire/include/sproto.h
diff -c crossfire/include/sproto.h:1.117 crossfire/include/sproto.h:1.118
*** crossfire/include/sproto.h:1.117 Tue Mar 22 15:22:41 2005
--- crossfire/include/sproto.h Wed Mar 23 13:34:56 2005
***************
*** 151,156 ****
--- 151,157 ----
void current_map_info(object *op);
void current_region_info(object *op);
int command_who(object *op, char *params);
+ void display_who_entry(object *op, player *pl, char *format);
void get_who_escape_code_value(char *return_val, const char letter, player *pl);
int command_malloc(object *op, char *params);
int command_mapinfo(object *op, char *params);
Index: crossfire/lib/regions
diff -c crossfire/lib/regions:1.3 crossfire/lib/regions:1.4
*** crossfire/lib/regions:1.3 Mon Mar 21 11:29:24 2005
--- crossfire/lib/regions Wed Mar 23 13:35:04 2005
***************
*** 11,17 ****
endmsg
end
region world
! longname Somewhere in the world.
msg
If you are seeing this, someone goofed, you should never see this message.
endmsg
--- 11,17 ----
endmsg
end
region world
! longname The World.
msg
If you are seeing this, someone goofed, you should never see this message.
endmsg
***************
*** 158,163 ****
--- 158,170 ----
Describe Port Joesph
endmsg
end
+ region pupland
+ parent world
+ longname Pupland
+ msg
+ Describe pupland
+ endmsg
+ end
region ancientpupland
parent pupland
longname Pupland of Times Long Past
***************
*** 171,183 ****
Describe Nurnberg
endmsg
end
- region pupland
- parent world
- longname Pupland
- msg
- Describe pupland
- endmsg
- end
region lonetown
parent pupland
msg
--- 178,183 ----
Index: crossfire/server/c_misc.c
diff -c crossfire/server/c_misc.c:1.52 crossfire/server/c_misc.c:1.53
*** crossfire/server/c_misc.c:1.52 Tue Mar 22 15:22:42 2005
--- crossfire/server/c_misc.c Wed Mar 23 13:35:07 2005
***************
*** 1,6 ****
/*
* static char *rcsid_c_misc_c =
! * "$Id: c_misc.c,v 1.52 2005/03/22 23:22:42 ryo_saeba Exp $";
*/
/*
--- 1,6 ----
/*
* static char *rcsid_c_misc_c =
! * "$Id: c_misc.c,v 1.53 2005/03/23 21:35:07 cavesomething Exp $";
*/
/*
***************
*** 268,274 ****
int command_who (object *op, char *params) {
player *pl;
uint16 i;
! char tmpbuf[HUGE_BUF];
int num_players = 0;
int num_wiz = 0;
int num_afk = 0;
--- 268,275 ----
int command_who (object *op, char *params) {
player *pl;
uint16 i;
! region *reg;
! char* format;
int num_players = 0;
int num_wiz = 0;
int num_afk = 0;
***************
*** 285,356 ****
strcpy(settings.who_format, "%N_the_%t%h%d%n[%m]");
if (!strcmp(settings.who_wiz_format,""))
strcpy(settings.who_wiz_format, "%N_the_%t%h%d%nLevel %l [%m](@%i)(%c)");
! for(pl=first_player;pl!=NULL;pl=pl->next) {
! if(pl->ob->map == NULL)
continue;
if (pl->hidden && !QUERY_FLAG(op, FLAG_WIZ)) continue;
if (pl->state==ST_PLAYING || pl->state==ST_GET_PARTY_PASSWORD) {
num_players++;
chars = (chars_names *) realloc(chars, num_players*sizeof(chars_names));
! if (chars == NULL)
! {
new_draw_info(NDI_UNIQUE, 0, op, "who failed - out of memory!");
return 0;
}
! sprintf(chars[num_players-1].namebuf, "");
chars[num_players-1].login_order = num_players;
/*Check for WIZ's & AFK's*/
if (QUERY_FLAG(pl->ob,FLAG_WIZ))
num_wiz++;
if (QUERY_FLAG(pl->ob,FLAG_AFK))
num_afk++;
- if (op == NULL || QUERY_FLAG(op, FLAG_WIZ)) {
- for (i=0;i<=strlen(settings.who_wiz_format);i++) {
- if (settings.who_wiz_format[i]=='%') {
- i++;
- get_who_escape_code_value(tmpbuf,settings.who_wiz_format[i],pl);
- strcat(chars[num_players-1].namebuf, tmpbuf);
- }
- else if (settings.who_wiz_format[i]=='_')
- strcat(chars[num_players-1].namebuf," "); /* allow '_' to be used in place of spaces */
- else {
- sprintf(tmpbuf,"%c",settings.who_wiz_format[i]);
- strcat(chars[num_players-1].namebuf,tmpbuf);
- }
- }
- }
- else {
- for (i=0;i<=strlen(settings.who_format);i++) {
- if (settings.who_format[i]=='%') {
- i++;
- get_who_escape_code_value(tmpbuf,settings.who_format[i],pl);
- strcat(chars[num_players-1].namebuf, tmpbuf);
- }
- else if (settings.who_format[i]=='_')
- strcat(chars[num_players-1].namebuf," "); /* allow '_' to be used in place of spaces */
- else {
- sprintf(tmpbuf,"%c",settings.who_format[i]);
- strcat(chars[num_players-1].namebuf,tmpbuf);
- }
- }
- }
}
}
! if (first_player != (player *) NULL)
! {
! sprintf(players_str, "Total Players (%d) -- WIZ(%d) AFK(%d)", num_players, num_wiz, num_afk);
! new_draw_info(NDI_UNIQUE, 0, op, players_str);
}
qsort (chars, num_players, sizeof(chars_names), name_cmp);
for (i=0;i<num_players;i++)
! new_draw_info(NDI_UNIQUE, 0, op, chars[i].namebuf);
! free (chars);
return 1;
}
/* Returns the value of the escape code used in the who format specifier
* the values are:
* N Name of character
--- 286,366 ----
strcpy(settings.who_format, "%N_the_%t%h%d%n[%m]");
if (!strcmp(settings.who_wiz_format,""))
strcpy(settings.who_wiz_format, "%N_the_%t%h%d%nLevel %l [%m](@%i)(%c)");
+ if (op == NULL || QUERY_FLAG(op, FLAG_WIZ))
+ format=settings.who_wiz_format;
+ else
+ format=settings.who_format;
! reg=get_region_from_string(params);
!
! for (pl=first_player;pl!=NULL;pl=pl->next) {
! if (pl->ob->map == NULL)
continue;
if (pl->hidden && !QUERY_FLAG(op, FLAG_WIZ)) continue;
+
+ if(!region_is_child_of_region(get_region_by_map(pl->ob->map),reg)) continue;
if (pl->state==ST_PLAYING || pl->state==ST_GET_PARTY_PASSWORD) {
num_players++;
chars = (chars_names *) realloc(chars, num_players*sizeof(chars_names));
! if (chars == NULL) {
new_draw_info(NDI_UNIQUE, 0, op, "who failed - out of memory!");
return 0;
}
! sprintf(chars[num_players-1].namebuf, "%s", pl->ob->name);
chars[num_players-1].login_order = num_players;
/*Check for WIZ's & AFK's*/
if (QUERY_FLAG(pl->ob,FLAG_WIZ))
num_wiz++;
if (QUERY_FLAG(pl->ob,FLAG_AFK))
num_afk++;
}
}
! if (first_player != (player *) NULL) {
! if (reg == NULL)
! new_draw_info_format(NDI_UNIQUE, 0, op, "Total Players (%d) -- WIZ(%d) AFK(%d)",
! num_players, num_wiz, num_afk);
! else if (reg->longname == NULL)
! new_draw_info_format(NDI_UNIQUE, 0, op, "Total Players in %s (%d) -- WIZ(%d) AFK(%d)",
! reg->name, num_players, num_wiz, num_afk);
! else
! new_draw_info_format(NDI_UNIQUE, 0, op, "Total Players in %s (%d) -- WIZ(%d) AFK(%d)",
! reg->longname, num_players, num_wiz, num_afk);
}
qsort (chars, num_players, sizeof(chars_names), name_cmp);
for (i=0;i<num_players;i++)
! display_who_entry(op, find_player(chars[i].namebuf), format);
! free(chars);
return 1;
}
+ /* Display a line of 'who' to op, about pl, using the formatting specified by format */
+ void display_who_entry(object *op, player *pl, char *format) {
+ char tmpbuf[MAX_BUF];
+ char outbuf[MAX_BUF];
+ sint16 i;
+ outbuf[0]='\0'; /* we strcat to this, so reset it here. */
+ if (pl==NULL) {
+ LOG(llevError,"display_who_entry(): I was passed a null player");
+ return;
+ }
+ for (i=0;i<=strlen(format);i++) {
+ if (format[i]=='%') {
+ i++;
+ get_who_escape_code_value(tmpbuf,format[i],pl);
+ strcat(outbuf, tmpbuf);
+ }
+ else if (format[i]=='_')
+ strcat(outbuf," "); /* allow '_' to be used in place of spaces */
+ else {
+ sprintf(tmpbuf,"%c",format[i]);
+ strcat(outbuf,tmpbuf);
+ }
+ }
+ new_draw_info(NDI_UNIQUE, 0, op, outbuf);
+ }
+
/* Returns the value of the escape code used in the who format specifier
* the values are:
* N Name of character
|
|
From: <cro...@li...> - 2005-03-23 21:03:56
|
Module Name: maps-bigworld Committed By: cavesomething Date: Wed Mar 23 21:03:07 UTC 2005 Modified Files: maps-bigworld/brest: underground maps-bigworld/navar_city/apartments: apartment apartment_attic apartment_basement apartment_upstairs maps-bigworld/navar_city/misc: buildshop maps-bigworld/world: world_107_123 Log Message: region updates for some maps in navar and brest Start of context diffs Index: maps-bigworld/brest/underground diff -c maps-bigworld/brest/underground:1.4 maps-bigworld/brest/underground:1.5 *** maps-bigworld/brest/underground:1.4 Sun Mar 20 18:59:02 2005 --- maps-bigworld/brest/underground Wed Mar 23 13:02:12 2005 *************** *** 1,4 **** --- 1,5 ---- arch map + region brest name underground reset_timeout 7200 difficulty 12 Index: maps-bigworld/navar_city/apartments/apartment diff -c maps-bigworld/navar_city/apartments/apartment:1.1 maps-bigworld/navar_city/apartments/apartment:1.2 *** maps-bigworld/navar_city/apartments/apartment:1.1 Sun Mar 13 17:15:10 2005 --- maps-bigworld/navar_city/apartments/apartment Wed Mar 23 13:02:21 2005 *************** *** 1,4 **** --- 1,5 ---- arch map + region navar name Permanent Apartment msg Creator: CF Java Map Editor Index: maps-bigworld/navar_city/misc/buildshop diff -c maps-bigworld/navar_city/misc/buildshop:1.1 maps-bigworld/navar_city/misc/buildshop:1.2 *** maps-bigworld/navar_city/misc/buildshop:1.1 Sun Mar 13 14:32:46 2005 --- maps-bigworld/navar_city/misc/buildshop Wed Mar 23 13:02:43 2005 *************** *** 1,4 **** --- 1,5 ---- arch map + region navar name Acme Inc. msg Creator: Ryo Saeba Index: maps-bigworld/world/world_107_123 diff -c maps-bigworld/world/world_107_123:1.14 maps-bigworld/world/world_107_123:1.15 *** maps-bigworld/world/world_107_123:1.14 Sun Mar 20 18:59:02 2005 --- maps-bigworld/world/world_107_123 Wed Mar 23 13:02:46 2005 *************** *** 1,4 **** --- 1,5 ---- arch map + region brest name world_107_123 reset_timeout 7200 difficulty 1 |
|
From: <cro...@li...> - 2005-03-22 23:23:06
|
Module Name: crossfire
Committed By: ryo_saeba
Date: Tue Mar 22 23:22:42 UTC 2005
Modified Files:
crossfire: ChangeLog
crossfire/include: sproto.h
crossfire/server: c_misc.c c_wiz.c
Log Message:
Fix broken win32 compilation. Remove sleep(1) in hide commandas that causes the whole server to sleep
Start of context diffs
Index: crossfire/ChangeLog
diff -c crossfire/ChangeLog:1.265 crossfire/ChangeLog:1.266
*** crossfire/ChangeLog:1.265 Tue Mar 22 13:44:36 2005
--- crossfire/ChangeLog Tue Mar 22 15:22:37 2005
***************
*** 17,22 ****
--- 17,27 ----
------------------------------------------------------------------------------
Changes for CVS:
+ include/sproto.h: get_who_escape_code_value is void, not void*.
+ server/c_misc.c: move local function outside the function.
+ server/c_wiz.c: remove sleep( 1 ) that would cause whole server to sleep one sec.
+ Ryo 2005-03-23
+
common/living.c: Allow luck to drop back to zero. Limit bad luck object to
+/-100 to prevent overflows.
Andreas Kirschbaum 2005-03-22
Index: crossfire/include/sproto.h
diff -c crossfire/include/sproto.h:1.116 crossfire/include/sproto.h:1.117
*** crossfire/include/sproto.h:1.116 Sun Mar 20 14:20:40 2005
--- crossfire/include/sproto.h Tue Mar 22 15:22:41 2005
***************
*** 151,157 ****
void current_map_info(object *op);
void current_region_info(object *op);
int command_who(object *op, char *params);
! void *get_who_escape_code_value(char *return_val, const char letter, player *pl);
int command_malloc(object *op, char *params);
int command_mapinfo(object *op, char *params);
int command_whereami(object *op, char *params);
--- 151,157 ----
void current_map_info(object *op);
void current_region_info(object *op);
int command_who(object *op, char *params);
! void get_who_escape_code_value(char *return_val, const char letter, player *pl);
int command_malloc(object *op, char *params);
int command_mapinfo(object *op, char *params);
int command_whereami(object *op, char *params);
Index: crossfire/server/c_misc.c
diff -c crossfire/server/c_misc.c:1.51 crossfire/server/c_misc.c:1.52
*** crossfire/server/c_misc.c:1.51 Mon Mar 21 18:39:50 2005
--- crossfire/server/c_misc.c Tue Mar 22 15:22:42 2005
***************
*** 1,6 ****
/*
* static char *rcsid_c_misc_c =
! * "$Id: c_misc.c,v 1.51 2005/03/22 02:39:50 majorwoo Exp $";
*/
/*
--- 1,6 ----
/*
* static char *rcsid_c_misc_c =
! * "$Id: c_misc.c,v 1.52 2005/03/22 23:22:42 ryo_saeba Exp $";
*/
/*
***************
*** 250,258 ****
else
new_draw_info(NDI_UNIQUE, 0,op,"Heap checks out OK.");
return 1;
! yea }
#endif
int command_who (object *op, char *params) {
player *pl;
uint16 i;
--- 250,270 ----
else
new_draw_info(NDI_UNIQUE, 0,op,"Heap checks out OK.");
return 1;
! }
#endif
+ typedef struct
+ {
+ char namebuf[MAX_BUF];
+ int login_order;
+ } chars_names;
+
+ /*local functon for qsort comparison*/
+ int name_cmp (chars_names *c1, chars_names *c2)
+ {
+ return strcasecmp (c1->namebuf, c2->namebuf);
+ }
+
int command_who (object *op, char *params) {
player *pl;
uint16 i;
***************
*** 261,277 ****
int num_wiz = 0;
int num_afk = 0;
char players_str[MAX_BUF];
- typedef struct
- {
- char namebuf[MAX_BUF];
- int login_order;
- } chars_names;
chars_names *chars = NULL;
- /*local functon for qsort comparison*/
- int name_cmp (chars_names *c1, chars_names *c2)
- {
- return strcasecmp (c1->namebuf, c2->namebuf);
- }
/*
* The who formats are defined in config to be blank. They should have been
--- 273,279 ----
***************
*** 368,374 ****
* _ a literal underscore
*/
! void *get_who_escape_code_value(char *return_val, const char letter, player *pl) {
switch (letter) {
case 'N' : strcpy(return_val, pl->ob->name);
--- 370,376 ----
* _ a literal underscore
*/
! void get_who_escape_code_value(char *return_val, const char letter, player *pl) {
switch (letter) {
case 'N' : strcpy(return_val, pl->ob->name);
Index: crossfire/server/c_wiz.c
diff -c crossfire/server/c_wiz.c:1.60 crossfire/server/c_wiz.c:1.61
*** crossfire/server/c_wiz.c:1.60 Mon Mar 21 17:54:00 2005
--- crossfire/server/c_wiz.c Tue Mar 22 15:22:42 2005
***************
*** 1,6 ****
/*
* static char *rcsid_c_wiz_c =
! * "$Id: c_wiz.c,v 1.60 2005/03/22 01:54:00 majorwoo Exp $";
*/
/*
--- 1,6 ----
/*
* static char *rcsid_c_wiz_c =
! * "$Id: c_wiz.c,v 1.61 2005/03/22 23:22:42 ryo_saeba Exp $";
*/
/*
***************
*** 124,131 ****
"%s has entered the game.",op->name);
if ( !silent_dm )
{
- /*slight delay to make it look like a person doing it*/
- sleep (1);
new_draw_info(NDI_UNIQUE | NDI_ALL | NDI_LT_GREEN, 1, NULL,
"The Dungeon Master has arrived!");
}
--- 124,129 ----
***************
*** 142,151 ****
}
new_draw_info_format(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL,
"%s leaves the game.",op->name);
! /*slight delay to make it look like a person doing it*/
! sleep (1);
! new_draw_info_format(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL,
! "%s left the game.",op->name);
}
}
--- 140,147 ----
}
new_draw_info_format(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL,
"%s leaves the game.",op->name);
! new_draw_info_format(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL,
! "%s left the game.",op->name);
}
}
|
|
From: <cro...@li...> - 2005-03-22 21:45:09
|
Module Name: crossfire
Committed By: akirschbaum
Date: Tue Mar 22 21:44:44 UTC 2005
Modified Files:
crossfire: ChangeLog
crossfire/common: living.c
Log Message:
common/living.c: Allow luck to drop back to zero. Limit bad luck object to
+/-100 to prevent overflows.
Start of context diffs
Index: crossfire/ChangeLog
diff -c crossfire/ChangeLog:1.264 crossfire/ChangeLog:1.265
*** crossfire/ChangeLog:1.264 Sun Mar 20 08:32:55 2005
--- crossfire/ChangeLog Tue Mar 22 13:44:36 2005
***************
*** 17,22 ****
--- 17,26 ----
------------------------------------------------------------------------------
Changes for CVS:
+ common/living.c: Allow luck to drop back to zero. Limit bad luck object to
+ +/-100 to prevent overflows.
+ Andreas Kirschbaum 2005-03-22
+
common/living.c: When randomly adjusting luck, change both op->stats.luck and
the applied bad_luck object.
server/attack.c: Do not decrease luck if a player kills himself with a spell
Index: crossfire/common/living.c
diff -c crossfire/common/living.c:1.66 crossfire/common/living.c:1.67
*** crossfire/common/living.c:1.66 Sun Mar 20 08:32:55 2005
--- crossfire/common/living.c Tue Mar 22 13:44:43 2005
***************
*** 1,6 ****
/*
* static char *rcsid_living_c =
! * "$Id: living.c,v 1.66 2005/03/20 16:32:55 akirschbaum Exp $";
*/
/*
--- 1,6 ----
/*
* static char *rcsid_living_c =
! * "$Id: living.c,v 1.67 2005/03/22 21:44:43 akirschbaum Exp $";
*/
/*
***************
*** 676,681 ****
--- 676,683 ----
void change_luck(object *op, int value) {
object *tmp;
archetype *at;
+ int new_luck;
+
at = find_archetype("luck");
if (!at)
LOG(llevError, "Couldn't find archetype luck.\n");
***************
*** 689,710 ****
SET_FLAG(tmp,FLAG_APPLIED);
}
if (value) {
op->stats.luck+=value;
! tmp->stats.luck+=value;
} else {
if (!tmp->stats.luck) {
- LOG(llevDebug, "Internal error in change_luck().\n");
return;
}
/* Randomly change the players luck. Basically, we move it
* back neutral (if greater>0, subtract, otherwise add)
- * I believe this is supposed to be > and not >= - this means
- * if your luck is -1/1, it won't get adjusted - only when your
- * luck is worse can you hope for improvment.
- * note that if we adjusted it with it is -1/1, that check above
- * for 0 luck will happen, resulting in error.
*/
! if (RANDOM()%(FABS(tmp->stats.luck)) > RANDOM()%30) {
int diff = tmp->stats.luck>0?-1:1;
op->stats.luck += diff;
tmp->stats.luck += diff;
--- 691,713 ----
SET_FLAG(tmp,FLAG_APPLIED);
}
if (value) {
+ /* Limit the luck value of the bad luck object to +/-100. This
+ * (arbitrary) value prevents overflows (both in the bad luck object and
+ * in op itself).
+ */
+ new_luck = tmp->stats.luck+value;
+ if (new_luck >= -100 && new_luck <= 100) {
op->stats.luck+=value;
! tmp->stats.luck = new_luck;
! }
} else {
if (!tmp->stats.luck) {
return;
}
/* Randomly change the players luck. Basically, we move it
* back neutral (if greater>0, subtract, otherwise add)
*/
! if (RANDOM()%(FABS(tmp->stats.luck)) >= RANDOM()%30) {
int diff = tmp->stats.luck>0?-1:1;
op->stats.luck += diff;
tmp->stats.luck += diff;
|
|
From: <cro...@li...> - 2005-03-22 21:03:03
|
Module Name: maps-bigworld Committed By: majorwoo Date: Tue Mar 22 21:02:36 UTC 2005 Modified Files: maps-bigworld/teamarena: teamwar Added Files: maps-bigworld/teamarena: twregister Log Message: Updates to the teamwar map, moved team registration to a new map, added spectator area The following files had too many changes to show the context diffs here: cvs rdiff -r1.3 -r1.4 maps-bigworld/teamarena/teamwar cvs rdiff -r0 -r1.1 maps-bigworld/teamarena/twregister |
|
From: <cro...@li...> - 2005-03-22 07:28:28
|
Module Name: crossfire Committed By: mwedel Date: Tue Mar 22 07:28:22 UTC 2005 Modified Files: crossfire/lib: Makefile.in Log Message: Update Makefile.in so that it will install the regions file. MSW 2005-03-21 Start of context diffs Index: crossfire/lib/Makefile.in diff -c crossfire/lib/Makefile.in:1.62 crossfire/lib/Makefile.in:1.63 *** crossfire/lib/Makefile.in:1.62 Wed Mar 9 11:17:52 2005 --- crossfire/lib/Makefile.in Mon Mar 21 23:28:22 2005 *************** *** 1,8 **** ! # Makefile.in generated by automake 1.9.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, ! # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. --- 1,8 ---- ! # Makefile.in generated by automake 1.9.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, ! # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. *************** *** 225,231 **** dist_noinst_SCRIPTS = collect.pl util.pl checkarch.pl dist_pkgdata_DATA = artifacts def_help formulae messages races smooth\ animations archetypes bmaps bmaps.paths crossfire.0 \ ! crossfire.1 faces attackmess image_info materials CONF_FILES = settings motd dm_file forbid ban_file exp_table VAR_FILES = highscore banish_file bookarch temp.maps clockdata --- 225,231 ---- dist_noinst_SCRIPTS = collect.pl util.pl checkarch.pl dist_pkgdata_DATA = artifacts def_help formulae messages races smooth\ animations archetypes bmaps bmaps.paths crossfire.0 \ ! crossfire.1 faces attackmess image_info materials regions CONF_FILES = settings motd dm_file forbid ban_file exp_table VAR_FILES = highscore banish_file bookarch temp.maps clockdata |
|
From: <cro...@li...> - 2005-03-22 07:23:10
|
Module Name: client
Committed By: mwedel
Date: Tue Mar 22 07:23:01 UTC 2005
Modified Files:
client: ChangeLog configure configure.in
client/common: client.h commands.c config.h.in image.c init.c
client/gtk: config.c gx11.c gx11.h image.c map.c sdl.c
client/gtk-v2/src: Makefile.am Makefile.in config.c gtk2proto.h image.c
image.h info.c inventory.c keys.c main.c map.c png.c sdl.c
client/x11: xutil.c
Added Files:
client/gtk-v2/src: opengl.c
Log Message:
Main change of this is addition of opengl drawing for the map in the gtk-v2
client. On my system, the opengl code is about 10 times faster than the
sdl code was, making it so I can turn on all the bells and whistles (smoothing,
best lighting) and still use less than 10% cpu time. As part of this, I
redid the smoothing logic, so the client now requires a new server for
smoothing to work (needs push logic, as client won't request smoothing
info as that adds a lot of complication). This change was done because
the old smoothing code wasn't that efficient - now, we store the smoothing
face along with the face it smooths, so finding the smoothing info is
much faster.
--
configure.in, configure: Add check for -lglut - indication we have opengl
libraries available.
common/client.h: Remove Smooths struct. Change CONFIG_SDL to
CONFIG_DISPLAY, and add CFG_DM_... to denote different display modes,
since there is more than just sdl and not sdl now.
common/commands.c: Don't have SmoothCmd try to update what spaces need
to be redrawn - for opengl, it doesn't care about that, and for
most other maps, it will figure it out when it needs to redraw
anyways.
common/config.h.in: Addition of HAVE_OPENGL line.
common/image.c: Remove getsmooth() - rely on push logic.
common/init.c: Update want_config[CONFIG_SDL] to
want_config[CONFIG_DISPLAYMODE]
gtk/config.c: Change access to CONFIG_DISPLAYMODE
gtk/gx11.c: Change access to CONFIG_DISPLAYMODE. Add -smooth command line
option.
gtk/gx11.h: Add smooth_face to PixmapInfo struct.
gtk/image.c: Change access to CONFIG_DISPLAYMODE. When getting new
PixmapInfo struct, use calloc so we are sure all fields are initialized
to zero. Add addsmooth().
gtk/map.c: Change access to CONFIG_DISPLAYMODE. Change how we access
smooth face info.
gtk/sdl.c: Change how we access smooth face info.
gtk-v2/src/Makefile.am, gtk-v2/src/Makefile.in: Add addition of OPENGL_LIBS
to link libs. Add opengl.c file.
gtk-v2/src/config.c: Add image.h include.
gtk-v2/src/gtk2proto.h: Rebuilt.
gtk-v2/src/image.c: Change access to CONFIG_DISPLAYMODE. Add hooks for
opengl image generation. Change call for pixmap creation from malloc
to calloc. Add addsmooth().
gtk-v2/src/image.h. If we have opengl, include GL/gl.h. Add fields
for opengl texture maps.
gtk-v2/src/info.c: Update so text line wraps if it is too long.
gtk-v2/src/inventory.c: Add checks to make sure object face is
valid before trying to draw. In icon mode, add code to cleanup
old fields (if you drop an item, it wouldn't erase the list item
in the list). Also, free callbacks, as they effectively stack,
and we were using incorrect object pointers (pointer from first
callback, which didn't match current one).
gtk-v2/src/keys.c: Add image.h to includes.
gtk-v2/src/main.c: Add image.h to includes. Change access to
CONFIG_DISPLAYMODE. Add -opengl command switch. Remove
+sdl and popups command line options. Relocate setup of
cache call setup to after we know all windows have been created.
gtk-v2/src/map.c: Change access to CONFIG_DISPLAYMODE. Add opengl
drawing hooks. Change access for smooth info. Implement
button press code for map window (basically grabbed from
gtk/map.c)
gtk-v2/src/opengl.c: New file containing opengl draw code.
gtk-v2/src/png.c: Remove some unused code resulting in compile warnings.
gtk-v2/src/sdl.c: Remove some commented out code. Change access method
for smoothing code.
x11/xutil.c: Change access to CONFIG_DISPLAYMODE. Add addsmooth()
function.
MSW 2005-03-20
The following files had too many changes to show the context diffs here:
cvs rdiff -r1.49 -r1.50 client/configure
cvs rdiff -r1.60 -r1.61 client/gtk/gx11.c
cvs rdiff -r0 -r1.1 client/gtk-v2/src/opengl.c
Start of context diffs
Index: client/ChangeLog
diff -c client/ChangeLog:1.4 client/ChangeLog:1.5
*** client/ChangeLog:1.4 Sun Mar 13 07:18:21 2005
--- client/ChangeLog Mon Mar 21 23:22:54 2005
***************
*** 1,9 ****
! "$Id: ChangeLog,v 1.4 2005/03/13 15:18:21 ryo_saeba Exp $"
Top of CVS tree:
------------------------------------------------------------------------------
! Applied patch #1161817 (cowboyatheart): Add wands/staves/rods/horns to new pickup (client).
gtk/gx11.c: add new 'magic devices' menu option.
Ryo 2005-03-13
--- 1,77 ----
! "$Id: ChangeLog,v 1.5 2005/03/22 07:22:54 mwedel Exp $"
Top of CVS tree:
------------------------------------------------------------------------------
! Main change of this is addition of opengl drawing for the map in the gtk-v2
! client. On my system, the opengl code is about 10 times faster than the
! sdl code was, making it so I can turn on all the bells and whistles (smoothing,
! best lighting) and still use less than 10% cpu time. As part of this, I
! redid the smoothing logic, so the client now requires a new server for
! smoothing to work (needs push logic, as client won't request smoothing
! info as that adds a lot of complication). This change was done because
! the old smoothing code wasn't that efficient - now, we store the smoothing
! face along with the face it smooths, so finding the smoothing info is
! much faster.
! --
! configure.in, configure: Add check for -lglut - indication we have opengl
! libraries available.
! common/client.h: Remove Smooths struct. Change CONFIG_SDL to
! CONFIG_DISPLAY, and add CFG_DM_... to denote different display modes,
! since there is more than just sdl and not sdl now.
! common/commands.c: Don't have SmoothCmd try to update what spaces need
! to be redrawn - for opengl, it doesn't care about that, and for
! most other maps, it will figure it out when it needs to redraw
! anyways.
! common/config.h.in: Addition of HAVE_OPENGL line.
! common/image.c: Remove getsmooth() - rely on push logic.
! common/init.c: Update want_config[CONFIG_SDL] to
! want_config[CONFIG_DISPLAYMODE]
! gtk/config.c: Change access to CONFIG_DISPLAYMODE
! gtk/gx11.c: Change access to CONFIG_DISPLAYMODE. Add -smooth command line
! option.
! gtk/gx11.h: Add smooth_face to PixmapInfo struct.
! gtk/image.c: Change access to CONFIG_DISPLAYMODE. When getting new
! PixmapInfo struct, use calloc so we are sure all fields are initialized
! to zero. Add addsmooth().
! gtk/map.c: Change access to CONFIG_DISPLAYMODE. Change how we access
! smooth face info.
! gtk/sdl.c: Change how we access smooth face info.
! gtk-v2/src/Makefile.am, gtk-v2/src/Makefile.in: Add addition of OPENGL_LIBS
! to link libs. Add opengl.c file.
! gtk-v2/src/config.c: Add image.h include.
! gtk-v2/src/gtk2proto.h: Rebuilt.
! gtk-v2/src/image.c: Change access to CONFIG_DISPLAYMODE. Add hooks for
! opengl image generation. Change call for pixmap creation from malloc
! to calloc. Add addsmooth().
! gtk-v2/src/image.h. If we have opengl, include GL/gl.h. Add fields
! for opengl texture maps.
! gtk-v2/src/info.c: Update so text line wraps if it is too long.
! gtk-v2/src/inventory.c: Add checks to make sure object face is
! valid before trying to draw. In icon mode, add code to cleanup
! old fields (if you drop an item, it wouldn't erase the list item
! in the list). Also, free callbacks, as they effectively stack,
! and we were using incorrect object pointers (pointer from first
! callback, which didn't match current one).
! gtk-v2/src/keys.c: Add image.h to includes.
! gtk-v2/src/main.c: Add image.h to includes. Change access to
! CONFIG_DISPLAYMODE. Add -opengl command switch. Remove
! +sdl and popups command line options. Relocate setup of
! cache call setup to after we know all windows have been created.
! gtk-v2/src/map.c: Change access to CONFIG_DISPLAYMODE. Add opengl
! drawing hooks. Change access for smooth info. Implement
! button press code for map window (basically grabbed from
! gtk/map.c)
! gtk-v2/src/opengl.c: New file containing opengl draw code.
! gtk-v2/src/png.c: Remove some unused code resulting in compile warnings.
! gtk-v2/src/sdl.c: Remove some commented out code. Change access method
! for smoothing code.
! x11/xutil.c: Change access to CONFIG_DISPLAYMODE. Add addsmooth()
! function.
! MSW 2005-03-20
!
! Applied patch #1161817 (cowboyatheart): Add wands/staves/rods/horns to new
! pickup (client).
gtk/gx11.c: add new 'magic devices' menu option.
Ryo 2005-03-13
Index: client/configure.in
diff -c client/configure.in:1.48 client/configure.in:1.49
*** client/configure.in:1.48 Wed Mar 2 00:19:43 2005
--- client/configure.in Mon Mar 21 23:22:57 2005
***************
*** 39,44 ****
--- 39,49 ----
AC_SUBST(INTLLIBS)
CF_SUBDIRS="$CF_SUBDIRS gtk-v2"
+ AC_CHECK_LIB(glut, main, OPENGL_LIBS="-lglut")
+ AC_SUBST(OPENGL_LIBS)
+ if eval "test x$OPENGL_LIBS != x"; then
+ AC_DEFINE(HAVE_OPENGL)
+ fi
dnl end of gtk-v2 stuff
Index: client/common/client.h
diff -c client/common/client.h:1.24 client/common/client.h:1.25
*** client/common/client.h:1.24 Sun Feb 13 21:42:01 2005
--- client/common/client.h Mon Mar 21 23:22:58 2005
***************
*** 1,6 ****
/*
* static char *rcsid_client_h =
! * "$Id: client.h,v 1.24 2005/02/14 05:42:01 mwedel Exp $";
*/
/*
Crossfire client, a client program for the crossfire program.
--- 1,6 ----
/*
* static char *rcsid_client_h =
! * "$Id: client.h,v 1.25 2005/03/22 07:22:58 mwedel Exp $";
*/
/*
Crossfire client, a client program for the crossfire program.
***************
*** 74,88 ****
extern Animations animations[MAXANIM];
- #define MAXSMOOTH 1000
- typedef struct Smooths {
- uint8 received:1;
- uint16 smoothid;
- uint16 face;
- } Smooths;
-
- extern Smooths smooths[MAXSMOOTH];
- extern int smoothused;
#define CAN_SMOOTH(__SMOOTHLEVEL) (__SMOOTHLEVEL)
/* ClientSocket could probably hold more of the global values - it could
--- 74,79 ----
***************
*** 146,152 ****
#define CONFIG_ICONSCALE 9
#define CONFIG_MAPSCALE 10
#define CONFIG_POPUPS 11
! #define CONFIG_SDL 12
#define CONFIG_SHOWICON 13
#define CONFIG_TOOLTIPS 14
#define CONFIG_SOUND 15
--- 137,143 ----
#define CONFIG_ICONSCALE 9
#define CONFIG_MAPSCALE 10
#define CONFIG_POPUPS 11
! #define CONFIG_DISPLAYMODE 12
#define CONFIG_SHOWICON 13
#define CONFIG_TOOLTIPS 14
#define CONFIG_SOUND 15
***************
*** 172,177 ****
--- 163,176 ----
#define CFG_LT_PIXEL 2
#define CFG_LT_PIXEL_BEST 3
+ /* CONFIG_DISPLAYMODE can have several possible values. Give
+ * defines for the possibilities.
+ */
+ #define CFG_DM_PIXMAP 0
+ #define CFG_DM_SDL 1
+ #define CFG_DM_OPENGL 2
+
+
extern sint16 want_config[CONFIG_NUMS], use_config[CONFIG_NUMS];
/* see common/init.c - basically, this is a string to number
Index: client/common/config.h.in
diff -c client/common/config.h.in:1.3 client/common/config.h.in:1.4
*** client/common/config.h.in:1.3 Sat May 17 22:59:58 2003
--- client/common/config.h.in Mon Mar 21 23:22:58 2005
***************
*** 95,97 ****
--- 95,100 ----
/* The size of a `long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG
+
+ /* The size of a `long long', as computed by sizeof. */
+ #undef HAVE_OPENGL
Index: client/common/image.c
diff -c client/common/image.c:1.16 client/common/image.c:1.17
*** client/common/image.c:1.16 Fri Jan 30 14:03:37 2004
--- client/common/image.c Mon Mar 21 23:22:58 2005
***************
*** 1,5 ****
char *rcsid_common_image_c =
! "$Id: image.c,v 1.16 2004/01/30 22:03:37 ryo_saeba Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_common_image_c =
! "$Id: image.c,v 1.17 2005/03/22 07:22:58 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 367,399 ****
void requestsmooth (int pnum){
cs_print_string (csocket.fd, "asksmooth %d",pnum);
}
- int getsmooth (int face){
- int i;
- if (smoothused<1){
- smooths[0].smoothid=face;
- smooths[0].received=0;
- requestsmooth(face);
- smoothused++;
- return 0;
- }
- for (i=0;i<smoothused;i++){
- if (smooths[i].smoothid==face){
- if (smooths[i].received)
- return smooths[i].face;
- else{
- return -1;
- }
- }
- }
- if (smoothused<MAXSMOOTH){
- smooths[smoothused].smoothid=face;
- smooths[smoothused].received=0;
- requestsmooth(face);
- smoothused++;
- return -1;
- }
- return -1;
- }
/******************************************************************************
*
--- 367,372 ----
***************
*** 506,516 ****
facetoname[i]=NULL;
}
}
- /* Also reset smooth data, considered to be part of image cache
- * (Actually this is the better place to handle it) :P
- */
- smoothused=0;
- memset (smooths,sizeof(Smooths)*MAXSMOOTH,0);
}
--- 479,484 ----
Index: client/common/init.c
diff -c client/common/init.c:1.20 client/common/init.c:1.21
*** client/common/init.c:1.20 Wed Feb 9 23:03:35 2005
--- client/common/init.c Mon Mar 21 23:22:58 2005
***************
*** 1,5 ****
char *rcsid_common_init_c =
! "$Id: init.c,v 1.20 2005/02/10 07:03:35 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_common_init_c =
! "$Id: init.c,v 1.21 2005/03/22 07:22:58 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 172,178 ****
want_config[CONFIG_ICONSCALE] = 100;
want_config[CONFIG_MAPSCALE] = 100;
want_config[CONFIG_POPUPS] = TRUE;
! want_config[CONFIG_SDL] = FALSE;
want_config[CONFIG_SHOWICON] = FALSE;
want_config[CONFIG_TOOLTIPS] = TRUE;
want_config[CONFIG_SOUND] = TRUE;
--- 172,178 ----
want_config[CONFIG_ICONSCALE] = 100;
want_config[CONFIG_MAPSCALE] = 100;
want_config[CONFIG_POPUPS] = TRUE;
! want_config[CONFIG_DISPLAYMODE] = CFG_DM_PIXMAP;
want_config[CONFIG_SHOWICON] = FALSE;
want_config[CONFIG_TOOLTIPS] = TRUE;
want_config[CONFIG_SOUND] = TRUE;
Index: client/gtk/config.c
diff -c client/gtk/config.c:1.19 client/gtk/config.c:1.20
*** client/gtk/config.c:1.19 Sun Feb 13 21:42:01 2005
--- client/gtk/config.c Mon Mar 21 23:22:58 2005
***************
*** 1,5 ****
char *rcsid_gtk_config_c =
! "$Id: config.c,v 1.19 2005/02/14 05:42:01 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_gtk_config_c =
! "$Id: config.c,v 1.20 2005/03/22 07:22:58 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 188,194 ****
"Map Scale (Takes effect next run)"},
{NULL, CBUTTON, CONFIG_SMOOTH, FLAG_MAPPANE | FLAG_UPDATE,
"Enable smoothing - Use additionnal CPU (Take effect on next connection)."},
! {NULL, CBUTTON, CONFIG_SDL, FLAG_MAPPANE,
"SDL Image Support (Take effect next run)"},
{NULL, CBUTTON, CONFIG_SHOWGRID, FLAG_MAPPANE | FLAG_UPDATE,
"Print Grid Overlay (SDL only, Slow, useful for debugging/development"},
--- 188,194 ----
"Map Scale (Takes effect next run)"},
{NULL, CBUTTON, CONFIG_SMOOTH, FLAG_MAPPANE | FLAG_UPDATE,
"Enable smoothing - Use additionnal CPU (Take effect on next connection)."},
! {NULL, CBUTTON, CONFIG_DISPLAYMODE, FLAG_MAPPANE,
"SDL Image Support (Take effect next run)"},
{NULL, CBUTTON, CONFIG_SHOWGRID, FLAG_MAPPANE | FLAG_UPDATE,
"Print Grid Overlay (SDL only, Slow, useful for debugging/development"},
***************
*** 348,354 ****
use_config[CONFIG_LIGHTING] = lighting;
}
#ifdef HAVE_SDL
! if (use_config[CONFIG_SDL])
/* This is done to make the 'lightmap' in the proper format */
init_SDL( NULL, 1);
#endif
--- 348,354 ----
use_config[CONFIG_LIGHTING] = lighting;
}
#ifdef HAVE_SDL
! if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_SDL)
/* This is done to make the 'lightmap' in the proper format */
init_SDL( NULL, 1);
#endif
Index: client/gtk/gx11.h
diff -c client/gtk/gx11.h:1.9 client/gtk/gx11.h:1.10
*** client/gtk/gx11.h:1.9 Sun Oct 26 03:43:55 2003
--- client/gtk/gx11.h Mon Mar 21 23:22:59 2005
***************
*** 1,6 ****
/*
* static char *rcsid_gx11_h =
! * "$Id: gx11.h,v 1.9 2003/10/26 11:43:55 ryo_saeba Exp $";
*/
/*
Crossfire client, a client program for the crossfire program.
--- 1,6 ----
/*
* static char *rcsid_gx11_h =
! * "$Id: gx11.h,v 1.10 2005/03/22 07:22:59 mwedel Exp $";
*/
/*
Crossfire client, a client program for the crossfire program.
***************
*** 56,61 ****
--- 56,62 ----
void *map_mask, *map_image;
uint16 map_width, map_height;
void *fog_image;
+ uint16 smooth_face;
} PixmapInfo;
extern PixmapInfo *pixmaps[MAXPIXMAPNUM];
Index: client/gtk/image.c
diff -c client/gtk/image.c:1.20 client/gtk/image.c:1.21
*** client/gtk/image.c:1.20 Sat May 22 08:51:50 2004
--- client/gtk/image.c Mon Mar 21 23:22:59 2005
***************
*** 1,5 ****
char *rcsid_gtk_image_c =
! "$Id: image.c,v 1.20 2004/05/22 15:51:50 tchize Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_gtk_image_c =
! "$Id: image.c,v 1.21 2005/03/22 07:22:59 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 133,139 ****
pi->map_image = NULL;
pi->map_mask = NULL;
! if (use_config[CONFIG_SDL]) {
#if defined(HAVE_SDL)
int i;
SDL_Surface *fog;
--- 133,139 ----
pi->map_image = NULL;
pi->map_mask = NULL;
! if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_SDL) {
#if defined(HAVE_SDL)
int i;
SDL_Surface *fog;
***************
*** 234,240 ****
if (pi->map_mask) gdk_pixmap_unref(pi->map_mask);
if (pi->map_image) {
#ifdef HAVE_SDL
! if (use_config[CONFIG_SDL]) {
free(((SDL_Surface*)pi->map_image)->pixels);
SDL_FreeSurface(pi->map_image);
SDL_FreeSurface(pi->fog_image);
--- 234,240 ----
if (pi->map_mask) gdk_pixmap_unref(pi->map_mask);
if (pi->map_image) {
#ifdef HAVE_SDL
! if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_SDL) {
free(((SDL_Surface*)pi->map_image)->pixels);
SDL_FreeSurface(pi->map_image);
SDL_FreeSurface(pi->fog_image);
***************
*** 261,267 ****
uint8 *png_tmp;
PixmapInfo *pi;
! pi = malloc(sizeof(PixmapInfo));
iscale = use_config[CONFIG_ICONSCALE];
--- 261,267 ----
uint8 *png_tmp;
PixmapInfo *pi;
! pi = calloc(1, sizeof(PixmapInfo));
iscale = use_config[CONFIG_ICONSCALE];
***************
*** 308,321 ****
pi->map_width = nx;
pi->map_height = ny;
create_map_image(png_tmp, pi);
! if (!use_config[CONFIG_SDL]) free(png_tmp);
} else {
pi->map_width = width;
pi->map_height = height;
/* if using SDL mode, a copy of the rgba data needs to be
* stored away.
*/
! if (use_config[CONFIG_SDL]) {
png_tmp = malloc(width * height * BPP);
memcpy(png_tmp, rgba_data, width * height * BPP);
} else
--- 308,321 ----
pi->map_width = nx;
pi->map_height = ny;
create_map_image(png_tmp, pi);
! if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_PIXMAP) free(png_tmp);
} else {
pi->map_width = width;
pi->map_height = height;
/* if using SDL mode, a copy of the rgba data needs to be
* stored away.
*/
! if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_SDL) {
png_tmp = malloc(width * height * BPP);
memcpy(png_tmp, rgba_data, width * height * BPP);
} else
***************
*** 338,343 ****
--- 338,348 ----
return 0;
}
+ void addsmooth(uint16 face, uint16 smooth_face)
+ {
+ pixmaps[face]->smooth_face = smooth_face;
+ }
+
/* This functions associates the image_data in the cache entry
* with the specific pixmap number. Returns 0 on success, -1
* on failure. Currently, there is no failure condition, but
Index: client/gtk/map.c
diff -c client/gtk/map.c:1.24 client/gtk/map.c:1.25
*** client/gtk/map.c:1.24 Sun May 9 00:56:54 2004
--- client/gtk/map.c Mon Mar 21 23:22:59 2005
***************
*** 1,5 ****
char *rcsid_gtk_map_c =
! "$Id: map.c,v 1.24 2004/05/09 07:56:54 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_gtk_map_c =
! "$Id: map.c,v 1.25 2005/03/22 07:22:59 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 202,208 ****
* let the neighbors know they should update their darkness
* now.
*/
! if (use_config[CONFIG_SDL] &&
(use_config[CONFIG_LIGHTING] == CFG_LT_PIXEL ||
use_config[CONFIG_LIGHTING] == CFG_LT_PIXEL_BEST)) {
if (x-1>0) the_map.cells[x-1][y].need_update = 1;
--- 202,208 ----
* let the neighbors know they should update their darkness
* now.
*/
! if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_SDL &&
(use_config[CONFIG_LIGHTING] == CFG_LT_PIXEL ||
use_config[CONFIG_LIGHTING] == CFG_LT_PIXEL_BEST)) {
if (x-1>0) the_map.cells[x-1][y].need_update = 1;
***************
*** 369,375 ****
} /* for x */
#ifdef HAVE_SDL
! if (use_config[CONFIG_SDL])
sdl_mapscroll(dx,dy);
else
#endif
--- 369,375 ----
} /* for x */
#ifdef HAVE_SDL
! if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_SDL)
sdl_mapscroll(dx,dy);
else
#endif
***************
*** 447,453 ****
sfaces[i]=0; /*black picture*/
}else{
slevels[i]=the_map.cells[emx][emy].smooth[layer];
! sfaces[i]=getsmooth(the_map.cells[emx][emy].heads[layer].face);
dosmooth=1;
}
}
--- 447,453 ----
sfaces[i]=0; /*black picture*/
}else{
slevels[i]=the_map.cells[emx][emy].smooth[layer];
! sfaces[i]=pixmaps[the_map.cells[emx][emy].heads[layer].face]->smooth_face;
dosmooth=1;
}
}
Index: client/gtk/sdl.c
diff -c client/gtk/sdl.c:1.15 client/gtk/sdl.c:1.16
*** client/gtk/sdl.c:1.15 Sat Feb 26 22:06:30 2005
--- client/gtk/sdl.c Mon Mar 21 23:22:59 2005
***************
*** 1,5 ****
char *rcsid_gtk_sdl_c =
! "$Id: sdl.c,v 1.15 2005/02/27 06:06:30 mwedel Exp $";
/*
CrossFire, A Multiplayer game for X-windows
--- 1,5 ----
char *rcsid_gtk_sdl_c =
! "$Id: sdl.c,v 1.16 2005/03/22 07:22:59 mwedel Exp $";
/*
CrossFire, A Multiplayer game for X-windows
***************
*** 651,657 ****
sfaces[i]=0; /*black picture*/
}else{
slevels[i]=the_map.cells[emx][emy].smooth[layer];
! sfaces[i]=getsmooth(the_map.cells[emx][emy].heads[layer].face);
dosmooth=1;
}
}
--- 651,657 ----
sfaces[i]=0; /*black picture*/
}else{
slevels[i]=the_map.cells[emx][emy].smooth[layer];
! sfaces[i]=pixmaps[the_map.cells[emx][emy].heads[layer].face]->smooth_face;
dosmooth=1;
}
}
Index: client/gtk-v2/src/Makefile.am
diff -c client/gtk-v2/src/Makefile.am:1.2 client/gtk-v2/src/Makefile.am:1.3
*** client/gtk-v2/src/Makefile.am:1.2 Mon Mar 7 23:18:09 2005
--- client/gtk-v2/src/Makefile.am Mon Mar 21 23:22:59 2005
***************
*** 19,24 ****
--- 19,25 ----
map.c \
magicmap.c \
menubar.c \
+ opengl.c \
png.c \
sdl.c \
sound.c \
***************
*** 30,36 ****
interface.c interface.h
! gcfclient2_LDADD = @PACKAGE_LIBS@ @DMALLOC_LIB@ $(INTLLIBS) ../../common/libcfclient.a @SDL_LIBS@
proto:
--- 31,37 ----
interface.c interface.h
! gcfclient2_LDADD = @PACKAGE_LIBS@ @DMALLOC_LIB@ $(INTLLIBS) ../../common/libcfclient.a @SDL_LIBS@ @OPENGL_LIBS@
proto:
Index: client/gtk-v2/src/config.c
diff -c client/gtk-v2/src/config.c:1.1 client/gtk-v2/src/config.c:1.2
*** client/gtk-v2/src/config.c:1.1 Tue Mar 1 23:52:04 2005
--- client/gtk-v2/src/config.c Mon Mar 21 23:23:00 2005
***************
*** 1,5 ****
char *rcsid_gtk2_config_c =
! "$Id: config.c,v 1.1 2005/03/02 07:52:04 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_gtk2_config_c =
! "$Id: config.c,v 1.2 2005/03/22 07:23:00 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 38,43 ****
--- 38,44 ----
#include "support.h"
#include "main.h"
+ #include "image.h"
#include "gtk2proto.h"
void load_defaults()
Index: client/x11/xutil.c
diff -c client/x11/xutil.c:1.17 client/x11/xutil.c:1.18
*** client/x11/xutil.c:1.17 Wed Feb 9 23:03:56 2005
--- client/x11/xutil.c Mon Mar 21 23:23:00 2005
***************
*** 1,5 ****
char *rcsid_x11_xutil_c =
! "$Id: xutil.c,v 1.17 2005/02/10 07:03:56 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
--- 1,5 ----
char *rcsid_x11_xutil_c =
! "$Id: xutil.c,v 1.18 2005/03/22 07:23:00 mwedel Exp $";
/*
Crossfire client, a client program for the crossfire program.
***************
*** 1334,1340 ****
* let the neighbors know they should update their darkness
* now.
*/
! if (use_config[CONFIG_SDL]) {
if (x-1>0) the_map.cells[x-1][y].need_update = 1;
if (y-1>0) the_map.cells[x][y-1].need_update = 1;
if (x+1<use_config[CONFIG_MAPWIDTH]) the_map.cells[x+1][y].need_update = 1;
--- 1334,1340 ----
* let the neighbors know they should update their darkness
* now.
*/
! if (use_config[CONFIG_DISPLAYMODE]==CFG_DM_SDL) {
if (x-1>0) the_map.cells[x-1][y].need_update = 1;
if (y-1>0) the_map.cells[x][y-1].need_update = 1;
if (x+1<use_config[CONFIG_MAPWIDTH]) the_map.cells[x+1][y].need_update = 1;
***************
*** 1521,1523 ****
--- 1521,1529 ----
}
}
}
+
+
+ /* x11 client doesn't do smoothing, so don't need to do anything with this */
+ void addsmooth(uint16 face, uint smooth_face)
+ {
+ }
|
|
From: <cro...@li...> - 2005-03-22 03:15:14
|
Module Name: crossfire
Committed By: majorwoo
Date: Tue Mar 22 03:15:07 UTC 2005
Modified Files:
crossfire/server: player.c
Log Message:
Allow a player to hide if standing near a hidden dm. #1119594
Start of context diffs
Index: crossfire/server/player.c
diff -c crossfire/server/player.c:1.159 crossfire/server/player.c:1.160
*** crossfire/server/player.c:1.159 Sun Mar 20 14:26:27 2005
--- crossfire/server/player.c Mon Mar 21 19:15:06 2005
***************
*** 1,6 ****
/*
* static char *rcsid_player_c =
! * "$Id: player.c,v 1.159 2005/03/20 22:26:27 majorwoo Exp $";
*/
/*
--- 1,6 ----
/*
* static char *rcsid_player_c =
! * "$Id: player.c,v 1.160 2005/03/22 03:15:06 majorwoo Exp $";
*/
/*
***************
*** 3043,3049 ****
if((player||friendly)
&&QUERY_FLAG(tmp,FLAG_MONSTER)&&!QUERY_FLAG(tmp,FLAG_UNAGGRESSIVE))
return 1;
! else if(tmp->type==PLAYER) return 1;
}
}
return 0;
--- 3043,3055 ----
if((player||friendly)
&&QUERY_FLAG(tmp,FLAG_MONSTER)&&!QUERY_FLAG(tmp,FLAG_UNAGGRESSIVE))
return 1;
! else if(tmp->type==PLAYER)
! {
! /*don't let a hidden DM prevent you from hiding*/
! if ( (QUERY_FLAG(tmp, FLAG_WIZ)) && (tmp->contr->hidden==1) )
! return 0;
! return 1;
! }
}
}
return 0;
|
|
From: <cro...@li...> - 2005-03-22 02:39:57
|
Module Name: crossfire
Committed By: majorwoo
Date: Tue Mar 22 02:39:50 UTC 2005
Modified Files:
crossfire/server: c_misc.c
Log Message:
Updated who to sort case insensitive and prevent the occasional printing of garbage characters
Start of context diffs
Index: crossfire/server/c_misc.c
diff -c crossfire/server/c_misc.c:1.50 crossfire/server/c_misc.c:1.51
*** crossfire/server/c_misc.c:1.50 Sun Mar 20 14:23:40 2005
--- crossfire/server/c_misc.c Mon Mar 21 18:39:50 2005
***************
*** 1,6 ****
/*
* static char *rcsid_c_misc_c =
! * "$Id: c_misc.c,v 1.50 2005/03/20 22:23:40 majorwoo Exp $";
*/
/*
--- 1,6 ----
/*
* static char *rcsid_c_misc_c =
! * "$Id: c_misc.c,v 1.51 2005/03/22 02:39:50 majorwoo Exp $";
*/
/*
***************
*** 250,256 ****
else
new_draw_info(NDI_UNIQUE, 0,op,"Heap checks out OK.");
return 1;
! }
#endif
int command_who (object *op, char *params) {
--- 250,256 ----
else
new_draw_info(NDI_UNIQUE, 0,op,"Heap checks out OK.");
return 1;
! yea }
#endif
int command_who (object *op, char *params) {
***************
*** 270,276 ****
/*local functon for qsort comparison*/
int name_cmp (chars_names *c1, chars_names *c2)
{
! return strcmp (c1->namebuf, c2->namebuf);
}
/*
--- 270,276 ----
/*local functon for qsort comparison*/
int name_cmp (chars_names *c1, chars_names *c2)
{
! return strcasecmp (c1->namebuf, c2->namebuf);
}
/*
***************
*** 292,305 ****
if (pl->state==ST_PLAYING || pl->state==ST_GET_PARTY_PASSWORD) {
num_players++;
! chars = (chars_names *) realloc(chars, (num_players+1)*sizeof(chars_names));
! sprintf(chars[num_players].namebuf, "");
! chars[num_players].login_order = num_players;
if (chars == NULL)
{
new_draw_info(NDI_UNIQUE, 0, op, "who failed - out of memory!");
return 0;
}
/*Check for WIZ's & AFK's*/
if (QUERY_FLAG(pl->ob,FLAG_WIZ))
num_wiz++;
--- 292,305 ----
if (pl->state==ST_PLAYING || pl->state==ST_GET_PARTY_PASSWORD) {
num_players++;
! chars = (chars_names *) realloc(chars, num_players*sizeof(chars_names));
if (chars == NULL)
{
new_draw_info(NDI_UNIQUE, 0, op, "who failed - out of memory!");
return 0;
}
+ sprintf(chars[num_players-1].namebuf, "");
+ chars[num_players-1].login_order = num_players;
/*Check for WIZ's & AFK's*/
if (QUERY_FLAG(pl->ob,FLAG_WIZ))
num_wiz++;
***************
*** 310,322 ****
if (settings.who_wiz_format[i]=='%') {
i++;
get_who_escape_code_value(tmpbuf,settings.who_wiz_format[i],pl);
! strcat(chars[num_players].namebuf, tmpbuf);
}
else if (settings.who_wiz_format[i]=='_')
! strcat(chars[num_players].namebuf," "); /* allow '_' to be used in place of spaces */
else {
sprintf(tmpbuf,"%c",settings.who_wiz_format[i]);
! strcat(chars[num_players].namebuf,tmpbuf);
}
}
}
--- 310,322 ----
if (settings.who_wiz_format[i]=='%') {
i++;
get_who_escape_code_value(tmpbuf,settings.who_wiz_format[i],pl);
! strcat(chars[num_players-1].namebuf, tmpbuf);
}
else if (settings.who_wiz_format[i]=='_')
! strcat(chars[num_players-1].namebuf," "); /* allow '_' to be used in place of spaces */
else {
sprintf(tmpbuf,"%c",settings.who_wiz_format[i]);
! strcat(chars[num_players-1].namebuf,tmpbuf);
}
}
}
***************
*** 325,337 ****
if (settings.who_format[i]=='%') {
i++;
get_who_escape_code_value(tmpbuf,settings.who_format[i],pl);
! strcat(chars[num_players].namebuf, tmpbuf);
}
else if (settings.who_format[i]=='_')
! strcat(chars[num_players].namebuf," "); /* allow '_' to be used in place of spaces */
else {
sprintf(tmpbuf,"%c",settings.who_format[i]);
! strcat(chars[num_players].namebuf,tmpbuf);
}
}
}
--- 325,337 ----
if (settings.who_format[i]=='%') {
i++;
get_who_escape_code_value(tmpbuf,settings.who_format[i],pl);
! strcat(chars[num_players-1].namebuf, tmpbuf);
}
else if (settings.who_format[i]=='_')
! strcat(chars[num_players-1].namebuf," "); /* allow '_' to be used in place of spaces */
else {
sprintf(tmpbuf,"%c",settings.who_format[i]);
! strcat(chars[num_players-1].namebuf,tmpbuf);
}
}
}
***************
*** 342,349 ****
sprintf(players_str, "Total Players (%d) -- WIZ(%d) AFK(%d)", num_players, num_wiz, num_afk);
new_draw_info(NDI_UNIQUE, 0, op, players_str);
}
! qsort (chars, (num_players+1), sizeof(chars_names), name_cmp);
! for (i=1;i<=num_players;i++)
new_draw_info(NDI_UNIQUE, 0, op, chars[i].namebuf);
free (chars);
return 1;
--- 342,349 ----
sprintf(players_str, "Total Players (%d) -- WIZ(%d) AFK(%d)", num_players, num_wiz, num_afk);
new_draw_info(NDI_UNIQUE, 0, op, players_str);
}
! qsort (chars, num_players, sizeof(chars_names), name_cmp);
! for (i=0;i<num_players;i++)
new_draw_info(NDI_UNIQUE, 0, op, chars[i].namebuf);
free (chars);
return 1;
|
|
From: <cro...@li...> - 2005-03-22 01:54:07
|
Module Name: crossfire
Committed By: majorwoo
Date: Tue Mar 22 01:54:01 UTC 2005
Modified Files:
crossfire/server: c_wiz.c
Log Message:
Add's a slight pause to dm's using the hide command to make it look more realistic.
Start of context diffs
Index: crossfire/server/c_wiz.c
diff -c crossfire/server/c_wiz.c:1.59 crossfire/server/c_wiz.c:1.60
*** crossfire/server/c_wiz.c:1.59 Sat Mar 19 22:22:59 2005
--- crossfire/server/c_wiz.c Mon Mar 21 17:54:00 2005
***************
*** 1,6 ****
/*
* static char *rcsid_c_wiz_c =
! * "$Id: c_wiz.c,v 1.59 2005/03/20 06:22:59 mwedel Exp $";
*/
/*
--- 1,6 ----
/*
* static char *rcsid_c_wiz_c =
! * "$Id: c_wiz.c,v 1.60 2005/03/22 01:54:00 majorwoo Exp $";
*/
/*
***************
*** 124,130 ****
"%s has entered the game.",op->name);
if ( !silent_dm )
{
! new_draw_info(NDI_UNIQUE | NDI_ALL | NDI_LT_GREEN, 1, NULL,
"The Dungeon Master has arrived!");
}
}
--- 124,132 ----
"%s has entered the game.",op->name);
if ( !silent_dm )
{
! /*slight delay to make it look like a person doing it*/
! sleep (1);
! new_draw_info(NDI_UNIQUE | NDI_ALL | NDI_LT_GREEN, 1, NULL,
"The Dungeon Master has arrived!");
}
}
***************
*** 135,146 ****
op->map->players--;
if ( !silent_dm )
{
! new_draw_info(NDI_UNIQUE | NDI_ALL | NDI_LT_GREEN, 1, NULL,
"The Dungeon Master is gone..");
}
! new_draw_info_format(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL,
"%s leaves the game.",op->name);
! new_draw_info_format(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL,
"%s left the game.",op->name);
}
}
--- 137,150 ----
op->map->players--;
if ( !silent_dm )
{
! new_draw_info(NDI_UNIQUE | NDI_ALL | NDI_LT_GREEN, 1, NULL,
"The Dungeon Master is gone..");
}
! new_draw_info_format(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL,
"%s leaves the game.",op->name);
! /*slight delay to make it look like a person doing it*/
! sleep (1);
! new_draw_info_format(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL,
"%s left the game.",op->name);
}
}
|
|
From: <cro...@li...> - 2005-03-21 19:29:43
|
Module Name: crossfire Committed By: majorwoo Date: Mon Mar 21 19:29:35 UTC 2005 Modified Files: crossfire/lib: regions Log Message: Corrected firevolcano region entry Start of context diffs Index: crossfire/lib/regions diff -c crossfire/lib/regions:1.2 crossfire/lib/regions:1.3 *** crossfire/lib/regions:1.2 Mon Mar 21 09:48:23 2005 --- crossfire/lib/regions Mon Mar 21 11:29:24 2005 *************** *** 196,200 **** --- 196,201 ---- This fiery volcano rose up from the mountains one day. It is inhabited by a strange race of fire creatures who seem friendly, but very competitive. endmsg + end nomore |
|
From: <cro...@li...> - 2005-03-21 17:48:34
|
Module Name: crossfire Committed By: majorwoo Date: Mon Mar 21 17:48:25 UTC 2005 Modified Files: crossfire/lib: regions Log Message: Defining a region for teamwar maps Start of context diffs Index: crossfire/lib/regions diff -c crossfire/lib/regions:1.1 crossfire/lib/regions:1.2 *** crossfire/lib/regions:1.1 Tue Mar 15 13:06:21 2005 --- crossfire/lib/regions Mon Mar 21 09:48:23 2005 *************** *** 190,194 **** --- 190,200 ---- Describe Stoneville endmsg end + region firevolcano + parent world + msg + This fiery volcano rose up from the mountains one day. It is inhabited by a + strange race of fire creatures who seem friendly, but very competitive. + endmsg nomore |
|
From: <cro...@li...> - 2005-03-21 05:59:28
|
Module Name: maps-bigworld Committed By: majorwoo Date: Mon Mar 21 05:59:14 UTC 2005 Modified Files: maps-bigworld/teamarena: teamwar Log Message: Moved to a real map, instead of a DM only after final testing. Start of context diffs Index: maps-bigworld/teamarena/teamwar diff -c maps-bigworld/teamarena/teamwar:1.2 maps-bigworld/teamarena/teamwar:1.3 *** maps-bigworld/teamarena/teamwar:1.2 Sun Mar 20 21:49:34 2005 --- maps-bigworld/teamarena/teamwar Sun Mar 20 21:59:12 2005 *************** *** 4759,4764 **** --- 4759,4767 ---- y 25 end arch invis_exit + slaying /world/world_115_115 + hp 20 + sp 30 x 19 y 25 end |
|
From: <cro...@li...> - 2005-03-21 05:49:45
|
Module Name: maps-bigworld Committed By: majorwoo Date: Mon Mar 21 05:49:35 UTC 2005 Modified Files: maps-bigworld/teamarena: teamwar Log Message: Correct teleport on teamwar map. Start of context diffs Index: maps-bigworld/teamarena/teamwar diff -c maps-bigworld/teamarena/teamwar:1.1 maps-bigworld/teamarena/teamwar:1.2 *** maps-bigworld/teamarena/teamwar:1.1 Sun Mar 20 14:35:37 2005 --- maps-bigworld/teamarena/teamwar Sun Mar 20 21:49:34 2005 *************** *** 1121,1127 **** Coward! You have been removed from team1! endmsg ! slaying x 4 y 16 end --- 1121,1127 ---- Coward! You have been removed from team1! endmsg ! slaying x 4 y 16 end *************** *** 4684,4690 **** msg Congratulations! endmsg ! slaying x 19 y 20 end --- 4684,4690 ---- msg Congratulations! endmsg ! slaying x 19 y 20 end *************** *** 4735,4744 **** name RULES msg For a team war please split into sides and proceed to the entry points for each team. - Team 1 is to the left. Team 2 is to the right. - For a free for all everyone should join the same team. endmsg x 19 --- 4735,4742 ---- *************** *** 8234,8240 **** Coward! You have been removed from team2! endmsg ! slaying x 34 y 16 end --- 8232,8238 ---- Coward! You have been removed from team2! endmsg ! slaying x 34 y 16 end *************** *** 8992,8998 **** end arch teleporter invisible 1 ! hp 4 sp 8 connected 5 speed 0.0 --- 8990,8996 ---- end arch teleporter invisible 1 ! hp 34 sp 8 connected 5 speed 0.0 |
|
From: <cro...@li...> - 2005-03-21 05:10:12
|
Module Name: crossfire Committed By: mwedel Date: Mon Mar 21 05:10:03 UTC 2005 Modified Files: crossfire/lib: animations archetypes bmaps bmaps.paths crossfire.0 crossfire.1 faces treasures.bld Log Message: recollect archetypes MSW 2005-03-20 The following files had too many changes to show the context diffs here: cvs rdiff -r1.156 -r1.157 crossfire/lib/archetypes cvs rdiff -r1.77 -r1.78 crossfire/lib/bmaps cvs rdiff -r1.79 -r1.80 crossfire/lib/bmaps.paths cvs rdiff -r1.66 -r1.67 crossfire/lib/faces Start of context diffs Index: crossfire/lib/animations diff -c crossfire/lib/animations:1.69 crossfire/lib/animations:1.70 *** crossfire/lib/animations:1.69 Sat Mar 12 21:48:07 2005 --- crossfire/lib/animations Sun Mar 20 21:09:48 2005 *************** *** 1644,1649 **** --- 1644,1697 ---- chalice.113 chalice.114 mina + anim chalice_bro + chalice_bro.111 + chalice_bro.111 + chalice_bro.111 + chalice_bro.112 + chalice_bro.113 + chalice_bro.114 + mina + anim chalice_cop + chalice_cop.111 + chalice_cop.111 + chalice_cop.111 + chalice_cop.112 + chalice_cop.113 + chalice_cop.114 + mina + anim chalice_iro + chalice_iro.111 + chalice_iro.111 + chalice_iro.111 + chalice_iro.112 + chalice_iro.113 + chalice_iro.114 + mina + anim chalice_plat + chalice_plat.111 + chalice_plat.111 + chalice_plat.111 + chalice_plat.112 + chalice_plat.113 + chalice_plat.114 + mina + anim chalice_sil + chalice_sil.111 + chalice_sil.111 + chalice_sil.111 + chalice_sil.112 + chalice_sil.113 + chalice_sil.114 + mina + anim chalice_tin + chalice_tin.111 + chalice_tin.111 + chalice_tin.111 + chalice_tin.112 + chalice_tin.113 + chalice_tin.114 + mina anim chaos explosion.111 burnout.11O Index: crossfire/lib/crossfire.0 Index: crossfire/lib/crossfire.1 Index: crossfire/lib/treasures.bld diff -c crossfire/lib/treasures.bld:1.27 crossfire/lib/treasures.bld:1.28 *** crossfire/lib/treasures.bld:1.27 Tue Mar 15 23:59:19 2005 --- crossfire/lib/treasures.bld Sun Mar 20 21:10:01 2005 *************** *** 10,16 **** # # This file contains various treasures, with generation rules. # ! # $Id: treasures.bld,v 1.27 2005/03/16 07:59:19 mwedel Exp $ # # As of version 0.91.1, what this file was extended to handle list # re-linking and generation of only 1 item on that list. This does away --- 10,16 ---- # # This file contains various treasures, with generation rules. # ! # $Id: treasures.bld,v 1.28 2005/03/21 05:10:01 mwedel Exp $ # # As of version 0.91.1, what this file was extended to handle list # re-linking and generation of only 1 item on that list. This does away |