From a0f66df087ca1a4088a2638a89bce4c28a3aaa0723aea5ddb22ca210ef0a3be3 Mon Sep 17 00:00:00 2001 From: Gabriel Lorenzo Date: Wed, 6 Nov 2002 19:39:51 +0000 Subject: [PATCH] arreglado transparency y flags --- ediv/propuestas.txt | 11 +++++++++++ ediv/src/dlls/dinmem/dinmem.vcproj | 11 ++++++----- ediv/src/dlls/dlls.sln | 23 ----------------------- ediv/src/dlls/dlls.suo | Bin 23552 -> 23552 bytes ediv/src/dlls/edivstd/edivstd.c | 23 +++++++++++++++++++---- ediv/src/dlls/edivstd/main.h | 1 + ediv/src/dlls/file/file.vcproj | 10 +++++----- ediv/src/dlls/graphics/SDL_rotozoom.c | 3 +-- ediv/src/dlls/graphics/graphics.h | 2 ++ ediv/src/dlls/graphics/main.c | 26 ++++++++++++++++++++------ ediv/src/dlls/input/input.vcproj | 12 ++++++------ ediv/src/dlls/math/math.vcproj | 4 +++- ediv/src/dlls/scroll/scroll.vcproj | 3 ++- ediv/src/dlls/strings/strings.vcproj | 2 +- ediv/src/dlls/text/text.vcproj | 12 ++++++------ ediv/src/stub/inte.c | 17 ++++++++++------- ediv/src/visual c/doku/doku.vcproj | 2 +- ediv/src/visual c/ediv/ediv.vcproj | 2 +- ediv/src/visual c/ediv_ws.suo | Bin 18944 -> 20480 bytes ediv/src/visual c/stub/stub.vcproj | 4 ++-- 20 files changed, 97 insertions(+), 71 deletions(-) diff --git a/ediv/propuestas.txt b/ediv/propuestas.txt index f6fce0e..1fd66f4 100644 --- a/ediv/propuestas.txt +++ b/ediv/propuestas.txt @@ -304,3 +304,14 @@ joysticks... controladores.. force feedback.. (kien tiene uno de estos trastos? drag&drop graficos mediante beziers!! http://www.newimage.com/~rhk/roaddemo/ + +[20:07] > en el caso de ediv +[20:07] [Xtrai2] igual vosotros incrementais antes ip +[20:07] > hacemos ip++ nada más leer el opcode +[20:07] > es decir +[20:07] [Xtrai2] ah +[20:07] [Xtrai2] ok ok +[20:07] > en el switch +[20:07] > ponemos +[20:07] > switch(mem[ip++]) { +[20:07] > etc \ No newline at end of file diff --git a/ediv/src/dlls/dinmem/dinmem.vcproj b/ediv/src/dlls/dinmem/dinmem.vcproj index d2dca49..7f81757 100644 --- a/ediv/src/dlls/dinmem/dinmem.vcproj +++ b/ediv/src/dlls/dinmem/dinmem.vcproj @@ -4,10 +4,10 @@ Version="7.00" Name="dinmem" ProjectGUID="{6994F9CD-63ED-425D-879C-678D1706F4AE}" - SccProjectName=""$/dlls", YCAAAAAA" + SccProjectName="" SccAuxPath="" - SccLocalPath="..\.." - SccProvider="MSSCCI:Microsoft Visual SourceSafe"> + SccLocalPath="" + SccProvider=""> @@ -24,6 +24,7 @@ UrbwN6hGhXy`?~JDTPwTm@VVFF$N@1Scc5mW*v}$Eh~+pq6-_HT`~rND}ils z^}#0-qnt-g=G6Eyr<41##Kal5w}nNrhpEHCgAXPq{tFLVOsK!Fv=njM*ZgkIJ?Gr> z=XcK6^fi&bCa!*{XbnWPW?fP)3sJ<2YQXuA_v2e{ekpPhbo46R_k-Rx0vR1l^@FbPiB ze-VFLokgXhOM(6=;3Q2@GaaNcN&>IYDH^4{6r}z1>f=1D3y#A!rvqkLq&(=*&~zvU ztcRsNLX2{z?>SEE)x6a0uPPDes1?76Ms^YcZa6l+bkwJ9NOP`U$9k;wXm%G&T*PNx zZ;H?Pq3eQZ;MuYxd`N4xR?Dgc-|pMV^G2l=Dp!S5I?MF=S}fD^y>RY;MrO-vi!1Tc z1P}|O!g{arP+9XWNoo>3pQ34+A`=qP*B(4xr%4(CIVqS0n6v3&Ps_N4w_RZ?&jYHlN^cp>vm#h9n?u3>)X(o-3BDs zI9wCkZV>sXMOhH&CzF{#Luar_I?48ks_Fbk2VN{^U$l|qwGr03Q@%lpP(K~Za$$mx zv%olw@lrG;cCm=ostS1o4{z^>`&}MLXsktRl$yLM#jox5h!n3xM|o(#udUKK3UjD` zRhRP{##r6}rQ`fnk6&v<4UKZkioe93-2nFUqFzzhxu)arkdQY~o`uWpolN8|4^NHFbIK}ZMCp!XLlDgzN;U>V5>hTrt?ZM=sPvwwdAVa;?iPsO$i$+C(+4BK>WEyRDFROVM((j9pL8h1%Q_hAC=80(1S1>N)dX2XaS=yc zNqjc5=fwvTF>aqII=|q1QJv#$-&tkzivN(Mg0Q=)0-Y`Y4pl28M$qe8q?13e zO(z!6l-UfU^i;{|EH_+JrU{F`%32qKk`H%4buV)M1M#`4k?zv-2y&H zBoWK-K947^b29duKJ_hI{bRNa^Cpbn0p9~Z0Jne*KzyZb$oI$iYX2jz%o>*lu6Rr@ zd?gmklsa2`*4;eO8s{g+GQ5^N#jjdz`WBs`eV2wmt>G{2FlN(HW-;0ou0sMyXW8;= zcN6=D8>(V9N5U8ddjetqe5r{X)}qt_@3Z#0vc$9FTP8KqZ?1KP?uy02L~17zP#kTZ zpyxp6V_+Z+;)EmO_q&4L$`*+(^V}S%$MEkY@8hQqhk2u^N3HT`q?h}KY)(en`K@C| z`SnqYZzS5(FFZ4Tl5eKm-T!lUIXg7Ted9e!1cK zi>e>QDaPwoE>Pdd8Hb8@nmxaE&SP$&;Sezm11D51pY_KF2&bcIvw?RQK=&TwBvr)DsgO5_Q5P& wEW6P=brk<|_qNJ~eds<496)}N${l=UI>)oq^ZcM@6`shSpH|S~9G{N<17M+SA^-pY diff --git a/ediv/src/dlls/edivstd/edivstd.c b/ediv/src/dlls/edivstd/edivstd.c index 9b1683a..5aacb01 100644 --- a/ediv/src/dlls/edivstd/edivstd.c +++ b/ediv/src/dlls/edivstd/edivstd.c @@ -162,6 +162,7 @@ int ExportaFuncs(EXPORTAFUNCS_PARAMS) FUNCTION("get_id",1,eDiv_GetId) ; FUNCTION("define_region",5,eDiv_DefineRegion) ; FUNCTION("signal",2,eDIV_Signal); + FUNCTION("let_me_alone",0,eDIV_Let_Me_Alone); ENTRYPOINT( first_load ) ; ENTRYPOINT(frame); @@ -248,11 +249,11 @@ void signal_tree(int proc, int signal, FUNCTION_PARAMS) int id2; if(id2=local("son",proc)) { signal_tree(id2,signal,fp); - reserved("status",proc)=signal; + reserved("status",id2)=signal; } - while(local("bigbro",proc)) { - proc=local("bigbro",proc); - reserved("status",proc)=signal; + while(local("bigbro",id2)) { + proc=local("bigbro",id2); + reserved("status",id2)=signal; } /*while(local("smallbro",proc)) { proc=local("smallbro",proc); @@ -291,6 +292,20 @@ int eDIV_Signal(FUNCTION_PARAMS) } } } + return 0; +} + +int eDIV_Let_Me_Alone(FUNCTION_PARAMS) +{ + int i; + int _status=reservedptr("status"); + + for(i=0;i<*fp->num_procs;i++) { + if(i!=*fp->proceso_actual) { + fp->mem[fp->procs_s[fp->proc_orden[i]].id+_status]=1; /* s_kill */ + } + } + return 0; } diff --git a/ediv/src/dlls/edivstd/main.h b/ediv/src/dlls/edivstd/main.h index 1125e90..2393629 100644 --- a/ediv/src/dlls/edivstd/main.h +++ b/ediv/src/dlls/edivstd/main.h @@ -8,3 +8,4 @@ int eDIV_Exit(FUNCTION_PARAMS); int eDiv_GetId(FUNCTION_PARAMS) ; int eDiv_DefineRegion(FUNCTION_PARAMS) ; int eDIV_Signal(FUNCTION_PARAMS); +int eDIV_Let_Me_Alone(FUNCTION_PARAMS); \ No newline at end of file diff --git a/ediv/src/dlls/file/file.vcproj b/ediv/src/dlls/file/file.vcproj index a913540..662ceb2 100644 --- a/ediv/src/dlls/file/file.vcproj +++ b/ediv/src/dlls/file/file.vcproj @@ -4,10 +4,10 @@ Version="7.00" Name="file" ProjectGUID="{6994F9CD-63ED-425D-879C-678D1706F4AE}" - SccProjectName=""$/dlls", YCAAAAAA" + SccProjectName="" SccAuxPath="" - SccLocalPath="..\.." - SccProvider="MSSCCI:Microsoft Visual SourceSafe"> + SccLocalPath="" + SccProvider=""> @@ -44,10 +44,10 @@ IgnoreImportLibrary="TRUE" AdditionalOptions="/MACHINE:I386" AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile="..\..\..\bin\dll\edivstd.dll" + OutputFile="..\..\..\bin\dll\file.dll" LinkIncremental="1" SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\edivstd.def" + ModuleDefinitionFile=".\file.def" ProgramDatabaseFile=".\Release/edivstd.pdb" ImportLibrary=".\Release/edivstd.lib"/> w * zoomx); dstheight = (int) ((double) rz_src->h * zoomy); if (dstwidth < 1) @@ -884,7 +883,7 @@ zoomSurface (SDL_Surface * src, double zoomx, double zoomy, int smooth) return (rz_dst); } -#ifdef WIN32 +#ifdef NORL_WIN32 /* For DLL building under VC6 */ BOOL APIENTRY DllMain (HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) diff --git a/ediv/src/dlls/graphics/graphics.h b/ediv/src/dlls/graphics/graphics.h index 2ee7bb7..f4e555b 100644 --- a/ediv/src/dlls/graphics/graphics.h +++ b/ediv/src/dlls/graphics/graphics.h @@ -1,5 +1,7 @@ // GRAPHICS.H +#include + #define PIOVER180 0.017453292519943295769236907684886 SDL_Surface *screen; diff --git a/ediv/src/dlls/graphics/main.c b/ediv/src/dlls/graphics/main.c index 2fa2747..5a9e257 100644 --- a/ediv/src/dlls/graphics/main.c +++ b/ediv/src/dlls/graphics/main.c @@ -1167,7 +1167,7 @@ int eDIV_FADE(FUNCTION_PARAMS2) return 1 ; } -int eDIV_SETMODE(FUNCTION_PARAMS) +/*int eDIV_SETMODE(FUNCTION_PARAMS) { int x,y,bpp,full; full = getparm(); @@ -1181,7 +1181,7 @@ int eDIV_SETMODE(FUNCTION_PARAMS) else screen = SDL_SetVideoMode(x, y, bpp, SDL_SWSURFACE ); return; -} +}*/ //*********************************** Entry Points **********************************************// @@ -1361,7 +1361,7 @@ void frame(FUNCTION_PARAMS) for ( i = 0 ; i <= last_blit ; i++ ) { - SDL_SetAlpha( blits[i].src, SDL_SRCALPHA , blits[i].trans ) ; + //SDL_SetAlpha( blits[i].src, SDL_SRCALPHA , /*blits[i].trans*/128 ) ; SDL_BlitSurface( blits[i].src , &blits[i].srcrect , screen , &blits[i].dstrect ) ; SDL_FreeSurface (blits[i].src); } @@ -1462,6 +1462,20 @@ int Dibuja(SDL_Surface *src , SDL_Rect srcrect , SDL_Rect dstrect , int z , int //blits[last_blit].src = src; blits[last_blit].src =xput(src, zoom,angulo); + + /* PEKEÑO HACK PARA ARREGLAR TRANSPARENCY + * Debería limpiarse y revisarse un poco :P + */ + if(blits[last_blit].src->flags & SDL_SRCALPHA) { + for(i=0;ih*blits[last_blit].src->w*blits[last_blit].src->format->BytesPerPixel;i+=blits[last_blit].src->format->BytesPerPixel) { + if(*((int*)&((unsigned char*)blits[last_blit].src->pixels)[i])!=color_transparente) + ((unsigned char*)blits[last_blit].src->pixels)[i+3]=trans; + } + } + else { + SDL_SetAlpha(blits[last_blit].src,SDL_SRCALPHA,trans); + } + blits[last_blit].srcrect.x = srcrect.x ; blits[last_blit].srcrect.y = srcrect.y ; blits[last_blit].srcrect.w = blits[last_blit].src->w;//srcrect.w ; @@ -1472,7 +1486,7 @@ int Dibuja(SDL_Surface *src , SDL_Rect srcrect , SDL_Rect dstrect , int z , int blits[last_blit].dstrect.h = dstrect.h ; blits[last_blit].z = z ; blits[last_blit].trans = trans ; - + // Buscamos su posicion @@ -1505,8 +1519,8 @@ SDL_Surface *xput(SDL_Surface *src,double size,double angle) SDL_Surface *tmp; s=smooth; - if(size==1 && angle ==0)s=0; - tmp= zoomSurface (src, size, size,s); + if(size==1 && angle ==0)s=0; + tmp= zoomSurface (src, size, size,s); dst=rotozoomSurface (tmp, angle, 1,s); SDL_FreeSurface (tmp); diff --git a/ediv/src/dlls/input/input.vcproj b/ediv/src/dlls/input/input.vcproj index d9c388e..f347844 100644 --- a/ediv/src/dlls/input/input.vcproj +++ b/ediv/src/dlls/input/input.vcproj @@ -4,10 +4,10 @@ Version="7.00" Name="input" ProjectGUID="{6994F9CD-63ED-425D-879C-678D1706F4AE}" - SccProjectName=""$/dlls", YCAAAAAA" + SccProjectName="" SccAuxPath="" - SccLocalPath="..\.." - SccProvider="MSSCCI:Microsoft Visual SourceSafe"> + SccLocalPath="" + SccProvider=""> @@ -43,11 +43,11 @@ Name="VCLinkerTool" IgnoreImportLibrary="TRUE" AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile="..\..\..\bin\dll\edivstd.dll" + AdditionalDependencies="sdlmain.lib sdl.lib" + OutputFile="..\..\..\bin\dll\input.dll" LinkIncremental="1" SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\edivstd.def" + ModuleDefinitionFile=".\input.def" ProgramDatabaseFile=".\Release/edivstd.pdb" ImportLibrary=".\Release/edivstd.lib"/> + SccLocalPath="" + SccProvider=""> @@ -43,11 +43,11 @@ Name="VCLinkerTool" IgnoreImportLibrary="TRUE" AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile="..\..\..\bin\dll\edivstd.dll" + AdditionalDependencies="sdlmain.lib sdl.lib" + OutputFile="..\..\..\bin\dll\text.dll" LinkIncremental="1" SuppressStartupBanner="TRUE" - ModuleDefinitionFile=".\edivstd.def" + ModuleDefinitionFile=".\text.def" ProgramDatabaseFile=".\Release/edivstd.pdb" ImportLibrary=".\Release/edivstd.lib"/> 0 && no_devuelve == 0 ) { //pila[++sp] = 0 ;// AQUI SE DEBERA DEVOLVER EL ID diff --git a/ediv/src/visual c/doku/doku.vcproj b/ediv/src/visual c/doku/doku.vcproj index 0751cdc..3d60f74 100644 --- a/ediv/src/visual c/doku/doku.vcproj +++ b/ediv/src/visual c/doku/doku.vcproj @@ -78,7 +78,7 @@ OutputFile="$(OutDir)/doku.exe" LinkIncremental="1" GenerateDebugInformation="TRUE" - SubSystem="2" + SubSystem="1" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1"/> diff --git a/ediv/src/visual c/ediv/ediv.vcproj b/ediv/src/visual c/ediv/ediv.vcproj index 7c3a284..25c65ca 100644 --- a/ediv/src/visual c/ediv/ediv.vcproj +++ b/ediv/src/visual c/ediv/ediv.vcproj @@ -74,7 +74,7 @@ EnableFunctionLevelLinking="TRUE" UsePrecompiledHeader="0" WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" + Detect64BitPortabilityProblems="FALSE" DebugInformationFormat="3"/> diff --git a/ediv/src/visual c/ediv_ws.suo b/ediv/src/visual c/ediv_ws.suo index 4a8e55c474b350a63754af647ae3a8371271f4dc4358ade96223460a0a5f66e0..a1be842e7be7cf28ac29616f813a320b566cc7acf811680608d3cf5dfe47b2b5 100644 GIT binary patch delta 1174 zcmaKrT}YEr7{{M8=X4*hy3N{b%#RvFPp=f9{BC-`8fY`&U2o(>!Roy5Vv{^ z++(td>DxOGi9Tbsu<(%4r~E8$sp}pTX+#uSuXPv)4aO+`YoUzpbVYY7Fk=`<5Ab(e zjm;K!%sAVWFjpx-lLG-ymi9-vY}l~aKxvzI<-ntlYi{ZsfGy(o6rG}CT1%_b$wngK zl|dfLahmtRBhjshy+SBthGhkbT}@6HVZj}aGh$f#?HIS(troZ%=qMebcA4$w(gS@;V=iy%xOT5p5iZ{x!I2Px z1*wA^E1S-b3RE!`^QTVHJQeqac>x}?F!7)~wPlAh16Qb}Mrs24@dk~wiS3z1E_Du> zOIuB%IKEXNb&k}h==BoEw+A=IWm9Eyw9>^BIYxI7kt!LEk3?2vTe{$}GOKTify8|M z%Ds8pMJM0!7I1duBEIX*<*VgkK40pz7ABW+v$~FJ)aqPp^IywzuSZIl{knub(UN;{ zb-g)xpnSI!^es&a%H#ek^lP?IUQ*})dcT=k(CMDBqE3(M*1zcnO=G$2nQFE1e*|$)6BW~7wW&lVGSh0pv46`5zdn84MVV84Ot&I2ag#qTN7=X+W$q`J#X@XEIQv5QxP= zyiJ16jJ%ATKuK;OhB<>x7|40TFu6*oj`7^)pF;Pzg?EEolfsbCkj+pEWGPE9Fic*k zEUw4E@E9bM3Y5!aCPZ5!R!`QKUpu)&US*O(1=A{~ z%~c9*jFXF$3?_>xznQ#%Q)sfPy~yPMc07~wl-VZVkyn|#PM!lU_D)G{@+)7f#Rp7S zH)-;4iGqUhDA3SjKztmCPXO`1iGlYwnbdG8DB=quCWa4_7r0KItZ!c^u7q9T=I!>p zjN-~TByT$aB~`FXPX6!sPfmpq=<)ymRk17CEbY9LkxdR52WpIy&k2Z4{@~)r&kA(D z3osm$fMJ!+U_JRDhq1UC4*kC7nD-(%IzB%D7qB?=9nG0~S62vw*ka diff --git a/ediv/src/visual c/stub/stub.vcproj b/ediv/src/visual c/stub/stub.vcproj index a08ba95..ae22661 100644 --- a/ediv/src/visual c/stub/stub.vcproj +++ b/ediv/src/visual c/stub/stub.vcproj @@ -89,7 +89,7 @@ makelib.bat win32.rel OutputFile="$(OutDir)/stub.exe" LinkIncremental="1" GenerateDebugInformation="TRUE" - SubSystem="1" + SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1"/> @@ -173,7 +173,7 @@ makelib.bat win32.dbg EnableFunctionLevelLinking="TRUE" UsePrecompiledHeader="0" WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" + Detect64BitPortabilityProblems="FALSE" DebugInformationFormat="3"/>