Advertisement
gmeawasige

Untitled

Sep 21st, 2011
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. int update_HETR(UPDATE_FUNC_ARGS) {
  2. int r,rx,ry,rt,a,b;
  3. for (rx=-2; rx<3; rx++)
  4. for (ry=-2; ry<3; ry++)
  5. if (x+rx>=0 && y+ry>=0 && x+rx<XRES && y+ry<YRES && (rx || ry)){
  6. r = pmap[y+ry][x+rx];
  7. rt = (r&0xFF);
  8. if (!r)
  9. continue;
  10. if ((r&0xFF)==PT_SPRK&&parts[r>>8].ctype!=PT_PSCN&&parts[r>>8].ctype!=PT_NSCN){
  11. for (a=-2; a<3; a++)
  12. for (b=-2; b<3; b++){
  13. if ((pmap[y+b][x+a]&0xFF)==PT_DLAY)
  14. parts[pmap[y+b][x+a]>>8].temp += 2.0f;
  15. else if ((pmap[y+b][x+a]&0xFF)==PT_WIFI||(pmap[b][a]&0xFF)==PT_PRTI||(pmap[b][a]&0xFF)==PT_PRTO)
  16. parts[pmap[y+b][x+a]>>8].temp += 100.0f;
  17. }
  18. }
  19. }
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement