A PHP Error was encountered
Severity: 8192
Message:  strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
Filename: database/DB_driver.php
Line Number: 1876
 
A PHP Error was encountered
Severity: 8192
Message:  strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
Filename: database/DB_driver.php
Line Number: 1876
 
A PHP Error was encountered
Severity: 8192
Message:  strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
Filename: database/DB_driver.php
Line Number: 1876
 
A PHP Error was encountered
Severity: 8192
Message:  strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
Filename: database/DB_driver.php
Line Number: 1876
 
A PHP Error was encountered
Severity: 8192
Message:  strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
Filename: database/DB_driver.php
Line Number: 1876
 
A PHP Error was encountered
Severity: 8192
Message:  strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
Filename: database/DB_driver.php
Line Number: 1876
 
A PHP Error was encountered
Severity: 8192
Message:  strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
Filename: database/DB_driver.php
Line Number: 1876
 
A PHP Error was encountered
Severity: 8192
Message:  strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
Filename: database/DB_driver.php
Line Number: 1876
 
A PHP Error was encountered
Severity: 8192
Message:  strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
Filename: database/DB_driver.php
Line Number: 1876
 
A PHP Error was encountered
Severity: 8192
Message:  strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
Filename: database/DB_driver.php
Line Number: 1876
 
A PHP Error was encountered
Severity: 8192
Message:  Function create_function() is deprecated
Filename: geshi/geshi.php
Line Number: 4751
 
A PHP Error was encountered
Severity: 8192
Message:  strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
Filename: database/DB_driver.php
Line Number: 1876
 
A PHP Error was encountered
Severity: 8192
Message:  strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
Filename: database/DB_driver.php
Line Number: 1876
 
A PHP Error was encountered
Severity: Warning
Message:  Cannot modify header information - headers already sent by (output started at /home/Jenja/www/mcpaste.de/www/system/core/Exceptions.php:272)
Filename: view/download.php
Line Number: 2
 
A PHP Error was encountered
Severity: Warning
Message:  Cannot modify header information - headers already sent by (output started at /home/Jenja/www/mcpaste.de/www/system/core/Exceptions.php:272)
Filename: view/download.php
Line Number: 3
 /******************************************************************************
    file:       main.cpp
    created:    12.4.2004
******************************************************************************/
#include 
#include 
#include "box.h"
// Prototypes:
bool collide( Box *box1, Box *box2 );
bool SaveAsBitmap( char *szFile, BYTE **array, int width, int height );
// Global Vars
const int nHind = 10;  // Anzahl der Hindernisse
const int nRob = 1;   // Anzahl der Roboterglieder
int nTests = 0;
Box aHindernis[nHind];  // Unsere Hindernise
Box aRoboter[nRob];     // Roboterteile
int setCellColisionIndex(int width, int height, BYTE ** cspace){
	for (int j = 0; j < nHind; j++){
		bool isCollided = collide(&aRoboter[0], &aHindernis[j]);
		nTests++;
		if (isCollided){
			cspace[width][height] = j + 1;
			return j + 1;
		}
	}
	return 0;
}
/*
 *  main
 */
int main( )
{
    // Breite und Höhe des Konfigurationsraumes
    int width  = 1000;
    int height = 1000;
    int x, y = 0;
    // Konfigurationsraum initialisieren ( Dynamische Größe )
    // gleiche wie cpace[height][width]
    BYTE **cspace = new BYTE*[width];
    for ( x=0; xm_OpModel;
    ColCache.Model1 = &box2->m_OpModel;
    // Collision query
    bool IsOk = TC.Collide( ColCache, &box1->m_Matrix, &box2->m_Matrix );
    // Get collision status => if true, objects overlap
    bool Status = TC.GetContactStatus() != FALSE;
    return Status;
}
/*
 *  SaveAsBitmap
 *  Speichert den Konfigurationsraum als Bitmap.
 *  Parameter:
 *  szFile  -   Dateiname
 *  array   -   Das 2D Array mit dem Konfigurationsraum
 *  width   -   Breite des Konfigurationsraum
 *  height  -   Höhe des Konfigrationsraum
 */
bool SaveAsBitmap( char *szFile, BYTE **array, int width, int height )
{
    BITMAPFILEHEADER bmpFileHeader;
    bmpFileHeader.bfType = *((int*)("BM"));     // Muss BM sein
    bmpFileHeader.bfSize = 0;           // Größe der Bitmap Datei
    bmpFileHeader.bfReserved1 = 0;      // Muss 0 sein
    bmpFileHeader.bfReserved2 = 0;      // Muss 0 sein
    bmpFileHeader.bfOffBits = 0;        // Offset, in Bytes, zwischen BITMAPFILEHEADE und den Bits
    BITMAPINFOHEADER bmpInfoHeader;
    bmpInfoHeader.biSize = sizeof( BITMAPINFOHEADER );
    bmpInfoHeader.biWidth = width;
    bmpInfoHeader.biHeight = height;
    bmpInfoHeader.biPlanes = 1;
    bmpInfoHeader.biBitCount = 8;
    bmpInfoHeader.biCompression = BI_RGB;
    bmpInfoHeader.biSizeImage = width * height * 1;
    bmpInfoHeader.biXPelsPerMeter = 2834;
    bmpInfoHeader.biYPelsPerMeter = 2834;
    bmpInfoHeader.biClrUsed = 256;
    bmpInfoHeader.biClrImportant = 256;
    FILE *pFile = fopen( szFile, "wb" );
    if ( pFile == NULL )
    {
        printf( "Konnte Datei '%s' nicht erzeugen.\n", szFile );
        return false;
    }
    fwrite( &bmpFileHeader, sizeof( BITMAPFILEHEADER ), 1, pFile );
    fwrite( &bmpInfoHeader, sizeof( BITMAPINFOHEADER ), 1, pFile );
    // Farbpalette zum Bild hinzufügen
    static RGBQUAD colortable[] =
    {
        // B    G    R   0
        { 255, 255, 255, 0},
        {   0,   0, 255, 0},    // Rot
        {   0, 255,   0, 0},    // Grün
        { 255,   0,   0, 0},    // Blau
        {   0, 255, 255, 0},    // Gelb
        { 255,   0, 255, 0},    // Magenta
        { 255, 255,   0, 0},    // Cyan
        {   0, 128, 255, 0},    // Oragne
        { 255,   0, 128, 0},    // Weinrot
        { 128, 255,   0, 0},    // Hell Grün
        {   0, 255, 128, 0}     // Gift Grün
        // Wenn die Farben nicht reichen, hier neue hinzufügen
    };
    int nCol = sizeof(colortable) / sizeof(RGBQUAD);
    fwrite( colortable, sizeof(RGBQUAD), sizeof(colortable), pFile );
    // Alle restlichen Farben auf Schwarz setzen
    for ( int i=nCol; i<256; i++ )
    {
        RGBQUAD  rgb;
        rgb.rgbRed   = 0;
        rgb.rgbGreen = 0;
        rgb.rgbBlue  = 0;
        rgb.rgbReserved = 0;
        fwrite( &rgb, sizeof( RGBQUAD), 1, pFile );
    }
    // Bits schreiben
    bmpFileHeader.bfOffBits = ftell( pFile );
    for ( int y=height-1; y>=0; y-- )
    {
        for ( int x=0; x
A PHP Error was encountered
Severity: 8192
Message:  strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
Filename: database/DB_driver.php
Line Number: 1876