Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make the package split build, now with parallel make.

  • Loading branch information...
commit e0951774435d9ab62849c0112e338c3c8a64a90a 1 parent ce06890
@clanehin authored
View
21 Makefile
@@ -29,15 +29,33 @@ clean:
(cd roguestar && cabal clean ${OPTS})
rm -rf roguestar-sdist
-install:
+install: roguestar roguestar-gtk roguestar-glut roguestar-engine rsagl-demos
+
+rsagl-math:
(cd rsagl-math && cabal install --reinstall ${OPTS})
+
+rsagl-frp: rsagl-math
(cd rsagl-frp && cabal install --reinstall ${OPTS})
+
+rsagl: rsagl-frp rsagl-math
(cd rsagl && cabal install --reinstall ${OPTS})
+
+rsagl-demos: rsagl
(cd rsagl-demos && cabal install --reinstall ${OPTS})
+
+roguestar-engine:
(cd roguestar-engine && cabal install --reinstall ${OPTS})
+
+roguestar-gl: rsagl
(cd roguestar-gl && cabal install --reinstall ${OPTS})
+
+roguestar-glut: roguestar-gl
(cd roguestar-glut && cabal install --reinstall ${OPTS})
+
+roguestar-gtk: roguestar-gl
(cd roguestar-gtk && cabal install --reinstall ${OPTS})
+
+roguestar:
(cd roguestar && cabal install --reinstall ${OPTS})
dev:
@@ -86,3 +104,4 @@ sdist:
(cd roguestar-sdist/roguestar-${VERSION} && cabal configure && cabal install)
ls roguestar-sdist
+.PHONY: rsagl-math rsagl-frp rsagl rsagl-demos roguestar-engine roguestar-gl roguestar-glut roguestar-gtk roguestar
View
4 roguestar-engine/src/Activate.hs
@@ -37,11 +37,11 @@ resolveActivation creature_ref =
executeActivation :: ActivationOutcome -> DB ()
executeActivation (NoEffect) = return ()
-executeActivation (Heal creature_ref x) =
+executeActivation (Heal creature_ref x) =
do healCreature x creature_ref
dbPushSnapshot $ HealEvent creature_ref
executeActivation (ExpendTool tool_ref activation_outcome) =
do executeActivation activation_outcome
dbPushSnapshot $ ExpendToolEvent tool_ref
deleteTool tool_ref
-
+
View
1  roguestar-gl/roguestar-gl.cabal
@@ -37,6 +37,7 @@ Library
AnimationExtras, AnimationCreatures, AnimationBuildings, MaybeArrow,
EventUtils, Sky, Paths_roguestar_gl
build-depends: base>=4&&<5,
+ GLUT>=2.2 && < 2.3,
rsagl==0.5,
rsagl-math==0.5,
rsagl-frp==0.5,
View
15 roguestar-gl/src/Actions.hs
@@ -27,9 +27,6 @@ import Quality
import Data.Char
import qualified Data.ByteString.Char8 as B
--- |
--- Input to an action.
---
data ActionInput = ActionInput {
action_globals :: Globals,
action_driver_object :: DriverObject,
@@ -60,7 +57,7 @@ isGo _ = False
----------------------------------------------------------}
actionValid :: ActionInput -> Action -> STM ActionValidity
-actionValid action_input action =
+actionValid action_input action =
do result <- runErrorT $ action action_input
return $ either Hold (const Go) result
@@ -90,7 +87,7 @@ executeContinueAction action_input =
-- or the action will not be allowed to execute.
--
-- For example: selectTableAction ("people","0","name") "select-person-to-call-state" "call-with-telephone" "carl"
---
+--
-- \> game query state
-- answer: state select-person-to-call-state
-- \> game query people
@@ -101,14 +98,14 @@ executeContinueAction action_input =
-- bob
-- end-table
-- \> game action call-with-telephone Carl
---
+--
-- In this case the action executes because the state is actually select-person-to-call-state and Carl
-- is actually listed under the "name" header of the "people" table.
--
-- In practice this function is used for things like the race-selection-state and the class-selection-state
-- where we select from a predifined list of possible choices, but the engine further restricts the choices.
-- Each possible choice is it's own action that will only return action_valid if it is listed in the appropriate
--- table from the engine.
+-- table from the engine.
--
selectTableAction :: (B.ByteString,B.ByteString,B.ByteString) -> B.ByteString -> B.ByteString -> B.ByteString -> Action
selectTableAction (the_table_name,the_table_id,the_table_header) allowed_state action_name action_param = stateGuard [allowed_state] $
@@ -131,7 +128,7 @@ stateGuard allowed_states actionM action_input =
-- The action name is passed directly to the engine.
--
stateLinkedAction :: [B.ByteString] -> B.ByteString -> (B.ByteString,Action)
-stateLinkedAction allowed_state action_name =
+stateLinkedAction allowed_state action_name =
(action_name,
stateGuard allowed_state $ \action_input ->
return $ driverAction (action_driver_object action_input) [action_name])
@@ -182,7 +179,7 @@ select_menu_action = stateLinkedAction selectable_menu_states "select-menu"
normal_action :: (B.ByteString,Action)
normal_action = ("normal",
- stateGuard (menu_states ++ player_turn_states) $ \action_input ->
+ stateGuard (menu_states ++ player_turn_states) $ \action_input ->
return $ driverAction (action_driver_object action_input) ["normal"])
move_action :: (B.ByteString,Action)
View
7 roguestar-gl/src/DrawString.hs
@@ -2,17 +2,13 @@
module DrawString
(DrawString(..),
stderrDrawString,
-#ifdef __ROGUESTAR_SUPPORTS_GLUT__
glutDrawString
-#endif
)
where
import System.IO
-#ifdef __ROGUESTAR_SUPPORTS_GLUT__
import qualified Graphics.UI.GLUT as GLUT
-#endif
data DrawString = DrawString {
draw_string_font_width :: Int,
@@ -27,12 +23,9 @@ stderrDrawString = DrawString {
draw_string_padding = 0,
drawString = hPutStrLn stderr }
-#ifdef __ROGUESTAR_SUPPORTS_GLUT__
glutDrawString :: DrawString
glutDrawString = DrawString {
draw_string_font_width = 9,
draw_string_font_height = 15,
draw_string_padding = 5,
drawString = GLUT.renderString GLUT.Fixed9By15 }
-#endif
-
View
5 roguestar-glut/Setup.hs
@@ -0,0 +1,5 @@
+#!/usr/bin/runhaskell
+
+import Distribution.Simple
+
+main = defaultMainWithHooks simpleUserHooks
View
5 roguestar-gtk/Setup.hs
@@ -0,0 +1,5 @@
+#!/usr/bin/runhaskell
+
+import Distribution.Simple
+
+main = defaultMainWithHooks simpleUserHooks
View
5 roguestar/Setup.hs
@@ -0,0 +1,5 @@
+#!/usr/bin/runhaskell
+
+import Distribution.Simple
+
+main = defaultMainWithHooks simpleUserHooks
Please sign in to comment.
Something went wrong with that request. Please try again.