Skip to content
Snippets Groups Projects
Commit 6ed70808 authored by unknown's avatar unknown
Browse files

getting mad... w1250 ???

parent d622f8c4
No related branches found
No related tags found
No related merge requests found
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "gcc.exe - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "C:\\Program Files (x86)\\CodeBlocks\\MinGW\\gdb32\\bin\\gdb32.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: gcc.exe build active file"
}
]
}
\ No newline at end of file
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "C/C++: gcc.exe build active file",
"command": "C:\\Program Files (x86)\\CodeBlocks\\MinGW\\bin\\gcc.exe",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
\ No newline at end of file
-=======T=========================
Hope it'll work
?
This is a box for snake
============
:D
random
obstacles
w-1250 char test
L=================================-
asdbkjghkijg
\ No newline at end of file
......@@ -6,7 +6,7 @@
//typedef unsigned long long int pointer; //Not optimal
int isUnicodeEncoding = 1;
int isUnicodeEncoding = 0;
typedef enum Direcion{
UP,
......@@ -218,7 +218,11 @@ void _print1char(Matrix *map){
while(scanf(" %d%d", &x, &y) == 2){
if(x >= 0 && y >= 0 && x < map->width && y < map->height){
for(int i = 0;i < 2; i++){
printf("\nvalue: %d, %d, %d, %d\n", map->matrix[x][y].chars[i].bytes.c[0], map->matrix[x][y].chars[i].bytes.c[1], map->matrix[x][y].chars[i].bytes.c[2], map->matrix[x][y].chars[i].bytes.c[3]);
printf("\nvalue: %hhx, %hhx, %hhx, %hhx\n",
(unsigned)map->matrix[x][y].chars[i].bytes.c[0],
(unsigned)map->matrix[x][y].chars[i].bytes.c[1],
(unsigned)map->matrix[x][y].chars[i].bytes.c[2],
(unsigned)map->matrix[x][y].chars[i].bytes.c[3]);
printf("as character: \"");
printChar(map->matrix[x][y].chars[i]);
printf("\"\n");
......@@ -250,7 +254,7 @@ int core(int argc, char const *argv[])
//test code
printf("map:\n");
_testprint(&map);
//_print1char(&map);
_print1char(&map);
/* code */
//free stuff
rmMatrix(&map);
......@@ -270,7 +274,7 @@ int main(int argc, char const *argv[])
{
2 + 3;
int ret;
char const *array[] = {argv[0], "snake/map1.txt"};
char const *array[] = {argv[0], "map1_e.txt"};
ret = core(2, array);
printf("\npress any key to continue");
getchar();
......
No preview for this file type
?
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment