test me: Allegro built with MSVC (no ASM)
Matthew Leverton

Attached is the Allegro test program and the alleg43.dll. Two versions of each are included:

  • 100% C built with MSVC

  • C / ASM built with MinGW

I want to know if all four combinations work and if any of them behave differently. (You'll need to rename a DLL to alleg43.dll before running the executable.) If you reply, please note your OS.

Everything seems to work fine for me, except when running either test program with the MSVC DLL: the windowed screen doesn't update until I drag it off the screen. I don't know if this is a problem specifically to the C-version or not; I think I've seen it happen before.

The goal is to include a MSVC 6 workspace with Allegro so that MinGW isn't required to build it.


System: WinXP Pro SP2

exe	dll	result
mingw	mingw	v
mingw   msvc	x refresh problem as described in OP
msvc	msvc	x refresh problem as described in OP
msvc	mingw   v

Matthew Leverton


Another test:

1#include <allegro.h>
3int main(void)
5int card, w, h;
7 allegro_init();
9 install_keyboard();
11 install_mouse();
13 set_color_depth(32 /* 8 */);
14 set_gfx_mode(GFX_GDI /* GFX_DIRECTX_WIN */, 640,480, 0,0);
16 gfx_mode_select(&card, &w, &h); // just a simple GUI test
18 while (!key[KEY_ESC])
19 {
21 if (key[KEY_1])
22 rectfill(screen, 0,0, SCREEN_W, SCREEN_H, makecol(255,0,0));
23 else if (key[KEY_2])
24 rectfill(screen, 0,0, SCREEN_W, SCREEN_H, makecol(0,255,0));
25 else if (key[KEY_3])
26 rectfill(screen, 0,0, SCREEN_W, SCREEN_H, makecol(0,0,255));
28 rest(10);
29 }
32 return 0;

I want to know if any combination of 8-bit or 32-bit (or your native color depth) with GFX_GDI and GFX_DIRECTX_WIN fail to update on your Allegro.

These are the results I got with Allegro 4.3.1:

		Vista      XP (Vbox)
ASM DX 8	  -           X
ASM DX 32         -           -
ASM GDI 8         -           -	
ASM GDI 32        -           -
C DX 8            -           X
C DX 32	          -           -
C GDI 8           X           X
C GDI 32          X           X

Where X means the screen failed to updated. Just testing the default (ASM) version is sufficient.

Thread #591252. Printed from Allegro.cc