This commit is contained in:
Albert Fabregat 2002-09-29 11:00:12 +00:00
parent cd00b33874
commit dd9f7ef627
4 changed files with 106 additions and 84 deletions

View file

@ -79,7 +79,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 zlib.lib libpng.lib sdlmain.lib sdl.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /nodefaultlib:"LIBCMTD.lib" /out:"..\..\..\bin\dll\graphics.dll" /pdbtype:sept
# ADD LINK32 zlib.lib libpng.lib sdlmain.lib sdl.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libc.lib /nologo /dll /machine:I386 /nodefaultlib:"LIBCMTD.lib" /nodefaultlib /out:"..\..\..\bin\dll\graphics.dll" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF
@ -93,92 +93,28 @@ LINK32=link.exe
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\files.c
SOURCE=..\graphics\graphics.def
# End Source File
# Begin Source File
SOURCE=.\g_blit.c
SOURCE=..\graphics\main.c
# End Source File
# Begin Source File
SOURCE=.\g_draw.c
# End Source File
# Begin Source File
SOURCE=.\g_flic.c
# End Source File
# Begin Source File
SOURCE=.\g_main.c
# End Source File
# Begin Source File
SOURCE=.\g_maps.c
# End Source File
# Begin Source File
SOURCE=.\g_pal.c
# End Source File
# Begin Source File
SOURCE=.\graphics.def
# End Source File
# Begin Source File
SOURCE=.\img_pcx.c
# End Source File
# Begin Source File
SOURCE=.\img_png.c
# End Source File
# Begin Source File
SOURCE=.\main.c
# End Source File
# Begin Source File
SOURCE=.\xctype.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\export.h
# End Source File
# Begin Source File
SOURCE=.\files.h
# End Source File
# Begin Source File
SOURCE=.\flic.h
# End Source File
# Begin Source File
SOURCE=.\fmath.h
# End Source File
# Begin Source File
SOURCE=.\fxi.h
# End Source File
# Begin Source File
SOURCE=.\graphics.h
# End Source File
# Begin Source File
SOURCE=.\grlib.h
# End Source File
# Begin Source File
SOURCE=.\xctype.h
SOURCE=..\graphics\SDL_rotozoom.c
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# Begin Source File
SOURCE=..\graphics\graphics.h
# End Source File
# Begin Source File
SOURCE=..\graphics\SDL_rotozoom.h
# End Source File
# End Target
# End Project

View file

@ -48,5 +48,7 @@ int eDIV_GET_POINT(FUNCTION_PARAMS) ;
int eDIV_GET_REAL_POINT(FUNCTION_PARAMS) ;
int eDIV_GRAPHIC_INFO(FUNCTION_PARAMS) ;
int eDIV_FADE(FUNCTION_PARAMS) ;
int eDIV_XPUT(FUNCTION_PARAMS);
int Dibuja(SDL_Surface *src , SDL_Rect srcrect , SDL_Rect dstrect , int z , int trans);
SDL_Surface *xput(SDL_Surface *src,double size,double angle);

View file

@ -6,11 +6,41 @@
--------------------Configuration: graphics - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "G:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP174.tmp" with contents
[
/nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLL_EXPORTS" /FR"Debug/" /Fp"Debug/graphics.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"C:\SION\ediv\src\dlls\graphics\main.c"
"C:\SION\ediv\src\dlls\graphics\SDL_rotozoom.c"
]
Creating command line "cl.exe @G:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP174.tmp"
Creating temporary file "G:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP175.tmp" with contents
[
zlib.lib libpng.lib sdlmain.lib sdl.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libc.lib /nologo /dll /incremental:yes /pdb:"Debug/graphics.pdb" /machine:I386 /nodefaultlib:"LIBCMTD.lib" /nodefaultlib /def:".\graphics.def" /out:"..\..\..\bin\dll\graphics.dll" /implib:"Debug/graphics.lib" /pdbtype:sept
.\Debug\main.obj
.\Debug\SDL_rotozoom.obj
]
Creating command line "link.exe @G:\DOCUME~1\ADMINI~1\CONFIG~1\Temp\RSP175.tmp"
<h3>Output Window</h3>
Compiling...
main.c
c:\sion\ediv\src\dlls\graphics\main.c(1338) : warning C4101: 'temp' : unreferenced local variable
SDL_rotozoom.c
c:\sion\ediv\src\dlls\graphics\main.c(1026) : warning C4761: integral size mismatch in argument; conversion supplied
c:\sion\ediv\src\dlls\graphics\main.c(1074) : warning C4761: integral size mismatch in argument; conversion supplied
c:\sion\ediv\src\dlls\graphics\main.c(1471) : warning C4761: integral size mismatch in argument; conversion supplied
c:\sion\ediv\src\dlls\graphics\sdl_rotozoom.c(228) : warning C4018: '<' : signed/unsigned mismatch
c:\sion\ediv\src\dlls\graphics\sdl_rotozoom.c(237) : warning C4018: '<' : signed/unsigned mismatch
c:\sion\ediv\src\dlls\graphics\sdl_rotozoom.c(247) : warning C4018: '<' : signed/unsigned mismatch
c:\sion\ediv\src\dlls\graphics\sdl_rotozoom.c(254) : warning C4018: '<' : signed/unsigned mismatch
c:\sion\ediv\src\dlls\graphics\sdl_rotozoom.c(267) : warning C4018: '<' : signed/unsigned mismatch
c:\sion\ediv\src\dlls\graphics\sdl_rotozoom.c(271) : warning C4018: '<' : signed/unsigned mismatch
Linking...
Creating library Debug/graphics.lib and object Debug/graphics.exp
<h3>Results</h3>
graphics.dll - 0 error(s), 0 warning(s)
graphics.dll - 0 error(s), 10 warning(s)
</pre>
</body>
</html>

View file

@ -11,6 +11,8 @@
#include "export.h"
#include <SDL/SDL.h>
#include "graphics.h"
#include "SDL_rotozoom.h"
//#include "varindex.h"
@ -200,6 +202,7 @@ int ExportaFuncs(EXPORTAFUNCS_PARAMS)
FUNCTION("get_real_point",3,eDIV_GET_REAL_POINT) ;
FUNCTION("graphic_info",3,eDIV_GRAPHIC_INFO) ;
FUNCTION("fade",4,eDIV_FADE) ;
FUNCTION("xput",6,eDIV_XPUT);
ENTRYPOINT( frame ) ;
ENTRYPOINT( first_load ) ;
@ -751,6 +754,41 @@ int eDIV_PUT(FUNCTION_PARAMS)
}
int eDIV_XPUT(FUNCTION_PARAMS)
{
int f , g , x , y ;
double zoom,angle;
SDL_Surface *map;
SDL_Rect dstrect ;
zoom = getparm();
angle = getparm();
y = getparm() ;
x = getparm() ;
g = getparm() ;
f = getparm() ;
if ( !files[f].existe || !files[f].mapa[g].existe )
return -1 ;
dstrect.x = x - files[f].mapa[g].cpoint[0].x ;
dstrect.y = y - files[f].mapa[g].cpoint[0].y ;
dstrect.w = 0 ; // Se ignora
dstrect.h = 0 ; // Se ignora
map=xput(files[f].mapa[g].Surface,zoom,angle);
SDL_BlitSurface(map , NULL , fondo , &dstrect ) ;
SDL_FreeSurface (map);
return 1 ;
}
int eDIV_PUT_SCREEN(FUNCTION_PARAMS)
{
int f , g ;
@ -1297,7 +1335,7 @@ FILE * memo ;
void frame(FUNCTION_PARAMS)
{
static int una_vez = 1 ;
int i , temp , id , f , g , r , z , trans;
int i , temp , id , f , g , r , z , trans,angle,size;
SDL_Rect dstrect , srcrect ;
fichero = fopen( "draw.txt" , "w" ) ;
@ -1353,6 +1391,8 @@ void frame(FUNCTION_PARAMS)
g = local("graph",id);
r = local("region",id);
z = local("z",id);
size = local("size",id);
angle = local("angle",id);
dstrect.x = local("x",id);
dstrect.y = local("y",id);
dstrect.w = 0 ;
@ -1430,6 +1470,7 @@ void frame(FUNCTION_PARAMS)
{
SDL_SetAlpha( orden[i]->src, SDL_SRCALPHA , orden[i]->trans ) ;
SDL_BlitSurface( orden[i]->src , &orden[i]->srcrect , screen , &orden[i]->dstrect ) ;
}
last_blit = -1 ;
@ -1489,9 +1530,9 @@ void first_load(FUNCTION_PARAMS2)
define_region = 1 ;
SDL_WM_SetCaption(fp->nombre_program, NULL);
SDL_WM_SetCaption("eDiv testing", NULL);
//prueba = SDL_LoadBMP("prueba.bmp" );
prueba = SDL_LoadBMP("prueba.bmp" );
//fclose(fichero ) ;
@ -1512,6 +1553,7 @@ int Dibuja(SDL_Surface *src , SDL_Rect srcrect , SDL_Rect dstrect , int z , int
register int i , j ;
last_blit++ ;
//blits[last_blit].src = SDL_BlitSurface(rotozoomSurface (src, angle, 2,1), NULL , fondo , &dstrect );//src ;
blits[last_blit].src = src;
blits[last_blit].srcrect.x = srcrect.x ;
blits[last_blit].srcrect.y = srcrect.y ;
@ -1547,3 +1589,15 @@ int Dibuja(SDL_Surface *src , SDL_Rect srcrect , SDL_Rect dstrect , int z , int
}
SDL_Surface *xput(SDL_Surface *src,double size,double angle)
{
SDL_Surface *dst;
SDL_Surface *tmp;
tmp= zoomSurface (src, size/100, size/100,1);
dst=rotozoomSurface (tmp, angle, 1,1);
//SDL_FreeSurface (tmp);
return dst;
}