A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

Tocado y Contacto - Stikked
From Chocolate Bird, 10 Years ago, written in JavaScript.
Embed
  1. function hit(a,b){
  2.     var hit = false;
  3.     if(b.x + b.width >= a.x && b.x < a.x + a.width){
  4.         if(b.y + b.height >= a.y && b.y < a.y + a.height
  5.           ){
  6.           hit = true;  
  7.         }
  8.     }
  9.     if(b.x <= a.x && b.x + b.width >= a.x + a.width){
  10.         if(b.y <= a.y && b.y + b.height >= a.y + a.height){
  11.             hit = true;
  12.         }
  13.     }
  14.     if(a.x <= b.x && a.x + a.width >= b.x + b.width){
  15.         if(a.y <= b.y && a.y + a.height >= b.y + b.height){
  16.             hit = true;
  17.         }
  18.     }
  19.     return hit;
  20. }
  21.  
  22. function verificarContacto(){
  23.     for(var i in disparos){
  24.         var disparo = disparos[i];
  25.         for(j in enemigos){
  26.             var enemigo = enemigos[j];
  27.             if(hit(disparo,enemigo)){
  28.                 enemigo.estado = 'hit';
  29.                 enemigo.contador = 0;
  30.             }
  31.         }
  32.     }
  33.     if (nave.estado == 'hit' || nave.estado == 'muerto') return;
  34.     for (var i in disparosEnemigos){
  35.         var disparo = disparosEnemigos[i];
  36.         if (hit(disparo,nave)){
  37.             nave.estado = 'hit';
  38.         }
  39.     }
  40. }