Changes in uspace/app/tetris/shapes.c [a405563:2aeec8ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tetris/shapes.c
ra405563 r2aeec8ef 1 /* $OpenBSD: shapes.c,v 1.8 2004/07/10 07:26:24 deraadt Exp $ */ 2 /* $NetBSD: shapes.c,v 1.2 1995/04/22 07:42:44 cgd Exp $ */ 1 /* 2 * Copyright (c) 2011 Martin Decky 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * - Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * - Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * - The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 3 28 4 /*- 29 /** Attributations 30 * 31 * shapes.c 8.1 (Berkeley) 5/31/93 32 * NetBSD: shapes.c,v 1.2 1995/04/22 07:42:44 cgd 33 * OpenBSD: shapes.c,v 1.8 2004/07/10 07:26:24 deraadt 34 * 35 * Based upon BSD Tetris 36 * 5 37 * Copyright (c) 1992, 1993 6 * The Regents of the University of California. All rights reserved. 38 * The Regents of the University of California. 39 * Distributed under BSD license. 7 40 * 8 41 * This code is derived from software contributed to Berkeley by 9 42 * Chris Torek and Darren F. Provine. 10 43 * 11 * Redistribution and use in source and binary forms, with or without12 * modification, are permitted provided that the following conditions13 * are met:14 * 1. Redistributions of source code must retain the above copyright15 * notice, this list of conditions and the following disclaimer.16 * 2. Redistributions in binary form must reproduce the above copyright17 * notice, this list of conditions and the following disclaimer in the18 * documentation and/or other materials provided with the distribution.19 * 3. Neither the name of the University nor the names of its contributors20 * may be used to endorse or promote products derived from this software21 * without specific prior written permission.22 *23 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF33 * SUCH DAMAGE.34 *35 * @(#)shapes.c 8.1 (Berkeley) 5/31/9336 44 */ 37 45 … … 61 69 62 70 const struct shape shapes[] = { 63 /* 0 */ { 7, 7, { TL, TC, MR }, 0x ff042d},64 /* 1 */ { 8, 8, { TC, TR, ML }, 0x ff9304},65 /* 2 */ { 9, 11, { ML, MR, BC }, 0x beff04},66 /* 3 */ { 3, 3, { TL, TC, ML }, 0x 63ff04},67 /* 4 */ { 12, 14, { ML, BL, MR }, 0x ce04ff},68 /* 5 */ { 15, 17, { ML, BR, MR }, 0xff 04cf},69 /* 6 */ { 18, 18, { ML, MR, 2 }, 0x 7604ff}, /* sticks out */70 /* 7 */ { 0, 0, { TC, ML, BL }, 0x ff042d},71 /* 8 */ { 1, 1, { TC, MR, BR }, 0x ff9304},72 /* 9 */ { 10, 2, { TC, MR, BC }, 0x beff04},73 /* 10 */ { 11, 9, { TC, ML, MR }, 0x beff04},74 /* 11 */ { 2, 10, { TC, ML, BC }, 0x beff04},75 /* 12 */ { 13, 4, { TC, BC, BR }, 0x ce04ff},76 /* 13 */ { 14, 12, { TR, ML, MR }, 0x ce04ff},77 /* 14 */ { 4, 13, { TL, TC, BC }, 0x ce04ff},78 /* 15 */ { 16, 5, { TR, TC, BC }, 0xff 04cf},79 /* 16 */ { 17, 15, { TL, MR, ML }, 0xff 04cf},80 /* 17 */ { 5, 16, { TC, BC, BL }, 0xff 04cf},81 /* 18 */ { 6, 6, { TC, BC, 2 * B_COLS }, 0x 7604ff} /* sticks out */71 /* 0 */ { 7, 7, { TL, TC, MR }, 0x00aaaa}, 72 /* 1 */ { 8, 8, { TC, TR, ML }, 0x00aa00}, 73 /* 2 */ { 9, 11, { ML, MR, BC }, 0xaa5500}, 74 /* 3 */ { 3, 3, { TL, TC, ML }, 0x0000aa}, 75 /* 4 */ { 12, 14, { ML, BL, MR }, 0xaa00aa}, 76 /* 5 */ { 15, 17, { ML, BR, MR }, 0xffa500}, 77 /* 6 */ { 18, 18, { ML, MR, 2 }, 0xaa0000}, /* sticks out */ 78 /* 7 */ { 0, 0, { TC, ML, BL }, 0x00aaaa}, 79 /* 8 */ { 1, 1, { TC, MR, BR }, 0x00aa00}, 80 /* 9 */ { 10, 2, { TC, MR, BC }, 0xaa5500}, 81 /* 10 */ { 11, 9, { TC, ML, MR }, 0xaa5500}, 82 /* 11 */ { 2, 10, { TC, ML, BC }, 0xaa5500}, 83 /* 12 */ { 13, 4, { TC, BC, BR }, 0xaa00aa}, 84 /* 13 */ { 14, 12, { TR, ML, MR }, 0xaa00aa}, 85 /* 14 */ { 4, 13, { TL, TC, BC }, 0xaa00aa}, 86 /* 15 */ { 16, 5, { TR, TC, BC }, 0xffa500}, 87 /* 16 */ { 17, 15, { TL, MR, ML }, 0xffa500}, 88 /* 17 */ { 5, 16, { TC, BC, BL }, 0xffa500}, 89 /* 18 */ { 6, 6, { TC, BC, 2 * B_COLS }, 0xaa0000} /* sticks out */ 82 90 }; 83 91
Note:
See TracChangeset
for help on using the changeset viewer.