aboutsummaryrefslogtreecommitdiff
path: root/devel.but
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2005-10-22 16:44:38 +0000
committerSimon Tatham <anakin@pobox.com>2005-10-22 16:44:38 +0000
commit40fcf516f40e10f23f5a9f6760bfffae206b2e49 (patch)
tree6c6ca9b79fdbcc5f57280812d8b2a032d6266b62 /devel.but
parentb44d75aa4e97e9264e585712a8ec5fa757b645ec (diff)
downloadpuzzles-40fcf516f40e10f23f5a9f6760bfffae206b2e49.zip
puzzles-40fcf516f40e10f23f5a9f6760bfffae206b2e49.tar.gz
puzzles-40fcf516f40e10f23f5a9f6760bfffae206b2e49.tar.bz2
puzzles-40fcf516f40e10f23f5a9f6760bfffae206b2e49.tar.xz
Cleanup: remove the game_state parameter to game_colours(). No game
was actually using it, and also it wasn't being called again for different game states or different game parameters, so it would have been a mistake to depend on anything in that game state. Games are now expected to commit in advance to a single fixed list of all the colours they will ever need, which was the case in practice already and simplifies any later port to a colour-poor platform. Also this change has removed a lot of unnecessary faff from midend_colours(). [originally from svn r6416]
Diffstat (limited to 'devel.but')
-rw-r--r--devel.but12
1 files changed, 2 insertions, 10 deletions
diff --git a/devel.but b/devel.but
index 66413ec..8696c83 100644
--- a/devel.but
+++ b/devel.but
@@ -1104,7 +1104,7 @@ create a fresh drawstate.
\S{backend-colours} \cw{colours()}
-\c float *(*colours)(frontend *fe, game_state *state, int *ncolours);
+\c float *(*colours)(frontend *fe, int *ncolours);
This function is responsible for telling the front end what colours
the puzzle will need to draw itself.
@@ -1115,15 +1115,7 @@ array of three times that many \c{float}s, containing the red, green
and blue components of each colour respectively as numbers in the
range [0,1].
-It is passed a sample \c{game_state} in case it needs one, although
-currently no puzzle does need this. (In fact, colours are not
-reallocated when the game parameters change or a new game is
-started, so you can't reliably use this \c{game_state} to allocate a
-different number of colours depending on the game. It is probably
-actually a mistake to rely on this parameter at all. I ought to
-either remove it or fix it; probably the former.)
-
-The final parameter passed to this function is a front end handle.
+The second parameter passed to this function is a front end handle.
The only things it is permitted to do with this handle are to call
the front-end function called \cw{frontend_default_colour()} (see
\k{frontend-default-colour}) or the utility function called