diff --git a/SDL#4/err.log b/SDL#4/err.log index 635b770..3d134be 100644 --- a/SDL#4/err.log +++ b/SDL#4/err.log @@ -1,3 +1,5 @@ +WINDOW CREATED +RENDERER CREATED INDEX: bottom-left0 AT 0 (-32,576) -> (32, 32) INDEX: bottom-left1 AT 1 @@ -118,67 +120,842 @@ INDEX: bottom-center28 AT 58 (640,640) -> (32, 32) INDEX: bottom-center29 AT 59 (672,640) -> (32, 32) -INDEX: float-center0 AT 60 - (160,64) -> (32, 32) -INDEX: float-center1 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 +INDEX: green-sheel AT 60 + (163,553) -> (25, 22) +INDEX: brick1 AT 61 (128,448) -> (32, 32) -INDEX: mystery-bloc AT 86 +INDEX: mystery-bloc AT 62 (160,448) -> (32, 32) -INDEX: brick2 AT 87 +INDEX: brick2 AT 63 (192,448) -> (32, 32) -INDEX: mystery-bloc2 AT 88 +INDEX: mystery-bloc2 AT 64 (480,448) -> (32, 32) -INDEX: mystery-bloc3 AT 89 +INDEX: mystery-bloc3 AT 65 (544,480) -> (32, 32) -INDEX: mystery-bloc4 AT 90 +INDEX: mystery-bloc4 AT 66 (608,512) -> (32, 32) -INDEX: mario AT 91 +INDEX: mario AT 67 (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 diff --git a/SDL#4/exe b/SDL#4/exe index b36a31f..666143d 100755 Binary files a/SDL#4/exe and b/SDL#4/exe differ diff --git a/SDL#4/main.cpp b/SDL#4/main.cpp index 90d5eca..346b5e4 100644 --- a/SDL#4/main.cpp +++ b/SDL#4/main.cpp @@ -127,23 +127,23 @@ int main(int argc, char* argv[]) { - if( mgr->hit("brick1", 0, 1) ) mbr1.jump(); - else mbr1.unjump(); - if( mgr->hit("brick2", 0, 1) ) mbr2.jump(); - else mbr2.unjump(); + // if( mgr->hit("brick1", 0, 1) )mbr1.jump(); + mbr1.unjump(); + // if( mgr->hit("brick2", 0, 1) ) mbr2.jump(); + mbr2.unjump(); - if( mgr->hit("mystery-bloc", 0, 1) ) mb.jump(); - else mb.unjump(); + // if( mgr->hit("mystery-bloc", 0, 1) )mb.jump(); + mb.unjump(); - if( mgr->hit("mystery-bloc2", 0, 1) ) mb1.jump(); - else mb1.unjump(); + // if( mgr->hit("mystery-bloc2", 0, 1) )mb1.jump(); + mb1.unjump(); - if( mgr->hit("mystery-bloc3", 0, 1) ) mb2.jump(); - else mb2.unjump(); + // if( mgr->hit("mystery-bloc3", 0, 1) )mb2.jump(); + mb2.unjump(); - if( mgr->hit("mystery-bloc4", 0, 1) ) mb3.jump(); - else mb3.unjump(); + // if( mgr->hit("mystery-bloc4", 0, 1) ) mb3.jump(); + mb3.unjump(); mgr->manageFps(); // Gestion des FPS (speed) mgr->update(); // Mise a jour du rendu diff --git a/SDL#4/main.o b/SDL#4/main.o index 2f353ac..c93d08e 100644 Binary files a/SDL#4/main.o and b/SDL#4/main.o differ diff --git a/SDL#4/todo.md b/SDL#4/todo.md index f456be3..8136d78 100644 --- a/SDL#4/todo.md +++ b/SDL#4/todo.md @@ -1,15 +1,17 @@ A FAIRE ======= +- [ ] Erreur accrochage quand saut sur un coin - [ ] Verifier toute la trajectoire pour move() - [x][ ] Gestion du saut unique ou double (limitation) EN COURS ======== -- [ ] Liberation memoire car lag - [...] Gestion sprites de mario en fonction mouvement 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] Optimisation/Correction des collisions (hit + move) - [x] Erreur de hit() (gravity) diff --git a/SDL#4/xMario/BreakableBloc/xMarioBrick.cpp b/SDL#4/xMario/BreakableBloc/xMarioBrick.cpp index f64fc1c..b26dff0 100644 --- a/SDL#4/xMario/BreakableBloc/xMarioBrick.cpp +++ b/SDL#4/xMario/BreakableBloc/xMarioBrick.cpp @@ -34,6 +34,7 @@ void xMarioBrick::jump(){ if( !this->active() ) return; + if( _defaultrect.y == _dst.y && SDL_GetTicks()-_lastjump > 100 ){ this->move(0, -2); @@ -92,6 +93,6 @@ void xMarioBrick::active(bool active){ =========================================================*/ void xMarioBrick::onCollide(vector from, xSprite* by){ /* (1) Saut de mario */ - if( by->getType() == "Mario" && from[1] == 1 ) - cout << "JUMP JUMP" << endl; + if( by->getType() == "Mario" && from[1] == -1 ) + this->jump(); } \ No newline at end of file diff --git a/SDL#4/xMario/BreakableBloc/xMarioMysteryBloc.cpp b/SDL#4/xMario/BreakableBloc/xMarioMysteryBloc.cpp index abff631..c43ca6c 100644 --- a/SDL#4/xMario/BreakableBloc/xMarioMysteryBloc.cpp +++ b/SDL#4/xMario/BreakableBloc/xMarioMysteryBloc.cpp @@ -31,6 +31,7 @@ void xMarioMysteryBloc::jump(){ if( !this->active() ) return; + if( _defaultrect.y == _dst.y && SDL_GetTicks()-_lastjump > 100 ){ this->move(0, -5); @@ -42,6 +43,7 @@ void xMarioMysteryBloc::jump(){ if( _jumps >= _nb_jumps ) this->active(false); } + } @@ -112,6 +114,6 @@ void xMarioMysteryBloc::active(bool active){ =========================================================*/ void xMarioMysteryBloc::onCollide(vector from, xSprite* by){ /* (1) Saut de mario */ - if( by->getType() == "Mario" && from[1] == 1 ) - cout << "JUMP JUMP" << endl; + if( by->getType() == "Mario" && from[1] == -1 ) + this->jump(); } \ No newline at end of file diff --git a/SDL#4/xMario/BreakableBloc/xMarioMysteryBloc.h b/SDL#4/xMario/BreakableBloc/xMarioMysteryBloc.h index 0283e65..9fb6a63 100644 --- a/SDL#4/xMario/BreakableBloc/xMarioMysteryBloc.h +++ b/SDL#4/xMario/BreakableBloc/xMarioMysteryBloc.h @@ -25,7 +25,6 @@ int _nb_jumps; // nombre de coups avant de casser - }; #endif \ No newline at end of file diff --git a/SDL#4/xMario/xMarioMario.cpp b/SDL#4/xMario/xMarioMario.cpp index 9dd1dd1..60984b5 100644 --- a/SDL#4/xMario/xMarioMario.cpp +++ b/SDL#4/xMario/xMarioMario.cpp @@ -93,6 +93,8 @@ void xMarioMario::moveFromVelocity(){ // TROUBLE if( !this->onFloor() ) _velocity[1] += _gravity; + + cout << "ON FLOOR: " << this->onFloor() << endl; // TROUBLE // TROUBLE // TROUBLE diff --git a/SDL#4/xSDL/xManager.cpp b/SDL#4/xSDL/xManager.cpp index 6d196d2..b26d55c 100644 --- a/SDL#4/xSDL/xManager.cpp +++ b/SDL#4/xSDL/xManager.cpp @@ -109,7 +109,7 @@ bool xManager::setImage(const char *url){ =========================================================*/ // bool xManager::hit(SDL_Texture *current, int movex, int movey){ // // Anti conflit inter-thread -// _mutex_hit.lock(); +// _mutex_hit.try_lock(); // /* (1) On recupere le SDL_Rect destination du sprite courant */ @@ -205,10 +205,10 @@ bool xManager::collide(SDL_Rect a, SDL_Rect b){ bool xManager::hit(xSprite* current, int movex, int movey){ 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 */ int xIndex = -1; for( int i = 0 ; i < _sprites.size() ; i++ ) @@ -264,10 +264,6 @@ bool xManager::hit(xSprite* current, int movex, int movey){ current->onCollide(collideTo, _sprites[i]); _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(); return true; @@ -290,7 +286,7 @@ bool xManager::hit(xSprite* current, int movex, int movey){ bool xManager::hit(string current, int movex, int movey){ if( !this->status() ) return true; - _mutex_hit.lock(); + _mutex_hit.try_lock(); /* (1) On recupere le SDL_Rect destination du sprite courant */ xSprite *sprite = NULL; @@ -331,7 +327,7 @@ void xManager::push(string index, xSprite* sprite){ if( !this->status() ) return; // On bloque l'acces inter-thread - _mutex_push.lock(); + _mutex_push.try_lock(); _indexes.push_back( index ); _sprites.push_back( sprite ); @@ -347,7 +343,7 @@ void xManager::pull(string index){ if( !this->status() ) return; // On bloque l'acces inter-thread - _mutex_pull.lock(); + _mutex_pull.try_lock(); // On cherche l'indice de la texture int xIndex = -1; @@ -374,7 +370,7 @@ void xManager::pull(xSprite* sprite){ if( !this->status() ) return; // On bloque l'acces inter-thread - _mutex_pull.lock(); + _mutex_pull.try_lock(); // On cherche l'indice de la texture int xIndex = -1; @@ -432,7 +428,7 @@ void xManager::update(){ // cout << "Update MAIN SPRITE +" << _sprites.size() << " added sprites.." << endl; // On bloque l'acces inter-thread - _mutex_update.lock(); + _mutex_update.try_lock(); /* (1) On efface le rendu */ SDL_RenderClear(_renderer); diff --git a/SDL#4/xSDL/xSprite.cpp b/SDL#4/xSDL/xSprite.cpp index dc96641..8d4b6b8 100644 --- a/SDL#4/xSDL/xSprite.cpp +++ b/SDL#4/xSDL/xSprite.cpp @@ -171,7 +171,7 @@ vector xSprite::move(SDL_Rect newpos){ // vector xSprite::move(int x, int y){ // Protection inter-thread - _mutex_move.lock(); + _mutex_move.try_lock(); vector result; @@ -211,6 +211,7 @@ vector xSprite::move(int x, int y){ } + /* (4) Sinon, on decremente les deplacements 'alternativement' */ if( moveFasterOnX ){ // Si on a plus de mouvement horizontal if( signofx != 0 && incrx != 0 ) // si la vel. sur x n'est pas nulle @@ -234,8 +235,7 @@ vector xSprite::move(int x, int y){ // } } - // retour - + // retour _mutex_move.unlock(); return result; }