forked from KolibriOS/kolibrios
Make SDL work with newlib as DLL
git-svn-id: svn://kolibrios.org@6380 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
7ddfc6356d
commit
9f7d4d2ec3
@ -77,7 +77,7 @@ LIBS:= -ldll -lc.dll -lgcc
|
|||||||
# fasm ../../sound/src/sndgetsize.asm ../../sound/src/sndgetsize.o
|
# fasm ../../sound/src/sndgetsize.asm ../../sound/src/sndgetsize.o
|
||||||
|
|
||||||
%.o : %.asm Makefile
|
%.o : %.asm Makefile
|
||||||
nasm -f coff $< -o $@
|
nasm -f win32 $< -o $@
|
||||||
|
|
||||||
%.obj : %.asm Makefile
|
%.obj : %.asm Makefile
|
||||||
fasm $< $@
|
fasm $< $@
|
||||||
@ -109,4 +109,6 @@ $(LIBRARY).dll: $(OBJECTS) Makefile
|
|||||||
$(CC) $(INCLUDES) $(CFLAGS) $(DEFINES) -o $@ $<
|
$(CC) $(INCLUDES) $(CFLAGS) $(DEFINES) -o $@ $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -f */*/*.o
|
rm -rf *.o
|
||||||
|
rm -rf */*.o
|
||||||
|
rm -f */*/*.o
|
||||||
|
@ -10,19 +10,12 @@
|
|||||||
;
|
;
|
||||||
|
|
||||||
BITS 32
|
BITS 32
|
||||||
|
|
||||||
|
SECTION .text ALIGN=16
|
||||||
|
|
||||||
GLOBAL _ConvertX86
|
GLOBAL _ConvertX86
|
||||||
GLOBAL _x86return
|
GLOBAL _x86return
|
||||||
|
|
||||||
GLOBAL _Hermes_X86_CPU
|
GLOBAL _Hermes_X86_CPU
|
||||||
|
|
||||||
|
|
||||||
SECTION .data
|
|
||||||
|
|
||||||
cpu_flags dd 0
|
|
||||||
|
|
||||||
|
|
||||||
SECTION .text
|
|
||||||
|
|
||||||
;; _ConvertX86:
|
;; _ConvertX86:
|
||||||
;; [ESP+8] ConverterInfo*
|
;; [ESP+8] ConverterInfo*
|
||||||
@ -61,7 +54,7 @@ y_loop:
|
|||||||
|
|
||||||
jmp [ebp+32]
|
jmp [ebp+32]
|
||||||
|
|
||||||
_x86return:
|
_x86return:
|
||||||
add esi,[ebp+12]
|
add esi,[ebp+12]
|
||||||
add edi,[ebp+28]
|
add edi,[ebp+28]
|
||||||
|
|
||||||
@ -124,3 +117,8 @@ _Hermes_X86_CPU:
|
|||||||
.L1:
|
.L1:
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
section '.DATA' ALIGN=16
|
||||||
|
|
||||||
|
cpu_flags dd 0
|
||||||
|
|
||||||
|
@ -52,19 +52,14 @@ static int IsStyle4Available=0;
|
|||||||
void MenuetOS_SDL_RepaintWnd(void)
|
void MenuetOS_SDL_RepaintWnd(void)
|
||||||
{
|
{
|
||||||
begin_draw();
|
begin_draw();
|
||||||
sys_create_window(1,1,vm_suf->hidden->win_size_x+9,vm_suf->hidden->win_size_y+get_skinh()+4,
|
sys_create_window(1,1,vm_suf->hidden->win_size_x+9,vm_suf->hidden->win_size_y+get_skinh()+4, (int)vm_suf->hidden->__title, 0x000000,0x34000000);
|
||||||
#ifdef KEEP_OBSOLETE_STYLE3
|
|
||||||
IsStyle4Available?0x34000000:0x33000000
|
|
||||||
#else
|
|
||||||
0x34000000
|
|
||||||
#endif
|
|
||||||
,0,(int)vm_suf->hidden->__title);
|
|
||||||
if(vm_suf && vm_suf->hidden->__video_buffer)
|
if(vm_suf && vm_suf->hidden->__video_buffer)
|
||||||
put_image(0,0,
|
put_image(1,1,
|
||||||
vm_suf->hidden->win_size_x,vm_suf->hidden->win_size_y,
|
vm_suf->hidden->win_size_x,vm_suf->hidden->win_size_y,
|
||||||
vm_suf->hidden->__video_buffer);
|
vm_suf->hidden->__video_buffer);
|
||||||
|
|
||||||
begin_draw();;
|
end_draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int MenuetOS_AllocHWSurface(_THIS,SDL_Surface * surface)
|
static int MenuetOS_AllocHWSurface(_THIS,SDL_Surface * surface)
|
||||||
@ -89,7 +84,7 @@ static void MenuetOS_DirectUpdate(_THIS,int numrects,SDL_Rect * rects)
|
|||||||
{
|
{
|
||||||
if(numrects)
|
if(numrects)
|
||||||
{
|
{
|
||||||
put_image(0,0,
|
put_image(1,1,
|
||||||
vm_suf->hidden->win_size_x,vm_suf->hidden->win_size_y,
|
vm_suf->hidden->win_size_x,vm_suf->hidden->win_size_y,
|
||||||
this->hidden->__video_buffer);
|
this->hidden->__video_buffer);
|
||||||
}
|
}
|
||||||
@ -214,7 +209,7 @@ static int MenuetOS_VideoInit(_THIS,SDL_PixelFormat * vformat)
|
|||||||
|
|
||||||
static int MenuetOS_FlipHWSurface(_THIS,SDL_Surface * surface)
|
static int MenuetOS_FlipHWSurface(_THIS,SDL_Surface * surface)
|
||||||
{
|
{
|
||||||
put_image(0,0,surface->w,surface->h, surface->pixels);
|
put_image(1,1,surface->w,surface->h, surface->pixels);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user