Skip to content

Commit 58074c2

Browse files
SiegeLordExSiegeLord
authored andcommitted
Remove D1.0 support.
:'(
1 parent fc4411a commit 58074c2

24 files changed

+72
-237
lines changed

README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
This is a D1.0 and D2 binding to the Allegro 5 library: http://liballeg.org/
1+
This is a D binding to the Allegro 5 library: http://liballeg.org/
22

33
Should work fine with Allegro 5.2. Pretty much all of the cross-platform functions are bound.
44
Non cross-platform functions are absent, but they will be added eventually.
55

6-
Tested with LDC/Tango and DMD/Phobos compilers on Linux 64 bit and DMD/Tango on Windows 32 bit (XP). See general notes below to see how to use this
6+
Tested with LDC and DMD compilers on Linux 64 bit and DMD on Windows 32 bit (XP). See general notes below to see how to use this
77
binding in your D program.
88

99
Installation
@@ -19,11 +19,6 @@ If you have LDC:
1919
./build_lib_ldc.sh
2020
./build_example_ldc.sh
2121

22-
If you have LDC2:
23-
24-
./build_lib_ldc2.sh
25-
./build_example_ldc2.sh
26-
2722
If you have DMD:
2823

2924
./build_lib_dmd.sh

allegro5/allegro_android.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import allegro5.internal.da5;
66
nothrow @nogc extern(C)
77
{
88
void al_android_set_apk_file_interface();
9-
const_char* al_android_get_os_version();
9+
const(char)* al_android_get_os_version();
1010
void al_android_set_apk_fs_interface();
1111
void _al_android_set_capture_volume_keys(ALLEGRO_DISPLAY* display, bool onoff);
1212
}

allegro5/allegro_color.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ nothrow @nogc extern (C)
1818
void al_color_rgb_to_hsv(float red, float green, float blue, float* hue, float* saturation, float* value);
1919
void al_color_hsl_to_rgb(float hue, float saturation, float lightness, float* red, float* green, float* blue);
2020
int al_color_name_to_rgb(in char* name, float* r, float* g, float* b);
21-
const_char* al_color_rgb_to_name(float r, float g, float b);
21+
const(char)* al_color_rgb_to_name(float r, float g, float b);
2222
void al_color_cmyk_to_rgb(float cyan, float magenta, float yellow, float key, float* red, float* green, float* blue);
2323
void al_color_rgb_to_cmyk(float red, float green, float blue, float* cyan, float* magenta, float* yellow, float* key);
2424
void al_color_yuv_to_rgb(float y, float u, float v, float* red, float* green, float* blue);

allegro5/allegro_native_dialog.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ nothrow @nogc extern (C)
2626

2727
struct ALLEGRO_MENU_INFO
2828
{
29-
const_char* caption;
29+
const(char)* caption;
3030
ushort id;
3131
int flags;
3232
ALLEGRO_BITMAP* icon;
@@ -37,7 +37,7 @@ nothrow @nogc extern (C)
3737
const ALLEGRO_MENU_SEPARATOR = ALLEGRO_MENU_INFO(null, -1, 0, null);
3838
}
3939

40-
template ALLEGRO_START_OF_MENU(const_char[] caption, int id)
40+
template ALLEGRO_START_OF_MENU(const(char)[] caption, int id)
4141
{
4242
const ALLEGRO_START_OF_MENU = ALLEGRO_MENU_INFO(mixin(`"` ~ caption ~ `->\0"`), id, 0, NULL);
4343
}
@@ -74,7 +74,7 @@ nothrow @nogc extern (C)
7474
void al_destroy_menu(ALLEGRO_MENU* menu);
7575

7676
/* properties */
77-
const_char* al_get_menu_item_caption(ALLEGRO_MENU* menu, int pos);
77+
const(char)* al_get_menu_item_caption(ALLEGRO_MENU* menu, int pos);
7878
void al_set_menu_item_caption(ALLEGRO_MENU* menu, int pos, in char* caption);
7979
int al_get_menu_item_flags(ALLEGRO_MENU* menu, int pos);
8080
void al_set_menu_item_flags(ALLEGRO_MENU* menu, int pos, int flags);

allegro5/bitmap_io.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ nothrow @nogc extern(C)
3333
ALLEGRO_BITMAP* al_load_bitmap_flags_f(ALLEGRO_FILE* fp, in char* ident, int flags);
3434
bool al_save_bitmap(in char* filename, ALLEGRO_BITMAP* bitmap);
3535
bool al_save_bitmap_f(ALLEGRO_FILE* fp, in char* ident, ALLEGRO_BITMAP* bitmap);
36-
const_char* al_identify_bitmap_f(ALLEGRO_FILE *fp);
37-
const_char* al_identify_bitmap(const_char* filename);
36+
const(char)* al_identify_bitmap_f(ALLEGRO_FILE *fp);
37+
const(char)* al_identify_bitmap(const(char)* filename);
3838
}

allegro5/config.d

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ nothrow @nogc extern (C)
1313
void al_add_config_section(ALLEGRO_CONFIG* config, in char* name);
1414
void al_set_config_value(ALLEGRO_CONFIG* config, in char* section, in char* key, in char* value);
1515
void al_add_config_comment(ALLEGRO_CONFIG* config, in char* section, in char* comment);
16-
const_char* al_get_config_value(in ALLEGRO_CONFIG* config, in char* section, in char* key);
16+
const(char)* al_get_config_value(in ALLEGRO_CONFIG* config, in char* section, in char* key);
1717
ALLEGRO_CONFIG* al_load_config_file(in char* filename);
1818
ALLEGRO_CONFIG* al_load_config_file_f(ALLEGRO_FILE* filename);
1919
bool al_save_config_file(in char* filename, in ALLEGRO_CONFIG* config);
@@ -24,8 +24,8 @@ nothrow @nogc extern (C)
2424
bool al_remove_config_section(ALLEGRO_CONFIG* config, in char* section);
2525
bool al_remove_config_key(ALLEGRO_CONFIG* config, in char* section, in char* key);
2626

27-
const_char* al_get_first_config_section(in ALLEGRO_CONFIG* config, ALLEGRO_CONFIG_SECTION** iterator);
28-
const_char* al_get_next_config_section(ALLEGRO_CONFIG_SECTION** iterator);
29-
const_char* al_get_first_config_entry(in ALLEGRO_CONFIG* config, in char* section, ALLEGRO_CONFIG_ENTRY** iterator);
30-
const_char* al_get_next_config_entry(ALLEGRO_CONFIG_ENTRY** iterator);
27+
const(char)* al_get_first_config_section(in ALLEGRO_CONFIG* config, ALLEGRO_CONFIG_SECTION** iterator);
28+
const(char)* al_get_next_config_section(ALLEGRO_CONFIG_SECTION** iterator);
29+
const(char)* al_get_first_config_entry(in ALLEGRO_CONFIG* config, in char* section, ALLEGRO_CONFIG_ENTRY** iterator);
30+
const(char)* al_get_next_config_entry(ALLEGRO_CONFIG_ENTRY** iterator);
3131
}

allegro5/d_util.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ module allegro5.d_util;
33
import allegro5.allegro;
44
import allegro5.internal.da5;
55

6-
const_ALLEGRO_USTR* dstr_to_ustr(ALLEGRO_USTR_INFO* info, const_char[] dstr)
6+
const(ALLEGRO_USTR)* dstr_to_ustr(ALLEGRO_USTR_INFO* info, const(char)[] dstr)
77
{
88
return al_ref_buffer(info, dstr.ptr, dstr.length);
99
}
1010

11-
const_char[] ustr_to_dstr(const_ALLEGRO_USTR* ustr)
11+
const(char)[] ustr_to_dstr(const(ALLEGRO_USTR)* ustr)
1212
{
1313
return al_cstr(ustr)[0..al_ustr_size(ustr)];
1414
}

allegro5/display.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ nothrow @nogc extern (C)
102102
int al_get_new_display_refresh_rate();
103103
int al_get_new_display_flags();
104104

105-
void al_set_new_window_title(const_char *title);
106-
const_char* al_get_new_window_title();
105+
void al_set_new_window_title(const(char) *title);
106+
const(char)* al_get_new_window_title();
107107

108108
int al_get_display_width(ALLEGRO_DISPLAY* display);
109109
int al_get_display_height(ALLEGRO_DISPLAY* display);

allegro5/file.d

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,15 @@ import allegro5.internal.da5;
44
import allegro5.path;
55
import allegro5.utf8;
66

7-
version (Tango)
8-
{
9-
import tango.core.Vararg : va_list;
10-
}
11-
else
12-
{
13-
version(D_Version2)
14-
{
15-
import core.stdc.stdarg : va_list;
16-
}
17-
else
18-
{
19-
import std.c.stdarg : va_list;
20-
}
21-
}
7+
import core.stdc.stdarg : va_list;
228

239
version(Windows)
2410
{
2511
private alias long off_t;
2612
}
2713
else
2814
{
29-
version(Tango)
30-
{
31-
import tango.stdc.posix.sys.types : off_t;
32-
}
33-
else
34-
{
35-
version(D_Version2)
36-
{
37-
import core.sys.posix.sys.types : off_t;
38-
}
39-
else
40-
{
41-
version(linux)
42-
{
43-
import std.c.linux.linux : off_t;
44-
}
45-
else
46-
{
47-
import std.c.freebsd.freebsd : off_t;
48-
}
49-
}
50-
}
15+
import core.sys.posix.sys.types : off_t;
5116
}
5217

5318
nothrow @nogc extern (C)
@@ -63,7 +28,7 @@ nothrow @nogc extern (C)
6328
bool function(ALLEGRO_FILE* f, long offset, int whence) fi_fseek;
6429
bool function(ALLEGRO_FILE* f) fi_feof;
6530
int function(ALLEGRO_FILE* f) fi_ferror;
66-
const_char* function(ALLEGRO_FILE* f) fi_ferrmsg(ALLEGRO_FILE *f);
31+
const(char)* function(ALLEGRO_FILE* f) fi_ferrmsg(ALLEGRO_FILE *f);
6732
void function(ALLEGRO_FILE* f) fi_fclearerr;
6833
int function(ALLEGRO_FILE* f, int c) fi_fungetc;
6934
off_t function(ALLEGRO_FILE* f) fi_fsize;
@@ -93,7 +58,7 @@ nothrow @nogc extern (C)
9358
bool al_fseek(ALLEGRO_FILE* f, long offset, int whence);
9459
bool al_feof(ALLEGRO_FILE* f);
9560
int al_ferror(ALLEGRO_FILE* f);
96-
const_char* al_ferrmsg(ALLEGRO_FILE *f);
61+
const(char)* al_ferrmsg(ALLEGRO_FILE *f);
9762
void al_fclearerr(ALLEGRO_FILE *f);
9863
int al_fungetc(ALLEGRO_FILE* f, int c);
9964
long al_fsize(ALLEGRO_FILE* f);

allegro5/fixed.d

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,7 @@ module allegro5.fixed;
22

33
import allegro5.error;
44

5-
version (Tango)
6-
{
7-
import tango.stdc.errno;
8-
}
9-
else
10-
{
11-
version(D_Version2)
12-
{
13-
import core.stdc.errno;
14-
}
15-
else
16-
{
17-
import std.c.stdlib;
18-
// Phobos doesn't define EDOM
19-
enum { EDOM = 33 }
20-
}
21-
}
5+
import core.stdc.errno;
226

237
nothrow @nogc extern (C)
248
{

0 commit comments

Comments
 (0)