- [x] Gestion des briques cassables quand collision

This commit is contained in:
xdrm-brackets 2016-03-16 13:56:52 +01:00
parent a3c7418bb1
commit 2ff038998b
11 changed files with 870 additions and 91 deletions

View File

@ -1,3 +1,5 @@
WINDOW CREATED
RENDERER CREATED
INDEX: bottom-left0 AT 0 INDEX: bottom-left0 AT 0
(-32,576) -> (32, 32) (-32,576) -> (32, 32)
INDEX: bottom-left1 AT 1 INDEX: bottom-left1 AT 1
@ -118,67 +120,842 @@ INDEX: bottom-center28 AT 58
(640,640) -> (32, 32) (640,640) -> (32, 32)
INDEX: bottom-center29 AT 59 INDEX: bottom-center29 AT 59
(672,640) -> (32, 32) (672,640) -> (32, 32)
INDEX: float-center0 AT 60 INDEX: green-sheel AT 60
(160,64) -> (32, 32) (163,553) -> (25, 22)
INDEX: float-center1 AT 61 INDEX: brick1 AT 61
(192,64) -> (32, 32)
INDEX: float-center2 AT 62
(224,64) -> (32, 32)
INDEX: float-center3 AT 63
(256,64) -> (32, 32)
INDEX: float-center4 AT 64
(288,64) -> (32, 32)
INDEX: float-center5 AT 65
(160,96) -> (32, 32)
INDEX: float-center6 AT 66
(192,96) -> (32, 32)
INDEX: float-center7 AT 67
(224,96) -> (32, 32)
INDEX: float-center8 AT 68
(256,96) -> (32, 32)
INDEX: float-center9 AT 69
(288,96) -> (32, 32)
INDEX: float-center10 AT 70
(160,128) -> (32, 32)
INDEX: float-center11 AT 71
(192,128) -> (32, 32)
INDEX: float-center12 AT 72
(224,128) -> (32, 32)
INDEX: float-center13 AT 73
(256,128) -> (32, 32)
INDEX: float-center14 AT 74
(288,128) -> (32, 32)
INDEX: float-center15 AT 75
(160,160) -> (32, 32)
INDEX: float-center16 AT 76
(192,160) -> (32, 32)
INDEX: float-center17 AT 77
(224,160) -> (32, 32)
INDEX: float-center18 AT 78
(256,160) -> (32, 32)
INDEX: float-center19 AT 79
(288,160) -> (32, 32)
INDEX: float-center20 AT 80
(160,192) -> (32, 32)
INDEX: float-center21 AT 81
(192,192) -> (32, 32)
INDEX: float-center22 AT 82
(224,192) -> (32, 32)
INDEX: float-center23 AT 83
(256,192) -> (32, 32)
INDEX: float-center24 AT 84
(288,192) -> (32, 32)
INDEX: brick1 AT 85
(128,448) -> (32, 32) (128,448) -> (32, 32)
INDEX: mystery-bloc AT 86 INDEX: mystery-bloc AT 62
(160,448) -> (32, 32) (160,448) -> (32, 32)
INDEX: brick2 AT 87 INDEX: brick2 AT 63
(192,448) -> (32, 32) (192,448) -> (32, 32)
INDEX: mystery-bloc2 AT 88 INDEX: mystery-bloc2 AT 64
(480,448) -> (32, 32) (480,448) -> (32, 32)
INDEX: mystery-bloc3 AT 89 INDEX: mystery-bloc3 AT 65
(544,480) -> (32, 32) (544,480) -> (32, 32)
INDEX: mystery-bloc4 AT 90 INDEX: mystery-bloc4 AT 66
(608,512) -> (32, 32) (608,512) -> (32, 32)
INDEX: mario AT 91 INDEX: mario AT 67
(547,544) -> (25, 32) (547,544) -> (25, 32)
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from left
bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from right
bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
green-shell collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom
Grass collided with Mario from bottom

BIN
SDL#4/exe

Binary file not shown.

View File

@ -127,23 +127,23 @@ int main(int argc, char* argv[]) {
if( mgr->hit("brick1", 0, 1) ) mbr1.jump(); // if( mgr->hit("brick1", 0, 1) )mbr1.jump();
else mbr1.unjump(); mbr1.unjump();
if( mgr->hit("brick2", 0, 1) ) mbr2.jump(); // if( mgr->hit("brick2", 0, 1) ) mbr2.jump();
else mbr2.unjump(); mbr2.unjump();
if( mgr->hit("mystery-bloc", 0, 1) ) mb.jump(); // if( mgr->hit("mystery-bloc", 0, 1) )mb.jump();
else mb.unjump(); mb.unjump();
if( mgr->hit("mystery-bloc2", 0, 1) ) mb1.jump(); // if( mgr->hit("mystery-bloc2", 0, 1) )mb1.jump();
else mb1.unjump(); mb1.unjump();
if( mgr->hit("mystery-bloc3", 0, 1) ) mb2.jump(); // if( mgr->hit("mystery-bloc3", 0, 1) )mb2.jump();
else mb2.unjump(); mb2.unjump();
if( mgr->hit("mystery-bloc4", 0, 1) ) mb3.jump(); // if( mgr->hit("mystery-bloc4", 0, 1) ) mb3.jump();
else mb3.unjump(); mb3.unjump();
mgr->manageFps(); // Gestion des FPS (speed) mgr->manageFps(); // Gestion des FPS (speed)
mgr->update(); // Mise a jour du rendu mgr->update(); // Mise a jour du rendu

Binary file not shown.

View File

@ -1,15 +1,17 @@
A FAIRE A FAIRE
======= =======
- [ ] Erreur accrochage quand saut sur un coin
- [ ] Verifier toute la trajectoire pour move() - [ ] Verifier toute la trajectoire pour move()
- [x][ ] Gestion du saut unique ou double (limitation) - [x][ ] Gestion du saut unique ou double (limitation)
EN COURS EN COURS
======== ========
- [ ] Liberation memoire car lag
- [...] Gestion sprites de mario en fonction mouvement - [...] Gestion sprites de mario en fonction mouvement
FAIT FAIT
==== ====
- [x] Gestion des briques cassables quand collision
- [?] Liberation memoire car lag
- [x] Gestion du nombre de saut avant de casser Brick ou MysteryBloc - [x] Gestion du nombre de saut avant de casser Brick ou MysteryBloc
- [x] Optimisation/Correction des collisions (hit + move) - [x] Optimisation/Correction des collisions (hit + move)
- [x] Erreur de hit() (gravity) - [x] Erreur de hit() (gravity)

View File

@ -34,6 +34,7 @@ void xMarioBrick::jump(){
if( !this->active() ) if( !this->active() )
return; return;
if( _defaultrect.y == _dst.y && SDL_GetTicks()-_lastjump > 100 ){ if( _defaultrect.y == _dst.y && SDL_GetTicks()-_lastjump > 100 ){
this->move(0, -2); this->move(0, -2);
@ -92,6 +93,6 @@ void xMarioBrick::active(bool active){
=========================================================*/ =========================================================*/
void xMarioBrick::onCollide(vector<int> from, xSprite* by){ void xMarioBrick::onCollide(vector<int> from, xSprite* by){
/* (1) Saut de mario */ /* (1) Saut de mario */
if( by->getType() == "Mario" && from[1] == 1 ) if( by->getType() == "Mario" && from[1] == -1 )
cout << "JUMP JUMP" << endl; this->jump();
} }

View File

@ -31,6 +31,7 @@ void xMarioMysteryBloc::jump(){
if( !this->active() ) if( !this->active() )
return; return;
if( _defaultrect.y == _dst.y && SDL_GetTicks()-_lastjump > 100 ){ if( _defaultrect.y == _dst.y && SDL_GetTicks()-_lastjump > 100 ){
this->move(0, -5); this->move(0, -5);
@ -42,6 +43,7 @@ void xMarioMysteryBloc::jump(){
if( _jumps >= _nb_jumps ) if( _jumps >= _nb_jumps )
this->active(false); this->active(false);
} }
} }
@ -112,6 +114,6 @@ void xMarioMysteryBloc::active(bool active){
=========================================================*/ =========================================================*/
void xMarioMysteryBloc::onCollide(vector<int> from, xSprite* by){ void xMarioMysteryBloc::onCollide(vector<int> from, xSprite* by){
/* (1) Saut de mario */ /* (1) Saut de mario */
if( by->getType() == "Mario" && from[1] == 1 ) if( by->getType() == "Mario" && from[1] == -1 )
cout << "JUMP JUMP" << endl; this->jump();
} }

View File

@ -25,7 +25,6 @@
int _nb_jumps; // nombre de coups avant de casser int _nb_jumps; // nombre de coups avant de casser
}; };
#endif #endif

View File

@ -93,6 +93,8 @@ void xMarioMario::moveFromVelocity(){
// TROUBLE // TROUBLE
if( !this->onFloor() ) if( !this->onFloor() )
_velocity[1] += _gravity; _velocity[1] += _gravity;
cout << "ON FLOOR: " << this->onFloor() << endl;
// TROUBLE // TROUBLE
// TROUBLE // TROUBLE
// TROUBLE // TROUBLE

View File

@ -109,7 +109,7 @@ bool xManager::setImage(const char *url){
=========================================================*/ =========================================================*/
// bool xManager::hit(SDL_Texture *current, int movex, int movey){ // bool xManager::hit(SDL_Texture *current, int movex, int movey){
// // Anti conflit inter-thread // // Anti conflit inter-thread
// _mutex_hit.lock(); // _mutex_hit.try_lock();
// /* (1) On recupere le SDL_Rect destination du sprite courant */ // /* (1) On recupere le SDL_Rect destination du sprite courant */
@ -205,9 +205,9 @@ bool xManager::collide(SDL_Rect a, SDL_Rect b){
bool xManager::hit(xSprite* current, int movex, int movey){ bool xManager::hit(xSprite* current, int movex, int movey){
if( !this->status() ) return true; if( !this->status() ) return true;
// Anti conflit inter-thread
_mutex_hit.lock();
// Anti conflit inter-thread
_mutex_hit.try_lock();
/* (1) On recupere le SDL_Rect destination du sprite courant */ /* (1) On recupere le SDL_Rect destination du sprite courant */
int xIndex = -1; int xIndex = -1;
@ -264,10 +264,6 @@ bool xManager::hit(xSprite* current, int movex, int movey){
current->onCollide(collideTo, _sprites[i]); current->onCollide(collideTo, _sprites[i]);
_debug = *(_sprites[i])->dst(); _debug = *(_sprites[i])->dst();
// _debug = (SDL_Rect){547-1, 531-1, 2, 2};
// if( i != 35 )
// cerr << "COLLISION with" << _indexes[i] << " with under " << (*(_sprites[i])->dst()).y+(*(_sprites[i])->dst()).h-a.y << endl;
_mutex_hit.unlock(); _mutex_hit.unlock();
return true; return true;
@ -290,7 +286,7 @@ bool xManager::hit(xSprite* current, int movex, int movey){
bool xManager::hit(string current, int movex, int movey){ bool xManager::hit(string current, int movex, int movey){
if( !this->status() ) return true; if( !this->status() ) return true;
_mutex_hit.lock(); _mutex_hit.try_lock();
/* (1) On recupere le SDL_Rect destination du sprite courant */ /* (1) On recupere le SDL_Rect destination du sprite courant */
xSprite *sprite = NULL; xSprite *sprite = NULL;
@ -331,7 +327,7 @@ void xManager::push(string index, xSprite* sprite){
if( !this->status() ) return; if( !this->status() ) return;
// On bloque l'acces inter-thread // On bloque l'acces inter-thread
_mutex_push.lock(); _mutex_push.try_lock();
_indexes.push_back( index ); _indexes.push_back( index );
_sprites.push_back( sprite ); _sprites.push_back( sprite );
@ -347,7 +343,7 @@ void xManager::pull(string index){
if( !this->status() ) return; if( !this->status() ) return;
// On bloque l'acces inter-thread // On bloque l'acces inter-thread
_mutex_pull.lock(); _mutex_pull.try_lock();
// On cherche l'indice de la texture // On cherche l'indice de la texture
int xIndex = -1; int xIndex = -1;
@ -374,7 +370,7 @@ void xManager::pull(xSprite* sprite){
if( !this->status() ) return; if( !this->status() ) return;
// On bloque l'acces inter-thread // On bloque l'acces inter-thread
_mutex_pull.lock(); _mutex_pull.try_lock();
// On cherche l'indice de la texture // On cherche l'indice de la texture
int xIndex = -1; int xIndex = -1;
@ -432,7 +428,7 @@ void xManager::update(){
// cout << "Update MAIN SPRITE +" << _sprites.size() << " added sprites.." << endl; // cout << "Update MAIN SPRITE +" << _sprites.size() << " added sprites.." << endl;
// On bloque l'acces inter-thread // On bloque l'acces inter-thread
_mutex_update.lock(); _mutex_update.try_lock();
/* (1) On efface le rendu */ /* (1) On efface le rendu */
SDL_RenderClear(_renderer); SDL_RenderClear(_renderer);

View File

@ -171,7 +171,7 @@ vector<int> xSprite::move(SDL_Rect newpos){
// //
vector<int> xSprite::move(int x, int y){ vector<int> xSprite::move(int x, int y){
// Protection inter-thread // Protection inter-thread
_mutex_move.lock(); _mutex_move.try_lock();
vector<int> result; vector<int> result;
@ -211,6 +211,7 @@ vector<int> xSprite::move(int x, int y){
} }
/* (4) Sinon, on decremente les deplacements 'alternativement' */ /* (4) Sinon, on decremente les deplacements 'alternativement' */
if( moveFasterOnX ){ // Si on a plus de mouvement horizontal if( moveFasterOnX ){ // Si on a plus de mouvement horizontal
if( signofx != 0 && incrx != 0 ) // si la vel. sur x n'est pas nulle if( signofx != 0 && incrx != 0 ) // si la vel. sur x n'est pas nulle
@ -235,7 +236,6 @@ vector<int> xSprite::move(int x, int y){
} }
// retour // retour
_mutex_move.unlock(); _mutex_move.unlock();
return result; return result;
} }