Skip to content

Commit

Permalink
Merge pull request #2063 from hawkthorne/master
Browse files Browse the repository at this point in the history
RELEASE Journey to the Center of Hawkthorne v0.7.0
  • Loading branch information
edisonout committed Mar 28, 2014
2 parents d046ce3 + 3180e19 commit 0705576
Show file tree
Hide file tree
Showing 94 changed files with 1,243 additions and 410 deletions.
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,16 @@ bin/tmx2lua:

bin/love.app/Contents/MacOS/love:
mkdir -p bin
$(wget) https://bitbucket.org/rude/love/downloads/love-0.8.0-macosx-ub.zip
unzip -q love-0.8.0-macosx-ub.zip
rm -f love-0.8.0-macosx-ub.zip
$(wget) https://bitbucket.org/rude/love/downloads/love-0.9.0-macosx-x64.zip
unzip -q love-0.9.0-macosx-x64.zip
rm -f love-0.9.0-macosx-x64.zip
mv love.app bin
cp osx/Info.plist bin/love.app/Contents

/usr/bin/love:
wget https://bitbucket.org/rude/love/downloads/love_0.8.0-0precise1_amd64.deb
-sudo dpkg -i love_0.8.0-0precise1_amd64.deb
sudo add-apt-repository -y ppa:bartbes/love-stable
sudo apt-get update -y
sudo apt-get install -f -y
sudo apt-get install -y love

######################################################
# THE REST OF THESE TARGETS ARE FOR RELEASE AUTOMATION
Expand Down Expand Up @@ -138,7 +137,7 @@ contributors: venv
venv/bin/python scripts/clean.py > CONTRIBUTORS
venv/bin/python scripts/credits.py > src/credits.lua

test: $(LOVE)
test: $(LOVE) maps
$(LOVE) src --test

validate: venv lint
Expand Down
29 changes: 15 additions & 14 deletions make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ if($check -eq $false){
}

$webclient = New-Object System.Net.WebClient
$lovedir = "bin\love-0.8.0-win-x86\"
$check = Test-Path "bin\love-0.8.0-win-x86\love.exe"
$lovedir = "bin\love-0.9.0-win32\"
$check = Test-Path "bin\love-0.9.0-win32\love.exe"

#add love to the path if necessary
$foundlove = $env:Path.Contains($lovedir)
Expand All @@ -26,19 +26,20 @@ if($foundlove -eq $false){
}

if($check -eq $false){
$filename = "bin\love-0.8.0-win-x86.zip"

$filename = (Get-Location).Path + "\bin\love-0.9.0-win32.zip"

$check = Test-Path $filename

if($check -eq $false){
Write-Host "Downloading love2d..."
$url = "https://bitbucket.org/rude/love/downloads/love-0.8.0-win-x86.zip"
if($check -eq $false){
Write-Host "Downloading love2d..."
$url = "https://bitbucket.org/rude/love/downloads/love-0.9.0-win32.zip"
$webclient.DownloadFile($url,$filename)
}

$shell_app=new-object -com shell.application
$zip_file = $shell_app.namespace((Get-Location).Path + "\$filename")
$destination = $shell_app.namespace((Get-Location).Path + "\bin")
$zip_file = $shell_app.namespace($filename)
$destination = $shell_app.namespace((Get-Location).Path + "\bin\")
$destination.Copyhere($zip_file.items())
}

Expand All @@ -47,18 +48,18 @@ $check = Test-Path $tmx

if($check -eq $false){

$filename = "bin\tmx2lua.windows32.zip"
$filename = (Get-Location).Path + "\bin\tmx2lua.windows32.zip"

$check = Test-Path $filename

if($check -eq $false){
Write-Host "Downloading tmx2lua..."
Write-Host "Downloading tmx2lua..."
$url = "http://hawkthorne.github.com/tmx2lua/downloads/tmx2lua.windows32.zip"
$webclient.DownloadFile($url,$filename)
}

$shell_app=new-object -com shell.application
$zip_file = $shell_app.namespace((Get-Location).Path + "\$filename")
$zip_file = $shell_app.namespace($filename)
$destination = $shell_app.namespace((Get-Location).Path + "\bin")
$destination.Copyhere($zip_file.items())
}
Expand All @@ -81,5 +82,5 @@ foreach($fileName in $fileEntries)

if($args[0] -eq "run"){
Write-Host "Running Journey to the center of Hawkthorne..."
.\bin\love-0.8.0-win-x86\love.exe src
.\bin\love-0.9.0-win32\love.exe src
}
8 changes: 4 additions & 4 deletions src/blackjackgame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ function state:draw()
)

--dealer stack
love.graphics.drawq( self.cardSprite, self.cardback, self.dealer_stack_x, self.dealer_stack_y )
love.graphics.draw( self.cardSprite, self.cardback, self.dealer_stack_x, self.dealer_stack_y )

if self.dealerHand[1] then
for i,n in pairs( self.dealerHand[1].cards ) do
Expand Down Expand Up @@ -698,7 +698,7 @@ function state:draw()
-- draw full stacks first
for s = 1, math.floor( count / 5 ), 1 do
for i = 0, 4, 1 do
love.graphics.drawq( self.chipSprite, self.chips[ color ], self.chip_x + cx - i, self.chip_y + cy - i )
love.graphics.draw( self.chipSprite, self.chips[ color ], self.chip_x + cx - i, self.chip_y + cy - i )
end
-- change the coords
if s % 2 == 0 then --even
Expand All @@ -709,7 +709,7 @@ function state:draw()
end
end
for i = 0, count % 5 - 1, 1 do
love.graphics.drawq( self.chipSprite, self.chips[ color ], self.chip_x + cx - i, self.chip_y + cy - i )
love.graphics.draw( self.chipSprite, self.chips[ color ], self.chip_x + cx - i, self.chip_y + cy - i )
end

-- shift the drawpoint left for the next stack
Expand Down Expand Up @@ -829,7 +829,7 @@ function state:drawCard( card, suit, flip, x, y, overlay )
end

love.graphics.setColor( darkness, darkness, darkness )
love.graphics.drawq(
love.graphics.draw(
self.cardSprite, _card, -- image, quad
x + utils.map( flip, 50, limit, w / 2, 0 ), -- offset for flip
utils.map( flip, 50, limit, y - ( ( sh - h ) / 2 ), y ), -- height offset
Expand Down
2 changes: 1 addition & 1 deletion src/brewing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function state:draw()
local firstcell_right = menu_right + 30
local firstcell_top = menu_top + 9

love.graphics.drawq(selectionSprite,
love.graphics.draw(selectionSprite,
love.graphics.newQuad(0,0,selectionSprite:getWidth(),selectionSprite:getHeight(),selectionSprite:getWidth(),selectionSprite:getHeight()),
firstcell_right, firstcell_top + ((self.selected-1) * 22))

Expand Down
2 changes: 1 addition & 1 deletion src/character.lua
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ end
function module.characters()
local list = {}

for _, filename in pairs(love.filesystem.enumerate('characters')) do
for _, filename in pairs(love.filesystem.getDirectoryItems('characters')) do
local name, _ = filename:gsub(".json", "")
table.insert(list, name)
end
Expand Down
1 change: 1 addition & 0 deletions src/characters/abed.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
{ "category": "s3e16", "name": "Pierce Roleplay", "sheet": "pierce", "ow": 17 },
{ "category": "s1e13", "name": "Radar", "sheet": "radar", "ow": 39 },
{ "category": "s3e21", "name": "Rod the Plumber", "sheet": "plumber", "ow": 27 },
{ "category": "s2e21", "name": "St Patrick's Day", "sheet": "patrick", "ow": 43 },
{ "category": "s3e5", "name": "Troy and Abed Sewn Together", "sheet": "sewn", "ow": 18 },
{ "category": "s3e16", "name": "Troy Roleplay", "sheet": "troy", "ow": 25 },
{ "category": "s2e6", "name": "Zombie", "sheet": "zombie", "ow": 19 }
Expand Down
1 change: 1 addition & 0 deletions src/characters/dean.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
{"category": "s2e12", "name": "Bumblebee", "sheet": "bee", "ow": 8},
{"category": "s3e22", "name": "Construction", "sheet": "construction", "ow": 7},
{"category": "s3e5", "name": "Devil Dean", "sheet": "devil", "ow": 2},
{"category": "s4e8", "name": "Donna Reed", "sheet": "donna", "ow": 10},
{"category": "s4e5", "name": "How-Dean Partners!", "sheet": "cowboy", "ow": 5},
{"category": "s2e21", "name": "Mardi Gras", "sheet": "mardigras","ow": 3},
{"category": "s3e1", "name": "New Dean", "sheet": "newdean","ow": 6},
Expand Down
2 changes: 1 addition & 1 deletion src/cheat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ local function setCheat(cheatName, turnOn)
'yellow_potion'}},
}
local activations = {
give_money = function() player.money = player.money + 500 end,
give_money = function() player.money = player.money + 10000 end,
max_health = function() player.health = player.max_health end,
give_gcc_key = function()
local gamesave = app.gamesaves:active()
Expand Down
8 changes: 4 additions & 4 deletions src/conf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ function love.conf(t)
t.title = "Journey to the Center of Hawkthorne v0.0.0"
t.url = "http://projecthawkthorne.com"
t.author = "https://github.com/hawkthorne?tab=members"
t.version = "0.8.0"
t.version = "0.9.0"
t.identity = "hawkthorne"
t.screen.width = 1056
t.screen.height = 672
t.screen.fullscreen = false
t.window.width = 1056
t.window.height = 672
t.window.fullscreen = false
t.console = false
t.modules.physics = false
t.modules.joystick = false
Expand Down
9 changes: 6 additions & 3 deletions src/costumeselect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ function state:init()

-- page will happily display up to 5*self.rowLength
-- maximum value for self.rowLength is 12 (i.e. display 60 costumes)
self.rowLength = 10
--Currently self.rowLength = 10 for main characters
-- and 11 for insufficient friends

self.side = 0 -- 0 for left, 1 for right
self.level = 0 -- 0 through 3 for characters
Expand Down Expand Up @@ -172,8 +173,10 @@ function state:characterKeypressed(button)
self.count = 1
sound.playSfx('confirm')
if self.level == 3 and self.side == 1 then
self.rowLength = 11
self:switchInsufficientPage()
else
self.rowLength = 10
self:switchCostumePage()
end
end
Expand Down Expand Up @@ -335,9 +338,9 @@ function state:drawCharacter(name, x, y, offset)
end

if offset then
love.graphics.drawq(image, char.mask, x, y, 0, -1, 1)
love.graphics.draw(image, char.mask, x, y, 0, -1, 1)
else
love.graphics.drawq(image, char.mask, x, y)
love.graphics.draw(image, char.mask, x, y)
end
end

Expand Down
4 changes: 3 additions & 1 deletion src/credits.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@ state.credits = {
'cptbooyah',
'creedogv',
'creekee',
'curtis81',
'cyberpie118',
'cynical_redditor',
'dakkjaniels',
'dakkjaniels',
'dancingshadow',
'daniwa',
'dano1163',
Expand Down Expand Up @@ -235,6 +236,7 @@ state.credits = {
'maathewdavis',
'majestic_moose',
'malarchymike',
'marbly',
'mario3d',
'masonnixon',
'matthewdelacruz15',
Expand Down
2 changes: 1 addition & 1 deletion src/flyin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function flyin:drawCharacter(flyer, x, y, r, sx, sy, ox, oy)

local mask = self.masks[key]

love.graphics.drawq(image, mask, x, y, r, sx, sy, ox, oy)
love.graphics.draw(image, mask, x, y, r, sx, sy, ox, oy)
end


Expand Down
2 changes: 1 addition & 1 deletion src/frying.lua
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function state:draw()
local firstcell_right = menu_right + 30
local firstcell_top = menu_top + 9

love.graphics.drawq(selectionSprite,
love.graphics.draw(selectionSprite,
love.graphics.newQuad(0,0,selectionSprite:getWidth(),selectionSprite:getHeight(),selectionSprite:getWidth(),selectionSprite:getHeight()),
firstcell_right, firstcell_top + ((self.selected-1) * 22))

Expand Down
4 changes: 2 additions & 2 deletions src/hawk/application.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ end
function Application:errhand(msg)
msg = tostring(msg)

if not love.graphics or not love.event or not love.graphics.isCreated() then
if not love.graphics or not love.event or not love.window.isCreated() then
return
end

Expand Down Expand Up @@ -85,7 +85,7 @@ end
function Application:releaseerrhand(msg)
print("An error has occurred, the game has been stopped.")

if not love.graphics or not love.event or not love.graphics.isCreated() then
if not love.graphics or not love.event or not love.window.isCreated() then
return
end

Expand Down
2 changes: 1 addition & 1 deletion src/hawk/i18n.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ end
function i18n:getLocales()
local langs = {}
-- will return a list of available language files
for i,p in pairs(love.filesystem.enumerate(self.path)) do
for i,p in pairs(love.filesystem.getDirectoryItems(self.path)) do
local name = p:gsub('.json', '')
table.insert(langs, name)
end
Expand Down
2 changes: 1 addition & 1 deletion src/hawk/sparkle/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function Updater:start()
end

if not self.thread then
self.thread = love.thread.newThread("sparkle", "hawk/sparkle/thread.lua")
self.thread = love.thread.newThread("hawk/sparkle/thread.lua")
self.thread:start()
self.thread:set('version', self.version)
self.thread:set('url', self.url)
Expand Down
2 changes: 1 addition & 1 deletion src/hawk/sparkle/windows.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function windows.removeRecursive(path)
return love.filesystem.remove(path)
end

for k, file in ipairs(love.filesystem.enumerate(path)) do
for k, file in ipairs(love.filesystem.getDirectoryItems(path)) do
local subpath = path .. "/" .. file

if love.filesystem.isDirectory(subpath) then
Expand Down
2 changes: 1 addition & 1 deletion src/hud.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function HUD:draw( player )
local position = {x = self.x + 22, y = self.y + 22}
currentWeapon:draw(position, nil,false)
else
love.graphics.drawq(self.sheet, self.character_quad, self.x + 7, self.y + 17)
love.graphics.draw(self.sheet, self.character_quad, self.x + 7, self.y + 17)
end
love.graphics.setStencil()
love.graphics.draw(lens, self.x, self.y)
Expand Down
Binary file modified src/images/characters/abed/overworld.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/characters/abed/patrick.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/characters/dean/donna.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/characters/dean/overworld.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/characters/shirley/zippy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/hiddendoor/castle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/hiddendoor/pedestal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/keys/bluetower.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/keys/throneroom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/keys/tower.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/keys/white_crystal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/materials/keyshardbottom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/materials/keyshardtop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/images/sprites/castle/castle-pedestal.png
Binary file not shown.
Binary file added src/images/sprites/castle/hawkthornesign.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/sprites/castle/lavacolumn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/sprites/castle/lavamouth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/tilesets/castle-hawkthorne-entrance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/tilesets/greendale-hallways.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/inventory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ function Inventory:draw( playerPosition )

--Draw the white border around the currently selected slot
if self.cursorPos.x < 2 then --If the cursor is in the main inventory section, draw this way
love.graphics.drawq(selectionSprite,
love.graphics.draw(selectionSprite,
love.graphics.newQuad(0,0,selectionSprite:getWidth(),selectionSprite:getHeight(),selectionSprite:getWidth(),selectionSprite:getHeight()),
(ffPos.x-17) + self.cursorPos.x * 38, ffPos.y + self.cursorPos.y * 18)
else --Otherwise, we're in the crafting annex, so draw this way.
love.graphics.drawq(selectionCraftingSprite,
love.graphics.draw(selectionCraftingSprite,
love.graphics.newQuad(0,0,selectionCraftingSprite:getWidth(), selectionCraftingSprite:getHeight(), selectionCraftingSprite:getWidth(), selectionCraftingSprite:getHeight()),
ffPos.x + (self.cursorPos.x - 3) * 19 + 101, ffPos.y + 18)
end
Expand Down Expand Up @@ -267,7 +267,7 @@ function Inventory:draw( playerPosition )
local lowestVisibleIndex = (self.scrollbar - 1 )* 2 + 1
local weaponPosition = self.selectedWeaponIndex - lowestVisibleIndex
if self.selectedWeaponIndex >= lowestVisibleIndex and self.selectedWeaponIndex < lowestVisibleIndex + 8 then
love.graphics.drawq(curWeaponSelect,
love.graphics.draw(curWeaponSelect,
love.graphics.newQuad(0,0, curWeaponSelect:getWidth(), curWeaponSelect:getHeight(), curWeaponSelect:getWidth(), curWeaponSelect:getHeight()),
self:slotPosition(weaponPosition).x + ffPos.x - 2, self:slotPosition(weaponPosition).y + ffPos.y - 2)
end
Expand All @@ -277,7 +277,7 @@ function Inventory:draw( playerPosition )
local index = self.selectedWeaponIndex - self.pageLength
local scrollPosition = index - lowestVisibleIndex
if index >= lowestVisibleIndex and index < lowestVisibleIndex + 8 then
love.graphics.drawq(curWeaponSelect,
love.graphics.draw(curWeaponSelect,
love.graphics.newQuad(0,0, curWeaponSelect:getWidth(), curWeaponSelect:getHeight(), curWeaponSelect:getWidth(), curWeaponSelect:getHeight()),
self:slotPosition(scrollPosition).x + ffPos.x - 2, self:slotPosition(scrollPosition).y + ffPos.y - 2)
end
Expand Down
2 changes: 1 addition & 1 deletion src/items/item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ end
-- @param position the location in the inventory
-- @return nil
function Item:draw(position, scrollIndex, hideAmount)
love.graphics.drawq(self.image, self.image_q, position.x, position.y)
love.graphics.draw(self.image, self.image_q, position.x, position.y)
if not hideAmount then
love.graphics.print("x" .. self.quantity, position.x + 4, position.y + 10,0, 0.5, 0.5)
end
Expand Down
9 changes: 9 additions & 0 deletions src/items/keys/bluetower.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
return{
name = "bluetower",
description = "Blue Tower",
type = "key",
subtype = "key",
MAX_ITEMS = 5,
quantity = 1,
directory = 'keys/'
}
9 changes: 9 additions & 0 deletions src/items/keys/throneroom.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
return{
name = "throneroom",
description = "Throne Room",
type = "key",
subtype = "key",
MAX_ITEMS = 5,
quantity = 1,
directory = 'keys/'
}
9 changes: 9 additions & 0 deletions src/items/keys/tower.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
return{
name = "tower",
description = "Tower",
type = "key",
subtype = "key",
MAX_ITEMS = 5,
quantity = 1,
directory = 'keys/'
}
5 changes: 5 additions & 0 deletions src/items/materials/keyshardbottom.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
return{
name = 'keyshardbottom',
type = 'material',
MAX_ITEMS = 1,
}
Loading

0 comments on commit 0705576

Please sign in to comment.