summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Shaw <jshaw@netsurf-browser.org>2007-11-30 17:17:36 (GMT)
committer James Shaw <jshaw@netsurf-browser.org>2007-11-30 17:17:36 (GMT)
commit5494a3040c58613d621fb3028f1bca813b96fc8d (patch)
tree0fffb7c09f41cb3ee3956dd3766aaa4b6e3dcc6d
parentb05103d01fc21b5ac94c52f655ff44965cc35800 (diff)
downloadlibrosprite-5494a3040c58613d621fb3028f1bca813b96fc8d.tar.gz
librosprite-5494a3040c58613d621fb3028f1bca813b96fc8d.tar.bz2
Make oldmodes const, tweak comment
svn path=/import/jshaw/libsprite/; revision=10010
-rw-r--r--trunk/libsprite.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/trunk/libsprite.c b/trunk/libsprite.c
index 2e6dcea..9ed3fb1 100644
--- a/trunk/libsprite.c
+++ b/trunk/libsprite.c
@@ -7,8 +7,6 @@
#include "libsprite.h"
-#define LOGDBG(...) printf(__VA_ARGS__);
-
/* reads four bytes, 00, 11, 22 and 33, of a byte array b to give 0x33221100 */
#define BTUINT(b) (b[0] | (b[1] << 8) | (b[2] << 16) | (b[3] << 24))
@@ -35,7 +33,7 @@ struct rosprite_mask_state {
uint32_t bpp;
};
-static struct rosprite_mode oldmodes[] = {
+static const struct rosprite_mode oldmodes[] = {
/*0*/{ .colorbpp = 1, .maskbpp = 1, .mask_width = 1, .xdpi = 90, .ydpi = 45, .color_model = rosprite_rgb },
/*1*/{ .colorbpp = 2, .maskbpp = 1, .mask_width = 2, .xdpi = 45, .ydpi = 45, .color_model = rosprite_rgb },
/*2*/{ .colorbpp = 4, .maskbpp = 1, .mask_width = 4, .xdpi = 22, .ydpi = 45, .color_model = rosprite_rgb },
@@ -575,7 +573,7 @@ struct rosprite* sprite_load_sprite(FILE* spritefile)
uint32_t word2 = sprite_read_word(spritefile);
assert(word1 == word2); /* TODO: if they aren't, START FLASHING */
- /* swap rr and bb parts (seems to give the right result, but where is it documented? PRM1-731 */
+ /* swap rr and bb parts -- PRM1-731 */
uint32_t entry = ((word1 & 0xff000000) >> 16) | (word1 & 0x00ff0000) | ((word1 & 0x0000ff00) << 16) | 0xff;
sprite->palette[j] = entry;
}
@@ -688,4 +686,3 @@ void rosprite_destroy_palette(struct rosprite_palette* palette)
free(palette->palette);
free(palette);
}
-