Check-in [34d6277973]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Very basic tilemap init (all zeros).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:34d6277973823f64ca802ac53eed0d37465ee97f
User & Date: stephanie.gawroriski 2019-07-01 20:36:43
Context
2019-07-02
07:02
Backup developer notes. check-in: fb66201f08 user: squirreljme tags: trunk
2019-07-01
20:36
Very basic tilemap init (all zeros). check-in: 34d6277973 user: stephanie.gawroriski tags: trunk
20:27
Add base initialization of the tilemap. check-in: f00c1a685e user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to runt/mids/squirrel-quarrel/dev/shadowtail/squirrelquarrel/Game.java.

38
39
40
41
42
43
44
45
46
47
48
49
		// Initialize RNG
		Random random;
		this.random = (random = new Random(__seed));
		
		// Initialize random map
		TileMap tilemap;
		this.tilemap = (tilemap = new TileMap(random, __mapsize, __numpl));
		
		throw new todo.TODO();
	}
}








<
<



38
39
40
41
42
43
44


45
46
47
		// Initialize RNG
		Random random;
		this.random = (random = new Random(__seed));
		
		// Initialize random map
		TileMap tilemap;
		this.tilemap = (tilemap = new TileMap(random, __mapsize, __numpl));


	}
}

Changes to runt/mids/squirrel-quarrel/dev/shadowtail/squirrelquarrel/TileMap.java.

27
28
29
30
31
32
33



34
35
36
37
38
39
40
..
51
52
53
54
55
56
57
58

59
60
61
62
63


64
65
66
	
	/** The width of the map in tiles. */
	public final int tilewidth;
	
	/** The height of the map in tiles. */
	public final int tileheight;
	



	/**
	 * Initializes the tile map.
	 *
	 * @param __rand The random level generator.
	 * @param __size The map size to use.
	 * @param __numpl The number of players to make room for.
	 * @throws IllegalArgumentException If the player count is zero or
................................................................................
		// {@squirreljme.error BE0r Negative or zero players, there must be
		// at least one player. (The player count)}
		if (__numpl < 1)
			throw new IllegalArgumentException("BE0r " + __numpl);
		
		// Get and store size of the level
		int tilewidth = __size.width,
			tileheight = __size.height;

		this.size = __size;
		this.tilewidth = tilewidth;
		this.tileheight = tileheight;
		
		throw new todo.TODO();


	}
}








>
>
>







 







|
>




|
>
>



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
..
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
	
	/** The width of the map in tiles. */
	public final int tilewidth;
	
	/** The height of the map in tiles. */
	public final int tileheight;
	
	/** The internal tile data. */
	final byte[] _tiles;
	
	/**
	 * Initializes the tile map.
	 *
	 * @param __rand The random level generator.
	 * @param __size The map size to use.
	 * @param __numpl The number of players to make room for.
	 * @throws IllegalArgumentException If the player count is zero or
................................................................................
		// {@squirreljme.error BE0r Negative or zero players, there must be
		// at least one player. (The player count)}
		if (__numpl < 1)
			throw new IllegalArgumentException("BE0r " + __numpl);
		
		// Get and store size of the level
		int tilewidth = __size.width,
			tileheight = __size.height,
			tiledens = tilewidth * tileheight;
		this.size = __size;
		this.tilewidth = tilewidth;
		this.tileheight = tileheight;
		
		// Initialize data areas
		byte[] tiles = new byte[tiledens];
		this._tiles = tiles;
	}
}