diff --git a/dlls/src/dinmem/win32/dinmem.vcproj b/dlls/src/dinmem/win32/dinmem.vcproj
index b799139..3c688d8 100644
--- a/dlls/src/dinmem/win32/dinmem.vcproj
+++ b/dlls/src/dinmem/win32/dinmem.vcproj
@@ -41,7 +41,7 @@
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/dinmem.pdb"
SubSystem="2"
- ImportLibrary="$(OutDir)/dinmem.lib"
+ ImportLibrary=""
TargetMachine="1"/>
diff --git a/dlls/src/edivstd/edivstd.c b/dlls/src/edivstd/edivstd.c
index 7280761..49a5077 100644
--- a/dlls/src/edivstd/edivstd.c
+++ b/dlls/src/edivstd/edivstd.c
@@ -32,6 +32,7 @@
#else
#error ¡adapta las rutinas de timer a Linux!
#endif
+#include
#include
@@ -41,6 +42,21 @@
int last_type ;
int last_proc ;
+int DEBUG_PROCESOS(FUNCTION_PARAMS)
+{
+ int i,n;
+ FILE* f;
+ f=fopen("procs.txt","a");
+ fprintf(f,"\n--- COMIENZO ---\n");
+ for(i=0;i<*fp->num_procs;i++) {
+ n=fp->procs_s[fp->proc_orden[i]].id;
+ fprintf(f,"(%d) ID: %d TYPE: %d TIPO: %d STATUS: %d ORDEN: %d\n",i,n,reserved("process_type",n),fp->procs_s[fp->proc_orden[i]].tipo,reserved("status",n),fp->procs_s[fp->proc_orden[i]].orden);
+ }
+ fprintf(f,"\n--- FIN ---\n");
+ fclose(f);
+ return 0;
+}
+
int ExportaFuncs(EXPORTAFUNCS_PARAMS)
{
@@ -164,6 +180,8 @@ int ExportaFuncs(EXPORTAFUNCS_PARAMS)
FUNCTION("signal",2,eDIV_Signal);
FUNCTION("let_me_alone",0,eDIV_Let_Me_Alone);
+ FUNCTION("debug_procesos",0,DEBUG_PROCESOS);
+
ENTRYPOINT( first_load ) ;
ENTRYPOINT(frame);
@@ -251,9 +269,10 @@ int eDiv_DefineRegion(FUNCTION_PARAMS)
void signal_tree(int proc, int signal, FUNCTION_PARAMS)
{
int id2;
+ reserved("status",proc)=signal;
if(id2=local("son",proc)) {
signal_tree(id2,signal,fp);
- reserved("status",id2)=signal;
+ //reserved("status",id2)=signal;
}
while(local("bigbro",id2)) {
proc=local("bigbro",id2);
@@ -266,19 +285,19 @@ int eDIV_Signal(FUNCTION_PARAMS)
int signal=getparm();
int proc=getparm();
char tree=FALSE;
-
+
+// assert(0);
if(signal>=100) {
signal-=100;
tree=TRUE;
}
signal++;
-
/* Si se le pasa un ID */
if(procimem_max)
{
reserved("status",proc)=signal;
- if(tree && (proc=reserved("son",proc)))
+ if(tree && (proc=local("son",proc)))
signal_tree(proc,signal,fp);
}
/* Si se le pasa un type */
@@ -287,7 +306,7 @@ int eDIV_Signal(FUNCTION_PARAMS)
for(i=0;i<*fp->num_procs;i++) {
if(fp->procs_s[fp->proc_orden[i]].tipo==proc) {
reserved("status",fp->procs_s[fp->proc_orden[i]].id)=signal;
- if(tree && (p=reserved("son",fp->procs_s[fp->proc_orden[i]].id)))
+ if(tree && (p=local("son",fp->procs_s[fp->proc_orden[i]].id)))
signal_tree(fp->procs_s[fp->proc_orden[i]].id,signal,fp);
}
}
diff --git a/dlls/src/edivstd/win32/edivstd.vcproj b/dlls/src/edivstd/win32/edivstd.vcproj
index 4362934..0c5a15e 100644
--- a/dlls/src/edivstd/win32/edivstd.vcproj
+++ b/dlls/src/edivstd/win32/edivstd.vcproj
@@ -12,7 +12,7 @@
@@ -40,12 +40,13 @@
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/edivstd.pdb"
SubSystem="2"
- ImportLibrary="$(OutDir)/edivstd.lib"
+ ImportLibrary=""
TargetMachine="1"/>
+ Name="VCPostBuildEventTool"
+ CommandLine="copy Debug\edivstd.dll ..\..\..\..\ediv\bin\dll"/>
diff --git a/dlls/src/graphics/win32/graphics.vcproj b/dlls/src/graphics/win32/graphics.vcproj
index 3ef73aa..9f9d2d6 100644
--- a/dlls/src/graphics/win32/graphics.vcproj
+++ b/dlls/src/graphics/win32/graphics.vcproj
@@ -41,7 +41,7 @@
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/graphics.pdb"
SubSystem="2"
- ImportLibrary="$(OutDir)/graphics.lib"
+ ImportLibrary=""
TargetMachine="1"/>
diff --git a/dlls/src/input/win32/input.vcproj b/dlls/src/input/win32/input.vcproj
index 12ab80a..9664d64 100644
--- a/dlls/src/input/win32/input.vcproj
+++ b/dlls/src/input/win32/input.vcproj
@@ -41,7 +41,7 @@
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/input.pdb"
SubSystem="2"
- ImportLibrary="$(OutDir)/input.lib"
+ ImportLibrary=""
TargetMachine="1"/>
diff --git a/dlls/src/math/win32/math.vcproj b/dlls/src/math/win32/math.vcproj
index 107e938..f5b18a5 100644
--- a/dlls/src/math/win32/math.vcproj
+++ b/dlls/src/math/win32/math.vcproj
@@ -40,7 +40,7 @@
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/math.pdb"
SubSystem="2"
- ImportLibrary="$(OutDir)/math.lib"
+ ImportLibrary=""
TargetMachine="1"/>
diff --git a/dlls/src/strings/win32/strings.vcproj b/dlls/src/strings/win32/strings.vcproj
index 801a491..a1373dc 100644
--- a/dlls/src/strings/win32/strings.vcproj
+++ b/dlls/src/strings/win32/strings.vcproj
@@ -39,7 +39,7 @@
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/strings.pdb"
SubSystem="2"
- ImportLibrary="$(OutDir)/strings.lib"
+ ImportLibrary=""
TargetMachine="1"/>
diff --git a/dlls/src/text/win32/text.vcproj b/dlls/src/text/win32/text.vcproj
index c03b583..c51408c 100644
--- a/dlls/src/text/win32/text.vcproj
+++ b/dlls/src/text/win32/text.vcproj
@@ -40,7 +40,7 @@
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/text.pdb"
SubSystem="2"
- ImportLibrary="$(OutDir)/text.lib"
+ ImportLibrary=""
TargetMachine="1"/>
diff --git a/ediv/CHANGE_LOG.txt b/ediv/CHANGE_LOG.txt
index ea880d7..c352dd7 100644
--- a/ediv/CHANGE_LOG.txt
+++ b/ediv/CHANGE_LOG.txt
@@ -1,3 +1,15 @@
+05/03/2003
+----------
+ * Hay algún fallo cuando se elimina un proceso, tiene que ver con la
+ eliminación de procesos de procs_s y proc_orden y la creación y
+ ejecución de nuevos procesos (probad a rular robots.prg y pasaros el
+ primer nivel, os dará un error "redefinición del tipo de proceso" cuando
+ intentéis mover el personaje). (Er_Makina)
+
+04/03/2003
+----------
+ * signal() arreglado, ya funcionan las señales tree (Er_Makina)
+
18/12/2002
----------
* Mas comentarizacion siguiendo las normas del ANSI C (Daijo)
diff --git a/ediv/bin/ROBOTS.PRG b/ediv/bin/ROBOTS.PRG
index 173b7e4..ea7d7cb 100644
--- a/ediv/bin/ROBOTS.PRG
+++ b/ediv/bin/ROBOTS.PRG
@@ -57,6 +57,7 @@ BEGIN
// fade_on();
// prota=protag(rand(0,39)*8,rand(0,24)*8);
protag(rand(0,39)*8,rand(0,24)*8);
+ debug_procesos();
for(i=1;i<=num_robots;i++)
loop
x=rand(0,39);
@@ -189,8 +190,11 @@ BEGIN
mueve_robots();
end
end
+ debug_procesos();
signal(prota,s_kill);
+ debug_procesos();
signal(type robot,s_kill);
+ debug_procesos();
muertos=0;
cogido=0;
ya=0;
diff --git a/ediv/bin/signal2.prg b/ediv/bin/signal2.prg
new file mode 100644
index 0000000..b695339
--- /dev/null
+++ b/ediv/bin/signal2.prg
@@ -0,0 +1,81 @@
+program prueba_signal2;
+global
+ idbola;
+
+begin
+ load_fnt("system.fnt");
+ load_fpg("test16.fpg");
+ put_screen(0,1);
+
+ write_int(1,0,0,0,&idbola);
+
+ idbola=bola(0);
+
+ loop
+ frame;
+ if(key(_f))
+ signal(idbola,s_freeze_tree);
+ while(key(_f))
+ frame;
+ end
+ signal(idbola,s_wakeup_tree);
+ end
+ if(key(_s))
+ signal(idbola,s_sleep_tree);
+ while(key(_s))
+ frame;
+ end
+ signal(idbola,s_wakeup_tree);
+ end
+ if(key(_k))
+ signal(idbola,s_kill_tree);
+ while(key(_k))
+ frame;
+ end
+ triangulo(7);
+ idbola=bola(0);
+ end
+ if(key(_esc))
+ exit("Taluego lucas!!",0);
+ end
+ end
+end
+
+process bola(num)
+begin
+ graph=100;
+ x=160;
+ y=30+num*20;
+
+ if(num<3)
+ bola(num+1);
+ else
+ triangulo(num+1);
+ end
+
+ loop
+ frame;
+ x+=rand(-5,5);
+ if(x<30) x=30; end
+ if(x>290) x=290; end
+ end
+end
+
+process triangulo(num)
+begin
+ graph=101;
+ x=160;
+ y=30+num*20;
+
+ if(num<6)
+ triangulo(num+1);
+ end
+
+ loop
+ frame;
+ x+=rand(-5,5);
+ if(x<30) x=30; end
+ if(x>290) x=290; end
+ end
+end
+
diff --git a/ediv/src/ediv/compiler.c b/ediv/src/ediv/compiler.c
index 8fa7417..9d7cc37 100644
--- a/ediv/src/ediv/compiler.c
+++ b/ediv/src/ediv/compiler.c
@@ -335,7 +335,7 @@ void compila()
#endif
if ((f=fopen(outfilename,"ab"))!=NULL) {
- fwrite(nombre_program,strlen(nombre_program)+1,1,f);
+ fwrite(nombre_program,strlen((const char*)nombre_program)+1,1,f);
p=(byte*)e_malloc((imem+iloc)*4);
m=(imem+iloc)*4+1024;
q=(byte*)e_malloc(m);
@@ -1065,7 +1065,7 @@ void escribe_lin(FILE* f)
b++;
progcomp=e_malloc(b*2);
l=b*2;
- if(compress(progcomp,&l,prog,b)) {
+ if(compress(progcomp,(unsigned long*)&l,prog,b)) {
fclose(linf);
fclose(f);
errormem();
diff --git a/ediv/src/ediv/config.c b/ediv/src/ediv/config.c
index a793e31..88f9799 100644
--- a/ediv/src/ediv/config.c
+++ b/ediv/src/ediv/config.c
@@ -33,12 +33,12 @@ char* buffer;
int linea;
char cfg[256];
-void cfg_error(int error)
+/*void cfg_error(int error)
{
printf(translate(41),cfg,linea,translate_cfg_error(error));
printf(translate(42));
exit(1);
-}
+}*/
void salta_spc() {
while(lower[buffer[i]]==0 && iu1.Function = (PDWORD) func;
+ ptd_out->u1.Function = (unsigned long)(PDWORD) func;
ptd_in++;
ptd_out++;
diff --git a/ediv/src/ediv/ediv.c b/ediv/src/ediv/ediv.c
index a1408d0..edcf00e 100644
--- a/ediv/src/ediv/ediv.c
+++ b/ediv/src/ediv/ediv.c
@@ -242,9 +242,9 @@ int main(int argc, char *argv[])
/* mete el PRG en el buffer prog */
fseek(fp,0,SEEK_END);
progsize=ftell(fp);
- prog = (char *)e_malloc(progsize+1);
+ prog = (unsigned char *)e_malloc(progsize+1);
fseek(fp,0,SEEK_SET);
- p=prog;
+ p=(char*)prog;
do {
*p = getc(fp);
p++;
diff --git a/ediv/src/ediv/lower.c b/ediv/src/ediv/lower.c
index 52ef9fa..b4f0cef 100644
--- a/ediv/src/ediv/lower.c
+++ b/ediv/src/ediv/lower.c
@@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include
+#include
#include "main.h"
#include "lower.h"
diff --git a/ediv/src/shared/shared.h b/ediv/src/shared/shared.h
index 1ce56c9..c61fb58 100644
--- a/ediv/src/shared/shared.h
+++ b/ediv/src/shared/shared.h
@@ -39,4 +39,4 @@
#define long_header 9 /* Longitud de la cabecera al inicio de los programas */
-#endif /* __EDIV_SHARED_H_
\ No newline at end of file
+#endif /* __EDIV_SHARED_H_ */
\ No newline at end of file
diff --git a/ediv/src/stub/inte.c b/ediv/src/stub/inte.c
index 5ca74f6..a5c1d06 100644
--- a/ediv/src/stub/inte.c
+++ b/ediv/src/stub/inte.c
@@ -123,9 +123,9 @@ int lista_quita( int num )
{
int i ;
- procs_s[num].tipo=0;
+ procs_s[proc_orden[num]].tipo=0;
- for ( i = procs_s[num].orden+1 ; i < num_proc_orden ; i++ )
+ for ( i = num+1 ; i < num_proc_orden ; i++ )
{
procs_s[ proc_orden[ i ] ].orden-- ;
proc_orden[ i - 1 ] = proc_orden[ i ] ;
@@ -155,9 +155,12 @@ int interprete()
for ( proceso_actual = 0 ; proceso_actual < num_proc_orden ; proceso_actual++ )
{
+ //printf("Proceso %d - Estado: %d\n",procs_s[proc_orden[proceso_actual]].id,mem[procs_s[proc_orden[proceso_actual]].id+_status]);
if(mem[procs_s[proc_orden[proceso_actual]].id+_status]==1) {
- //mem[procs_s[num].id+_status=0;
+ mem[procs_s[proc_orden[proceso_actual]].id+_status]=0;
+ //assert(0);
lista_quita(proceso_actual);
+ proceso_actual--;
}
}
diff --git a/ediv/src/visual c/ediv_ws.suo b/ediv/src/visual c/ediv_ws.suo
index 2a391a5..0dc4029 100644
Binary files a/ediv/src/visual c/ediv_ws.suo and b/ediv/src/visual c/ediv_ws.suo differ
diff --git a/ediv/src/visual c/encrypt/encrypt.vcproj b/ediv/src/visual c/encrypt/encrypt.vcproj
index f30d4b4..66ff6b8 100644
--- a/ediv/src/visual c/encrypt/encrypt.vcproj
+++ b/ediv/src/visual c/encrypt/encrypt.vcproj
@@ -27,7 +27,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
- RuntimeLibrary="5"
+ RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"