|
|
0dbfb8c |
Index: alex4-1.1/src/edit.c
|
|
|
0dbfb8c |
===================================================================
|
|
|
0dbfb8c |
--- alex4-1.1.orig/src/edit.c 2008-01-23 00:01:05.000000000 +0100
|
|
|
0dbfb8c |
+++ alex4-1.1/src/edit.c 2008-01-23 00:48:53.000000000 +0100
|
|
|
0dbfb8c |
@@ -69,8 +69,8 @@
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// show stuff
|
|
|
0dbfb8c |
- textprintf(bmp, data[THE_FONT].dat, 1, 1, 0, "TILE: %d,%d", tx, ty);
|
|
|
0dbfb8c |
- textprintf(bmp, data[THE_FONT].dat, 1, 11, 0, "SIZE: %d,%d", map->width, map->height);
|
|
|
0dbfb8c |
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, 1, 0, -1, "TILE: %d,%d", tx, ty);
|
|
|
0dbfb8c |
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, 11, 0, -1, "SIZE: %d,%d", map->width, map->height);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// show start pos
|
|
|
0dbfb8c |
x = (ABS(map->start_x) << 4) - map->offset_x;
|
|
|
0dbfb8c |
@@ -80,7 +80,7 @@
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// draw status bar
|
|
|
0dbfb8c |
rectfill(bmp, 0, 110, 159, 119, 1);
|
|
|
0dbfb8c |
- textprintf(bmp, data[THE_FONT].dat, 1, 111, 4, "EDITING: %s", get_filename(edit_path_and_file));
|
|
|
0dbfb8c |
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, 111, 4, -1, "EDITING: %s", get_filename(edit_path_and_file));
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
else if (edit_mode == EDIT_MODE_SELECT) { // draw tile palette
|
|
|
0dbfb8c |
// calculate offset depending on mouse pointer
|
|
|
0dbfb8c |
@@ -104,16 +104,16 @@
|
|
|
0dbfb8c |
else if (edit_mode == EDIT_MODE_STATS) { // draw map properties
|
|
|
0dbfb8c |
int ty = 16;
|
|
|
0dbfb8c |
clear_to_color(bmp, 3);
|
|
|
0dbfb8c |
- textprintf(bmp, data[THE_FONT].dat, 1, 1, 1, "%s (props)", get_filename(edit_path_and_file));
|
|
|
0dbfb8c |
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, 1, 1, -1, "%s (props)", get_filename(edit_path_and_file));
|
|
|
0dbfb8c |
line(bmp, 0, 10, 159, 10, 1);
|
|
|
0dbfb8c |
- textprintf(bmp, data[THE_FONT].dat, 1, ty+=10, 1, "Win by:");
|
|
|
0dbfb8c |
- textprintf(bmp, data[THE_FONT].dat, 1, ty+=10, 1, " 1) reach exit (%s)", (map->win_conditions & MAP_WIN_EXIT ? "X" : " "));
|
|
|
0dbfb8c |
- textprintf(bmp, data[THE_FONT].dat, 1, ty+=10, 1, " 2) kill boss (%s)", (map->win_conditions & MAP_WIN_KILL_GUARDIAN ? "X" : " "));
|
|
|
0dbfb8c |
- textprintf(bmp, data[THE_FONT].dat, 1, ty+=10, 1, " 3) kill all (%s)", (map->win_conditions & MAP_WIN_KILL_ALL ? "X" : " "));
|
|
|
0dbfb8c |
- textprintf(bmp, data[THE_FONT].dat, 1, ty+=10, 1, "4) Boss level: (%s)", (map->boss_level ? "X" : " "));
|
|
|
0dbfb8c |
- textprintf(bmp, data[THE_FONT].dat, 1, ty+=10, 1, "5) Name: %s", map->name);
|
|
|
0dbfb8c |
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, ty+=10, 1, -1, "Win by:");
|
|
|
0dbfb8c |
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, ty+=10, 1, -1, " 1) reach exit (%s)", (map->win_conditions & MAP_WIN_EXIT ? "X" : " "));
|
|
|
0dbfb8c |
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, ty+=10, 1, -1, " 2) kill boss (%s)", (map->win_conditions & MAP_WIN_KILL_GUARDIAN ? "X" : " "));
|
|
|
0dbfb8c |
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, ty+=10, 1, -1, " 3) kill all (%s)", (map->win_conditions & MAP_WIN_KILL_ALL ? "X" : " "));
|
|
|
0dbfb8c |
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, ty+=10, 1, -1, "4) Boss level: (%s)", (map->boss_level ? "X" : " "));
|
|
|
0dbfb8c |
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, ty+=10, 1, -1, "5) Name: %s", map->name);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
- textprintf(bmp, data[THE_FONT].dat, 1, 110, 1, "F1: back to editor");
|
|
|
0dbfb8c |
+ textprintf_ex(bmp, data[THE_FONT].dat, 1, 110, 1, -1, "F1: back to editor");
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
if (edit_mode != EDIT_MODE_STATS) {
|
|
|
0dbfb8c |
Index: alex4-1.1/src/hisc.c
|
|
|
0dbfb8c |
===================================================================
|
|
|
0dbfb8c |
--- alex4-1.1.orig/src/hisc.c 2008-01-23 00:48:53.000000000 +0100
|
|
|
0dbfb8c |
+++ alex4-1.1/src/hisc.c 2008-01-23 00:48:53.000000000 +0100
|
|
|
0dbfb8c |
@@ -153,9 +153,9 @@
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// draws a single hisc post
|
|
|
0dbfb8c |
void draw_hisc_post(Thisc *table, BITMAP *bmp, FONT *fnt, int x, int y, int color, int show_level) {
|
|
|
0dbfb8c |
- textprintf(bmp, fnt, x, y, color, "%s", table->name);
|
|
|
0dbfb8c |
- if (show_level) textprintf_right(bmp, fnt, x+80, y, color, "%2d", table->level);
|
|
|
0dbfb8c |
- textprintf_right(bmp, fnt, x+140, y, color, "%d", table->score);
|
|
|
0dbfb8c |
+ textprintf_ex(bmp, fnt, x, y, color, -1, "%s", table->name);
|
|
|
0dbfb8c |
+ if (show_level) textprintf_right_ex(bmp, fnt, x+80, y, color, -1, "%2d", table->level);
|
|
|
0dbfb8c |
+ textprintf_right_ex(bmp, fnt, x+140, y, color, -1, "%d", table->score);
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// draws the entire table
|
|
|
0dbfb8c |
Index: alex4-1.1/src/main.c
|
|
|
0dbfb8c |
===================================================================
|
|
|
0dbfb8c |
--- alex4-1.1.orig/src/main.c 2008-01-23 00:48:53.000000000 +0100
|
|
|
0dbfb8c |
+++ alex4-1.1/src/main.c 2008-01-23 00:48:53.000000000 +0100
|
|
|
0dbfb8c |
@@ -322,7 +322,7 @@
|
|
|
0dbfb8c |
cycle_count = 0;
|
|
|
0dbfb8c |
if (got_sound && duh_player != NULL) al_poll_duh(duh_player);
|
|
|
0dbfb8c |
i ++;
|
|
|
0dbfb8c |
- while(!cycle_count) yield_timeslice();
|
|
|
0dbfb8c |
+ while(!cycle_count) rest(0);
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
@@ -496,15 +496,15 @@
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
rectfill(bmp, 0, y, 159, y+9, 1);
|
|
|
0dbfb8c |
draw_sprite_h_flip(bmp, data[HERO_NORM].dat, 0, y+1);
|
|
|
0dbfb8c |
- textprintf(bmp, data[THE_FONT].dat, 9, y+1, 4, " :%d", player.lives);
|
|
|
0dbfb8c |
+ textprintf_ex(bmp, data[THE_FONT].dat, 9, y+1, 4, -1, " :%d", player.lives);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
for(i = 0; i < player.health; i ++)
|
|
|
0dbfb8c |
draw_sprite(bmp, data[HEART2].dat, 40 + 10 * i, y-3);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
draw_sprite(bmp, data[EGG].dat, 80, y-5);
|
|
|
0dbfb8c |
- textprintf(bmp, data[THE_FONT].dat, 85, y+1, 4, " :%d", player.ammo);
|
|
|
0dbfb8c |
+ textprintf_ex(bmp, data[THE_FONT].dat, 85, y+1, 4, -1, " :%d", player.ammo);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
- textprintf_right(bmp, data[THE_FONT].dat, 158, y+1, 4, "%d", player.score);
|
|
|
0dbfb8c |
+ textprintf_right_ex(bmp, data[THE_FONT].dat, 158, y+1, 4, -1, "%d", player.score);
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
@@ -626,7 +626,6 @@
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// various allegro things
|
|
|
0dbfb8c |
log2file(" initializing allegro");
|
|
|
0dbfb8c |
- text_mode(-1);
|
|
|
0dbfb8c |
garble_string(init_string, 53);
|
|
|
0dbfb8c |
#ifdef __unix__
|
|
|
0dbfb8c |
snprintf(filename, sizeof(filename), "%s/.alex4/alex4.ini",
|
|
|
0dbfb8c |
@@ -635,7 +634,6 @@
|
|
|
0dbfb8c |
#else
|
|
|
0dbfb8c |
set_config_file("alex4.ini");
|
|
|
0dbfb8c |
#endif
|
|
|
0dbfb8c |
- set_window_close_button(FALSE);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// install timers
|
|
|
0dbfb8c |
log2file(" installing timers");
|
|
|
0dbfb8c |
@@ -701,7 +699,7 @@
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// show initial loading screen
|
|
|
0dbfb8c |
clear(swap_screen);
|
|
|
0dbfb8c |
- textout_centre(swap_screen, font, "loading...", 320, 200, 1);
|
|
|
0dbfb8c |
+ textout_centre_ex(swap_screen, font, "loading...", 320, 200, 1, -1);
|
|
|
0dbfb8c |
blit_to_screen(swap_screen);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
#ifndef __unix__
|
|
|
0dbfb8c |
@@ -788,8 +786,8 @@
|
|
|
0dbfb8c |
clear_to_color(swap_screen, 3);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
bmp = data[FLD_LOGO].dat;
|
|
|
0dbfb8c |
- draw_character(swap_screen, bmp, 80 - bmp->w / 2 + 0, 50 + 1, 1);
|
|
|
0dbfb8c |
- draw_character(swap_screen, bmp, 80 - bmp->w / 2, 50, 4);
|
|
|
0dbfb8c |
+ draw_character_ex(swap_screen, bmp, 80 - bmp->w / 2 + 0, 50 + 1, 1, -1);
|
|
|
0dbfb8c |
+ draw_character_ex(swap_screen, bmp, 80 - bmp->w / 2, 50, 4, -1);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
blit_to_screen(swap_screen);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
@@ -1100,11 +1098,11 @@
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// draws text with an outline
|
|
|
0dbfb8c |
void textout_outline(BITMAP *bmp, const char *txt, int x, int y) {
|
|
|
0dbfb8c |
- textout(bmp, data[THE_FONT].dat, txt, x+1, y, 1);
|
|
|
0dbfb8c |
- textout(bmp, data[THE_FONT].dat, txt, x-1, y, 1);
|
|
|
0dbfb8c |
- textout(bmp, data[THE_FONT].dat, txt, x, y+1, 1);
|
|
|
0dbfb8c |
- textout(bmp, data[THE_FONT].dat, txt, x, y-1, 1);
|
|
|
0dbfb8c |
- textout(bmp, data[THE_FONT].dat, txt, x, y, 4);
|
|
|
0dbfb8c |
+ textout_ex(bmp, data[THE_FONT].dat, txt, x+1, y, 1, -1);
|
|
|
0dbfb8c |
+ textout_ex(bmp, data[THE_FONT].dat, txt, x-1, y, 1, -1);
|
|
|
0dbfb8c |
+ textout_ex(bmp, data[THE_FONT].dat, txt, x, y+1, 1, -1);
|
|
|
0dbfb8c |
+ textout_ex(bmp, data[THE_FONT].dat, txt, x, y-1, 1, -1);
|
|
|
0dbfb8c |
+ textout_ex(bmp, data[THE_FONT].dat, txt, x, y, 4, -1);
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
@@ -1153,7 +1151,7 @@
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// let other processes play
|
|
|
0dbfb8c |
- yield_timeslice();
|
|
|
0dbfb8c |
+ rest(0);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// draw stuff
|
|
|
0dbfb8c |
draw_frame(swap_screen, 1);
|
|
|
0dbfb8c |
@@ -1195,7 +1193,7 @@
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// let other processes play
|
|
|
0dbfb8c |
- yield_timeslice();
|
|
|
0dbfb8c |
+ rest(0);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// draw stuff
|
|
|
0dbfb8c |
draw_frame(swap_screen, 1);
|
|
|
0dbfb8c |
@@ -1257,7 +1255,7 @@
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// let other processes play
|
|
|
0dbfb8c |
- yield_timeslice();
|
|
|
0dbfb8c |
+ rest(0);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// draw stuff
|
|
|
0dbfb8c |
draw_custom_ending(swap_screen);
|
|
|
0dbfb8c |
@@ -1373,7 +1371,7 @@
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// let other processes play
|
|
|
0dbfb8c |
- yield_timeslice();
|
|
|
0dbfb8c |
+ rest(0);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// draw stuff
|
|
|
0dbfb8c |
blit(swap2, swap_screen, 0, 0, 0, 0, 160, 120);
|
|
|
0dbfb8c |
@@ -1447,12 +1445,12 @@
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
sprintf(buf, "%s %d %s", (level > min ? "<" : " "), level, (level < max ? ">" : " "));
|
|
|
0dbfb8c |
clear_bitmap(stuff);
|
|
|
0dbfb8c |
- textout_centre(stuff, data[THE_FONT].dat, buf, stuff->w/2 + 1, 1, 2);
|
|
|
0dbfb8c |
- textout_centre(stuff, data[THE_FONT].dat, buf, stuff->w/2, 0, 1);
|
|
|
0dbfb8c |
+ textout_centre_ex(stuff, data[THE_FONT].dat, buf, stuff->w/2 + 1, 1, 2, -1);
|
|
|
0dbfb8c |
+ textout_centre_ex(stuff, data[THE_FONT].dat, buf, stuff->w/2, 0, 1, -1);
|
|
|
0dbfb8c |
stretch_sprite(bmp, stuff, 80 - 4*stuff->w/2, 30, 4*stuff->w, 4*stuff->h);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
- textout_centre(bmp, data[THE_FONT].dat, "SELECT START LEVEL", 80, 90, 1);
|
|
|
0dbfb8c |
- textout_centre(bmp, data[THE_FONT].dat, "SELECT START LEVEL", 79, 89, 4);
|
|
|
0dbfb8c |
+ textout_centre_ex(bmp, data[THE_FONT].dat, "SELECT START LEVEL", 80, 90, 1, -1);
|
|
|
0dbfb8c |
+ textout_centre_ex(bmp, data[THE_FONT].dat, "SELECT START LEVEL", 79, 89, 4, -1);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
if (options.one_hundred) {
|
|
|
0dbfb8c |
if (game_count & 32 || game_count & 16) draw_sprite(bmp, data[SHIP100].dat, xpos, 2);
|
|
|
0dbfb8c |
@@ -2343,7 +2341,7 @@
|
|
|
0dbfb8c |
if (is_fire(&ctrl) || is_jump(&ctrl)) done = 1;
|
|
|
0dbfb8c |
if (keypressed()) done = 1;
|
|
|
0dbfb8c |
if (key[KEY_ESC]) done = -1;
|
|
|
0dbfb8c |
- yield_timeslice();
|
|
|
0dbfb8c |
+ rest(0);
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
if (done == -1) {
|
|
|
0dbfb8c |
@@ -2493,7 +2491,7 @@
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// let other processes play
|
|
|
0dbfb8c |
- yield_timeslice();
|
|
|
0dbfb8c |
+ rest(0);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// draw
|
|
|
0dbfb8c |
frame_count ++;
|
|
|
0dbfb8c |
@@ -2524,20 +2522,20 @@
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
y = 60;
|
|
|
0dbfb8c |
x = 50;
|
|
|
0dbfb8c |
- textout(bmp, data[THE_FONT].dat, start_string, x+1, y+1, 1);
|
|
|
0dbfb8c |
- textout(bmp, data[THE_FONT].dat, start_string, x, y, 4);
|
|
|
0dbfb8c |
+ textout_ex(bmp, data[THE_FONT].dat, start_string, x+1, y+1, 1, -1);
|
|
|
0dbfb8c |
+ textout_ex(bmp, data[THE_FONT].dat, start_string, x, y, 4, -1);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
y += step;
|
|
|
0dbfb8c |
- textout(bmp, data[THE_FONT].dat, "HIGH SCORES", x+1, y+1, 1);
|
|
|
0dbfb8c |
- textout(bmp, data[THE_FONT].dat, "HIGH SCORES", x, y, 4);
|
|
|
0dbfb8c |
+ textout_ex(bmp, data[THE_FONT].dat, "HIGH SCORES", x+1, y+1, 1, -1);
|
|
|
0dbfb8c |
+ textout_ex(bmp, data[THE_FONT].dat, "HIGH SCORES", x, y, 4, -1);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
y += step;
|
|
|
0dbfb8c |
- textout(bmp, data[THE_FONT].dat, "EDITOR", x+1, y+1, 1);
|
|
|
0dbfb8c |
- textout(bmp, data[THE_FONT].dat, "EDITOR", x, y, 4);
|
|
|
0dbfb8c |
+ textout_ex(bmp, data[THE_FONT].dat, "EDITOR", x+1, y+1, 1, -1);
|
|
|
0dbfb8c |
+ textout_ex(bmp, data[THE_FONT].dat, "EDITOR", x, y, 4, -1);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
y += step;
|
|
|
0dbfb8c |
- textout(bmp, data[THE_FONT].dat, "QUIT", x+1, y+1, 1);
|
|
|
0dbfb8c |
- textout(bmp, data[THE_FONT].dat, "QUIT", x, y, 4);
|
|
|
0dbfb8c |
+ textout_ex(bmp, data[THE_FONT].dat, "QUIT", x+1, y+1, 1, -1);
|
|
|
0dbfb8c |
+ textout_ex(bmp, data[THE_FONT].dat, "QUIT", x, y, 4, -1);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
draw_sprite(bmp, data[POINTER].dat, x - 25 + fixtoi(3 * fcos(itofix(tick << 2))), 44 + menu_choice * step);
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
@@ -2589,7 +2587,7 @@
|
|
|
0dbfb8c |
string[i] = letters[current_letter];
|
|
|
0dbfb8c |
string[i + 1] = '\0';
|
|
|
0dbfb8c |
blit(block, bmp, 0, 0, pos_x - 1, pos_y - 1, block->w, block->h);
|
|
|
0dbfb8c |
- textout(bmp, f, string, pos_x, pos_y, colour);
|
|
|
0dbfb8c |
+ textout_ex(bmp, f, string, pos_x, pos_y, colour, -1);
|
|
|
0dbfb8c |
blit_to_screen(bmp);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
if (pad != NULL) {
|
|
|
0dbfb8c |
@@ -2775,7 +2773,7 @@
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// let other processes play
|
|
|
0dbfb8c |
- yield_timeslice();
|
|
|
0dbfb8c |
+ rest(0);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// draw
|
|
|
0dbfb8c |
frame_count ++;
|
|
|
0dbfb8c |
Index: alex4-1.1/src/map.c
|
|
|
0dbfb8c |
===================================================================
|
|
|
0dbfb8c |
--- alex4-1.1.orig/src/map.c 2008-01-23 00:48:53.000000000 +0100
|
|
|
0dbfb8c |
+++ alex4-1.1/src/map.c 2008-01-23 00:49:56.000000000 +0100
|
|
|
0dbfb8c |
@@ -280,7 +280,7 @@
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
if (sm == NULL) return;
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
- set_clip(bmp, dx, dy, dx+w-1, dy+h-1);
|
|
|
0dbfb8c |
+ set_clip_rect(bmp, dx, dy, dx+w-1, dy+h-1);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
for(y=0;y<7;y++) {
|
|
|
0dbfb8c |
for(x=0;x<11;x++) {
|
|
|
0dbfb8c |
@@ -330,13 +330,13 @@
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
if (edit) {
|
|
|
0dbfb8c |
if (sm->dat[pos].type == MAP_DEAD) {
|
|
|
0dbfb8c |
- textout(bmp, font, "D", dx + x*16 + ax, dy + y*16 + ay, 0);
|
|
|
0dbfb8c |
+ textout_ex(bmp, font, "D", dx + x*16 + ax, dy + y*16 + ay, 0, -1);
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
if (sm->dat[pos].type == MAP_EXIT) {
|
|
|
0dbfb8c |
- textout(bmp, font, "XT", dx + x*16 + ax, dy + y*16 + ay, 255);
|
|
|
0dbfb8c |
+ textout_ex(bmp, font, "XT", dx + x*16 + ax, dy + y*16 + ay, 255, -1);
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
if (sm->dat[pos].type == MAP_BRK) {
|
|
|
0dbfb8c |
- textout(bmp, font, "GL", dx + x*16 + ax, dy + y*16 + ay, 255);
|
|
|
0dbfb8c |
+ textout_ex(bmp, font, "GL", dx + x*16 + ax, dy + y*16 + ay, 255, -1);
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
if (sm->dat[pos].type == MAP_ENEMY1) {
|
|
|
0dbfb8c |
draw_sprite(bmp, sm->data[ENEMY1_01 + ((ABS(game_count) >> 3) % 4)].dat, dx + x*16 + ax, dy + y*16 + ay);
|
|
|
0dbfb8c |
@@ -367,7 +367,7 @@
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
- set_clip(bmp, 0, 0, SCREEN_W - 1, SCREEN_H - 1);
|
|
|
0dbfb8c |
+ set_clip_rect(bmp, 0, 0, SCREEN_W - 1, SCREEN_H - 1);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
Index: alex4-1.1/src/script.c
|
|
|
0dbfb8c |
===================================================================
|
|
|
0dbfb8c |
--- alex4-1.1.orig/src/script.c 2008-01-23 00:01:05.000000000 +0100
|
|
|
0dbfb8c |
+++ alex4-1.1/src/script.c 2008-01-23 00:48:53.000000000 +0100
|
|
|
0dbfb8c |
@@ -89,7 +89,7 @@
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// draw text
|
|
|
0dbfb8c |
for(i = 0; i < lines; i ++) {
|
|
|
0dbfb8c |
- textout(bmp, d[THE_FONT].dat, rows[i], x1 + 4, y1 + 5 + i * 9, 1);
|
|
|
0dbfb8c |
+ textout_ex(bmp, d[THE_FONT].dat, rows[i], x1 + 4, y1 + 5 + i * 9, 1, -1);
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
@@ -103,7 +103,7 @@
|
|
|
0dbfb8c |
poll_music();
|
|
|
0dbfb8c |
count ++;
|
|
|
0dbfb8c |
while(!cycle_count);
|
|
|
0dbfb8c |
- yield_timeslice();
|
|
|
0dbfb8c |
+ rest(0);
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
if (key[KEY_ESC]) script_done = -1;
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
@@ -521,7 +521,7 @@
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// let other processes play
|
|
|
0dbfb8c |
- yield_timeslice();
|
|
|
0dbfb8c |
+ rest(0);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// blit buffer to swap buffer
|
|
|
0dbfb8c |
blit(buffer, swap_buffer, 0, 0, 0, 0, 160, 120);
|
|
|
0dbfb8c |
Index: alex4-1.1/src/scroller.c
|
|
|
0dbfb8c |
===================================================================
|
|
|
0dbfb8c |
--- alex4-1.1.orig/src/scroller.c 2008-01-23 00:01:05.000000000 +0100
|
|
|
0dbfb8c |
+++ alex4-1.1/src/scroller.c 2008-01-23 00:50:53.000000000 +0100
|
|
|
0dbfb8c |
@@ -65,22 +65,22 @@
|
|
|
0dbfb8c |
if (sc->horizontal) {
|
|
|
0dbfb8c |
if (sc->offset < -sc->length) return;
|
|
|
0dbfb8c |
if (sc->offset > sc->width) return;
|
|
|
0dbfb8c |
- set_clip(bmp, x, y, x + sc->width, y + sc->height);
|
|
|
0dbfb8c |
- textout(bmp, sc->fnt, sc->text, x + sc->offset + 1, y + 1, 1);
|
|
|
0dbfb8c |
- textout(bmp, sc->fnt, sc->text, x + sc->offset, y, 3);
|
|
|
0dbfb8c |
- set_clip(bmp, 0, 0, bmp->w-1, bmp->h-1);
|
|
|
0dbfb8c |
+ set_clip_rect(bmp, x, y, x + sc->width, y + sc->height);
|
|
|
0dbfb8c |
+ textout_ex(bmp, sc->fnt, sc->text, x + sc->offset + 1, y + 1, 1, -1);
|
|
|
0dbfb8c |
+ textout_ex(bmp, sc->fnt, sc->text, x + sc->offset, y, 3, -1);
|
|
|
0dbfb8c |
+ set_clip_rect(bmp, 0, 0, bmp->w-1, bmp->h-1);
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
else {
|
|
|
0dbfb8c |
int i;
|
|
|
0dbfb8c |
if (sc->offset < -sc->rows * sc->font_height) return;
|
|
|
0dbfb8c |
if (sc->offset > sc->height) return;
|
|
|
0dbfb8c |
- set_clip(bmp, x, y, x + sc->width, y + sc->height);
|
|
|
0dbfb8c |
+ set_clip_rect(bmp, x, y, x + sc->width, y + sc->height);
|
|
|
0dbfb8c |
for(i=0;i<sc->rows;i++) {
|
|
|
0dbfb8c |
if (i * sc->font_height + sc->offset <= sc->height)
|
|
|
0dbfb8c |
if ((i+1) * sc->font_height + sc->offset >= 0)
|
|
|
0dbfb8c |
- textout_centre(bmp, sc->fnt, sc->lines[i], x+(sc->width>>1) , i * sc->font_height + y + sc->offset, -1);
|
|
|
0dbfb8c |
+ textout_centre_ex(bmp, sc->fnt, sc->lines[i], x+(sc->width>>1) , i * sc->font_height + y + sc->offset, -1, -1);
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
- set_clip(bmp, 0, 0, bmp->w-1, bmp->h-1);
|
|
|
0dbfb8c |
+ set_clip_rect(bmp, 0, 0, bmp->w-1, bmp->h-1);
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
Index: alex4-1.1/src/shooter.c
|
|
|
0dbfb8c |
===================================================================
|
|
|
0dbfb8c |
--- alex4-1.1.orig/src/shooter.c 2008-01-23 00:48:53.000000000 +0100
|
|
|
0dbfb8c |
+++ alex4-1.1/src/shooter.c 2008-01-23 00:48:53.000000000 +0100
|
|
|
0dbfb8c |
@@ -341,7 +341,7 @@
|
|
|
0dbfb8c |
if (!o->hit || o->type == SO_PLAYER_BULLET)
|
|
|
0dbfb8c |
draw_sprite(bmp, s_data[o->image].dat, (int)o->x, (int)o->y);
|
|
|
0dbfb8c |
else
|
|
|
0dbfb8c |
- draw_character(bmp, s_data[o->image].dat, (int)o->x, (int)o->y, 4);
|
|
|
0dbfb8c |
+ draw_character_ex(bmp, s_data[o->image].dat, (int)o->x, (int)o->y, 4, -1);
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
else {
|
|
|
0dbfb8c |
int c = (o->energy + 8) >> 3;
|
|
|
0dbfb8c |
@@ -379,8 +379,8 @@
|
|
|
0dbfb8c |
padding_str[i] = '0';
|
|
|
0dbfb8c |
padding_str[i] = '\0';
|
|
|
0dbfb8c |
strcat(padding_str, score_str);
|
|
|
0dbfb8c |
- textprintf_right(bmp, s_data[SPACE_FONT].dat, x + 160, y + 2, 3, "%s", padding_str);
|
|
|
0dbfb8c |
- if (s_var.score) textprintf_right(bmp, s_data[SPACE_FONT].dat, x + 160, y + 2, 4, "%s", score_str);
|
|
|
0dbfb8c |
+ textprintf_right_ex(bmp, s_data[SPACE_FONT].dat, x + 160, y + 2, 3, -1, "%s", padding_str);
|
|
|
0dbfb8c |
+ if (s_var.score) textprintf_right_ex(bmp, s_data[SPACE_FONT].dat, x + 160, y + 2, 4, -1, "%s", score_str);
|
|
|
0dbfb8c |
}
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
@@ -1268,7 +1268,7 @@
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// let other processes play
|
|
|
0dbfb8c |
- yield_timeslice();
|
|
|
0dbfb8c |
+ rest(0);
|
|
|
0dbfb8c |
|
|
|
0dbfb8c |
// draw
|
|
|
c538221 |
frame_count ++;
|