(svn r6717) -Codechange: move OPENTTD_SPRITES_COUNT into table/sprites.h to use it from there.
authorDarkvater
Tue, 10 Oct 2006 09:40:12 +0000
changeset 4795 718c0aca2e3d
parent 4794 23b5ee70e87e
child 4796 20f8d2582b7b
(svn r6717) -Codechange: move OPENTTD_SPRITES_COUNT into table/sprites.h to use it from there.
gfxinit.c
table/sprites.h
--- a/gfxinit.c	Tue Oct 10 08:34:14 2006 +0000
+++ b/gfxinit.c	Tue Oct 10 09:40:12 2006 +0000
@@ -265,7 +265,6 @@
  * the old sprite-count offset from SPR_OPENTTD_BASE. With this there is no
  * correspondence of any kind with the ID's in the grf file, but results in
  * a maximum use of sprite slots. */
-#define OPENTTD_SPRITES_COUNT 109
 static const SpriteID _openttd_grf_indexes[] = {
 	SPR_IMG_AUTORAIL, SPR_CURSOR_WAYPOINT, // icons etc
 	134, 134,  // euro symbol medium size
--- a/table/sprites.h	Tue Oct 10 08:34:14 2006 +0000
+++ b/table/sprites.h	Tue Oct 10 09:40:12 2006 +0000
@@ -48,6 +48,7 @@
 	SPR_ASCII_SPACE_BIG   = 450,
 
 	/* Extra graphic spritenumbers */
+	OPENTTD_SPRITES_COUNT = 109, // number of gfx-sprites in openttd.grf
 	SPR_CANALS_BASE   = 5382,
 	SPR_SLOPES_BASE   = SPR_CANALS_BASE + 70,
 	SPR_AUTORAIL_BASE = SPR_SLOPES_BASE + 78,
@@ -94,7 +95,7 @@
 	SPR_LOCK = SPR_OPENTTD_BASE + 19,       // lock icon (for password protected servers)
 	SPR_FLAGS_BASE = SPR_OPENTTD_BASE + 83, // start of the flags block (in same order as enum NetworkLanguage)
 
-	SPR_AIRPORTX_BASE = SPR_OPENTTD_BASE + 109, // The sprites used for other airport angles
+	SPR_AIRPORTX_BASE = SPR_OPENTTD_BASE + OPENTTD_SPRITES_COUNT, // The sprites used for other airport angles
 	SPR_NEWAIRPORT_TARMAC = SPR_AIRPORTX_BASE,
 	SPR_NSRUNWAY1 = SPR_AIRPORTX_BASE + 1,
 	SPR_NSRUNWAY2 = SPR_AIRPORTX_BASE + 2,