muchos bugs corregidos!! LEER CHANGELOG KE PA ESO ESTA

This commit is contained in:
Gabriel Lorenzo 2002-09-24 04:38:38 +00:00
parent 386186ee5c
commit 17321e69a8
15 changed files with 31 additions and 152 deletions

View file

@ -22,6 +22,10 @@
aprovechado para cambiar alguna cosilla por ahí para quitar warnings (uf aprovechado para cambiar alguna cosilla por ahí para quitar warnings (uf
la graphics tiene cada warnings mas peligrosos.. variables sin inicializar.. la graphics tiene cada warnings mas peligrosos.. variables sin inicializar..
de to) :P (Er_Makina) de to) :P (Er_Makina)
*  Corregido bug de los 154 procesos!! (Er_Makina)
*  Ya se inicializan las variables locales!! (Er_Makina)
* Cambiado max_process en ediv.cfg de 20 a 1024 (Er_Makina)
* Por hacer: controlar el m醲imo de procesos permitidos. (Er_Makina)
9/9/2002 9/9/2002
-------- --------

View file

@ -3,7 +3,7 @@
motd_host=divsite.net ; Hostname de donde coger el motd motd_host=divsite.net ; Hostname de donde coger el motd
[default_compiler_options] [default_compiler_options]
max_process=20 ; Por poner algo xD max_process=1024 ; Por poner algo xD
free_sintax=0 ; No hay sintaxis libre free_sintax=0 ; No hay sintaxis libre
extended_conditions=0 ; No hay condiciones extendidas extended_conditions=0 ; No hay condiciones extendidas
case_sensitive=0 ; Sin case sensitive case_sensitive=0 ; Sin case sensitive

Binary file not shown.

View file

@ -23,7 +23,7 @@
* DIV, tal como las opciones de compilación, estructura reserved, etc. * DIV, tal como las opciones de compilación, estructura reserved, etc.
*/ */
#include <export.h> #include "export.h"
//#include "../../shared/varindex.h" //#include "../../shared/varindex.h"
#include "main.h" #include "main.h"

View file

@ -49,3 +49,4 @@ int eDIV_GET_REAL_POINT(FUNCTION_PARAMS) ;
int eDIV_GRAPHIC_INFO(FUNCTION_PARAMS) ; int eDIV_GRAPHIC_INFO(FUNCTION_PARAMS) ;
int eDIV_FADE(FUNCTION_PARAMS) ; int eDIV_FADE(FUNCTION_PARAMS) ;
int Dibuja(SDL_Surface *src , SDL_Rect srcrect , SDL_Rect dstrect , int z , int trans );

View file

@ -144,6 +144,7 @@ int ExportaFuncs(EXPORTAFUNCS_PARAMS)
GLOBAL_STRUCT("video_modes",31); GLOBAL_STRUCT("video_modes",31);
_INT("wide",0); _INT("wide",0);
_INT("height",0); _INT("height",0);
_INT("bpp",0); // NUEVO
_INT("mode",0); _INT("mode",0);
END_STRUCT; END_STRUCT;
@ -440,9 +441,9 @@ int eDIV_COLLISION(FUNCTION_PARAMS)
r1.h = files[f1].mapa[g1].Surface->h ; r1.h = files[f1].mapa[g1].Surface->h ;
id2 = a ; id2 = a ;
g2 = local("graph",id2) ; g2 = local("graph",id2) ;
f2 = local("file",id2);
if ( files[f2].existe == 0 || files[f2].mapa[g2].existe == 0 ) if ( files[f2].existe == 0 || files[f2].mapa[g2].existe == 0 )
return -1 ; return -1 ;
f2 = local("file",id2) ;
r2.x = local("x",id2) ; r2.x = local("x",id2) ;
r2.y = local("y",id2) ; r2.y = local("y",id2) ;
r2.w = files[f2].mapa[g2].Surface->w ; r2.w = files[f2].mapa[g2].Surface->w ;
@ -470,9 +471,9 @@ int eDIV_COLLISION(FUNCTION_PARAMS)
r1.h = files[f1].mapa[g1].Surface->h ; r1.h = files[f1].mapa[g1].Surface->h ;
id2 = a ; id2 = a ;
g2 = local("graph",id2) ; g2 = local("graph",id2) ;
f2 = local("file",id2) ;
if ( files[f2].existe == 0 || files[f2].mapa[g2].existe == 0 ) if ( files[f2].existe == 0 || files[f2].mapa[g2].existe == 0 )
return -1 ; return -1 ;
f2 = local("file",id2) ;
r2.x = local("x",id2) ; r2.x = local("x",id2) ;
r2.y = local("y",id2) ; r2.y = local("y",id2) ;
r2.w = files[f2].mapa[g2].Surface->w ; r2.w = files[f2].mapa[g2].Surface->w ;
@ -1208,6 +1209,7 @@ int eDIV_LOAD_FPG(FUNCTION_PARAMS2)
} }
fclose(r);*/ fclose(r);*/
fclose(f); fclose(f);
return 0;
} }
int eDIV_GET_POINT(FUNCTION_PARAMS2) int eDIV_GET_POINT(FUNCTION_PARAMS2)
@ -1270,6 +1272,7 @@ int eDIV_GRAPHIC_INFO(FUNCTION_PARAMS2)
case 3: case 3:
return files[f].mapa[g].cpoint[0].y ; return files[f].mapa[g].cpoint[0].y ;
} }
return -1;
} }
@ -1291,7 +1294,7 @@ int eDIV_FADE(FUNCTION_PARAMS2)
FILE * fichero ; FILE * fichero ;
FILE * memo ; FILE * memo ;
void frame(FUNCTION_PARAMS2 ) void frame(FUNCTION_PARAMS)
{ {
static int una_vez = 1 ; static int una_vez = 1 ;
int i , temp , id , f , g , r , z , trans; int i , temp , id , f , g , r , z , trans;
@ -1299,7 +1302,6 @@ void frame(FUNCTION_PARAMS2 )
fichero = fopen( "draw.txt" , "w" ) ; fichero = fopen( "draw.txt" , "w" ) ;
if ( define_region == 1) if ( define_region == 1)
{ {
@ -1337,7 +1339,8 @@ void frame(FUNCTION_PARAMS2 )
dstrect.y = draws[i].y ; dstrect.y = draws[i].y ;
dstrect.w = 0 ; // Se ignora dstrect.w = 0 ; // Se ignora
dstrect.h = 0 ; // Se ignora dstrect.h = 0 ; // Se ignora
Dibuja( files[f].mapa[g].Surface , srcrect , dstrect , z ) ; //Dibuja( files[f].mapa[g].Surface , srcrect , dstrect , z , 0 ) ;
Dibuja( draws[i].Surface , srcrect , dstrect , z , draws[i].t ) ;
} }
} }
} }
@ -1432,6 +1435,8 @@ void frame(FUNCTION_PARAMS2 )
SDL_Flip(screen) ; SDL_Flip(screen) ;
fclose(fichero);
} }
void first_load(FUNCTION_PARAMS2) void first_load(FUNCTION_PARAMS2)

View file

@ -245,8 +245,8 @@ struct _fun_params{
int *pila ; int *pila ;
int *sp ; int *sp ;
int *mem ; int *mem ;
int *varindex ; varindex_t *varindex ;
struct _procs_s *procs_s ; struct _procs_s (*procs_s)[4096] ;
int *num_procs ; int *num_procs ;
int *proc_orden ; int *proc_orden ;
int *proceso_actual ; int *proceso_actual ;

View file

@ -54,141 +54,5 @@ varindex_t* varindex;
#define reservedptr(nombre) GetVarOffset(v_reserved,nombre) #define reservedptr(nombre) GetVarOffset(v_reserved,nombre)
#define localptr(nombre) GetVarOffset(v_local,nombre) #define localptr(nombre) GetVarOffset(v_local,nombre)
/*
//////////////////////////////
/// GLOBALES ///
//////////////////////////////
#define _glo_timer 0
#define _glo_max_process_time 1
#define _glo_argc 2
#define _glo_argv 3
//////////////////////////////
/// LOCALES ///
//////////////////////////////
// Estructura reserved
#define _res_process_id 4
#define _res_id_scan 5
#define _res_process_type 6
#define _res_type_scan 7
#define _res_status 8
#define _res_parameters 9
#define _res_param_offset 10
#define _res_program_index 11
#define _res_stack_pointer 12
#define _res_is_executed 13
#define _res_is_painted 14
#define _res_m8_object 15
#define _res_old_ctype 16
#define _res_frame_percent 17
#define _res_box_x0 18
#define _res_box_y0 19
#define _res_box_x1 20
#define _res_box_y1 21
#define _res_f_count 22
#define _res_caller_id 23
// Jerarquía de procesos
#define _loc_father 24
#define _loc_son 25
#define _loc_smallbro 26
#define _loc_bigbro 27
// Variables locales varias
#define _loc_priority 28
#define _loc_ctype 29
#define _loc_x 30
#define _loc_y 31
#define _loc_z 32
#define _loc_graph 33
#define _loc_size 34
#define _loc_angle 35
#define _loc_region 36
#define _loc_file 37
#define _loc_xgraph 38
#define _loc_height 39
#define _loc_cnumber 40
#define _loc_resolution 41
#define _loc_flags 42
#define _glo_draw_z 43
#define _glo_scroll 44
#define _glo_fps 45
*/
/*enum {
//////////////////////////////
/// GLOBALES ///
//////////////////////////////
_glo_timer,
_glo_max_process_time,
_glo_argc,
_glo_argv,
_glo_draw_z,
_glo_scroll,
_glo_fps,
//////////////////////////////
/// LOCALES ///
//////////////////////////////
// Estructura reserved
_res_process_id,
_res_id_scan,
_res_process_type,
_res_type_scan,
_res_status,
_res_parameters,
_res_param_offset,
_res_program_index,
_res_stack_pointer,
_res_is_executed,
_res_is_painted,
_res_m8_object,
_res_old_ctype,
_res_frame_percent,
_res_box_x0,
_res_box_y0,
_res_box_x1,
_res_box_y1,
_res_f_count,
_res_caller_id,
// Jerarquía de procesos
_loc_father,
_loc_son,
_loc_smallbro,
_loc_bigbro,
// Variables locales varias
_loc_priority,
_loc_ctype,
_loc_x,
_loc_y,
_loc_z,
_loc_graph,
_loc_size,
_loc_angle,
_loc_region,
_loc_file,
_loc_xgraph,
_loc_height,
_loc_cnumber,
_loc_resolution,
_loc_flags,
_loc_transparency,
___last // por si acaso
};*/
#endif // __VARINDEX_H #endif // __VARINDEX_H

View file

@ -758,7 +758,7 @@ int Call_Entrypoint(int ep, ...)
case EDIV_frame: case EDIV_frame:
case EDIV_first_load: case EDIV_first_load:
{ {
void (*funcion_ep)(void); void (*funcion_ep)(struct _fun_params* fp);
funcion_ep=entrypoints[i].hfuncion; funcion_ep=entrypoints[i].hfuncion;
funcion_ep(&fp) ; funcion_ep(&fp) ;
} }

View file

@ -109,6 +109,7 @@ static void eDIV_Parachute(int sig)
#endif #endif
fprintf(stderr,"\ndbg: num_procesos:%d, proceso actual:%d\n",num_proc_orden,proceso_actual); fprintf(stderr,"\ndbg: num_procesos:%d, proceso actual:%d\n",num_proc_orden,proceso_actual);
fprintf(stderr,"dbg: imem:%d, imem_max:%d, mem:0x%X\n",imem,imem_max,mem); fprintf(stderr,"dbg: imem:%d, imem_max:%d, mem:0x%X\n",imem,imem_max,mem);
fprintf(stderr,"dbg: iloc:%d, iloc_len:%d, iloc_pub_len:%d, inicio_privadas:%d\n",iloc,iloc_len,iloc_pub_len,inicio_privadas);
fprintf(stderr,"dbg: sp:%d, pila:0x%X, pila_max:%d\n",sp,pila,pila_max); fprintf(stderr,"dbg: sp:%d, pila:0x%X, pila_max:%d\n",sp,pila,pila_max);
if(pila) { if(pila) {
int s,e,i; int s,e,i;

View file

@ -271,7 +271,7 @@ int proceso( int num )
case lfun://25 NO USADO case lfun://25 NO USADO
break ; break ;
case lcal://26 case lcal://26
assert(num_proc_orden<153); //assert(num_proc_orden<153);
devolver++ ; devolver++ ;
v1 = busca_proc_libre() ; v1 = busca_proc_libre() ;
procs_s[v1].imem = mem[imem++] ; procs_s[v1].imem = mem[imem++] ;
@ -311,6 +311,8 @@ int proceso( int num )
break; break;
case ltyp://32 case ltyp://32
procs_s[num_proc].id = mem[2] + ( num_proc * iloc_len ) ; procs_s[num_proc].id = mem[2] + ( num_proc * iloc_len ) ;
reserved("process_id",procs_s[num_proc].id)=procs_s[num_proc].id;
memcpy(&mem[procs_s[num_proc].id],&mem[iloc],iloc_pub_len<<2);
if ( procs_s[num_proc].tipo != 0 ) if ( procs_s[num_proc].tipo != 0 )
critical_error(3); // redefinición del tipo de proceso critical_error(3); // redefinición del tipo de proceso
procs_s[num_proc].tipo = mem[ imem++ ] ; procs_s[num_proc].tipo = mem[ imem++ ] ;

View file

@ -183,9 +183,9 @@
//ヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘ //-----------------------------------------------------------------------------
// Variables locales del sistema de sprites (las primeras no son p£blicas) // Variables locales del sistema de sprites (las primeras no son p£blicas)
//ヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘ //-----------------------------------------------------------------------------
#define _Id 0 //Para comprobar validez de accesos externos #define _Id 0 //Para comprobar validez de accesos externos
#define _IdScan 1 //Recorrido del resto de los procesos (p.ej.colisiones) #define _IdScan 1 //Recorrido del resto de los procesos (p.ej.colisiones)

View file

@ -24,6 +24,8 @@
* *
*/ */
// se supone ke todo esto sirve para algo? (Er_Makina)
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>

View file

@ -307,7 +307,7 @@ int main(int argc, char* argv[])
fprintf(file_tiempo , "fps: %d\n" , 1000/(tiempo - tiempo_pre) ) ; fprintf(file_tiempo , "fps: %d\n" , 1000/(tiempo - tiempo_pre) ) ;
*/ */
// PETA EN AMD???? // PETA EN AMD???? <-- y esto? a mi no me peta.. (Er_Makina)
tiempo_i ++ ; tiempo_i ++ ;
if ( tiempo_i > 99 ) tiempo_i = 0 ; if ( tiempo_i > 99 ) tiempo_i = 0 ;
tiempo[ tiempo_i ] = SDL_GetTicks() ; tiempo[ tiempo_i ] = SDL_GetTicks() ;

Binary file not shown.