Exemple #1
0
        private static int LoadDer(GamePicture.PicInfo parent, int x, int y, int w, int h)
        {
            int der_h;

            if (
                x < 0 || IntTools.IMAX < x ||
                y < 0 || IntTools.IMAX < y ||
                w < 1 || IntTools.IMAX - x < w ||
                h < 1 || IntTools.IMAX - y < h
                )
            {
                throw new GameError();
            }

            // ? 範囲外
            if (
                parent.W < x + w ||
                parent.H < y + h
                )
            {
                throw new GameError();
            }

            der_h = DX.DerivationGraph(x, y, w, h, parent.Handle);

            if (der_h == -1)             // ? 失敗
            {
                throw new GameError();
            }

            return(der_h);
        }
Exemple #2
0
 private static void UnloadPic(GamePicture.PicInfo handle)
 {
     handle.Dispose();
 }