Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Athokshay Ashok
VHDL-Maze
Commits
7ff47871
Commit
7ff47871
authored
Apr 24, 2019
by
ktsiam
Browse files
fixed 1 bug
parent
b05c7b5f
Changes
5
Show whitespace changes
Inline
Side-by-side
a.out
deleted
100755 → 0
View file @
b05c7b5f
File deleted
a.out.dSYM/Contents/Info.plist
deleted
100644 → 0
View file @
b05c7b5f
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
CFBundleDevelopmentRegion
</key>
<string>
English
</string>
<key>
CFBundleIdentifier
</key>
<string>
com.apple.xcode.dsym.a.out
</string>
<key>
CFBundleInfoDictionaryVersion
</key>
<string>
6.0
</string>
<key>
CFBundlePackageType
</key>
<string>
dSYM
</string>
<key>
CFBundleSignature
</key>
<string>
????
</string>
<key>
CFBundleShortVersionString
</key>
<string>
1.0
</string>
<key>
CFBundleVersion
</key>
<string>
1
</string>
</dict>
</plist>
a.out.dSYM/Contents/Resources/DWARF/a.out
deleted
100644 → 0
View file @
b05c7b5f
File deleted
brick-breaker.cpp
View file @
7ff47871
...
...
@@ -32,7 +32,6 @@ struct State {
}
State
()
{
reset
();
}
#define MAX(x,y) x < y ? y : x; // y if x < y
void
update
(
int
input
)
{
// -1 => LEFT, 1 => RIGHT, 0 => WAIT
// player move
...
...
@@ -46,7 +45,7 @@ struct State {
ball_p
[
1
]
+=
ball_v
[
1
];
// horizontal collision
if
(
ball_p
[
0
]
<
0
or
ball_p
[
0
]
>
WIDTH
)
if
(
ball_p
[
0
]
<
=
0
or
ball_p
[
0
]
>
=
WIDTH
)
ball_v
[
0
]
=
-
ball_v
[
0
];
// top collision
...
...
@@ -60,6 +59,7 @@ struct State {
ball_v
[
1
]
=
-
ball_v
[
1
];
else
{
reset
();
// game over
assert
(
false
&&
"END"
);
return
;
}
}
...
...
@@ -73,7 +73,7 @@ struct State {
x_interval
[
0
]
=
(
i
%
BRICK_COLS
)
*
BRICK_SIZE
;
x_interval
[
1
]
=
x_interval
[
0
]
+
BRICK_SIZE
;
y_interval
[
0
]
=
(
i
/
BRICK_COLS
)
*
BRICK_SIZE
+
BRICK_MIN_HEIGHT
;
y_interval
[
0
]
=
(
i
/
BRICK_COLS
)
*
BRICK_SIZE
;
//
+ BRICK_MIN_HEIGHT;
y_interval
[
1
]
=
y_interval
[
0
]
+
BRICK_SIZE
;
if
(
ball_p
[
0
]
<
x_interval
[
0
]
or
...
...
@@ -81,7 +81,6 @@ struct State {
ball_p
[
1
]
<
y_interval
[
0
]
or
ball_p
[
1
]
>
y_interval
[
1
])
continue
;
// no collision
else
{
bricks
[
i
]
=
false
;
...
...
run.sh
0 → 100755
View file @
7ff47871
#!/bin/bash
clang++
-std
=
c++14 brick-breaker.cpp
./a.out
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment