1. Список говнокодов пользователя ShitCode

    Всего: 1

  2. C++ / Говнокод #5743

    +173

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    void DrawingLibrary::drawText(int x0, int y0, char string[], int strlen, int red, int green, int blue, int alpha) {
    	for(int i = 0; i < strlen; ++i) {
    		char chr = string[i];
    		int sX = x0 + i * 8;
    		// проходимся по символам, рисуя их
    		if(chr == '!') {
    			bool symbol[8][8] = {{0,0,0,0,0,1,0,0},{0,0,0,0,0,1,0,0},{0,0,0,0,0,1,0,0},{0,0,0,0,0,1,0,0},{0,0,0,0,0,1,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,1,0,0},{0,0,0,0,0,0,0,0}};
    			this->drawSymbol(sX, y0, symbol, red, green, blue, alpha);
    		}
    		else if(chr == '"') {
    			bool symbol[8][8] = {{0,0,0,0,1,0,1,0},{0,0,0,0,1,0,1,0},{0,0,0,0,1,0,1,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0}};
    			this->drawSymbol(sX, y0, symbol, red, green, blue, alpha);
    		}
    		else if(chr == '#') {
    			bool symbol[8][8] = {{0,0,0,0,1,0,1,0},{0,0,0,0,1,0,1,0},{0,0,0,1,1,1,1,1},{0,0,0,0,1,0,1,0},{0,0,0,1,1,1,1,1},{0,0,0,0,1,0,1,0},{0,0,0,0,1,0,1,0},{0,0,0,0,0,0,0,0}};
    			this->drawSymbol(sX, y0, symbol, red, green, blue, alpha);
    		}
    		/* еще 135 строк такого "кода" */
    		else if(chr == 'э') {
    			bool symbol[8][8] = {{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,1,1,1,0},{0,0,0,0,0,0,0,1},{0,0,0,0,0,1,1,1},{0,0,0,0,0,0,0,1},{0,0,0,0,1,1,1,0},{0,0,0,0,0,0,0,0}};
    			this->drawSymbol(sX, y0, symbol, red, green, blue, alpha);
    		}
    		else if(chr == 'ю') {
    			bool symbol[8][8] = {{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,1,0,0,1,0},{0,0,0,1,0,1,0,1},{0,0,0,1,1,1,0,1},{0,0,0,1,0,1,0,1},{0,0,0,1,0,0,1,0},{0,0,0,0,0,0,0,0}};
    			this->drawSymbol(sX, y0, symbol, red, green, blue, alpha);
    		}
    		else if(chr == 'я') {
    			bool symbol[8][8] = {{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,1,1,1},{0,0,0,0,1,0,0,1},{0,0,0,0,0,1,1,1},{0,0,0,0,0,1,0,1},{0,0,0,0,1,0,0,1},{0,0,0,0,0,0,0,0}};
    			this->drawSymbol(sX, y0, symbol, red, green, blue, alpha);
    		}
    	}
    }

    Функция, рисующая на картинке текст.

    ShitCode, 21 Февраля 2011

    Комментарии (26)