1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 13:33:02 +01:00

added GCC/MinGW-compatible assembler

This commit is contained in:
anyc
2014-05-19 22:53:14 +02:00
parent 872f4521a0
commit d34e2db9e1
28 changed files with 1536 additions and 5 deletions

View File

@@ -187,8 +187,18 @@ static void window_map_mouseup()
/*short widgetIndex;
rct_window *w;
#ifdef _MSC_VER
__asm mov widgetIndex, dx
#else
__asm__ ( "mov %[widgetIndex], dx " : [widgetIndex] "+m" (widgetIndex) );
#endif
#ifdef _MSC_VER
__asm mov w, esi
#else
__asm__ ( "mov %[w], esi " : [w] "+m" (w) );
#endif
switch (widgetIndex) {
case WIDX_CLOSE:
@@ -243,7 +253,11 @@ static void window_map_invalidate()
uint32 pressed_widgets;
int i, height;
#ifdef _MSC_VER
__asm mov w, esi
#else
__asm__ ( "mov %[w], esi " : [w] "+m" (w) );
#endif
// set the pressed widgets
pressed_widgets = (uint32)w->pressed_widgets;
@@ -366,8 +380,18 @@ static void window_map_paint()
int image_id;
int i, x, y;
#ifdef _MSC_VER
__asm mov w, esi
#else
__asm__ ( "mov %[w], esi " : [w] "+m" (w) );
#endif
#ifdef _MSC_VER
__asm mov dpi, edi
#else
__asm__ ( "mov %[dpi], edi " : [dpi] "+m" (dpi) );
#endif
window_draw_widgets(w, dpi);