/****************************************************************/ /* */ /* Memory */ /* */ /* Description: Fonctions de manipulation de la memoire */ /* Auteur: LePhenixNoir */ /* Version: 3.0 */ /* Date: 11.06.2014 */ /* Fichier: memory.c - Code des fonctions */ /* */ /****************************************************************/ #ifndef __FXLIB_H__ #include "fxlib.h" #endif #ifndef _STDIO #include #endif #ifndef _STDLIB #include #endif #ifndef _STRING #include #endif #include "memory.h" int memory_errors = 0; void memory_seterrors(int e) { memory_errors = (e!=0); } void memory_error(char *from, char *func, int val) { unsigned int key; char info[20]; if(!memory_errors) return; sprintf(info,"%d",val); PopUpWin(6); locate(4,2); Print((unsigned char *)"Memory ERROR !!"); locate(3,4); Print((unsigned char *)"FROM:"); locate(8,4); Print((unsigned char *)from); locate(3,5); Print((unsigned char *)"FUNC:"); locate(8,5); Print((unsigned char *)func); locate(3,6); Print((unsigned char *)"INFO:"); locate(8,6); Print((unsigned char *)info); locate(3,7); Print((unsigned char *)"META:"); locate(8,7); switch(val) { case 1: Print((unsigned char *)"NotEnoughRAM"); break; case -1: Print((unsigned char *)"Nonexisting"); break; case -5: Print((unsigned char *)"WrongDevice"); break; case -8: Print((unsigned char *)"AccessDenied"); break; case -14: Print((unsigned char *)"ReadOnly"); break; case -31: Print((unsigned char *)"DeviceError"); break; case -35: Print((unsigned char *)"NotEmpty"); break; default: Print((unsigned char *)"Other"); break; } GetKey(&key); } FONTCHARACTER *memory_char2font(char *adresse) { FONTCHARACTER *adr; int i; adr = calloc((strlen(adresse)+1),sizeof(FONTCHARACTER)); for(i=0;i3?3:n);t++) { if(icoind[offset+i]!=255) for(i=0;i<32;i++) { k = icons[icoind[offset+t]][i]; for(j=0;j<8;j++) { if(k&1) Bdisp_SetPoint_VRAM(11-j+8*(i&1),20*t+4+(i>>1),1); k >>= 1; } } PrintXY(24,20*t+9,(const unsigned char *)*(files+offset+t),0); } Bdisp_DrawLineVRAM(2,20*p+3,2,20*p+20); Bdisp_DrawLineVRAM(3,20*p+2,99,20*p+2); Bdisp_DrawLineVRAM(3,20*p+21,99,20*p+21); Bdisp_DrawLineVRAM(100,20*p+3,100,20*p+20); if(offset>0) PrintXY(114,6,(const unsigned char *)"\346\234",0); if(offset+3